@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--ink:#19362c;--green:#255740;--lime:#d7ee97;--muted:#78847c;--line:#e1e6de;--paper:#f7f8f3}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:14px 'DM Sans',sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #8dad4a;outline-offset:4px}button{color:inherit}h1,h2,p{margin:0}h1,h2,.score-numbers{font-family:Manrope,sans-serif}h2{font-size:17px;font-weight:800}p{line-height:1.6}.topbar{height:80px;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 max(24px,calc((100vw - 1180px)/2));gap:24px;background:#fff}.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);font-size:25px;font-weight:800;letter-spacing:-1.3px}.ball{font-size:32px}.brand-sub{border-left:1px solid #d2dacf;padding-left:16px;margin-left:10px;font-size:10px;letter-spacing:2px;font-weight:600}.save-status{margin-left:auto;font-size:12px;color:#718173}.save-status::first-letter{color:#5e8b41}.icon-button{border:1px solid var(--line);background:white;border-radius:50%;height:38px;width:38px;font-size:21px}main{max-width:1180px;margin:auto;padding:38px 24px 20px}.page-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:#7c8e64;margin-bottom:10px}h1{font-size:34px;letter-spacing:-1.4px;margin-bottom:8px}.page-heading p{color:var(--muted)}.outline{border:1px solid #ccd6c8;border-radius:8px;background:transparent;padding:11px 16px;font-weight:600;min-height:44px}.scoreboard{background:#193b2e;color:white;border-radius:17px;padding:21px 30px 0;position:relative;overflow:hidden;box-shadow:0 9px 25px #193b2e0c}.score-head{display:flex;justify-content:space-between;font-size:10px;letter-spacing:1.5px;color:#b5c8b8}.live{display:flex;align-items:center;gap:7px;color:#d7ee97}.live i{width:6px;height:6px;background:var(--lime);border-radius:50%}.score-grid{display:grid;grid-template-columns:1fr 1fr 1fr;text-align:center;align-items:center;padding:16px 0 20px}.team-mark{display:inline-grid;place-items:center;background:#d7ee97;color:#1e422d;border-radius:12px;height:42px;width:42px;font-weight:800;font-size:20px;margin-bottom:10px}.team-mark.away{background:#ffffff14;color:#e1e8dc;border:1px solid #ffffff20}.team-name{font-size:20px;word-break:break-word}.team-label{display:block;font-size:9px;letter-spacing:1.6px;color:#9eb5a5;margin-top:7px}.score-numbers{font-size:70px;line-height:1.2;font-weight:700;letter-spacing:-4px;font-variant-numeric:tabular-nums}.score-numbers b{font-size:35px;font-weight:400;color:#7c9989;margin:0 17px}.set-pill{display:inline-block;font-size:9px;letter-spacing:1.5px;background:#ffffff0d;border:1px solid #ffffff15;padding:5px 12px;border-radius:20px;margin-top:9px;color:#d1decf}.score-bottom{display:flex;align-items:center;justify-content:space-around;border-top:1px solid #ffffff19;padding:12px 0}.score-bottom button{border:0;background:transparent;color:#d9e7d7;padding:8px 15px;min-height:40px;border-radius:6px}.score-bottom button:hover{background:#ffffff15}.score-bottom>span{font-size:11px;color:#a3baaa}.set-history{display:flex;gap:16px;justify-content:center;font-size:11px;color:#c8d9c8}.set-history:not(:empty){padding:0 0 15px}.tabs{display:flex;gap:28px;border-bottom:1px solid var(--line);margin:25px 0 27px}.tabs button{border:0;background:none;color:#7d897d;padding:13px 0 16px;font-weight:600;min-height:48px;border-bottom:2px solid transparent}.tabs button[aria-selected=true]{color:var(--ink);border-color:var(--green)}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:35px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:16px}.section-title h2{display:flex;align-items:center;gap:9px;font-size:15px}.step{font-size:10px;border:1px solid #d7dfce;border-radius:50%;width:22px;height:22px;display:grid;place-items:center;color:#6e8265}.text-button{border:0;background:none;padding:8px 0;font-size:12px;color:#62775a;min-height:36px}.players{display:grid;grid-template-columns:repeat(6,1fr);gap:9px}.player{min-height:98px;padding:13px 4px;background:white;border:1px solid var(--line);border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.player strong{width:35px;height:35px;display:grid;place-items:center;border-radius:50%;background:#f1f3ec;font:700 17px Manrope,sans-serif}.player span{font-size:11px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player.selected{background:#eef3e3;border:1.5px solid #78975f;box-shadow:0 0 0 2px #dde8c955}.player.selected strong{background:#d8e9b6}.stat-heading{margin-top:26px}.muted{color:var(--muted);font-size:12px}.actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.action{border:1px solid var(--line);border-radius:10px;background:#fff;min-height:88px;padding:13px 15px;display:flex;align-items:center;text-align:left;gap:13px;transition:transform .1s,background .1s}.action:active{transform:scale(.96)}.action:hover{background:#f0f4e9}.action .symbol{font-size:22px;font-weight:400;color:#568446;width:25px;text-align:center}.action strong{display:block;font-size:14px}.action small{display:block;color:#8a9588;font-size:10px;margin-top:5px}.action.negative{background:#f3d9d7;border-color:#dca6a1}.action.negative .symbol{color:#aa514a}.action.negative:hover{background:#edceca}.action.negative .stat-count{background:#e9bfba;color:#8f443e}.capture-note{font-size:11px;color:#8c9786;margin:14px 0}.tiny{font-size:9px;letter-spacing:1px;color:#89967e}aside{border-left:1px solid var(--line);padding-left:26px}.snapshot{border:1px solid var(--line);border-radius:10px;background:#fff;padding:4px 16px}.snapshot-row{display:flex;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid #eef0e9;color:#6e7b6c;font-size:12px}.snapshot-row:last-child{border:0}.snapshot-row strong{font-size:20px;color:var(--ink);font-family:Manrope,sans-serif}.recent{margin-top:20px}.recent .section-title{margin-bottom:5px}.empty{font-size:12px;color:#91a087;padding:18px 0;line-height:1.6}.latest-play{border-left:2px solid #bad181;padding:8px 12px;font-size:12px}.latest-play span{display:block;margin-top:5px;color:#8c9982;font-size:10px}.court-note{display:flex;gap:12px;margin-top:24px;padding:17px 14px;background:#eef1e5;border-radius:10px}.court-note>span{font-size:25px;color:#728b57}.court-note strong{font-size:11px}.court-note p{font-size:11px;color:#839076;margin-top:5px}footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);margin-top:32px;padding-top:14px;color:#909a87;font-size:10px}footer b{padding:0 10px;font-weight:400}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px;text-align:right}th,td{padding:16px 13px;border-bottom:1px solid var(--line)}th{font-size:10px;letter-spacing:.5px;color:#7b886e}th:first-child,td:first-child{text-align:left}tbody{background:white}tfoot{font-weight:bold}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:10px;margin-top:20px}.log-row{display:flex;justify-content:space-between;gap:15px;padding:17px;background:white;border-bottom:1px solid var(--line);font-size:13px}.log-row small{color:#839078}.tab-panel[hidden]{display:none}dialog{border:1px solid var(--line);border-radius:18px;padding:26px;max-width:440px;width:calc(100% - 32px);color:var(--ink);box-shadow:0 20px 80px #10201730}dialog::backdrop{background:#102a2366;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}label{display:block;font-size:12px;font-weight:600;margin:15px 0}input,select,textarea{display:block;width:100%;border:1px solid #cfd8c7;border-radius:7px;padding:12px;margin-top:7px;background:#fafbf7;color:var(--ink);font-size:16px}textarea{resize:vertical}.primary{background:var(--green);color:white;border:0;border-radius:8px;padding:14px;width:100%;font-weight:600;margin-top:20px}.error{color:#a34032;font-size:12px}#toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);background:#18392e;color:white;padding:13px 22px;border-radius:10px;font-size:13px;opacity:0;transition:.2s;pointer-events:none;z-index:10;max-width:90vw;width:max-content}#toast.show{opacity:1;transform:translate(-50%,0)}
.player-profile{display:flex;align-items:center;gap:16px;background:#eef3e3;border:1px solid #dae4cd;border-radius:13px;padding:18px 22px;margin-bottom:18px}.profile-number{display:grid;place-items:center;flex-shrink:0;width:56px;height:56px;border-radius:50%;background:#d7e8b5;font:800 25px Manrope,sans-serif}.profile-details{min-width:0}.profile-details .eyebrow{display:block;margin-bottom:5px;font-size:9px}.profile-details h2{font-size:21px;overflow-wrap:anywhere}.profile-details p{font-size:11px;color:#7a896e;margin-top:4px}.player-profile>.text-button{margin-left:auto;flex-shrink:0}.player-fields{border:1px solid var(--line);border-radius:9px;padding:5px 15px;margin-bottom:22px}.player-fields legend{font-size:12px;font-weight:700;padding:0 6px}
@media(max-width:540px){.player-profile{padding:14px 12px;gap:11px}.profile-number{height:43px;width:43px;font-size:20px}.profile-details h2{font-size:17px}.profile-details .eyebrow{font-size:7px;letter-spacing:1px}.profile-details p{font-size:9px;max-width:160px}.player-profile>.text-button{font-size:10px}}
@media(min-width:1400px){main{padding-top:48px}.scoreboard{margin-bottom:32px}.score-grid{padding:24px 0}.actions .action{min-height:98px}}
@media(max-width:850px){.workspace{grid-template-columns:1fr;gap:24px}aside{border:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:0 22px}aside>.section-title{grid-column:1/-1}.recent{margin:0}.court-note{grid-column:1/-1;margin-top:14px}.snapshot-row{padding:10px 0}.players{grid-template-columns:repeat(6,1fr)}}
@media(max-width:540px){.topbar{height:65px;padding:0 18px;gap:10px}.brand{font-size:23px}.brand-sub{display:none}.save-status{font-size:9px}.icon-button{width:34px;height:34px}main{padding:26px 16px 18px}.page-heading{align-items:flex-start;gap:8px;margin-bottom:22px}h1{font-size:27px;letter-spacing:-1px}.eyebrow{font-size:8px;letter-spacing:1.5px}.page-heading p{font-size:12px;max-width:220px}.page-heading .outline{font-size:10px;padding:9px;white-space:nowrap;min-height:38px;margin-top:22px}.scoreboard{padding:17px 14px 0;border-radius:13px}.score-head{font-size:8px;letter-spacing:1px}.score-grid{grid-template-columns:1fr 1.1fr 1fr;padding:20px 0 16px}.team-mark{height:32px;width:32px;border-radius:9px;font-size:15px;margin-bottom:9px}.team-name{font-size:13px}.team-label{font-size:7px;letter-spacing:1px}.score-numbers{font-size:48px;letter-spacing:-2px}.score-numbers b{font-size:24px;margin:0 7px}.set-pill{font-size:8px;margin-top:10px}.score-bottom{padding:6px 0}.score-bottom button{font-size:11px;padding:8px 5px}.score-bottom>span{font-size:9px}.tabs{margin:16px 0 20px;gap:0;justify-content:space-between}.tabs button{font-size:12px;padding:13px 8px}.section-title h2{font-size:14px}.players{grid-template-columns:repeat(3,1fr);gap:8px}.player{min-height:78px;flex-direction:row;padding:12px 9px;gap:8px}.player strong{flex-shrink:0;width:29px;height:29px;font-size:14px}.player span{font-size:11px}.actions{gap:8px}.action{min-height:85px;flex-direction:column;justify-content:center;gap:6px;padding:10px 5px;text-align:center}.action .symbol{font-size:20px}.action strong{font-size:12px}.action small{font-size:8px;margin-top:3px}.stat-heading{margin-top:22px}#selectedLabel{font-size:10px}.capture-note{font-size:10px}aside{gap:0 15px}.court-note{display:none}.snapshot{padding:4px 12px}.snapshot-row{font-size:10px}.snapshot-row strong{font-size:17px}.latest-play{font-size:11px;padding:7px 9px}.recent .section-title{gap:4px}.recent h2{font-size:12px}.text-button{font-size:11px}footer{margin-top:24px}.log-row{font-size:11px}}

.pool-summary{display:flex;align-items:center;justify-content:space-between;margin:0 0 16px;padding:14px 17px;border:1px solid #d7ee9733;border-radius:10px;background:#d7ee9710}.pool-summary[hidden]{display:none}.pool-summary span{font-size:9px;letter-spacing:1.4px;color:#d7ee97}.pool-summary p{font-size:12px;color:#bdcfbd;margin-top:5px}.pool-summary strong{font:800 34px Manrope,sans-serif;color:#d7ee97;font-variant-numeric:tabular-nums}.pool-summary+ .set-history:not(:empty){padding-top:0}

.score-bottom>span{padding:0 8px;flex-shrink:0}.log-row{align-items:center}.log-description{display:flex;flex-direction:column;gap:7px;min-width:0;overflow-wrap:anywhere}.remove-play{border:1px solid #e8d8cb;color:#9b5d42;background:#fcf7f1;border-radius:7px;min-height:44px;min-width:68px;padding:10px;font-size:12px;flex-shrink:0}.remove-play:hover{background:#f4e6d9}.correction-help{margin:0 0 16px}

.action{position:relative}.stat-count{position:absolute;right:10px;top:8px;min-width:19px;text-align:center;font-size:11px;font-weight:700;color:#6c805c;background:#eff3e8;padding:2px 5px;border-radius:12px}.action,.team{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.holding{animation:hold-progress .6s linear forwards}@keyframes hold-progress{from{box-shadow:inset 0 0 0 1px #a3bb7255}to{box-shadow:inset 0 0 0 4px #9bb65d;background-color:#b7d38544}}@media(prefers-reduced-motion:reduce){.holding{animation:none;outline:2px solid #9bb65d}}

button.team{background:#ffffff05;border:1px solid #ffffff19;border-radius:12px;color:inherit;padding:14px 8px;min-width:0;min-height:120px;transition:background .15s}button.team:hover{background:#ffffff0d}button.team:active{background:#ffffff17}.team-name{display:block;font-family:Manrope,sans-serif;font-weight:800}.score-grid{gap:12px}.score-bottom{flex-direction:column;gap:6px;padding:12px 0}#scoreHint{font-size:10px;color:#9eb5a5}@media(max-width:540px){button.team{padding:11px 5px;min-height:105px}.score-grid{gap:6px}#scoreHint{font-size:9px}}

.finish-set-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:13px 24px;background:var(--green);color:#fff;border:1px solid var(--green);border-radius:9px;font-weight:700;font-size:14px;box-shadow:0 3px 8px #193b2e15}.finish-set-button:hover:not(:disabled){background:#193b2e}.finish-set-button:active:not(:disabled){transform:translateY(1px)}.finish-set-button:disabled{box-shadow:none}

.stats-overview{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-bottom:28px}.stats-overview .recent h2{font-size:14px;margin-bottom:12px}.pool-overview{margin-top:24px}.pool-stat-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.pool-stat-card{background:white;border:1px solid var(--line);border-radius:10px;padding:18px;display:flex;align-items:center;justify-content:space-between;gap:8px}.pool-stat-card span{font-size:12px;color:var(--muted)}.pool-stat-card strong{font:800 24px Manrope,sans-serif}@media(max-width:540px){.stats-overview{grid-template-columns:1fr;gap:22px}.pool-stat-card{flex-direction:column;padding:14px 8px}.pool-stat-card span{font-size:10px}.tabs button{font-size:12px;padding-left:4px;padding-right:4px}}

.pool-match-history{margin-top:28px}.pool-match-row{background:#fff;border:1px solid var(--line);border-radius:9px;padding:16px;display:flex;justify-content:space-between;align-items:center;margin-bottom:9px;gap:12px}.pool-match-row strong{font-size:12px}.pool-match-row span{display:block;font-size:11px;color:var(--muted);margin-top:6px}.pool-match-row b{font:800 23px Manrope,sans-serif}



.actions{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:540px){.actions{gap:6px}.action{padding:12px 4px;min-width:0}.action strong{font-size:11px;overflow-wrap:anywhere}.action small{font-size:8px}.stat-count{right:6px;top:5px;font-size:10px}}

.receive-heading{margin-top:24px}.receive-actions .symbol{font:800 22px Manrope,sans-serif}.receive-actions .action{min-height:92px}

.serving-actions{grid-template-columns:repeat(5,minmax(0,1fr))}.serving-actions .symbol{font:800 22px Manrope,sans-serif}.serving-actions .action{min-height:92px}@media(max-width:540px){.serving-actions .action strong{font-size:10px}.serving-actions .action small{font-size:7px}}

.match-details{display:block;width:100%;text-align:left;background:transparent;border:0;color:#64785b;padding:0 2px 16px;font-size:12px;line-height:1.6;min-height:38px;overflow-wrap:anywhere}.match-details:hover{text-decoration:underline}.match-fields{border:1px solid var(--line);border-radius:9px;padding:4px 14px;margin:18px 0}.match-fields legend{font-weight:700;font-size:12px;padding:0 6px}.date-time-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.date-time-fields label{min-width:0}.date-time-fields input{min-width:0}dialog{max-height:calc(100dvh - 40px);overflow-y:auto}

.actions:not(.serving-actions):not(.receive-actions){grid-template-columns:repeat(3,minmax(0,1fr))}

.serving-group{min-width:0;margin:24px 0 0;padding:16px;border:1px solid #ccd8bf;border-radius:13px;background:#eff3e7}.serving-group legend{padding:0 9px;font:800 15px Manrope,sans-serif;color:var(--ink)}@media(max-width:540px){.serving-group{padding:12px 8px}.serving-group legend{font-size:14px}}

/* Compact courtside layout: keep primary controls within a phone-height view. */
.topbar{height:52px;gap:14px;padding-left:max(16px,calc((100vw - 960px)/2));padding-right:max(16px,calc((100vw - 960px)/2))}
.topbar #newBtn{font-size:11px;min-height:36px;padding:7px 11px;white-space:nowrap}
main{max-width:960px;padding:12px 16px}.player-profile{padding:9px 14px;gap:11px;margin-bottom:4px}.profile-number{width:38px;height:38px;font-size:19px}.profile-details h2{font-size:17px}.profile-details .eyebrow,.profile-details p{display:none}.match-details{min-height:28px;padding:3px 2px 7px;font-size:11px}
.scoreboard{padding:10px 16px 0;border-radius:12px;margin-bottom:0}.score-grid{padding:7px 0;gap:10px}.score-head{font-size:8px}.team-mark,.team-label{display:none}button.team{min-height:54px;padding:8px;border-radius:9px}.team-name{font-size:14px}.score-numbers{font-size:43px;letter-spacing:-2px}.score-numbers b{font-size:25px;margin:0 10px}.set-pill{font-size:7px;padding:3px 8px;margin-top:2px}.score-bottom{flex-direction:row;justify-content:space-between;gap:8px;padding:5px 0}.score-bottom>span{font-size:9px;padding:0}#scoreHint{font-size:8px}.pool-summary{margin-bottom:7px;padding:5px 10px;border-radius:7px}.pool-summary span{font-size:8px;letter-spacing:.7px}.pool-summary p{font-size:9px;display:inline;margin:0 0 0 8px}.pool-summary strong{font-size:23px}.set-history{font-size:9px;gap:10px}.set-history:not(:empty){padding-bottom:7px}
.tabs{margin:8px 0 8px}.tabs button{min-height:36px;padding:8px 5px;font-size:12px}.section-title{margin-bottom:7px}.section-title h2{font-size:14px}#capture>.section-title{min-height:30px}.text-button{min-height:32px;padding:5px 0}.actions{gap:6px}.action{min-height:53px;padding:10px 12px;gap:8px;border-radius:8px}.action .symbol{font-size:18px}.action strong{font-size:12px}.action small{font-size:9px;margin-top:3px}.stat-count{right:6px;top:4px;font-size:10px;min-width:17px;padding:1px 4px}
.rating-groups{display:grid;grid-template-columns:1fr 1fr;gap:10px}.serving-group{margin:10px 0 0;padding:8px; border-radius:9px}.serving-group legend{font-size:12px;padding:0 6px}.serving-actions .action,.receive-actions .action{min-height:52px;padding:9px 4px;flex-direction:column;gap:3px}.serving-actions .action .symbol,.receive-actions .action .symbol{display:none}.serving-actions .action strong,.receive-actions .action strong{font-size:10px}.receive-actions .action small{display:none}.capture-note{margin:6px 0 0;font-size:10px}footer{margin-top:10px;padding-top:8px}.finish-set-button{min-height:42px;padding:9px 18px;font-size:13px}
@media(max-width:600px){.topbar{height:44px;padding:0 10px;gap:10px}.brand{font-size:21px}.brand .ball{font-size:25px}.save-status,.brand-sub{display:none}.topbar #newBtn{margin-left:auto;font-size:10px;min-height:32px;padding:6px 9px}.icon-button{height:32px;width:32px}main{padding:7px 10px}.player-profile{padding:5px 9px;min-height:40px}.profile-number{height:30px;width:30px;font-size:16px}.profile-details h2{font-size:15px}.player-profile>.text-button{font-size:10px}.match-details{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:24px;padding-bottom:5px}.scoreboard{padding:9px 10px 0}.score-head{font-size:7px;letter-spacing:.7px}.score-grid{grid-template-columns:1fr 1fr 1fr;gap:6px;padding:5px 0}button.team{min-height:51px;padding:6px 4px}.team-name{font-size:11px}.score-numbers{font-size:36px}.score-numbers b{font-size:21px;margin:0 6px}.score-bottom{padding:4px 0}.score-bottom>span,#scoreHint{font-size:8px}.pool-summary{padding:4px 8px;margin-bottom:5px}.pool-summary p{font-size:8px;display:block;margin:2px 0 0}.pool-summary span{font-size:7px}.pool-summary strong{font-size:20px}.tabs{margin:5px 0 5px;gap:12px}.tabs button{min-height:34px;padding:7px 2px;font-size:11px}.section-title h2{font-size:12px}#capture>.section-title{min-height:27px;margin-bottom:4px}.actions{gap:5px}.action{min-height:45px;padding:9px 5px 7px;justify-content:center;flex-direction:row;gap:0}.action .symbol{display:none}.action strong{font-size:11px;padding-right:6px;line-height:1.2}.action small{display:none}.stat-count{font-size:9px;right:3px;top:2px;padding:0 3px;min-width:14px}.rating-groups{grid-template-columns:1fr;gap:0}.serving-group{margin-top:7px;padding:6px}.serving-group legend{font-size:11px}.serving-actions .action,.receive-actions .action{min-height:44px;padding:10px 2px 5px}.serving-actions .action strong,.receive-actions .action strong{font-size:10px;padding-right:0}.capture-note{font-size:8px;margin-top:5px}footer{margin-top:7px;padding-top:6px;font-size:8px}.finish-set-button{min-height:40px;padding:8px 15px;font-size:12px}}

.help-button{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 9px;border:1px solid #ccd6c8;border-radius:8px;color:var(--ink);background:#fff;text-decoration:none;font-weight:600;font-size:11px;white-space:nowrap}@media(max-width:600px){.topbar{gap:8px}.help-button{min-height:32px;padding:5px 8px;font-size:10px}}

.match-details[hidden]{display:none}

.match-total-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:14px;align-items:start}.match-total-group{background:#fff;border:1px solid var(--line);border-radius:10px;padding:16px;min-width:0}.match-total-group h3{margin:0 0 12px;font-size:15px;color:var(--green)}.match-total-group dl{margin:0}.match-total-group dl>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #eef0e9}.match-total-group dl>div:last-child{border:0;padding-bottom:0}.match-total-group dt{font-size:13px;line-height:1.5;color:#64735d}.match-total-group dd{margin:0;font:700 18px Manrope,sans-serif;flex-shrink:0;font-variant-numeric:tabular-nums}@media(max-width:700px){.match-total-groups{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.match-total-group{padding:13px}.match-total-group dt{font-size:12px}}@media(max-width:420px){.match-total-groups{grid-template-columns:1fr}.match-total-group dt{font-size:14px}.match-total-group dd{font-size:20px}}

.match-summary-compact{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:10px 0 14px}.match-summary-compact>div{padding:9px 8px;background:#eef3e7;border:1px solid #dae4cd;border-radius:8px;text-align:center}.match-summary-compact span{display:block;font-size:10px;color:#6a7c5d;line-height:1.3}.match-summary-compact strong{display:block;font:800 19px Manrope,sans-serif;margin-top:4px}.match-totals-heading{margin-bottom:5px}.match-total-groups{gap:9px;margin-top:7px}.match-total-group{padding:11px}.match-total-group h3{font-size:13px;margin-bottom:6px}.match-total-group dl>div{padding:6px 0;gap:7px}.match-total-group dt{font-size:12px;line-height:1.3}.match-total-group dd{font-size:16px}@media(max-width:700px){.match-total-groups{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.match-total-group{padding:10px}.match-total-group dt{font-size:11px}.match-total-group dd{font-size:15px}.match-total-group[data-group="defense"]{grid-column:1/-1}.match-total-group[data-group="defense"] dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.match-total-group[data-group="defense"] dl>div{border:0;padding:3px 0}.match-summary-compact{margin:7px 0 10px}.match-summary-compact span{font-size:9px}.match-summary-compact strong{font-size:17px}}

.topbar .finish-set-button{min-height:36px;padding:7px 11px;font-size:11px;white-space:nowrap;box-shadow:none}@media(max-width:600px){.topbar{gap:5px;padding:0 8px}.topbar .finish-set-button{min-height:32px;padding:6px 8px;font-size:10px}.topbar #newBtn{padding:6px 7px}.topbar .help-button{padding:5px 6px}.topbar .brand{font-size:19px;gap:5px}.topbar .brand .ball{font-size:21px}}

.history-intro{margin-bottom:16px}.history-subheading{font-size:14px;margin:19px 0 10px}.history-item{border:1px solid var(--line);border-radius:10px;background:#fff;margin-bottom:10px;overflow:hidden}.history-item>summary{list-style:none;cursor:pointer;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:58px}.history-item>summary::-webkit-details-marker{display:none}.history-item>summary:after{content:"＋";color:#6a805e}.history-item[open]>summary:after{content:"−"}.history-item>summary>div{flex:1;min-width:0}.history-item summary strong{font-size:13px;overflow-wrap:anywhere}.history-item summary span{display:block;font-size:10px;color:var(--muted);line-height:1.6;margin-top:5px}.history-item summary b{font:800 20px Manrope,sans-serif;color:var(--green);white-space:nowrap}.history-content{border-top:1px solid var(--line);padding:12px}.history-player{font-size:13px;font-weight:700;margin-bottom:10px}.history-score-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.history-score-strip .snapshot-row{flex-direction:column;align-items:center;padding:8px;border:0;border-radius:7px;background:#eff3e7;gap:5px;text-align:center;font-size:10px}.history-score-strip strong{font-size:18px}.history-set-scores{font-size:11px;color:var(--muted);line-height:1.6;margin:12px 0}.history-content .match-total-groups{grid-template-columns:repeat(2,minmax(0,1fr))}.tabs{gap:20px}@media(max-width:600px){.tabs{gap:0}.tabs button{font-size:10px}.history-item>summary{padding:12px 10px}.history-item summary strong{font-size:12px}.history-item summary b{font-size:18px}.history-content{padding:9px}}

.all-time-description{margin:0 0 14px}.all-time-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:16px}.all-time-summary .snapshot-row{flex-direction:column;align-items:center;gap:6px;background:#eef3e7;border:1px solid #dae4cd;border-radius:8px;padding:11px 6px;text-align:center;font-size:11px}.all-time-summary .snapshot-row strong{font-size:21px}@media(max-width:600px){.tabs button{font-size:9px;padding-left:1px;padding-right:1px}.all-time-summary{gap:6px}.all-time-summary .snapshot-row{font-size:10px;padding:9px 4px}.all-time-summary .snapshot-row strong{font-size:19px}}

/* A shared, stable page width across every tab. */
html{scrollbar-gutter:stable}body{width:100%;min-width:0}main{width:100%;min-width:0}.tab-panel{width:100%;min-width:0;max-width:100%}.tab-panel>*,.stats-overview>*,.rating-groups>*,.pool-stat-cards>*,.match-total-groups>*,.all-time-summary>*,.history-score-strip>*{min-width:0}.stats-overview,.rating-groups{grid-template-columns:repeat(2,minmax(0,1fr))}.score-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.pool-stat-card span,.snapshot-row span,.match-total-group dt,.history-player,.history-item summary span{overflow-wrap:anywhere}.tabs{width:100%;min-width:0}.tabs button{min-width:0;flex:1;overflow-wrap:anywhere}.topbar{flex-wrap:wrap;height:auto;min-height:52px;padding-top:5px;padding-bottom:5px}@media(max-width:600px){.topbar{min-height:44px}.stats-overview,.rating-groups{grid-template-columns:minmax(0,1fr)}.tabs{gap:0}.tabs button{white-space:normal}.history-content .match-total-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Responsive on every phone; content wraps instead of widening the page. */
.set-history{flex-wrap:wrap}.score-head,.score-bottom{flex-wrap:wrap}.history-content,.history-item,.snapshot,.pool-match-row{min-width:0;max-width:100%}.history-item>summary{min-width:0}.pool-match-row>div{min-width:0;overflow-wrap:anywhere}.pool-match-row>b{flex-shrink:0}.match-total-group dd,.snapshot-row strong{max-width:100%;overflow-wrap:anywhere}dialog{max-width:calc(100% - 24px)}img,video,canvas,svg{max-width:100%}@media(max-width:360px){.topbar .brand{font-size:16px;gap:3px}.topbar .brand .ball{font-size:18px}.topbar .finish-set-button{font-size:9px;padding:6px}.topbar #newBtn{font-size:9px;padding:6px}.topbar .help-button{font-size:9px}.topbar{gap:4px}.icon-button{width:30px;height:30px}.tabs button{font-size:8px}.match-total-group dl>div{flex-wrap:wrap;gap:3px}.match-total-group dd{margin-left:auto}.match-total-group[data-group="defense"] dl{gap:6px}}

/* Small-phone Capture tuning, including the 375px iPhone 13 mini. */
@media(max-width:430px){
 .topbar{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
 body[data-view="capture"] main{padding-top:5px}
 body[data-view="capture"] .player-profile{min-height:40px;padding:4px 9px}
 body[data-view="capture"] .player-profile>.text-button{min-height:28px}
 body[data-view="capture"] .scoreboard{padding-top:7px}
 body[data-view="capture"] .score-grid{padding:3px 0}
 body[data-view="capture"] .score-numbers{font-size:32px;line-height:1.1}
 body[data-view="capture"] .set-pill{font-size:7px;padding:2px 7px;margin-top:1px}
 body[data-view="capture"] .team-name{font-size:12px;line-height:1.25}
 body[data-view="capture"] button.team{min-height:52px}
 body[data-view="capture"] .score-bottom{padding:3px 0}
 body[data-view="capture"] .pool-summary{padding:3px 7px}
 body[data-view="capture"] .tabs button{min-height:38px;font-size:10px}
 #capture>.section-title{margin-bottom:5px}
 #capture>.actions{gap:6px}
 #capture>.actions .action{min-height:52px;padding:10px 6px 7px;border-radius:9px}
 #capture>.actions .action strong{font-size:12px;line-height:1.25;padding:0 4px}
 #capture .stat-count{font-size:11px;line-height:1.25;min-width:18px;padding:1px 4px;right:4px;top:3px;color:#35502f}
 #capture .negative .stat-count{color:#8f443e}
 #capture .serving-group{padding:7px;margin-top:8px}
 #capture .serving-group legend{font-size:12px}
 #capture .serving-actions .action,#capture .receive-actions .action{min-height:50px;padding:13px 2px 5px;border-radius:8px}
 #capture .serving-actions .action strong,#capture .receive-actions .action strong{font-size:11px;line-height:1.2}
 #capture .serving-actions .stat-count{font-size:10px;min-width:15px;padding:0 3px;right:3px;top:2px}
 #capture .capture-note{font-size:9px;line-height:1.4;margin-top:6px}
 body[data-view="capture"] footer{padding-bottom:env(safe-area-inset-bottom,0px)}
}

@media(max-width:430px){#capture .serving-group{padding:6px;margin-top:7px}body[data-view="capture"] footer{display:none}body[data-view="capture"] main{padding-bottom:max(7px,env(safe-area-inset-bottom))}}

/* Let taller phone viewports use their available Capture space. */
@media(max-width:430px) and (min-height:740px){
 #capture>.actions{gap:8px}
 #capture>.actions .action{min-height:clamp(56px,7.6dvh,68px);padding:12px 7px 9px}
 #capture>.actions .action strong{font-size:13px;line-height:1.3}
 #capture .serving-group{padding:8px;margin-top:12px}
 #capture .serving-group legend{font-size:13px}
 #capture .serving-actions .action,#capture .receive-actions .action{min-height:clamp(54px,7.2dvh,64px);padding:15px 3px 7px}
 #capture .serving-actions .action strong,#capture .receive-actions .action strong{font-size:12px}
 #capture .stat-count{font-size:12px;min-width:20px}
 #capture .serving-actions .stat-count{font-size:11px;min-width:17px}
 #capture .capture-note{margin-top:9px;font-size:10px}
}

.match-utility-row{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0;margin:2px 0 7px}.match-utility-row .match-details{flex:1;width:auto;padding:4px 2px;min-width:0}.share-button{min-height:34px;padding:6px 13px;border:1px solid #cbd8be;border-radius:8px;background:#eef3e7;color:var(--green);font-size:12px;font-weight:700;flex-shrink:0}.share-button:hover{background:#e3eccf}#sharePreview{display:block;max-height:48dvh;max-width:100%;margin:15px auto;object-fit:contain;border:1px solid var(--line);border-radius:8px}#sharePreview[hidden],#sendShare[hidden],#saveScreenshot[hidden]{display:none}.share-actions{display:flex;flex-direction:column;gap:10px}.share-actions .primary{margin-top:8px}.save-screenshot{text-align:center;text-decoration:none;display:block;color:var(--ink)}#shareStatus{line-height:1.6}@media(max-width:430px){.match-utility-row{margin:2px 0 5px}.share-button{min-height:32px;padding:5px 10px;font-size:11px}}

.screenshot-source,.screenshot-source *{font-family:Arial,sans-serif!important}

.standings-record{display:inline-block;margin-left:7px;font-size:11px;line-height:1.5;color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap}

.standings-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.standings-heading h4{margin:0}.standings-heading>span{font-size:10px;color:var(--muted);padding-right:25px}.compact-standings .standings-progress{font-size:11px;margin:7px 0 10px}.compact-standings .standings-list{gap:5px}.compact-standings .standings-list>li{padding:0;background:#fff;border-radius:8px}.standing-row>summary{display:grid;grid-template-columns:28px minmax(0,1fr) 40px 12px;gap:9px;align-items:center;min-height:62px;padding:9px 10px;cursor:pointer;list-style:none}.standing-row>summary::-webkit-details-marker{display:none}.standing-row>summary:focus-visible{outline:2px solid var(--green);outline-offset:2px;border-radius:8px}.standing-row .standings-place{min-width:28px;width:28px;height:28px;font-size:11px}.standings-row-label{min-width:0}.standings-row-label>strong{display:block;font-size:12px;line-height:1.4;overflow-wrap:anywhere}.standings-mini-bracket{display:inline-block;font-size:9px;line-height:1.5;border-radius:4px;padding:1px 5px;margin-top:3px;background:#eef1e9;color:var(--muted)}.standings-mini-bracket.gold{background:#f5e8b5;color:#69500d}.standings-mini-bracket.silver{background:#e4e9ed;color:#3d515e}.standings-mini-bracket.bronze{background:#eedbcb;color:#774729}.standings-row-diff{text-align:right;font-size:20px;font-variant-numeric:tabular-nums}.standings-chevron{font-size:14px;color:var(--muted);text-align:center}.standing-row[open] .standings-chevron{transform:rotate(180deg)}.compact-standings .standings-facts{margin:0 10px;padding:9px 0 12px;gap:9px}.compact-standings .standings-facts dt{font-size:10px}.compact-standings .standings-facts dd{font-size:14px}.standings-key{margin-top:9px}.standings-key>summary{font-size:11px;color:var(--muted);padding:7px 0;cursor:pointer}.standings-key>p{font-size:11px;line-height:1.6;color:var(--muted);margin:6px 0}@media(max-width:360px){.standing-row>summary{gap:6px;padding:8px;grid-template-columns:26px minmax(0,1fr) 36px 10px}.standings-row-diff{font-size:18px}}

.tournament-results-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px;margin-top:18px;border:1px solid #c9d6ba;border-radius:9px;background:#edf3e4}.tournament-results-entry h4{margin:0 0 5px}.tournament-results-entry .outline{font-size:11px;padding:8px 10px;flex-shrink:0}.tournament-results-entry .muted{line-height:1.5}dialog.tournament-results-dialog{width:calc(100% - 24px);max-width:760px;padding:20px}.tournament-results-dialog .dialog-heading h2{font-size:20px}.results-tools{display:flex;justify-content:space-between;gap:8px;margin-bottom:14px}.results-tools button{font-size:12px}.result-summary{background:#edf3e4;border:1px solid #d1dfc3;border-radius:10px;padding:15px}.result-summary .eyebrow{display:block;font-size:9px;letter-spacing:1px;margin-bottom:8px}.result-summary h2{font-size:22px;line-height:1.3;overflow-wrap:anywhere;margin-bottom:8px}.result-summary h3{font-size:17px;margin:14px 0 7px;overflow-wrap:anywhere}.result-summary .muted{line-height:1.6;overflow-wrap:anywhere}.result-player{font-size:13px;font-weight:700;overflow-wrap:anywhere}.result-finish{font-size:12px;color:var(--green);margin-top:12px;font-weight:700}.result-placement{font-size:14px;font-weight:800;line-height:1.5;margin-top:6px;overflow-wrap:anywhere}.result-note{margin-top:10px}.result-records{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:15px}.result-records>div{padding:11px 7px;border:1px solid #d1dfc3;border-radius:8px;background:#fff;text-align:center;min-width:0}.result-records strong{display:block;font-size:24px}.result-records span,.result-records small{display:block;font-size:10px;line-height:1.6;margin-top:4px;color:var(--muted);overflow-wrap:anywhere}.result-combined-matches,.result-player-totals{margin-top:20px}.result-combined-matches h3,.result-player-totals>h3{font-size:15px;margin-bottom:12px}.result-combined-matches ol{list-style:none;padding:0;margin:0;display:grid;gap:8px}.result-combined-matches li{padding:12px;border:1px solid var(--line);border-radius:8px;background:#fafbf7;min-width:0}.result-combined-matches li>span,.result-combined-matches li>strong,.result-combined-matches li>small{display:block;overflow-wrap:anywhere}.result-combined-matches li>strong{font-size:13px;margin:7px 0}.result-combined-matches li>span:not(.tiny){font-size:12px;font-weight:700}.result-combined-matches li>small{font-size:10px;line-height:1.5;color:var(--muted);margin-top:6px}.result-combined-matches li>p{font-size:11px;line-height:1.6;margin-top:7px}.result-scope-controls{display:flex;gap:6px;margin:12px 0}.result-scope-button{flex:1;min-width:0;min-height:40px;border:1px solid #ccd6c8;border-radius:7px;background:#fff;font-size:12px;color:var(--ink)}.result-scope-button.active{background:var(--green);color:#fff;border-color:var(--green)}#resultStatsCoverage{line-height:1.6;margin-bottom:12px}#tournamentResultsContent{min-width:0;background:#f7f8f3;padding:8px;overflow-wrap:anywhere}#tournamentResultSetup h2{font-size:19px}#tournamentResultSetup p{line-height:1.6}#tournamentResultError{margin-top:12px}#resetTournamentResult{width:100%;font-size:12px}@media(max-width:430px){dialog.tournament-results-dialog{padding:13px}.results-tools button{padding:8px 10px;font-size:11px}#tournamentResultsContent{padding:4px}.result-summary{padding:12px}.result-summary h2{font-size:20px}.result-player-totals .match-total-groups{grid-template-columns:minmax(0,1fr)}.result-player-totals .match-total-group dt{font-size:12px}.result-player-totals .match-total-group dd{font-size:16px}}

.bracket-path{margin-top:24px;padding-top:15px;border-top:1px solid var(--line)}.bracket-path h4{margin:0}.bracket-path>.muted{line-height:1.6}.bracket-path>.section-title .outline,.bracket-match-card .outline{font-size:11px;padding:7px 10px;min-height:38px}.bracket-match-card{margin-top:12px;border:1px solid #c9d6ba;border-left:3px solid var(--green);border-radius:9px;padding:12px;min-width:0;background:#f7f9f2}.bracket-match-card h5{font-size:13px;line-height:1.5;overflow-wrap:anywhere}.bracket-opponent{font-size:14px;font-weight:700;line-height:1.5;overflow-wrap:anywhere;margin:8px 0}.bracket-match-card>.muted{line-height:1.6;margin:7px 0;overflow-wrap:anywhere}.bracket-result{font-size:14px;font-weight:800;margin:10px 0;color:var(--green)}.bracket-override-note{font-size:11px;line-height:1.6;padding:9px;border-radius:6px;background:#eee8d8;color:#6c5b36;overflow-wrap:anywhere;margin-top:9px}.bracket-match-card .pool-match-scoreline{margin:8px 0}#bracketMatchSetup h2{font-size:20px}#bracketMatchSetup p{line-height:1.6}#bracketMatchError{margin:14px 0}#bracketOverrideField[hidden]{display:none}#bracketCaptureSource{overflow-wrap:anywhere}

.official-placements{margin-top:22px;padding:13px;border:1px solid #c9d6ba;border-radius:10px;background:#f3f6ec}.official-placements h4{margin:0}.official-placements .muted{line-height:1.6}.official-placements .section-title .outline{font-size:11px;min-height:38px;padding:7px 10px}.official-active{font-size:12px;font-weight:700;color:var(--green);margin:10px 0}.official-review{padding:10px;border-radius:7px;background:#fff0c9;color:#745815;font-size:12px;line-height:1.6;margin:10px 0}.official-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}.official-list li{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:10px;background:#fff;border:1px solid var(--line);border-radius:8px;min-width:0}.official-list li>strong{width:100%;font-size:13px;overflow-wrap:anywhere}.official-list li>span{font-size:11px;color:var(--muted)}.official-list .standings-bracket{margin:0;font-size:10px}.official-note{margin-top:12px;overflow-wrap:anywhere}.official-team-field{min-width:0;border:1px solid var(--line);border-radius:9px;padding:0 12px 4px;margin:18px 0}.official-team-field legend{font-size:14px;font-weight:700;padding:0 6px;overflow-wrap:anywhere;max-width:100%}#officialPoolSetup h2{font-size:20px}#officialPoolSetup>.muted,#officialPoolSetup p{line-height:1.6}#officialPoolError{margin:12px 0}#resetOfficialFields{width:100%;font-size:12px}

.standings-bracket-rule{font-size:11px;line-height:1.6;margin:8px 0 12px;color:var(--ink)}.standings-bracket{display:inline-block;margin:10px 0 0;padding:5px 9px;border-radius:6px;font-size:11px;font-weight:700;line-height:1.4}.standings-bracket.gold{background:#f5e8b5;color:#69500d}.standings-bracket.silver{background:#e4e9ed;color:#3d515e}.standings-bracket.bronze{background:#eedbcb;color:#774729}.standings-bracket.pending{background:#edf0e8;color:#62705b}

.pool-standings{margin-top:22px}.pool-standings h4{margin-bottom:7px}.standings-progress{font-size:12px;font-weight:700;color:var(--green);line-height:1.5}.standings-note{margin:7px 0 12px;line-height:1.6}.standings-list{list-style:none;margin:0;padding:0;display:grid;gap:9px}.standings-list>li{border:1px solid var(--line);border-radius:9px;padding:11px;background:#fafbf7;min-width:0}.standings-team{display:flex;align-items:center;gap:9px;min-width:0}.standings-place{display:grid;place-items:center;min-width:30px;height:30px;border-radius:50%;background:#e5edda;font-size:12px;font-weight:800;flex-shrink:0}.standings-team>strong{font-size:13px;line-height:1.5;overflow-wrap:anywhere;min-width:0}.standings-diff{margin-left:auto;text-align:right;flex-shrink:0}.standings-diff b{font-size:22px;font-variant-numeric:tabular-nums}.standings-diff span{display:block;color:var(--muted);font-size:9px}.standings-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:10px 0 0;border-top:1px solid var(--line);padding-top:9px}.standings-facts dt{color:var(--muted);font-size:11px;line-height:1.5;overflow-wrap:anywhere}.standings-facts dd{margin:4px 0 0;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.pool-match-breakdown{grid-column:1/-1;border:1px solid var(--line);border-radius:7px;overflow:hidden}.pool-match-breakdown summary{font-size:11px;padding:9px;cursor:pointer;color:var(--green)}.pool-diff-grid{display:grid;grid-template-columns:minmax(60px,.8fr) repeat(2,minmax(0,1fr));gap:8px;padding:9px;align-items:center;background:#f2f5ec}.pool-diff-grid>strong{font-size:10px;line-height:1.5;text-align:center;overflow-wrap:anywhere}.pool-diff-grid>span{font-size:10px;color:var(--muted)}.pool-diff-grid>b{text-align:center;font-size:13px;font-variant-numeric:tabular-nums}

.pool-captured-note{grid-column:1/-1;font-size:10px;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}

.pool-score-grid{display:grid;grid-template-columns:44px repeat(2,minmax(0,1fr));gap:9px;align-items:center;margin:20px 0}.pool-score-grid>strong{text-align:center;font-size:12px;line-height:1.5;overflow-wrap:anywhere}.pool-score-grid>span{font-size:12px}.pool-score-grid label{margin:0;min-width:0}.pool-score-grid input{margin:0;text-align:center;font-size:22px;padding:12px 5px;font-variant-numeric:tabular-nums;min-width:0}.score-input-label>span{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.score-entry-hint,.captured-match-import p,#poolScoreSource{line-height:1.6}.captured-match-import{margin:18px 0;padding:14px;border:1px solid var(--line);background:#f2f5ec;border-radius:9px}.captured-match-import h3{font-size:13px;margin-bottom:8px}.captured-match-import select{font-size:14px}.captured-match-import .outline{width:100%;font-size:12px;margin-top:12px}.captured-match-import [hidden]{display:none}#poolScoreSetup h2{font-size:20px}#poolScoreError{line-height:1.6;margin:14px 0}.score-save-actions{display:flex;gap:9px;margin-top:18px}.score-save-actions button{flex:1;min-width:0;font-size:12px;margin:0;min-height:46px}.pool-match-scoreline{grid-column:1/-1;color:var(--green);font-size:12px;line-height:1.5;font-weight:700}.schedule-match-list .pool-enter-score{grid-column:1/-1;justify-self:start;min-height:38px;padding:7px 12px}.pool-match-status{font-weight:600}

.tournament-schedule-heading{margin-top:20px}.tournament-schedule-heading h4{margin:0}.schedule-pool{margin-top:12px;border:1px solid var(--line);border-radius:9px;overflow:hidden}.schedule-pool>summary{padding:12px;background:#eef3e7;font-size:13px;font-weight:700;cursor:pointer}.schedule-roster{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:10px;border-bottom:1px solid var(--line)}.schedule-roster li{font-size:10px;padding:4px 7px;border-radius:5px;background:#f2f5ec;overflow-wrap:anywhere;max-width:100%}.schedule-match-list{margin:0;padding:0;list-style:none}.schedule-match-list li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;border-bottom:1px solid var(--line);padding:12px}.schedule-match-list li:last-child{border:0}.schedule-round{grid-column:1/-1;font-size:10px;color:var(--muted)}.schedule-match-list strong{font-size:12px;line-height:1.6;overflow-wrap:anywhere}.schedule-match-list strong span{color:var(--muted);font-weight:400}.schedule-match-list small{font-size:10px;color:var(--muted);align-self:center;white-space:nowrap}.schedule-team-summary{margin:16px 0}.schedule-team-summary h3,#schedulePreview h3{font-size:14px;margin:14px 0 10px}.schedule-repeat{display:flex;gap:10px;align-items:center;min-height:44px}.schedule-repeat input{width:20px;height:20px;flex-shrink:0;margin:0;accent-color:var(--green)}#poolScheduleSetup p{line-height:1.6}#poolScheduleSetup h2{font-size:20px}#scheduleError{margin:14px 0}.schedule-preview-button{width:100%;margin-top:16px}#savePoolSchedule[hidden]{display:none}

/* Tournament setup shares the responsive page width. */
.tournament-intro{line-height:1.6;margin:8px 0 16px}.tournament-card,.tournament-empty{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;margin:12px 0;min-width:0}.tournament-card h3,.tournament-empty h3{font-size:17px;overflow-wrap:anywhere}.tournament-card h4{font-size:13px;margin:18px 0 10px}.tournament-card .muted{overflow-wrap:anywhere;line-height:1.6}.tournament-card .outline{flex-shrink:0;font-size:11px;padding:8px 10px}.tournament-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:16px}.tournament-facts>div{padding:10px 5px;text-align:center;border-radius:8px;background:#eef3e7}.tournament-facts strong{display:block;font-size:22px}.tournament-facts span{display:block;font-size:10px;line-height:1.5;margin-top:4px}.tournament-team-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.tournament-team-list li{padding:10px;border:1px solid var(--line);border-radius:7px;font-size:12px;overflow-wrap:anywhere}.tournament-next{margin-top:16px}.tournament-empty p{font-size:13px;color:var(--muted);line-height:1.6;margin-top:10px}#tournamentSetup label{line-height:1.5}#tournamentTeams{min-height:120px}#tournamentError{line-height:1.6;margin-top:14px}#tournament>.section-title .outline{font-size:11px;padding:8px 10px}#tournamentSetup h2{font-size:20px}@media(max-width:600px){.tabs{flex-wrap:wrap}.tabs button{flex:1 1 14%;font-size:9px}.tournament-card,.tournament-empty{padding:13px}.tournament-card h3{font-size:15px}}@media(max-width:360px){.tabs button{font-size:8px}}

/* Phone layout cleanup; Capture has dedicated compact spacing below. */
.tournament-roster{margin:10px 0}.tournament-roster>summary{display:flex;align-items:center;justify-content:space-between;min-height:44px;padding:8px 0;font-size:12px;color:var(--muted);cursor:pointer}.tournament-roster>summary span{font-weight:700}.tournament-roster>.tournament-team-list{margin-top:6px}.tournament-meta{font-size:12px;line-height:1.6;color:var(--muted);margin-top:6px}.tournament-section{border:1px solid var(--line);border-radius:10px;margin-top:13px;background:#fff;min-width:0}.tournament-section>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;min-height:46px;cursor:pointer;list-style:none}.tournament-section>summary::-webkit-details-marker{display:none}.tournament-section>summary>strong{font-size:13px;min-width:0}.tournament-section>summary>span{margin-left:auto;font-size:10px;color:var(--muted);white-space:nowrap}.tournament-section>summary:after{content:'＋';color:var(--muted);font-size:14px}.tournament-section[open]>summary:after{content:'−'}.tournament-section-body{border-top:1px solid var(--line);padding:10px;min-width:0}.tournament-section-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.tournament-section-tools .outline{font-size:11px;padding:8px 10px;min-height:42px}.schedule-round-group{margin-top:8px;border:1px solid var(--line);border-radius:8px;overflow:hidden}.schedule-round-group>summary{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:44px;padding:10px;background:#f0f4e9;cursor:pointer;list-style:none}.schedule-round-group>summary::-webkit-details-marker{display:none}.schedule-round-group>summary>strong{font-size:12px}.schedule-round-group>summary>span{font-size:10px;color:var(--muted);margin-left:auto}.schedule-round-group>summary:after{content:'⌄';color:var(--muted)}.schedule-round-group[open]>summary:after{content:'⌃'}.tournament-section .bracket-path{margin:0;padding:0;border:0}.tournament-section .official-placements{margin:0;padding:0;border:0;background:transparent}.official-section .official-placements>.section-title>h4,.bracket-section .bracket-path>.section-title>h4{display:none}.official-section .section-title,.bracket-section .section-title{justify-content:flex-end}.tournament-card .schedule-match-list li{padding:10px;gap:4px 9px}.tournament-card .schedule-match-list li>strong{grid-column:1;font-size:12px;line-height:1.45}.tournament-card .schedule-match-list .pool-match-status{grid-column:1;grid-row:2;font-size:10px}.tournament-card .schedule-match-list .pool-enter-score{grid-column:2;grid-row:1/span 2;min-height:42px;align-self:center;padding:7px 9px;font-size:11px}.tournament-card .schedule-match-list .pool-match-scoreline{margin-top:5px;font-size:11px}.tournament-card .tournament-results-entry .muted{display:none}.tournament-card .tournament-results-entry{padding:9px 11px;margin-top:10px}.tournament-card .tournament-results-entry h4{margin:0;font-size:13px}
@media(max-width:600px){
 body[data-view] .tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;position:sticky;top:0;z-index:4;background:#f7f8f3;padding:6px 0;margin:6px 0 12px;border:0}
 body[data-view] .tabs button{font-size:11px;line-height:1.3;min-height:42px;padding:8px 5px;border:1px solid #d7dfcf;border-radius:8px;background:#fff;color:#62715b}
 body[data-view] .tabs button[aria-selected="true"]{background:var(--green);color:#fff;border-color:var(--green)}
 body[data-view="tournament"] .player-profile,body[data-view="tournament"] .scoreboard,body[data-view="tournament"] .match-utility-row,body[data-view="history"] .scoreboard,body[data-view="alltime"] .scoreboard{display:none}
 body[data-view="history"] .match-details,body[data-view="alltime"] .match-details{display:none}
 body:not([data-view="capture"]) .tab-panel>.section-title{margin-bottom:10px;min-height:42px}
 body:not([data-view="capture"]) .tab-panel>.section-title h2{font-size:17px}
 body[data-view="tournament"] main{padding:6px 10px 16px}
 body[data-view="tournament"] .tournament-intro{display:none}
 body[data-view="tournament"] .tournament-card{padding:12px;margin:10px 0 16px;border-radius:12px}
 body[data-view="tournament"] .tournament-card>.section-title{align-items:flex-start;margin-bottom:6px}
 body[data-view="tournament"] .tournament-card>.section-title h3{font-size:18px;line-height:1.4}
 body[data-view="tournament"] .tournament-card .outline{min-height:42px}
 body[data-view="tournament"] .tournament-location{font-size:12px;line-height:1.5}
 body[data-view="tournament"] .tournament-card .compact-standings{margin-top:16px}
 body[data-view="tournament"] .tournament-roster{margin:5px 0}
 body[data-view="tournament"] .tournament-roster .tournament-team-list{gap:6px}
 body:not([data-view="capture"]) .history-intro,body:not([data-view="capture"]) .all-time-description{display:none}
 body:not([data-view="capture"]) .history-item>summary{min-height:58px;padding:12px}
 body:not([data-view="capture"]) .history-item summary strong{font-size:13px;line-height:1.5}
 body:not([data-view="capture"]) .history-item summary span{font-size:11px;line-height:1.5}
 body:not([data-view="capture"]) .all-time-summary .snapshot-row{font-size:11px;padding:10px 6px}
 body:not([data-view="capture"]) .match-total-group{padding:12px;border-radius:9px}
 body:not([data-view="capture"]) .match-total-group h3{font-size:14px;margin-bottom:8px}
 body:not([data-view="capture"]) .match-total-group dt{font-size:12px;line-height:1.4}
 body:not([data-view="capture"]) .match-total-group dd{font-size:17px}
 body:not([data-view="capture"]) .match-total-group dl>div{padding:7px 0}
 body:not([data-view="capture"]) .pool-stat-card span{font-size:11px}
 body[data-view] dialog{padding:16px;width:calc(100% - 20px);max-height:calc(100dvh - 20px);border-radius:14px}
 body[data-view] dialog .dialog-heading{margin-bottom:14px}
 body:not([data-view="capture"]) .save-screenshot,body[data-view] dialog .primary{min-height:44px}
 body:not([data-view="capture"]) footer{margin-top:12px;font-size:10px}
}
@media(max-width:360px){body:not([data-view="capture"]) .match-total-groups,body:not([data-view="capture"]) .history-content .match-total-groups{grid-template-columns:minmax(0,1fr)}}

.tournament-roster>summary{gap:8px}.tournament-roster>summary>span{margin-left:auto}.tournament-roster>summary:after{content:"⌄"}.tournament-roster[open]>summary:after{content:"⌃"}

/* Capture uses the same phone navigation, with compact courtside spacing. */
@media(max-width:600px){
 body[data-view="capture"] .tabs{margin:5px 0 6px;padding:4px 0}
 body[data-view="capture"] #capture>.section-title{min-height:28px;margin-bottom:6px}
 body[data-view="capture"] #capture>.section-title h2{font-size:14px}
 body[data-view="capture"] #capture>.actions{gap:7px}
 body[data-view="capture"] #capture>.actions .action{border-radius:10px}
 body[data-view="capture"] #capture .serving-group{border-radius:10px;margin-top:9px}
 body[data-view="capture"] #capture .capture-note{margin-top:7px}
}
@media(max-width:430px) and (min-height:740px){
 body[data-view="capture"] #capture>.actions .action{min-height:clamp(54px,7.15dvh,64px);padding:11px 7px 8px}
}

/* Match Stats focuses on the saved scoring summary and player totals. */
body[data-view="stats"] .scoreboard{display:none}

/* Phone navigation stays at the bottom, clear of the home indicator. */
.tab-icon{margin-right:5px}
@media(max-width:600px){
 body[data-view] .tabs{position:fixed;top:auto;bottom:0;left:0;right:0;width:auto;z-index:20;display:flex;flex-wrap:nowrap;gap:3px;margin:0;padding:5px max(6px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom));border:0;border-top:1px solid #d8e1d0;background:#fff;box-shadow:0 -3px 16px #19362c0a;min-height:64px}
 body[data-view] .tabs button{flex:1 1 0;min-width:0;min-height:54px;height:54px;padding:4px 2px;border:0;border-radius:8px;background:transparent;color:#697961;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;line-height:1.1}
 body[data-view] .tabs button[hidden]{display:none}
 body[data-view] .tabs button[aria-selected="true"]{background:var(--green);color:#fff}
 body[data-view] .tabs .tab-icon{display:block;font-size:19px;line-height:20px;margin:0}
 body[data-view] .tabs .tab-label{display:block;font-size:9.5px;line-height:12px;white-space:nowrap;letter-spacing:-.1px;max-width:100%}
 body[data-view] main{padding-bottom:calc(82px + env(safe-area-inset-bottom))}
 body[data-view] #toast{bottom:calc(76px + env(safe-area-inset-bottom))}
 html{scroll-padding-bottom:calc(82px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){body[data-view] .tabs .tab-label{font-size:8.5px}body[data-view] .tabs .tab-icon{font-size:18px}}

@media(max-width:600px){body[data-view] .tabs{padding-left:max(6px,env(safe-area-inset-left))}}

.tab-label-short{display:none}
@media(max-width:600px){body[data-view] .tabs .tab-label{font-size:10px}.tabs .tab-label-wide{display:none}.tabs .tab-label-short{display:inline}}
@media(max-width:360px){body[data-view] .tabs .tab-label{font-size:9px}}

/* Use the room freed by bottom navigation for larger Capture targets. */
@media(max-width:430px) and (min-height:780px){
 body[data-view="capture"] #capture>.actions{gap:8px}
 body[data-view="capture"] #capture>.actions .action{min-height:clamp(62px,8.1dvh,72px);padding:18px 7px 9px;border-radius:11px}
 body[data-view="capture"] #capture>.actions .action strong{font-size:14px;line-height:1.25}
 body[data-view="capture"] #capture .stat-count{font-size:13px;min-width:21px;padding:1px 5px;top:3px;right:4px}
 body[data-view="capture"] #capture .serving-group{margin-top:11px;padding:8px;border-radius:11px}
 body[data-view="capture"] #capture .serving-group legend{font-size:14px}
 body[data-view="capture"] #capture .serving-actions .action,body[data-view="capture"] #capture .receive-actions .action{min-height:clamp(60px,7.9dvh,68px);padding:18px 3px 7px;border-radius:9px}
 body[data-view="capture"] #capture .serving-actions .action strong,body[data-view="capture"] #capture .receive-actions .action strong{font-size:13px;line-height:1.2}
 body[data-view="capture"] #capture .serving-actions .stat-count,body[data-view="capture"] #capture .receive-actions .stat-count{font-size:12px;min-width:17px;padding:1px 4px}
 /* Pool Play includes an extra differential panel, so reserve room for it. */
 body[data-view="capture"]:has(#poolSummary:not([hidden])) #capture>.actions .action{min-height:60px;padding-top:17px;padding-bottom:8px}
 body[data-view="capture"]:has(#poolSummary:not([hidden])) #capture .serving-group{margin-top:10px}
 body[data-view="capture"]:has(#poolSummary:not([hidden])) #capture .serving-actions .action,body[data-view="capture"]:has(#poolSummary:not([hidden])) #capture .receive-actions .action{min-height:61px}
}

/* Decorative icons complement the labels; all button gestures stay intact. */
body[data-view="capture"] #capture>.actions .action{padding-top:22px;padding-bottom:7px}
body[data-view="capture"] #capture>.actions .symbol{display:flex;position:absolute;top:4px;left:7px;width:18px;height:18px;margin:0;color:#62845d;pointer-events:none}
body[data-view="capture"] #capture>.actions .negative .symbol{color:#a45149}
body[data-view="capture"] #capture>.actions .symbol svg{width:18px;height:18px}
.rating-group-icon{vertical-align:-3px;margin-right:6px;color:#62845d}
@media(max-height:779px){body[data-view="capture"] #capture>.actions .symbol{width:15px;height:15px;top:3px}body[data-view="capture"] #capture>.actions .symbol svg{width:15px;height:15px}body[data-view="capture"] #capture>.actions .action{padding-top:18px;padding-bottom:6px}}

@media(max-width:430px) and (min-height:780px){body[data-view="capture"]:has(#poolSummary:not([hidden])) #capture>.actions .action{padding:22px 7px 5px}body[data-view="capture"]:has(#poolSummary:not([hidden])) #capture>.actions .action strong{font-size:13px}}

/* Compact Match Stats: readable totals, with rated-touch details on demand. */
body[data-view="stats"] .player-profile{padding:4px 9px;min-height:36px}
body[data-view="stats"] .profile-number{width:28px;height:28px;font-size:15px}
body[data-view="stats"] .profile-details h2{font-size:16px}
body[data-view="stats"] .match-utility-row{margin-bottom:7px}
#stats .match-context{padding:11px 12px 0;background:#edf3e4;border:1px solid #d6e1cb;border-bottom:0;border-radius:10px 10px 0 0}
#stats .match-context p{font-size:14px;font-weight:700;line-height:1.45;overflow-wrap:anywhere}
#stats .match-context p span{font-weight:400;color:var(--muted)}
#stats .match-context small{display:block;font-size:10px;color:var(--muted);margin-top:4px}
#stats .match-summary-compact{margin:0 0 12px;padding:9px 10px 10px;gap:6px;border:1px solid #d6e1cb;border-top:0;border-radius:0 0 10px 10px;background:#edf3e4}
#stats .match-summary-compact>div{padding:6px 3px;background:#ffffffaa;border:0;border-radius:6px}
#stats .match-summary-compact span{font-size:10px}
#stats .match-summary-compact strong{font-size:18px;margin-top:3px}
body[data-view="stats"] #stats>.match-totals-heading{min-height:25px;margin-bottom:6px}
body[data-view="stats"] #stats>.match-totals-heading h2{font-size:14px}
body[data-view="stats"] #matchTotals{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:0;align-items:start}
body[data-view="stats"] #matchTotals .match-total-group{padding:10px;border-radius:9px}
body[data-view="stats"] #matchTotals .match-total-group h3{font-size:13px;margin:0 0 6px}
body[data-view="stats"] #matchTotals .match-total-group dl>div{padding:4px 0;gap:6px}
body[data-view="stats"] #matchTotals .match-total-group dt{font-size:11.5px;line-height:1.4}
body[data-view="stats"] #matchTotals .match-total-group dd{font-size:17px}
body[data-view="stats"] #matchTotals .match-total-group[data-group="defense"]{grid-column:1/-1}
body[data-view="stats"] #matchTotals .match-total-group[data-group="defense"] dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body[data-view="stats"] #matchTotals .match-total-group[data-group="defense"] dl>div{padding:2px 0;border:0}
#matchTotals .match-stat-breakdown{margin-top:6px;border-top:1px solid var(--line)}
#matchTotals .match-stat-breakdown>summary{font-size:10px;color:var(--green);min-height:36px;display:flex;align-items:center;justify-content:space-between;gap:5px;cursor:pointer;list-style:none}
#matchTotals .match-stat-breakdown>summary::-webkit-details-marker{display:none}
#matchTotals .match-stat-breakdown>summary:after{content:'＋'}
#matchTotals .match-stat-breakdown[open]>summary:after{content:'−'}
@media(max-width:360px){body[data-view="stats"] #matchTotals .match-total-group{padding:8px}body[data-view="stats"] #matchTotals .match-total-group dt{font-size:11px}body[data-view="stats"] #matchTotals .match-total-group dd{font-size:16px}}

#stats .match-context{padding:9px 11px 0}
#stats .match-context small{line-height:1.3;margin-top:3px}
#stats .match-summary-compact{padding:8px;margin-bottom:8px}
#stats .match-summary-compact>div{padding:5px 3px}
#stats .match-summary-compact strong{line-height:1.2}
body[data-view="stats"] #stats>.match-totals-heading{min-height:22px;margin-bottom:5px}
body[data-view="stats"] #matchTotals .match-total-group dl>div{padding:3px 0}
body[data-view="stats"] #matchTotals .match-total-group dd{font-size:16px;line-height:1.3}
body[data-view="stats"] #matchTotals .match-total-group h3{line-height:1.3;margin-bottom:5px}

body[data-view="stats"] .match-utility-row{margin-bottom:5px}
#stats .match-summary-compact{margin-bottom:6px}
body[data-view="stats"] #matchTotals{gap:6px}
body[data-view="stats"] #matchTotals .match-total-group{padding:9px}

/* History uses the same compact totals cards as Match Stats. */
body[data-view="history"] #history>.section-title{min-height:26px;margin-bottom:8px}
body[data-view="history"] #history>.section-title h2{font-size:16px}
body[data-view="history"] .history-subheading{font-size:13px;margin:14px 0 8px}
body[data-view="history"] .history-item{border-radius:10px;margin-bottom:8px}
body[data-view="history"] .history-item>summary{min-height:66px;padding:11px;gap:9px}
body[data-view="history"] .history-item summary strong{font-size:13px;line-height:1.4}
body[data-view="history"] .history-item summary span{font-size:10px;line-height:1.5;margin-top:5px}
body[data-view="history"] .history-item summary .history-score-badge{min-width:44px;padding:7px 6px;text-align:center;border-radius:7px;background:#edf3e4;font-size:18px;line-height:1.2}
.history-score-badge small{display:block;margin-top:3px;font-size:9px;font-weight:500;color:var(--muted)}
body[data-view="history"] .history-content{padding:10px;background:#f7f9f3}
.history-match-context{margin-bottom:9px}.history-match-context .history-player{font-size:13px;margin:0}.history-venue{font-size:11px;color:var(--muted);margin-top:3px;overflow-wrap:anywhere}
body[data-view="history"] .history-score-strip{gap:6px}
body[data-view="history"] .history-score-strip .snapshot-row{padding:7px 4px;gap:3px;font-size:10px;background:#eaf1df}
body[data-view="history"] .history-score-strip strong{font-size:17px}
body[data-view="history"] .history-set-scores{font-size:11px;line-height:1.5;margin:9px 0 10px}
body[data-view="history"] .history-total-groups{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px}
body[data-view="history"] .history-total-groups .match-total-group{padding:9px;border-radius:9px}
body[data-view="history"] .history-total-groups .match-total-group h3{font-size:13px;line-height:1.3;margin:0 0 5px}
body[data-view="history"] .history-total-groups .match-total-group dl>div{padding:3px 0;gap:5px}
body[data-view="history"] .history-total-groups .match-total-group dt{font-size:11.5px;line-height:1.4}
body[data-view="history"] .history-total-groups .match-total-group dd{font-size:16px;line-height:1.3}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"]{grid-column:1/-1}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"] dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"] dl>div{padding:2px 0;border:0}
.history-total-groups .match-stat-breakdown{margin-top:6px;border-top:1px solid var(--line)}
.history-total-groups .match-stat-breakdown>summary{font-size:10px;color:var(--green);min-height:36px;display:flex;align-items:center;justify-content:space-between;gap:5px;cursor:pointer;list-style:none}
.history-total-groups .match-stat-breakdown>summary::-webkit-details-marker{display:none}
.history-total-groups .match-stat-breakdown>summary:after{content:'＋'}
.history-total-groups .match-stat-breakdown[open]>summary:after{content:'−'}
#historyPools:has(>.empty),#history .history-subheading:has(+ #historyPools > .empty){display:none}
@media(max-width:360px){body[data-view="history"] .history-total-groups .match-total-group{padding:7px}body[data-view="history"] .history-total-groups .match-total-group dt{font-size:11px}}

/* Give each Match Defense total its own readable column. */
body[data-view="stats"] #matchTotals .match-total-group[data-group="defense"]{padding:5px 9px}
body[data-view="stats"] #matchTotals .match-total-group[data-group="defense"] dl{gap:0}
body[data-view="stats"] #matchTotals .match-total-group[data-group="defense"] dl>div{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px;padding:0 4px;text-align:center}
body[data-view="stats"] #matchTotals .match-total-group[data-group="defense"] dl>div+div{border-left:1px solid var(--line)}
body[data-view="stats"] #matchTotals .match-total-group[data-group="defense"] dt{font-size:11px;line-height:15px}
body[data-view="stats"] #matchTotals .match-total-group[data-group="defense"] dd{font-size:18px;line-height:22px}

/* History Defense totals match the clear three-column Match layout. */
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"]{padding:7px 9px}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"] dl{gap:0}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"] dl>div{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px;padding:0 4px;text-align:center}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"] dl>div+div{border-left:1px solid var(--line)}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"] dt{font-size:11px;line-height:15px}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"] dd{font-size:18px;line-height:22px}

/* Reduce History chrome and card spacing without shrinking the totals. */
body[data-view="history"] .player-profile{display:none}
body[data-view="history"] .match-utility-row{margin:0 0 3px;min-height:30px}
body[data-view="history"] #history>.section-title{min-height:22px;margin-bottom:2px}
body[data-view="history"] .history-subheading{margin:8px 0 6px}
body[data-view="history"] .history-item>summary{min-height:54px;padding:8px;gap:7px}
body[data-view="history"] .history-item summary span{margin-top:3px}
body[data-view="history"] .history-item summary .history-score-badge{padding:5px;min-width:40px;font-size:17px}
body[data-view="history"] .history-content{padding:7px}
body[data-view="history"] .history-match-context{display:flex;align-items:baseline;flex-wrap:wrap;column-gap:8px;margin-bottom:6px}
body[data-view="history"] .history-match-context .history-player{font-size:12px}
body[data-view="history"] .history-venue{margin:0;font-size:10px}
body[data-view="history"] .history-score-strip .snapshot-row{padding:5px 3px;gap:1px}
body[data-view="history"] .history-score-strip strong{font-size:16px}
body[data-view="history"] .history-set-scores{margin:6px 0;line-height:1.3}
body[data-view="history"] .history-total-groups{gap:5px;margin-top:5px}
body[data-view="history"] .history-total-groups .match-total-group{padding:7px}
body[data-view="history"] .history-total-groups .match-total-group h3{font-size:12px;margin-bottom:4px}
body[data-view="history"] .history-total-groups .match-total-group dl>div{padding:2px 0}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"]{padding:5px 7px}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"] dl>div{padding:0 4px}
body[data-view="history"] .history-total-groups .match-stat-breakdown{margin-top:4px}
body[data-view="history"] .history-total-groups .match-stat-breakdown>summary{min-height:32px}

/* Keep compact History cards consistent in narrow app panels too. */
body[data-view="history"] .history-content .history-total-groups{grid-template-columns:repeat(2,minmax(0,1fr))}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"] dl>div{flex-wrap:nowrap}
body[data-view="history"] .history-total-groups .match-total-group[data-group="defense"] dd{margin:0;text-align:center}

/* Use one iPhone 13 mini-sized content shell across phone screens. */
@media(max-width:600px){
 body[data-view]{--phone-panel-width:375px}
 body[data-view] main,body[data-view] .topbar{width:100%;max-width:var(--phone-panel-width);margin-left:auto;margin-right:auto}
 body[data-view] .tabs{width:100%;max-width:var(--phone-panel-width);left:50%;right:auto;transform:translateX(-50%)}
 body[data-view] .tab-panel{width:100%;max-width:100%}
}

/* All-Time shares the compact, readable match totals layout. */
body[data-view="alltime"] .player-profile{padding:7px 9px;margin-bottom:5px}
body[data-view="alltime"] .match-utility-row{margin:0 0 5px;min-height:30px}
body[data-view="alltime"] #alltime>.section-title{min-height:22px;margin-bottom:7px}
body[data-view="alltime"] #alltime>.section-title h2{font-size:16px}
body[data-view="alltime"] .all-time-summary{gap:5px;margin-bottom:8px}
body[data-view="alltime"] .all-time-summary .snapshot-row{padding:5px 3px;font-size:10px;gap:1px}
body[data-view="alltime"] .all-time-summary strong{font-size:17px}
body[data-view="alltime"] #allTimeTotals{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:5px}
body[data-view="alltime"] #allTimeTotals .match-total-group{padding:7px;border-radius:9px}
body[data-view="alltime"] #allTimeTotals h3{font-size:12px;line-height:1.3;margin:0 0 4px}
body[data-view="alltime"] #allTimeTotals dl>div{padding:2px 0;gap:5px}
body[data-view="alltime"] #allTimeTotals dt{font-size:11.5px;line-height:1.4}
body[data-view="alltime"] #allTimeTotals dd{font-size:16px;line-height:1.3}
body[data-view="alltime"] #allTimeTotals [data-group="defense"]{grid-column:1/-1;padding:5px 7px}
body[data-view="alltime"] #allTimeTotals [data-group="defense"] dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0}
body[data-view="alltime"] #allTimeTotals [data-group="defense"] dl>div{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;gap:2px;padding:0 4px;border:0;text-align:center}
body[data-view="alltime"] #allTimeTotals [data-group="defense"] dl>div+div{border-left:1px solid var(--line)}
body[data-view="alltime"] #allTimeTotals [data-group="defense"] dt{font-size:11px;line-height:15px}
body[data-view="alltime"] #allTimeTotals [data-group="defense"] dd{font-size:18px;line-height:22px;margin:0}
body[data-view="alltime"] .match-stat-breakdown{margin-top:4px;border-top:1px solid var(--line)}
body[data-view="alltime"] .match-stat-breakdown>summary{min-height:32px;display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:10px;color:var(--green);cursor:pointer;list-style:none}
body[data-view="alltime"] .match-stat-breakdown>summary::-webkit-details-marker{display:none}
body[data-view="alltime"] .match-stat-breakdown>summary:after{content:'＋'}
body[data-view="alltime"] .match-stat-breakdown[open]>summary:after{content:'−'}

/* Compact Tourney layout with clear standings and reachable match controls. */
@media(max-width:600px){
 body[data-view="tournament"] #tournament>.section-title{margin-bottom:6px;min-height:36px}
 body[data-view="tournament"] #tournament>.section-title h2{font-size:16px}
 body[data-view="tournament"] #newTournament{min-height:36px;padding:6px 8px;font-size:10px}
 body[data-view="tournament"] .tournament-card{padding:9px;margin:6px 0 10px;border-radius:10px}
 body[data-view="tournament"] .tournament-card>.section-title{margin-bottom:3px;align-items:center;gap:6px}
 body[data-view="tournament"] .tournament-card>.section-title h3{font-size:15px;line-height:1.35;margin:0}
 body[data-view="tournament"] .tournament-card .outline{min-height:36px;padding:6px 8px;font-size:10px}
 body[data-view="tournament"] .tournament-meta,body[data-view="tournament"] .tournament-location{font-size:11px;line-height:1.4;margin-top:4px}
 body[data-view="tournament"] .tournament-roster{margin:3px 0}
 body[data-view="tournament"] .tournament-roster>summary{min-height:36px;padding:5px 0;font-size:10px}
 body[data-view="tournament"] .tournament-card .tournament-results-entry{padding:6px 8px;margin-top:5px;gap:6px}
 body[data-view="tournament"] .tournament-results-entry h4{font-size:12px}
 body[data-view="tournament"] .tournament-card .compact-standings{margin-top:10px}
 body[data-view="tournament"] .standings-heading h4{font-size:12px;margin:0}
 body[data-view="tournament"] .standings-heading>span{font-size:9px;padding-right:16px}
 body[data-view="tournament"] .compact-standings .standings-progress{font-size:10px;margin:5px 0 6px}
 body[data-view="tournament"] .compact-standings .standings-list{gap:4px}
 body[data-view="tournament"] .standing-row>summary{min-height:52px;padding:6px 7px;gap:6px;grid-template-columns:25px minmax(0,1fr) 35px 9px}
 body[data-view="tournament"] .standing-row .standings-place{min-width:25px;width:25px;height:25px;font-size:10px}
 body[data-view="tournament"] .standings-row-label>strong{font-size:11px}
 body[data-view="tournament"] .standings-row-diff{font-size:18px}
 body[data-view="tournament"] .standings-key{margin-top:3px}
 body[data-view="tournament"] .standings-key>summary{font-size:10px;padding:9px 0}
 body[data-view="tournament"] .tournament-section{margin-top:7px;border-radius:8px}
 body[data-view="tournament"] .tournament-section>summary{min-height:42px;padding:8px;gap:6px}
 body[data-view="tournament"] .tournament-section>summary>strong{font-size:12px}
 body[data-view="tournament"] .tournament-section-body{padding:7px}
 body[data-view="tournament"] .tournament-section-tools{margin-bottom:6px;gap:6px}
 body[data-view="tournament"] .tournament-section-tools .muted{font-size:10px}
 body[data-view="tournament"] .schedule-round-group{margin-top:5px}
 body[data-view="tournament"] .schedule-round-group>summary{padding:7px 8px;min-height:40px}
 body[data-view="tournament"] .schedule-round-group>summary>strong{font-size:11px}
 body[data-view="tournament"] .tournament-card .schedule-match-list li{padding:7px;gap:3px 6px}
 body[data-view="tournament"] .tournament-card .schedule-match-list li>strong{font-size:11px}
 body[data-view="tournament"] .bracket-match-card{padding:8px;margin-top:7px}
 body[data-view="tournament"] .bracket-match-card h5{margin:0;font-size:12px}
 body[data-view="tournament"] .bracket-match-card .section-title{margin-bottom:5px}
 body[data-view="tournament"] .bracket-opponent{font-size:12px;margin:5px 0}
 body[data-view="tournament"] .bracket-result{font-size:13px;margin:5px 0}
 body[data-view="tournament"] .bracket-match-card>.muted{font-size:10px;margin:4px 0}
 body[data-view="tournament"] .bracket-match-card .pool-match-scoreline{font-size:11px;margin:5px 0}
}

/* Distinct setup actions and two-second feedback for changed counters. */
#appSettings>.outline{display:block;width:100%;margin-top:10px;text-align:left;min-height:46px}
#setupPlayerSummary{font-weight:700;margin-bottom:8px}
#setupStartHint{padding:9px 11px;background:#edf3e4;border-radius:7px;margin:0 0 12px}
#playerSetup{max-width:380px}
#capture .action.touch-added,.scoreboard .team.touch-added{background:#c8e7c1!important;border-color:#65a16b!important;color:#18472a!important;box-shadow:inset 0 0 0 2px #78b07a}
#capture .action.touch-removed,.scoreboard .team.touch-removed{background:#e8b5b0!important;border-color:#bb625b!important;color:#6b2623!important;box-shadow:inset 0 0 0 2px #c77970}
#capture .action.touch-added .symbol,#capture .action.touch-added strong,.scoreboard .team.touch-added .team-name{color:#18472a!important}
#capture .action.touch-removed .symbol,#capture .action.touch-removed strong,.scoreboard .team.touch-removed .team-name{color:#6b2623!important}
#capture .action.touch-added .stat-count{background:#edf8e8!important;color:#18472a!important}
#capture .action.touch-removed .stat-count{background:#fae3e0!important;color:#6b2623!important}
span.match-details,span.match-details:hover{cursor:default;text-decoration:none}

/* History records show their own score, separate from the live Capture scoreboard. */
body[data-view="history"] .scoreboard{display:none}

.history-delete-match{margin:0 0 12px 8px;min-height:44px;padding:8px 12px;border:1px solid #dfb6b1;border-radius:7px;color:#8a3730;background:#fff4f2;font-size:11px;font-weight:600}
.history-delete-actions{display:flex;gap:10px;margin-top:16px}.history-delete-actions>button{flex:1;min-width:0;margin:0}.history-delete-confirm{background:#963e36;border-color:#963e36}#deleteMatchName{font-weight:700;margin-bottom:10px}

@media(max-width:600px){#tournament .bracket-match-card>.section-title{flex-wrap:wrap}#tournament .bracket-match-card>.section-title>h5{flex:1 0 100%}}
#setup [hidden]{display:none!important}
#poolScheduleSetup [hidden]{display:none!important}
