:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif;color:#f5f6f8;background:#101114;--red:#b71920;--panel:#1b1d22;--line:#343740;--muted:#a5a8b2;--green:#34c27a;--gold:#f3b83f}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at top,#252832 0,#101114 45%);padding-bottom:60px}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}header{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;align-items:center;padding:12px max(14px,env(safe-area-inset-left));background:rgba(16,17,20,.94);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}h1{font-size:18px;margin:2px 0}.eyebrow{font-size:10px;color:#ff7b80;font-weight:900;letter-spacing:.14em}.status-wrap{display:flex;gap:8px;align-items:center}.badge,.small{border-radius:999px;padding:7px 10px;border:1px solid var(--line);font-size:10px;font-weight:900}.badge.live{background:#143b29;color:#8de7b9}.badge.pending{background:#4b3b12;color:#ffe09a}.badge.offline{background:#4a181b;color:#ff9ca0}.small{background:#24272e;color:#fff}main{max-width:1200px;margin:auto;padding:12px}.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;box-shadow:0 12px 30px #0004}.scoreboard{display:grid;grid-template-columns:44px 1fr 76px 1fr 44px;overflow:hidden}.score-side,.score-adjust,.set-center{border:0;background:transparent;color:#fff;min-height:92px}.score-side{display:flex;flex-direction:column;justify-content:center;align-items:center}.score-side span{font-size:12px;font-weight:900;color:#ddd}.score-side strong{font-size:44px;line-height:1}.score-adjust{font-size:28px;color:var(--muted)}.set-center{display:flex;flex-direction:column;align-items:center;justify-content:center;border-left:1px solid var(--line);border-right:1px solid var(--line)}.set-center span,.set-center small{font-size:10px;color:var(--muted);font-weight:900}.set-center strong{font-size:25px}.team-tabs,.view-tabs,.mode-tabs{display:flex;gap:7px;margin:11px 0;overflow:auto}.team-tabs button,.view-tabs button,.mode-tabs button{flex:1;min-width:max-content;background:#24272e;color:#c9cbd1;border:1px solid var(--line);border-radius:12px;padding:11px;font-size:11px;font-weight:900}.team-tabs button.active,.view-tabs button.active,.mode-tabs button.active{background:var(--red);color:#fff;border-color:#df464c}.hidden{display:none!important}.player-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px}.player-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px}.player-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}.jersey{width:42px;height:42px;display:grid;place-items:center;background:var(--red);border-radius:50%;font-weight:950}.player-name{font-weight:900}.libero-label{font-size:9px;color:#ffce6a;font-weight:900}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.stat{padding:12px 6px;border:1px solid #444853;border-radius:10px;background:#292c34;color:#fff;font-size:10px;font-weight:900}.stat.positive{background:#17472f;border-color:#29734f}.stat.error{background:#542126;border-color:#87333a}.empty{padding:36px;text-align:center;color:var(--muted)}.recent-card{margin-top:12px;padding:12px}.recent-card h2,.card h2,.modal-card h2{font-size:13px;letter-spacing:.08em}.recent-item{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding:8px 0;font-size:12px}.roster-editor{padding:14px;margin-bottom:10px}.form-row{display:flex;gap:8px}.form-row input,.form-row select{min-width:0;flex:1;background:#111318;border:1px solid #414550;color:#fff;border-radius:10px;padding:12px}.form-row input:first-child{max-width:75px}.form-row button,.roster-actions button,.wide{background:var(--red);color:#fff;border:1px solid #df464c;border-radius:10px;padding:11px;font-weight:900}.roster-list{display:grid;gap:7px}.roster-row{display:grid;grid-template-columns:55px 1fr auto;gap:9px;align-items:center;padding:10px;background:var(--panel);border:1px solid var(--line);border-radius:12px}.roster-row.playing{border-color:#36885e}.roster-meta{font-size:10px;color:var(--muted)}.roster-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}.roster-actions button{background:#292c34;border-color:#444853;padding:7px;font-size:9px}.roster-actions .on{background:#694700;border-color:#c89217}.roster-actions .remove{background:#542126}.table-wrap{overflow:auto;padding:12px}table{width:100%;border-collapse:collapse;font-size:11px}th,td{padding:9px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}th:first-child,td:first-child{text-align:left;position:sticky;left:0;background:var(--panel)}.modal{position:fixed;inset:0;z-index:30;background:#000b;display:grid;place-items:center;padding:16px}.modal-card{width:min(520px,100%);max-height:92vh;overflow:auto;background:#1c1e24;border:1px solid #444853;border-radius:18px;padding:18px}.modal-card.large{width:min(850px,100%)}.modal-card label{display:block;color:var(--muted);font-size:11px;margin:8px 0}.wide{width:100%;margin-top:8px}.wide.danger{background:#6b181d}.wide.ghost{background:#292c34;border-color:#444853}.diagnostics{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:14px 0}.diagnostics div{background:#121419;border-radius:10px;padding:10px}.diagnostics span,.diagnostics strong{display:block;font-size:10px}.diagnostics span{color:var(--muted);margin-bottom:4px}.history-row{padding:12px;border-bottom:1px solid var(--line)}.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,120px);background:#f5f6f8;color:#111;padding:11px 16px;border-radius:999px;font-size:12px;font-weight:900;transition:.2s;z-index:50}.toast.show{transform:translate(-50%,0)}footer{text-align:center;color:#747884;font-size:10px;padding:20px}@media(max-width:650px){.scoreboard{grid-template-columns:34px 1fr 58px 1fr 34px}.score-side strong{font-size:38px}.player-grid{grid-template-columns:1fr}.form-row{flex-wrap:wrap}.roster-row{grid-template-columns:44px 1fr}.roster-actions{grid-column:1/-1;justify-content:flex-start}header h1{font-size:14px}}
.team-select-screen{position:fixed;inset:0;z-index:100;background:radial-gradient(circle at top,#30272a,#101114 55%);display:grid;place-items:center;padding:18px}.team-select-card{width:min(480px,100%);background:#191b20;border:1px solid #3b3e47;border-radius:22px;padding:24px;box-shadow:0 24px 70px #0008;text-align:center}.team-select-card p,.modal-help{color:var(--muted);font-size:12px}.team-select-card button{display:block;width:100%;margin-top:10px;padding:16px;border-radius:12px;border:1px solid #df464c;background:var(--red);color:#fff;font-weight:950}.sub-button{margin-left:auto;background:#292c34;color:#fff;border:1px solid #4b4f5a;border-radius:9px;padding:8px 11px;font-size:10px;font-weight:900}

/* School and platform administration must open above the full-screen program selector. */
#adminModal,#platformAdminModal,#platformSchoolManageModal{z-index:1300}
#platformAdminModal .modal-input{width:100%}
#platformAdminModal .admin-row-actions{align-items:center}
#platformAdminModal .program-limit-input{width:82px;min-height:40px;padding:8px;background:#111318;border:1px solid #414550;color:#fff;border-radius:8px}
.license-banner{position:sticky;top:0;z-index:140;padding:10px max(14px,env(safe-area-inset-left));background:#72530b;color:#fff3c4;border-bottom:1px solid #d5a52f;text-align:center;font-size:12px;font-weight:950;letter-spacing:.04em}.license-banner.urgent{background:#8a3c0d;color:#fff}.license-banner.expired{background:#761c22;color:#fff;border-color:#e34b55}body:has(.license-banner:not(.hidden)) header{top:38px}.license-date-input{min-height:40px;padding:8px;background:#111318;border:1px solid #414550;color:#fff;border-radius:8px}
.invitation-status{margin:9px 0;padding:11px 12px;border:1px solid #555b68;border-radius:10px;background:#15171c;color:#d7d9df;font-size:12px;line-height:1.4}.invitation-status.success{border-color:#2f9b67;background:#123c28;color:#aef0cb}.invitation-status.error{border-color:#b83b44;background:#4b1b20;color:#ffc0c4}button:disabled{cursor:not-allowed;opacity:.45}
.roster-visible-count{margin:10px 2px 12px;padding:8px 12px;border-left:3px solid var(--green);color:#c9cbd1;font-size:12px;font-weight:850}
.test-environment::before{content:'TEST';position:fixed;right:8px;bottom:8px;z-index:2000;padding:5px 8px;border-radius:7px;background:#f3b83f;color:#17120a;font-size:10px;font-weight:950;letter-spacing:.08em;pointer-events:none}
header{display:grid;grid-template-columns:1fr auto 1fr;gap:10px}.header-left,.header-right{display:flex;gap:7px;align-items:center}.header-right{justify-content:flex-end}.header-title{text-align:center}.scoreboard{display:block;overflow:hidden}.score-main-row{display:grid;grid-template-columns:44px 1fr 76px 1fr 44px}.score-info-row{display:grid;grid-template-columns:1fr minmax(180px,2fr);align-items:center;border-top:1px solid var(--line);background:#15171c}.sub-total{display:flex;align-items:center;justify-content:center;gap:7px;padding:8px}.sub-total span{font-size:10px;font-weight:900;color:var(--muted)}.sub-total strong{color:#fff;font-size:16px}.sub-total button{width:30px;height:28px;border:1px solid #454954;border-radius:8px;background:#292c34;color:#fff;font-weight:950}.set-scores{display:flex;gap:6px;justify-content:center;align-items:center;min-height:44px;border-left:1px solid var(--line);font-size:9px;color:var(--muted);font-weight:900;overflow:auto}.set-chip{background:#272a31;border:1px solid #414550;border-radius:8px;padding:6px 8px;color:#fff;white-space:nowrap}.score-bottom-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding:8px 10px}.score-bottom-row div{min-width:0}.score-bottom-row span,.score-bottom-row strong{display:block}.score-bottom-row span{font-size:9px;color:var(--muted);font-weight:900}.score-bottom-row strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.score-bottom-row button{border:1px solid #df464c;background:var(--red);color:#fff;border-radius:10px;padding:9px 14px;font-size:10px;font-weight:950}.roster-editor{margin-top:12px}.roster-editor-head{display:flex;justify-content:space-between;align-items:center}.modal-input{width:100%;background:#111318;border:1px solid #414550;color:#fff;border-radius:10px;padding:12px}.check-row{display:flex!important;align-items:center;gap:8px;padding:8px 0}.edit-all-grid{display:grid;gap:7px}.edit-all-row{display:grid;grid-template-columns:70px 1fr 100px;gap:7px}.edit-all-row input,.edit-all-row select{min-width:0;background:#111318;border:1px solid #414550;color:#fff;border-radius:9px;padding:10px}.edit-all-row.conflict input{border-color:#e04b52;background:#35171a}.edit-all-error{color:#ff9ca0;font-size:11px;margin-top:8px}.roster-actions .edit{background:#292c34;border-color:#5b606d}.tools-opponent-row{display:grid;grid-template-columns:1fr auto;gap:8px}.tools-opponent-row input{width:100%;font-size:18px;min-height:50px;background:#111318;border:1px solid #555a67;color:#fff;border-radius:10px;padding:12px}.tools-opponent-row button{background:var(--red);color:#fff;border:1px solid #df464c;border-radius:10px;padding:0 18px;font-weight:900}.stat-grid.attack{grid-template-columns:repeat(3,1fr)}.stat-grid.receive{grid-template-columns:repeat(2,1fr)}.stat.spacer{visibility:hidden;pointer-events:none}.recent-item{gap:8px;align-items:center}.recent-item>span{flex:1}.recent-undo{background:#292c34;color:#fff;border:1px solid #4b4f5a;border-radius:8px;padding:7px 9px;font-size:9px;font-weight:900}.box-toolbar{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:10px}.box-toolbar button{background:#292c34;color:#fff;border:1px solid #4b4f5a;border-radius:9px;padding:8px 10px;font-size:9px;font-weight:900}.box-toolbar button.active{background:var(--red);border-color:#df464c}.derived{color:#8de7b9;font-weight:900}
@media(max-width:760px){header{grid-template-columns:1fr auto}.header-title{grid-row:1;grid-column:1/-1}.header-left{grid-row:2;grid-column:1}.header-right{grid-row:2;grid-column:2}.header-right .small,.header-left .small{font-size:8px;padding:7px}.score-info-row{grid-template-columns:1fr}.set-scores{border:0;border-top:1px solid var(--line)}.score-main-row{grid-template-columns:34px 1fr 58px 1fr 34px}.edit-all-row{grid-template-columns:58px 1fr 82px}}
.tools-opponent-row button.success,.wide.success,.small.success{background:#17683f;border-color:#2f9b67;color:#fff}.wide.secondary{background:#454952;border-color:#626773}.derived{color:inherit;font-weight:inherit}

/* r9 scoreboard layout */
.header-subtitle{color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.04em}
.top-team-tabs{margin:0 0 12px;gap:6px}.top-team-tabs button{min-height:58px;border-radius:18px;font-size:13px;border-width:2px}.top-team-tabs button.active{box-shadow:0 0 0 3px #101114,0 0 0 5px #626773}.scoreboard{border-radius:18px}.match-strip{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;min-height:52px;padding:9px 14px;border-bottom:1px solid var(--line);background:#13151a}.match-strip>strong{font-size:12px;letter-spacing:.08em}.match-strip>strong b{font-size:18px;margin-left:5px}.match-strip #endMatch,.match-strip #nextSet{border:1px solid #555a67;color:#fff;border-radius:10px;padding:10px 15px;font-size:10px;font-weight:950}.match-strip #endMatch{justify-self:start;background:#292c34}.match-strip #nextSet{justify-self:end;border-color:#df464c;background:var(--red)}.score-main-row{display:grid;grid-template-columns:minmax(0,1fr) 82px minmax(0,1fr);align-items:stretch}.score-team{display:grid;grid-template-columns:58px minmax(0,1fr) 58px;align-items:center;gap:12px;padding:18px}.score-team .score-adjust{width:58px;height:58px;min-height:0;border:1px solid #3c404a;border-radius:15px;background:#191b21;color:#a5a8b2;font-size:30px;font-weight:950}.score-team .score-plus{background:#6b2026;border-color:#96313a;color:#fff}.score-readout{text-align:center;min-width:0}.score-readout>span{display:block;color:#b8bbc4;font-size:12px;font-weight:950;letter-spacing:.08em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.score-value-row{display:flex;justify-content:center;align-items:center;gap:16px}.score-value-row>strong{font-size:58px;line-height:1;color:#fff}.score-value-row small{display:flex;flex-direction:column;color:var(--muted);font-size:9px;font-weight:950;letter-spacing:.08em;text-align:left}.score-value-row small b{font-size:22px;line-height:1;color:#fff}.score-subs{color:var(--muted);font-size:10px;font-weight:950;letter-spacing:.06em}.score-subs b{color:#fff}.score-center-label{display:grid;place-items:center;color:#aeb1ba;font-size:12px;font-weight:950;letter-spacing:.1em;border-left:1px solid var(--line);border-right:1px solid var(--line)}.score-info-row{grid-template-columns:210px 1fr;min-height:74px}.sub-total{flex-wrap:wrap;align-content:center}.sub-total span{flex-basis:100%;text-align:center}.sub-total button{width:42px;height:38px}.sub-total #mainSubPlus{background:#153629;border-color:#245c44;color:#8de7b9}.set-scores{min-height:74px;gap:9px}.set-chip{display:flex;flex-direction:column;align-items:center;background:#113126;border-color:#2c8059;color:#9cebc0;padding:8px 14px;font-size:10px}.set-chip strong{font-size:18px;color:#baf4d3}.score-bottom-row{justify-content:flex-start;padding:10px 14px}.score-bottom-row span{flex:none}.score-bottom-row strong{min-width:0}
@media(max-width:760px){.top-team-tabs button{min-height:48px}.match-strip{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);padding:8px}.match-strip #endMatch,.match-strip #nextSet{padding:9px 8px;font-size:8px;white-space:nowrap}.match-strip>strong{justify-self:center;font-size:10px}.score-main-row{grid-template-columns:1fr}.score-center-label{display:none}.score-team{grid-template-columns:44px minmax(0,1fr) 44px;padding:12px 8px}.score-team .score-adjust{width:44px;height:50px}.opponent-score-team{border-top:1px solid var(--line)}.score-value-row>strong{font-size:48px}.score-info-row{grid-template-columns:1fr}.set-scores{border-left:0;border-top:1px solid var(--line)} }

/* r10 iPad tracking, roster controls, compact score and rally review */
.compact-score{position:sticky;top:66px;z-index:9;display:grid;grid-template-columns:minmax(0,1fr) auto auto auto minmax(0,1fr);align-items:center;gap:12px;margin:10px 0;padding:10px 16px;border:1px solid #454a55;border-radius:13px;background:rgba(20,22,27,.96);box-shadow:0 8px 24px #0008;backdrop-filter:blur(14px)}.compact-score span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:950;color:#c8cbd3}.compact-score span:last-child{text-align:right}.compact-score strong{font-size:24px}.compact-score em{font-style:normal;font-size:9px;font-weight:950;color:var(--muted);letter-spacing:.08em}.view-tabs button{min-height:58px;font-size:14px}.mode-tabs button{min-height:62px;font-size:13px}.player-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.player-card{padding:16px;border-radius:17px;min-width:0}.player-head{min-height:58px;margin-bottom:14px}.player-head .jersey{width:52px;height:52px;font-size:17px}.player-name{font-size:16px}.sub-button{min-height:44px;padding:10px 15px;font-size:11px}.stat-grid{gap:9px}.stat{min-height:64px;padding:12px 7px;border-radius:12px;font-size:12px;line-height:1.15}.track-swipe-zone{margin:13px 0;padding:16px;text-align:center;border:1px dashed #484d58;border-radius:13px;color:#8d919c;font-size:10px;font-weight:900;letter-spacing:.05em;touch-action:pan-y}.roster-row{grid-template-columns:58px minmax(180px,1fr) auto;gap:13px;padding:13px}.roster-identity{min-width:0}.roster-name-line{display:flex;align-items:center;gap:9px;min-width:0}.roster-name-line strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.roster-name-line .edit{flex:none;padding:7px 10px}.roster-actions{flex-wrap:nowrap;align-items:center}.roster-actions button{min-height:40px;padding:8px 11px;white-space:nowrap}.roster-actions .playing-toggle{min-width:92px}.rally-warning{display:flex;align-items:center;gap:12px;margin:10px 0;padding:12px 14px;border:1px solid #c89020;border-radius:13px;background:#46370f;color:#ffe5a8}.rally-warning>span{flex:1;font-size:11px}.rally-warning>div{display:flex;gap:7px}.rally-warning button,.rally-review-row button{border:1px solid #f0bd4f;border-radius:9px;background:#201b10;color:#fff;padding:9px 11px;font-size:9px;font-weight:950}.rally-review-list{display:grid;gap:7px}.rally-review-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px;border:1px solid var(--line);border-radius:10px;background:#13151a}.rally-review-row span{font-size:11px}.rally-review-row button{border-color:#5a5f6b;background:#292c34}
@media(max-width:1050px){.player-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.roster-row{grid-template-columns:54px 1fr}.roster-actions{grid-column:1/-1;justify-content:flex-end}}
@media(max-width:760px){.compact-score{top:105px;gap:7px;padding:9px 10px}.compact-score strong{font-size:20px}.view-tabs button{min-height:54px;font-size:12px}.mode-tabs button{min-height:56px;font-size:11px}.rally-warning{align-items:flex-start;flex-wrap:wrap}.rally-warning>span{flex-basis:100%}.rally-warning>div{width:100%}.rally-warning button{flex:1}}
@media(max-width:650px){.player-grid{grid-template-columns:1fr}.roster-actions{justify-content:flex-start;flex-wrap:wrap}.roster-name-line{align-items:flex-start;flex-direction:column}.compact-score span{font-size:9px}}

/* r11 compact roster edit and scroll-triggered floating score */
.roster-name-line strong{font-size:17px}
.roster-name-line .edit{width:auto;min-height:30px;padding:5px 8px;background:#292c34;color:#c9cbd1;border:1px solid #505560;border-radius:7px;font-size:9px;font-weight:800;line-height:1.1;white-space:nowrap}
.compact-score{position:fixed;top:var(--header-height,66px);left:50%;transform:translateX(-50%);width:min(1176px,calc(100% - 24px));margin:0;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:14px;border-top:0;border-radius:0 0 13px 13px}
.compact-team{display:flex;justify-content:center;align-items:center;gap:12px;min-width:0}
.compact-team span,.compact-team span:last-child{text-align:left;font-size:12px}
.compact-team strong{flex:none}
@media(max-width:650px){.compact-score{gap:8px;padding:8px 10px}.compact-team{gap:7px}.compact-team span,.compact-team span:last-child{font-size:10px}.compact-team strong{font-size:20px}}

/* r12 gestures stay inside tracking cards; recent actions scroll independently */
#players{touch-action:pan-y}
#recent{height:240px;overflow-y:scroll;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:8px;-webkit-overflow-scrolling:touch}
#recent::-webkit-scrollbar{width:8px}
#recent::-webkit-scrollbar-thumb{background:#555b68;border-radius:8px}
#recent::-webkit-scrollbar-track{background:#16181d}
.server-control{display:flex;align-items:center;justify-content:flex-end;gap:10px;color:var(--muted);font-size:10px;font-weight:900;margin:8px 0 12px}.server-control select{max-width:280px;padding:10px;background:#24272e;color:#fff;border:1px solid var(--line);border-radius:9px}.match-settings{margin:12px 0}.match-settings input:first-child{max-width:none}.modal-input{font:inherit}textarea.modal-input{resize:vertical;line-height:1.5}
.starting-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}.starting-grid label{display:block;font-size:12px;font-weight:800}.starting-grid .modal-input{box-sizing:border-box;width:100%;margin-top:6px}#startingAudit{max-height:260px;overflow:auto;font-size:12px}#startingAudit p{border-bottom:1px solid var(--line);padding:10px 0}#startingModal{z-index:1200}
#seasonEditModal{z-index:1200;padding:8px}#seasonEditModal .season-editor{width:min(1180px,100%);max-height:96vh;max-height:96dvh;padding:20px}.season-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.season-player-navigation{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center}.season-player-navigation button{min-height:52px}.season-player-navigation select{font-size:20px;margin:0}.season-categories{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.season-categories button{min-height:56px;background:#292c34;border:1px solid var(--line);border-radius:10px;color:#fff;font-weight:800}.season-categories button.active{background:var(--red);border-color:#df464c}#seasonEditTable{padding:12px 0}#seasonEditTable h3{font-size:24px;margin:8px 0}.season-stat-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}#seasonEditTable label{font-size:16px;font-weight:800;color:#eee}#seasonEditTable input{display:block;width:100%;min-width:0;min-height:62px;margin-top:8px;padding:12px;font-size:26px;background:#20232b;color:#fff;border:1px solid var(--line);border-radius:10px}.season-editor details{margin:12px 0}.season-editor summary{padding:10px 0;cursor:pointer;color:var(--muted)}.season-editor-footer{position:sticky;bottom:-20px;background:#1c1e24;padding:8px 0 16px}.season-editor-footer button{min-height:54px;font-size:16px}@media(max-width:600px){#seasonEditModal .season-editor{padding:12px}.season-categories{grid-template-columns:repeat(3,minmax(0,1fr))}.season-stat-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.season-player-navigation{gap:5px}.season-player-navigation button{font-size:10px;padding:8px}.season-player-navigation select{font-size:17px}.season-editor-footer{bottom:-12px}}

/* r13 keep iPad portrait roster controls on the same compact row */
@media(min-width:700px) and (max-width:1050px){
  .roster-row{grid-template-columns:42px minmax(0,1fr) auto;gap:8px;padding:9px 10px}
  .roster-row>.jersey{width:38px;height:38px}
  .roster-actions{grid-column:auto;flex-wrap:nowrap;gap:4px}
  .roster-actions button{min-height:38px;padding:7px 8px;font-size:8px}
  .roster-actions .playing-toggle{min-width:76px}
  .roster-name-line{gap:6px;flex-direction:row;align-items:center}
  .roster-name-line strong{font-size:16px;min-width:0}
  .roster-name-line .edit{padding:5px 6px;font-size:8px}
}
.stat.stat-saving{outline:3px solid var(--gold);filter:brightness(1.35)}.stat.stat-saved{outline:3px solid var(--green);filter:brightness(1.2)}.stat.stat-failed{outline:3px solid #ff5252}#seasonEditTable input.edited-total{border:2px solid var(--gold);background:#35301e}
.coach-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}.coach-metrics>div{background:#20232b;border:1px solid var(--line);border-radius:10px;padding:14px;min-width:0}.coach-metrics span{display:block;color:var(--muted);font-size:12px}.coach-metrics strong{display:block;font-size:28px;margin-top:6px}.coach-errors{white-space:normal;font-size:13px;color:var(--muted);line-height:1.6}#timeoutModal{z-index:1100}.timeout-points{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;text-align:center;padding:16px 0;border-bottom:1px solid var(--line)}.timeout-points div span,.timeout-points strong{display:block}.timeout-points strong{font-size:42px}.timeout-points>span{font-size:11px;color:var(--muted)}@media(max-width:650px){.coach-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.coach-metrics strong{font-size:25px}}

body.modal-open{overflow:hidden;overscroll-behavior:none}.box-reports{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:12px;padding:16px}.box-reports h2{margin:0 0 5px}.box-reports p{margin:0;color:var(--muted);font-size:12px}.box-reports .wide{width:auto;min-width:250px;margin:0}.modal{padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.modal-card{max-height:calc(100vh - 24px);max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px);overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.modal-heading{position:sticky;top:-18px;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;margin:-18px -18px 10px;padding:10px 10px 10px 18px;background:#1c1e24;border-bottom:1px solid var(--line)}.modal-heading h2{margin:0}.modal-close-x,.modal-header-close{flex:none;display:grid;place-items:center;min-width:44px;min-height:44px;border:1px solid #555a67;border-radius:50%;background:#292c34;color:#fff;font-size:28px;font-weight:700;line-height:1}.season-editor-heading{position:sticky;top:-20px;z-index:4;margin:-20px -20px 12px;padding:10px 12px 10px 20px;background:#1c1e24;border-bottom:1px solid var(--line)}.season-editor-heading .modal-header-close{font-size:10px;border-radius:999px;padding:0 14px}.modal-card>.wide:last-child{margin-bottom:max(0px,env(safe-area-inset-bottom))}
.tools-section-title{margin:14px 0 6px;color:var(--muted);font-size:10px;letter-spacing:.1em}.tools-grid{display:grid;gap:7px}.tools-grid-three{grid-template-columns:repeat(3,minmax(0,1fr))}.tools-grid-two{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:8px}.tools-grid button{min-width:0;min-height:42px;border:1px solid #4b4f5a;border-radius:9px;padding:7px 5px;background:#292c34;color:#fff;font-size:9px;font-weight:900;line-height:1.15}.tools-grid button.secondary{background:#454952;border-color:#626773}.tools-grid button.danger{background:#6b181d;border-color:#9d3037}.player-grid>.empty{grid-column:1/-1;width:100%}
@media(max-width:600px){.box-reports{display:block;padding:14px}.box-reports .wide{width:100%;min-width:0;margin-top:12px;min-height:48px}.modal{place-items:stretch center;padding:max(6px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}.modal-card,.modal-card.large{align-self:center;width:100%;max-height:calc(100vh - 12px);max-height:calc(100dvh - max(12px,env(safe-area-inset-top) + env(safe-area-inset-bottom)));padding:12px;border-radius:14px}.modal-heading{top:-12px;margin:-12px -12px 8px;padding:7px 6px 7px 12px;min-height:54px}.season-editor-heading{top:-12px;margin:-12px -12px 10px;padding:7px 6px 7px 12px}.modal-close-x{min-width:44px;min-height:44px}.modal-card label{margin:6px 0}.modal-card .wide{min-height:44px}.diagnostics{margin:10px 0}.diagnostics div{padding:8px}}

/* v1 production accounts, administration and centered Match Tools groups */
.auth-card{text-align:left}.auth-card h1,.auth-card>p,.auth-card .eyebrow{text-align:center}.auth-card label,.team-select-card>label{display:block;margin:12px 0 5px;color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.08em}.auth-card button.ghost,.selection-actions button.ghost,.team-select-card button.ghost{background:#292c34;border-color:#4b4f5a}.selection-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}.selection-actions button{margin:0}.tools-section-title{text-align:center}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:8px 0 14px}.permission-option{display:flex!important;align-items:center;gap:8px;margin:0!important;padding:10px;border:1px solid var(--line);border-radius:9px;background:#15171c}.permission-option input{width:20px;height:20px}.admin-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}.admin-row span{min-width:0;font-size:12px}.admin-row small{display:block;color:var(--muted)}.admin-row-actions{display:flex;gap:6px;flex:none}.admin-row button{flex:none;border:1px solid #4b4f5a;border-radius:8px;background:#292c34;color:#fff;padding:9px 10px;font-size:9px;font-weight:900}.admin-row button.danger{border-color:#923039;background:#5a1d22}.admin-add-program{margin:14px 0 22px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#15171c}.admin-add-program label{display:block;margin:0 0 7px;color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.08em}.admin-add-program .modal-input{width:100%;min-height:50px;font-size:16px}.admin-add-program .wide{margin-top:8px}#inviteLink:empty{display:none}
.history-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.history-actions .small{border-radius:8px}.history-actions .danger{background:#5a1d22;border-color:#923039}.history-row>div:first-of-type{margin-top:4px;color:var(--muted);font-size:11px}
.roster-program-tools{display:flex;align-items:center;gap:12px;margin-bottom:10px;padding:12px}.roster-program-tools>span{flex:none;color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.08em}.roster-filter-buttons{display:flex;flex-wrap:wrap;gap:7px}.roster-filter-buttons button,.program-switch-choices button{min-height:44px;border:1px solid #4b4f5a;border-radius:9px;background:#292c34;color:#fff;padding:9px 13px;font-size:10px;font-weight:900}.roster-filter-buttons button.active{background:var(--red);border-color:#df464c}.program-switch-choices{display:grid;gap:8px;margin:12px 0}.program-switch-choices button.current{border-color:#2f9b67;background:#17683f}.roster-actions .program-move{background:#292c34;border-color:#4b4f5a}
.startup-recovery{margin-top:12px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#15171c}.startup-recovery>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}.startup-recovery button{margin:0;min-width:0}.header-left{flex-wrap:wrap}
@media(max-width:600px){.selection-actions,.permission-grid{grid-template-columns:1fr}.admin-row{align-items:flex-start;flex-direction:column}.admin-row-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.admin-row button{width:100%}.roster-program-tools{align-items:flex-start;flex-direction:column}.roster-filter-buttons{width:100%}.roster-filter-buttons button{flex:1}.startup-recovery>div{grid-template-columns:1fr}}

/* v1.2.1 administration, select affordances and optional rally checks */
select{appearance:none;-webkit-appearance:none;padding-right:38px!important;background-image:linear-gradient(45deg,transparent 50%,#b9bdc7 50%),linear-gradient(135deg,#b9bdc7 50%,transparent 50%)!important;background-position:calc(100% - 18px) 50%,calc(100% - 12px) 50%!important;background-size:6px 6px,6px 6px!important;background-repeat:no-repeat!important}
#schoolSelect{text-align:center;text-align-last:center}
.match-strip{grid-template-columns:1fr auto auto 1fr}
.match-strip #endMatch,.match-strip #nextSet,.match-strip .rally-checks-toggle{border:1px solid #555a67;color:#fff;border-radius:10px;padding:10px 15px;font-size:10px;font-weight:950}
.match-strip .rally-checks-toggle{background:#17683f;border-color:#2f9b67}.match-strip .rally-checks-toggle.off{background:#454952;border-color:#737987;color:#ddd}
.member-role-select{min-height:36px;max-width:190px;border:1px solid #4b4f5a;border-radius:8px;background-color:#20232b;color:#fff;font-size:10px;font-weight:800}
@media(max-width:760px){.match-strip{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.match-strip .rally-checks-toggle{grid-column:1/-1;grid-row:2;padding:8px;font-size:9px}}
.match-settings{align-items:stretch}.match-settings .section-opponent-option{flex:1;min-width:180px;justify-content:center}.match-settings #saveMatchSettings{white-space:nowrap}
@media(max-width:600px){.match-settings{display:grid;grid-template-columns:1fr}.match-settings .section-opponent-option{min-width:0}}
.leaderboard-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin:12px 0}.leaderboard-card{padding:12px;border:1px solid var(--line);border-radius:12px;background:#15171c}.leaderboard-card h2{margin-top:0}.leaderboard-card ol{margin:0;padding-left:24px}.leaderboard-card li{padding:4px}.milestones-card{grid-column:1/-1}
.match-details-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(110px,.7fr) minmax(130px,.7fr);gap:8px;align-items:end}.match-details-grid>label{margin:0}.match-details-grid input{width:100%;min-height:48px;margin-top:5px;padding:11px;background:#111318;border:1px solid #555a67;border-radius:10px;color:#fff;font-size:16px}.match-details-grid .section-opponent-option{min-height:48px;justify-content:center;margin:0!important}.admin-section-heading{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:10px;margin-top:6px}.admin-section-heading h3{margin:0}.program-limit-badge{display:inline-flex;align-items:center;justify-content:center;min-width:48px;min-height:30px;padding:3px 9px;border:1px solid #4b4f5a;border-radius:999px;background:#20232b;color:#c9cbd1;font-size:11px;font-weight:900;white-space:nowrap}.admin-compact-section{margin-top:18px;padding-top:10px;border-top:1px solid var(--line)}.invite-compact-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.invite-compact-grid .invite-email{grid-column:1/-1}.invite-compact-grid label{margin:0}.invite-compact-grid fieldset{min-width:0;margin:0;padding:7px 9px;border:1px solid var(--line);border-radius:10px}.invite-compact-grid legend{padding:0 4px;color:var(--muted);font-size:10px;font-weight:900}.invite-programs{display:flex;flex-wrap:wrap;gap:5px;margin:0}.invite-programs .permission-option{flex:1 1 90px;padding:7px;font-size:10px}.compact-action{max-width:260px}.admin-inline-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.admin-inline-actions button{min-height:40px;border:1px solid #4b4f5a;border-radius:9px;background:#292c34;color:#fff;font-weight:900}.admin-row-actions{flex-wrap:wrap}.admin-row-actions button{padding:7px 8px}.admin-row>span strong{font-size:14px}.report-entry-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.report-entry-actions button{min-height:46px;border:1px solid #4b4f5a;border-radius:9px;color:#fff;font-size:10px;font-weight:900}.report-entry-actions .success{background:#17683f;border-color:#2f9b67}.report-entry-actions .ghost{background:#292c34}
@media(max-width:650px){.match-details-grid{grid-template-columns:1fr 1fr}.match-details-grid>label:first-child{grid-column:1/-1}.invite-compact-grid{grid-template-columns:1fr}.invite-compact-grid .invite-email{grid-column:auto}.admin-section-heading{grid-template-columns:1fr auto auto}.admin-section-heading .small{padding:8px;font-size:8px}.program-limit-badge{min-width:42px;padding:3px 7px}.report-entry-actions{grid-template-columns:1fr}.admin-row{align-items:flex-start}.admin-row-actions{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}.admin-row button{width:100%}}

/* v1.2.5 compact match details, current-player leaders and milestone drilldown */
.section-field{display:block;color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.08em}.section-check{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;height:48px;margin-top:5px;padding:11px;background:#111318;border:1px solid #555a67;border-radius:10px;color:#fff;font-size:11px;letter-spacing:0}.match-details-grid .section-check input{flex:none;width:20px;min-height:20px;height:20px;margin:0;padding:0}.leaderboard-card li.current-player{color:#fff;background:#263a31;border-radius:6px;padding-left:7px}#milestonesModal{z-index:1250}#upcomingMilestones p{padding:10px 0;margin:0;border-bottom:1px solid var(--line)}

/* v1.2.9 in-app help, stat formulas and sortable career player grid */
#helpModal{z-index:1600}.selection-actions .help-entry,.selection-actions .sign-out-entry{grid-column:1/-1}.help-guide{scroll-behavior:smooth}.help-guide>p{color:#d5d7dd;line-height:1.6}.help-guide section{scroll-margin-top:70px;padding:10px 0;border-bottom:1px solid var(--line)}.help-guide section h3{margin:0 0 8px;color:#fff;font-size:15px}.help-guide section p,.help-guide li{color:#d5d7dd;font-size:13px;line-height:1.65}.help-guide ol{padding-left:24px}.help-toc{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:14px 0}.help-toc a{display:flex;align-items:center;min-height:38px;padding:7px 10px;border:1px solid #4b4f5a;border-radius:9px;background:#292c34;color:#fff;text-decoration:none;font-size:10px;font-weight:900}.season-grid-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.7fr);gap:8px;align-items:end;margin:12px 0 8px}.season-grid-controls button{margin:0;min-height:48px}.season-grid-controls label{display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.08em}.season-grid-controls select{width:100%;min-height:48px;padding:10px 34px 10px 12px;border:1px solid #555a67;border-radius:10px;background:#111318;color:#fff;font-weight:900}.stat-formulas{margin:10px 0;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:#15171c}.stat-formulas summary{cursor:pointer;color:#fff;font-size:11px;font-weight:900;letter-spacing:.06em}.stat-formulas p{margin:10px 0 0;color:#d5d7dd;font-size:12px;line-height:1.5}@media(max-width:600px){.help-toc{grid-template-columns:1fr}.help-guide section p,.help-guide li{font-size:12px}.season-grid-controls{grid-template-columns:1fr}}

/* v1.3.0 synchronized celebrations and school controls */
.championship-stars{border:0;background:transparent;color:var(--gold);padding:2px 5px;font-size:12px;letter-spacing:2px}.scoreboard.set-point{animation:setPointPulse 1.1s ease-in-out infinite alternate}@keyframes setPointPulse{to{box-shadow:0 0 0 3px #f3b83f88,0 12px 34px #f3b83f24}}
.milestone-badge{display:inline-block;margin-left:4px;filter:drop-shadow(0 0 5px #f3b83f);animation:badgeBounce 1.4s ease-in-out infinite}@keyframes badgeBounce{50%{transform:translateY(-3px) scale(1.08)}}
.celebration-settings h3 span{color:var(--gold)}.celebration-toggle-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.celebration-toggle-grid label{display:flex!important;align-items:center;gap:8px;margin:0!important;padding:10px;border:1px solid var(--line);border-radius:9px;background:#15171c;font-size:11px;font-weight:800}.celebration-toggle-grid input{width:20px;height:20px}.celebration-custom-grid{display:grid;grid-template-columns:150px minmax(0,1fr);gap:9px;align-items:end;margin:9px 0}.celebration-custom-grid label{margin:0;color:var(--muted);font-size:10px;font-weight:900}.celebration-custom-grid input{box-sizing:border-box;width:100%;min-height:46px;margin-top:5px}.celebration-custom-grid input[type=color]{padding:4px;border:1px solid var(--line);border-radius:9px;background:#15171c}.player-of-match{margin:14px 0;padding:13px;border:1px solid #6d5725;border-radius:12px;background:#2b2415}.player-of-match label{color:#ffe19a}.player-of-match .modal-input{width:100%;margin:7px 0}
.celebration-modal{--celebration-color:#b71920;position:fixed;inset:0;z-index:2200;display:grid;place-items:center;overflow:hidden;padding:20px;background:#050609d9;backdrop-filter:blur(8px)}.celebration-card{position:relative;z-index:2;width:min(520px,94vw);padding:30px 24px;text-align:center;border:2px solid var(--celebration-color);border-radius:24px;background:radial-gradient(circle at top,#4a2025,#15171c 70%);box-shadow:0 0 70px #b7192066;animation:celebrationIn .36s cubic-bezier(.2,1.4,.4,1)}.celebration-ball{font-size:54px;animation:ballSpin .8s ease-out}.celebration-card h2{margin:8px 0;font-size:clamp(26px,7vw,48px);line-height:1;color:#fff;text-shadow:0 3px 16px #000}.celebration-card p{margin:12px auto 22px;max-width:430px;color:#f3f3f5;font-size:clamp(16px,3.4vw,22px);font-weight:800}.celebration-card button{min-width:170px;padding:12px 18px;border:1px solid #ffffff66;border-radius:999px;background:#ffffff18;color:#fff;font-weight:900}.celebration-modal[data-level=big] .celebration-card{width:min(650px,95vw);padding:42px 25px}.celebration-effect{position:absolute;inset:0;pointer-events:none}.celebration-effect i{position:absolute;left:calc(var(--x)*1%);top:-10%;font-style:normal;font-size:clamp(18px,3vw,34px);animation:celebrationFall 2.8s var(--d) ease-in infinite}@keyframes celebrationIn{from{opacity:0;transform:scale(.65) rotate(-3deg)}to{opacity:1;transform:scale(1)}}@keyframes ballSpin{from{transform:translateY(-30px) rotate(-180deg);opacity:0}to{transform:none;opacity:1}}@keyframes celebrationFall{0%{transform:translateY(-15vh) rotate(0);opacity:0}15%{opacity:1}100%{transform:translateY(120vh) rotate(540deg);opacity:0}}
@media(max-width:600px){.celebration-toggle-grid,.celebration-custom-grid{grid-template-columns:1fr}.celebration-card{padding:24px 16px}.celebration-ball{font-size:44px}}@media(prefers-reduced-motion:reduce){.scoreboard.set-point,.milestone-badge,.celebration-card,.celebration-ball,.celebration-effect i{animation:none!important}}
.match-details-grid{grid-template-columns:minmax(0,2fr) minmax(110px,.7fr) minmax(125px,.7fr) minmax(115px,.65fr)}@media(max-width:760px){.match-details-grid{grid-template-columns:1fr 1fr}.match-details-grid>label:first-child{grid-column:1/-1}}

/* Keep box filters visible above the horizontally scrolling statistics table. */
.compact-score{top:var(--header-height,66px)}
#boxView .box-filters{position:sticky;top:var(--box-filter-top,130px);z-index:8;margin-bottom:10px;padding:8px;background:rgba(27,29,34,.97);backdrop-filter:blur(12px)}
#boxView .box-filters .box-toolbar{margin:0;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
#boxView .box-filters button{flex:none;min-height:42px;white-space:nowrap}
.set-chip.set-loss{background:#4b1e24;border-color:#b74953;color:#ffb9c0}
.set-chip.set-loss strong{color:#ffd4d8}
.set-chip.set-tied{background:#272a31;border-color:#626773;color:#d0d3db}
.set-chip.set-tied strong{color:#fff}

.archive-editor{width:min(1080px,100%)!important;max-height:94dvh}.archive-edit-player{border-top:1px solid var(--line);padding:10px 0}.archive-edit-player h3{font-size:17px;margin:3px 0 9px}.archive-edit-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:9px}.archive-edit-fields label{font-size:12px;font-weight:800}.archive-edit-fields input{box-sizing:border-box;display:block;width:100%;min-height:50px;margin-top:6px;background:#20232b;color:#fff;font-size:22px;padding:8px;border:1px solid var(--line);border-radius:9px}#archiveEditGrid{padding-bottom:8px}#archiveEditModal .season-categories{margin:12px 0}#archiveEditModal .season-editor-footer{position:sticky;bottom:-18px;background:#1c1e24;padding:8px 0}

.help-roles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}.help-roles>div{padding:12px;border:1px solid var(--line);border-radius:10px;background:#191c22}.help-roles dt{color:#fff;font-size:12px;font-weight:900;letter-spacing:.04em}.help-roles dd{margin:6px 0 0;color:#d5d7dd;font-size:12px;line-height:1.55}@media(max-width:650px){.help-roles{grid-template-columns:1fr}}

/* Larger match-day text with room for long names and iPad portrait layouts. */
.player-head>div:nth-child(2){min-width:0;flex:1}
.player-name{font-size:21px;line-height:1.18;overflow-wrap:anywhere}
.player-head .sub-button{flex:none;font-size:12px}
.player-head .jersey{font-size:19px}
.libero-label{font-size:11px}
.stat-grid .stat{font-size:14px;line-height:1.2;min-height:68px}
.roster-name-line strong{font-size:18px}
.roster-meta{font-size:11px}
.box-toolbar button{font-size:11px}
.recent-item{font-size:13px}
.help-guide section h3{font-size:16px}
.help-toc a{font-size:11px}
@media(min-width:700px) and (max-width:1050px){.roster-name-line strong{font-size:17px}}
@media(max-width:650px){.player-name{font-size:19px}.stat-grid .stat{font-size:13px}.roster-name-line strong{font-size:17px}}

/* Setter is a lineup designation and does not change score, stats, or subs. */
.player-card.setter-card{border:2px solid #38a8dc;background:#182a36}
.player-card.setter-card .jersey,.roster-row.setter-row .jersey{background:#216a94}
.setter-label{font-size:11px;color:#83d7ff;font-weight:900;letter-spacing:.08em}
.roster-row.setter-row{border-color:#38a8dc;background:#1b2932}
.roster-actions .setter-toggle.on{background:#17577c;border-color:#64c9f4;color:#e5f7ff}

/* Two-level box score headers keep stats readable on portrait iPads. */
#boxScore{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
#boxScore .box-score-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:14px;font-variant-numeric:tabular-nums}
#boxScore .box-score-table th,#boxScore .box-score-table td{box-sizing:border-box;min-width:62px;padding:11px 9px;border-right:1px solid #454b56;border-bottom:1px solid #454b56;text-align:center;white-space:nowrap}
#boxScore .box-score-table thead th{background:#292e38;color:#fff;font-weight:900}
#boxScore .box-score-table .box-group-heading th{padding:13px 8px;background:#343c49;border-bottom:2px solid #6d879c;font-size:12px;letter-spacing:.08em}
#boxScore .box-score-table .box-column-heading th{font-size:12px;color:#e5e9f0}
#boxScore .box-score-table .group-start{border-left:3px solid #748fa2}
#boxScore .box-score-table .player-column{position:sticky;left:0;z-index:2;min-width:145px;max-width:220px;text-align:left;white-space:normal;background:#222731;box-shadow:2px 0 4px #0007}
#boxScore .box-score-table .box-group-heading .player-column{z-index:4;background:#343c49}
#boxScore .box-score-table .points-column{min-width:64px;font-weight:900;background:#242831}
#boxScore .box-score-table tbody tr:nth-child(even) td,#boxScore .box-score-table tbody tr:nth-child(even) .player-column{background:#242831}
#boxScore .box-score-table tbody tr:nth-child(even) .points-column{background:#242831}
#boxScore .box-score-table tbody .team-totals td,#boxScore .box-score-table tbody .team-totals th{background:#334038;color:#e5ffef;font-weight:900;border-top:2px solid #62a981}
#boxScore .box-score-table tbody .team-totals .player-column{z-index:3}
@media(max-width:650px){#boxScore .box-score-table{font-size:14px}#boxScore .box-score-table th,#boxScore .box-score-table td{min-width:58px;padding:10px 7px}#boxScore .box-score-table .player-column{min-width:118px;max-width:150px}}

/* Match and History use the same grid and fixed player-name column. */
#archiveBoxContent{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
#archiveBoxContent .archive-team-box{margin:18px 0 26px}
#archiveBoxContent .archive-team-box h3{position:sticky;left:0;width:max-content;max-width:100%;background:#1c1e24;padding:5px 0}
#archiveBoxContent .archive-simple-toggle{position:sticky;left:0;z-index:6;margin:0 0 5px}
#archiveBoxContent .box-score-table{width:max-content;min-width:100%}
#archiveBoxContent .box-score-table th,#archiveBoxContent .box-score-table td{font-size:14px;min-width:62px;padding:11px 9px;border:1px solid #454b56;text-align:center;white-space:nowrap}
#archiveBoxContent .box-score-table thead th{background:#343c49;color:#fff}
#archiveBoxContent .box-score-table .box-group-heading th{border-bottom:2px solid #6d879c;font-size:12px;letter-spacing:.08em}
#archiveBoxContent .box-score-table .box-column-heading th{font-size:12px}
#archiveBoxContent .box-score-table .group-start{border-left:3px solid #748fa2}
#archiveBoxContent .box-score-table .player-column{position:sticky;left:0;z-index:2;text-align:left;min-width:145px;max-width:220px;white-space:normal;background:#222731;box-shadow:2px 0 4px #0007}
#archiveBoxContent .box-score-table .box-group-heading .player-column{z-index:4;background:#343c49}
#archiveBoxContent .box-score-table .points-column{background:#242831;font-weight:900}
#archiveBoxContent .box-score-table .team-totals td,#archiveBoxContent .box-score-table .team-totals th{background:#334038;color:#e5ffef;font-weight:900;border-top:2px solid #62a981}
#boxScore .box-score-table .box-column-heading th,#archiveBoxContent .box-score-table .box-column-heading th{min-width:54px;padding:10px 6px}
@media(max-width:650px){#archiveBoxContent .box-score-table .player-column{min-width:118px;max-width:150px}#archiveBoxContent .box-score-table th,#archiveBoxContent .box-score-table td{min-width:58px;padding:10px 7px}}

/* Readable team names on the full and floating scoreboards. */
.score-readout>span{display:flex;justify-content:center;align-items:center;min-height:2.3em;font-size:clamp(16px,1.5vw,20px);line-height:1.15;letter-spacing:.04em;white-space:normal;overflow:visible;overflow-wrap:anywhere}
.compact-team span,.compact-team span:last-child{font-size:clamp(12px,1.2vw,16px);line-height:1.1;color:#f0f2f6}
@media(max-width:650px){.score-readout>span{font-size:17px}.compact-team span,.compact-team span:last-child{font-size:12px}}
@media(max-width:360px){.compact-team span,.compact-team span:last-child{font-size:11px}}
/* Negative values use the same red text and normal cell fill for all players. */

/* Higher specificity than the striped player row and team-total rules. */
#boxScore .box-score-table tbody tr td.negative-stat,#archiveBoxContent .box-score-table tbody tr td.negative-stat{color:#ff9297;background:#242831;font-weight:900}

#seasonReport .box-score-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:14px;font-variant-numeric:tabular-nums}
#seasonReport .box-score-table th,#seasonReport .box-score-table td{box-sizing:border-box;min-width:62px;padding:11px 9px;border-right:1px solid #454b56;border-bottom:1px solid #454b56;text-align:center;white-space:nowrap}
#seasonReport .box-score-table thead th{background:#292e38;color:#fff;font-weight:900}
#seasonReport .box-score-table .box-group-heading th{padding:13px 8px;background:#343c49;border-bottom:2px solid #6d879c;font-size:12px;letter-spacing:.08em}
#seasonReport .box-score-table .box-column-heading th{font-size:12px;color:#e5e9f0}
#seasonReport .box-score-table .group-start{border-left:3px solid #748fa2}
#seasonReport .box-score-table .player-column{position:sticky;left:0;z-index:2;min-width:145px;max-width:220px;text-align:left;white-space:normal;background:#222731;box-shadow:2px 0 4px #0007}
#seasonReport .box-score-table .box-group-heading .player-column{z-index:4;background:#343c49}
#seasonReport .box-score-table .points-column{min-width:64px;font-weight:900;background:#242831}
#seasonReport .box-score-table tbody tr:nth-child(even) td,#seasonReport .box-score-table tbody tr:nth-child(even) .player-column{background:#242831}
#seasonReport .box-score-table tbody tr:nth-child(even) .points-column{background:#242831}
#seasonReport .box-score-table tbody .team-totals td,#seasonReport .box-score-table tbody .team-totals th{background:#334038;color:#e5ffef;font-weight:900;border-top:2px solid #62a981}
#seasonReport .box-score-table tbody .team-totals .player-column{z-index:3}
#seasonReport .box-score-table .box-column-heading th,#archiveBoxContent .box-score-table .box-column-heading th{min-width:54px;padding:10px 6px}
.score-readout>span,.compact-team span,.top-team-tabs button{text-transform:uppercase}
#opponentInput{text-transform:uppercase}
.compact-score em{font-size:clamp(13px,1.35vw,17px);color:#f0f2f6}
.compact-score em b{font-size:clamp(17px,1.65vw,21px)}
#seasonReport .box-score-table tbody tr td.negative-stat{color:#ff9297;background:#242831;font-weight:900}
#seasonReport .box-score-table th button{border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;min-height:38px;white-space:nowrap}
#seasonReport .box-score-table th button[aria-pressed="true"]{color:#adf4ca;text-decoration:underline;text-underline-offset:4px}
#seasonReport .box-score-table th button:focus-visible{outline:2px solid #9fe9cb;outline-offset:2px;border-radius:4px}
.season-grid-controls{display:flex;justify-content:flex-end;margin:7px 0 3px}
.season-grid-controls #historicalPlayersToggle{width:auto;min-height:34px;margin:0;padding:6px 10px;font-size:11px;letter-spacing:0}
.leaderboard-modes{display:flex;gap:8px;margin:18px 0 8px}
.leaderboard-modes button{min-height:40px;padding:8px 13px;border:1px solid #555a67;border-radius:9px;background:#292c34;color:#fff;font-size:11px;font-weight:900}
.leaderboard-modes button.active{background:#17683f;border-color:#2f9b67}
.coach-metrics .coach-errors-metric{grid-column:auto}
.coach-error-breakdown{display:flex;flex-wrap:wrap;gap:2px 7px;margin-top:4px;color:#c9cdd4;font-size:10px;line-height:1.2;font-weight:700}.coach-error-breakdown span{display:inline;color:inherit;font-size:inherit;white-space:nowrap}
@media(max-width:650px){#seasonReport .box-score-table .player-column{min-width:118px;max-width:150px}.leaderboard-modes button{flex:1;font-size:10px;padding:8px}}

/* Keep report actions and records within the modal flow on iPad. */
#seasonModal .modal-card{display:block}#seasonModal #adjustSeasonStats{position:static;display:block;clear:both;margin:12px 0 10px;min-height:46px}#seasonModal #adjustSeasonStats.hidden{display:none}#seasonModal .report-entry-actions{clear:both;margin:0 0 10px}#seasonModal .season-summary{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:8px 0 10px}#seasonModal #seasonRecords{flex:1 1 250px}#seasonModal #seasonRecords p{margin:4px 0}#seasonModal #historicalPlayersToggle{flex:none;min-height:34px;width:auto;padding:6px 10px;font-size:11px;letter-spacing:0}@media(max-width:650px){#seasonModal .season-summary{align-items:flex-start}#seasonModal #historicalPlayersToggle{margin:0}}

.leaderboard-modes{flex-wrap:wrap}.leaderboard-modes button{flex:1 1 160px}@media(max-width:650px){.coach-metrics .coach-errors-metric{grid-column:auto}.coach-errors-metric{padding:10px!important}.coach-error-breakdown{font-size:9px}.leaderboard-modes button{flex:1 1 100px;white-space:normal}}

.coach-errors-metric strong{font-size:24px;margin-top:3px}.coach-errors-metric .coach-error-breakdown{gap:2px 5px;margin-top:3px;white-space:nowrap;font-size:9px}@media(max-width:650px){.coach-errors-metric strong{font-size:23px}.coach-errors-metric .coach-error-breakdown{white-space:normal}}

#startingError:not(:empty){display:block;margin:10px 0;padding:9px 11px;border:1px solid #9b5454;border-radius:8px;background:#3b2226;color:#fff;font-size:12px}#startingError.saving{border-color:#555a67;background:#222830}#saveStarting:disabled{opacity:.75;cursor:wait}

/* Designated tracking positions and visibility. */
.player-card.libero-card{border:3px solid #f4cf36;box-shadow:inset 0 0 0 1px #715b13}
#startingModal.records-only #startingKind,#startingModal.records-only #addHistoricalPlayer,#startingModal.records-only #startingPlayerFields,#startingModal.records-only #startingStats,#startingModal.records-only #startingHighFields{display:none!important}

.historical-high-row{display:grid;grid-template-columns:minmax(90px,1fr) repeat(2,minmax(90px,1fr));gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid var(--line)}
.historical-high-row label{margin:0!important}
#seasonModal .report-entry-actions{display:flex;flex-wrap:wrap;gap:8px}#seasonModal .report-entry-actions button{flex:1 1 210px}
@media(max-width:550px){.historical-high-row{grid-template-columns:1fr 1fr}.historical-high-row strong{grid-column:1/-1}}

/* The table owns both scroll axes so its horizontal bar stays close to the visible rows. */
#boxScore{overflow:visible;min-width:0}
#boxScore .box-table-scroll{max-height:min(65vh,650px);overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;border-radius:8px}
#boxScore .box-table-scroll .box-score-table thead th{position:sticky;top:0;z-index:3}
#boxScore .box-table-scroll .box-score-table thead .player-column{z-index:5}
#players .player-card[data-libero="true"]{border:4px solid #ffdb28!important;background:#302b13!important;box-shadow:0 0 0 2px rgba(255,219,40,.4),inset 0 0 0 1px #8b7110}

.auth-card .force-reload{display:block;width:100%;margin-top:10px;border:2px solid #e0b846;color:#ffe9a0;font-weight:900;min-height:50px}

/* Player-first historical editing. */
.historical-player-editor{width:min(950px,100%)!important;max-height:94dvh!important;padding:22px!important}
.historical-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.historical-heading h2{font-size:20px;margin:3px 0}.historical-heading button{min-height:42px}
.historical-identity{display:grid;grid-template-columns:2fr 2fr 1fr;gap:10px;margin:16px 0}.historical-identity label,.historical-high-controls label{font-weight:850;font-size:11px;letter-spacing:.04em}.historical-player-editor .modal-input{width:100%;margin-top:5px;min-height:45px;font-size:16px}
.historical-existing input{opacity:.75}.historical-section{border:1px solid #444854;border-radius:15px;padding:15px;margin:13px 0;background:#171a20}.historical-section h3{margin:0;font-size:17px}.historical-section .modal-help{margin:5px 0 12px;line-height:1.5}
.historical-stat-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.historical-stat-group{border:1px solid #383d46;border-radius:12px;padding:12px;background:#22252d}.historical-stat-group h4{margin:0 0 10px;font-size:13px;color:#fff}.historical-stat-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.historical-stat-fields label{min-width:0;font-size:11px;font-weight:800;margin:0}.historical-stat-fields input{box-sizing:border-box;min-width:0}
.historical-high-controls{display:grid;grid-template-columns:1fr 2fr;gap:12px}.historical-more{margin:14px 0;color:#e2e4e9}.historical-more summary{cursor:pointer;font-weight:800}
#historicalPlayerHighs .historical-high-row label{font-size:11px;font-weight:800}#saveHistoricalPlayer{position:sticky;bottom:-22px;z-index:2;min-height:54px;background:#298752;border-color:#48b779;box-shadow:0 -8px 18px #171a20}
@media(max-width:650px){.historical-player-editor{padding:14px!important}.historical-identity{grid-template-columns:1fr 1fr}.historical-identity label:first-child{grid-column:1/-1}.historical-stat-groups{grid-template-columns:1fr}.historical-stat-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.historical-high-controls{grid-template-columns:1fr}}

.historical-section summary{font-size:17px;font-weight:900;cursor:pointer;list-style-position:inside}#historicalSeasonSection .historical-stat-groups{margin-top:12px}#historicalAudit{max-height:230px;overflow:auto;font-size:12px}#historicalAudit p{border-bottom:1px solid var(--line);padding:8px 0}

/* Visible sign-in state and match-day controls. */
.auth-build{font-size:12px;font-weight:900;letter-spacing:.08em;text-align:center;color:#f1cf70;margin:4px 0 10px}
.auth-connection{text-align:center;font-size:12px;font-weight:800;color:#8de7b9}.auth-connection.offline{color:#ffaeae}.auth-progress{text-align:center;min-height:18px;margin:9px 0!important;color:#cbd0da!important}
/* Scoreboard setup controls stay together, and Focus keeps scoring tools in reach. */
.match-strip{grid-template-columns:minmax(120px,1fr) auto minmax(0,auto) minmax(90px,1fr)}
.score-set-tools{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;min-width:0}
.match-strip .score-set-tools button{min-height:40px;padding:8px 10px;border:1px solid #555a67;border-radius:10px;background:#292c34;color:#fff;font-size:10px;font-weight:950;white-space:nowrap}
.match-strip .score-set-tools #focusModeBtn[aria-pressed="true"]{background:#255f3e;border-color:#5bbb81}
.match-strip .score-set-tools .rally-checks-toggle{background:#17683f;border-color:#2f9b67;grid-column:auto;grid-row:auto}
.match-strip .score-set-tools .rally-checks-toggle.off{background:#454952;border-color:#737987;color:#ddd}
.match-focus header .header-left,.match-focus header .header-title{display:none!important}
.match-focus header{display:flex;justify-content:flex-end;min-height:55px;padding-top:7px;padding-bottom:7px}
.match-focus header .header-right{display:flex!important;justify-content:flex-end;margin-left:auto;gap:7px;white-space:nowrap}
.match-focus #compactScore{top:57px}
.match-focus main{max-width:1400px}.match-focus .scoreboard{margin-bottom:6px}.match-focus .player-grid{gap:12px}.match-focus .player-card{box-shadow:0 6px 22px #0005}.match-focus .recent-card{margin-top:8px}
@media(max-width:760px){.match-strip{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.match-strip .score-set-tools{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.match-strip .score-set-tools button{min-width:0;width:100%;padding:8px 3px;font-size:9px;white-space:normal}.match-focus #compactScore{top:56px}}
@media(max-width:420px){.match-focus header .header-right{gap:4px}.match-focus header .header-right .small,.match-focus header .header-right .badge{font-size:9px;padding:7px 8px}.match-strip .score-set-tools button{font-size:8px}}

.historical-lookup{display:flex;align-items:center;gap:10px;margin:8px 0;font-size:11px;color:var(--muted)}.historical-lookup button{min-height:38px}@media(max-width:550px){.historical-lookup{flex-direction:column;align-items:stretch}}

/* Match Ready keeps checks and repair actions reachable on iPads and phones. */
.match-health{padding:10px 13px;margin:5px 0 12px;border-radius:10px;border:1px solid #365a48;background:#193326;color:#bdf5d0;font-size:12px;font-weight:800}.match-health.pending,.match-health.connecting{border-color:#8d7336;background:#392e1b;color:#ffe4a3}.match-health.warning{border-color:#a95555;background:#392225;color:#ffc4c4}.match-health.offline{border-color:#6a7386;background:#303540;color:#d7e5ff}
.match-ready-card{max-width:690px}.match-ready-summary{font-size:14px;font-weight:900;color:#fff;margin:16px 0 12px}.match-ready-checks{display:grid;gap:9px}.match-ready-check{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #555b67;background:#252a32;border-radius:12px}.match-ready-check.ready{border-color:#40815c}.match-ready-check.review{border-color:#ba8c38}.match-ready-check.optional{border-color:#5b6473}.match-ready-check .ready-indicator{font-weight:950;min-width:59px;font-size:10px;color:#bfeacf}.match-ready-check.review .ready-indicator{color:#ffdda0}.match-ready-check.optional .ready-indicator{color:#c4ccda}.match-ready-check .ready-description{min-width:0;flex:1}.match-ready-check strong{display:block;font-size:12px}.match-ready-check small{display:block;line-height:1.4;margin-top:4px;color:#c3cbd6;font-size:11px}.match-ready-check button{min-height:42px;padding:7px 11px;border:1px solid #777f8b;border-radius:8px;background:#38414e;color:#fff;font-size:10px;font-weight:900}.match-ready-actions{display:grid;grid-template-columns:1fr;gap:8px;margin-top:16px}.match-ready-actions button{min-height:48px}
@media(max-width:650px){.match-ready-check{flex-wrap:wrap}.match-ready-check .ready-description{flex-basis:calc(100% - 85px)}.match-ready-check button{margin-left:auto}.match-ready-actions{grid-template-columns:1fr}}

/* Last action and server confirmation share the scoreboard footer. */
.score-bottom-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;min-width:0;min-height:50px}
.score-bottom-row .last-point-summary{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;flex:1 1 auto;min-width:0}
.score-bottom-row .last-point-summary span{display:block;flex:none;white-space:nowrap}
.score-bottom-row .last-point-summary strong{display:block;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.3}
.score-bottom-row .match-health{flex:0 1 auto;max-width:52%;min-width:0;margin:0;padding:7px 10px;text-align:right;line-height:1.3}
@media(max-width:600px){.score-bottom-row{gap:7px;padding:8px}.score-bottom-row .last-point-summary{display:block;flex:1 1 45%}.score-bottom-row .last-point-summary span{display:block;font-size:9px}.score-bottom-row .last-point-summary strong{display:block;font-size:11px}.score-bottom-row .match-health{flex:1 1 55%;max-width:55%;padding:6px;font-size:10px}}

/* Year-by-year player profiles */
.season-player-link{background:transparent;color:#fff;border:0;padding:4px 0;font-weight:800;text-align:left;text-decoration:underline;text-decoration-color:#f3b83f;text-underline-offset:4px}.season-player-link span{color:var(--gold);font-size:16px}.season-player-link:focus-visible{outline:2px solid var(--gold);outline-offset:3px}#playerProfileModal{z-index:1100}#playerProfileTable{max-width:100%;overflow-x:auto;overflow-y:hidden;margin:12px 0 18px;border:1px solid var(--line);border-radius:10px}#playerProfileTable table{width:max-content;min-width:100%}#playerProfileTable th:first-child{z-index:1;min-width:135px}#playerProfileTable .team-totals th{background:#303438}#playerProfileTable .player-profile-prior th{background:#27262a}.player-profile-records{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.player-profile-highs{padding:14px;background:#15171c;border:1px solid var(--line);border-radius:10px}.player-profile-highs h3{font-size:14px;margin:0 0 8px}.player-profile-highs div{display:grid;grid-template-columns:1fr auto;gap:4px 10px;padding:9px 0;border-top:1px solid var(--line);font-size:12px}.player-profile-highs small{grid-column:1/-1;color:var(--muted)}.player-profile-highs strong{color:var(--gold)}@media(max-width:600px){.player-profile-records{grid-template-columns:1fr}}

/* Optional rotation tracking and reports */
#rotationSetupModal,#rotationReportModal{z-index:1250}.rotation-track-card{margin:8px 0;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-color:var(--line)}.rotation-track-card.rotation-active{border-color:#d6a236}.rotation-track-card div{display:grid;gap:4px}.rotation-track-card strong{font-size:10px;color:var(--gold);letter-spacing:.08em}.rotation-track-card span{font-size:12px}.rotation-track-card button{flex:none;min-height:40px;border:1px solid var(--line);border-radius:9px;padding:6px 12px;background:#292c34;color:#fff;font-size:10px;font-weight:800}.rotation-lineup{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.rotation-lineup label,.rotation-serving-label{display:block;font-size:11px;font-weight:850;color:var(--muted)}.rotation-lineup select,.rotation-serving-label select{display:block;width:100%;min-height:47px;margin-top:5px;padding:9px 33px 9px 10px;border:1px solid #555a67;border-radius:9px;background-color:#15171c;color:#fff}.rotation-serving-label{margin-top:12px!important}.rotation-report-set{border-top:1px solid var(--line);padding:10px 0 14px}.rotation-report-set h3{font-size:14px}.rotation-report-set h3 small{color:var(--gold);font-size:10px}.rotation-report-table{min-width:680px}.rotation-report-table td:last-child{text-align:left}.rotation-report-table th:first-child{z-index:1}.rotation-report-set .box-table-scroll{overflow-x:auto;overflow-y:hidden}#rotationReportButton{margin:0;min-width:150px;width:auto}#rotationToggle{min-height:36px;background:#292c34;color:#fff;border:1px solid var(--line);border-radius:9px;padding:6px 9px;font-size:10px;font-weight:850}@media(max-width:600px){.rotation-lineup{grid-template-columns:1fr}.rotation-track-card{flex-wrap:wrap}.rotation-track-card button{width:100%}#rotationReportButton{width:100%}}

.rotation-player-detail{margin:6px 0;border:1px solid var(--line);border-radius:8px;padding:9px}.rotation-player-detail summary{cursor:pointer;font-size:11px;font-weight:800;color:var(--gold)}

@media(max-width:760px){.match-strip .score-set-tools{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Position-aware lineup in rotation tracking */
.match-strip{grid-template-columns:minmax(120px,1fr) minmax(0,auto) minmax(90px,1fr)}
.score-center-label{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px}
.score-center-label small{display:block;color:var(--muted);font-size:10px;font-weight:900;white-space:nowrap;text-align:center}
.score-center-label small b{display:block;width:100%;margin-top:2px;color:#fff;font-size:19px;text-align:center}
.rotation-player-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.rotation-player-grid .player-card{min-width:0}
.rotation-player-grid [data-court-position="4"]{grid-row:1;grid-column:1}
.rotation-player-grid [data-court-position="3"]{grid-row:1;grid-column:2}
.rotation-player-grid [data-court-position="2"]{grid-row:1;grid-column:3}
.rotation-player-grid [data-court-position="5"]{grid-row:2;grid-column:1}
.rotation-player-grid [data-court-position="6"]{grid-row:2;grid-column:2}
.rotation-player-grid [data-court-position="1"]{grid-row:2;grid-column:3}
.court-position-badge{margin-left:auto;border:1px solid var(--gold);border-radius:7px;padding:5px 7px;color:var(--gold);font-size:10px;font-weight:950;white-space:nowrap}
.rotation-player-grid .player-head{flex-wrap:wrap}
.rotation-player-grid .player-head .sub-button{margin-left:0}
.next-set-reuse{display:flex!important;align-items:center;gap:10px;color:#fff!important;font-size:13px!important;font-weight:900}
.next-set-reuse input{width:22px;height:22px;flex:none}
@media(orientation:portrait){
 .rotation-player-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .rotation-player-grid [data-court-position="5"]{grid-row:1;grid-column:1}
 .rotation-player-grid [data-court-position="4"]{grid-row:1;grid-column:2}
 .rotation-player-grid [data-court-position="6"]{grid-row:2;grid-column:1}
 .rotation-player-grid [data-court-position="3"]{grid-row:2;grid-column:2}
 .rotation-player-grid [data-court-position="1"]{grid-row:3;grid-column:1}
 .rotation-player-grid [data-court-position="2"]{grid-row:3;grid-column:2}
}
@media(max-width:620px){.score-center-label{gap:3px}.score-center-label small b{font-size:16px}.rotation-player-grid .player-card{padding:8px}.rotation-player-grid .stat{padding:10px 2px;font-size:9px}}



@media(max-width:760px){.score-center-label{display:flex;flex-direction:column;padding:8px;border-left:0;border-right:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.opponent-score-team{border-top:0}}

.rotation-track-card .rotation-track-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.rotation-track-card .rotation-track-actions button{width:auto}.rotation-track-card .rotation-track-actions button.hidden{display:none}.rotation-track-card #rotationBackward,.rotation-track-card #rotationForward{border-color:var(--gold);color:var(--gold)}@media(max-width:600px){.rotation-track-card .rotation-track-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.rotation-track-card .rotation-track-actions #rotationTrackToggle{grid-column:1/-1}.rotation-track-card .rotation-track-actions button{width:100%}}

#boxFilters .box-toolbar [data-rotation-report]{border-color:var(--gold);color:var(--gold)}

/* Rotation controls share the scoreboard footer with the last point. */
.score-bottom-row #rotationTrackCard{margin:0;min-width:0;flex:0 1 39%;max-width:39%;padding:5px 7px;gap:3px 5px;background:#1c2028;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto}
.score-bottom-row #rotationTrackCard>div:first-child{display:contents}.score-bottom-row #rotationTrackCard strong{grid-column:1;grid-row:1;font-size:9px}.score-bottom-row #rotationTrackCard #rotationLiveStatus{grid-column:1/-1;grid-row:2;min-width:0;font-size:11px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
.score-bottom-row #rotationTrackCard .rotation-track-actions{grid-column:2;grid-row:1;align-items:center;flex-wrap:nowrap;gap:5px}
.score-bottom-row #rotationTrackCard button{min-height:36px;padding:4px 6px;font-size:9px}.score-bottom-row #rotationTrackCard #rotationBackward,.score-bottom-row #rotationTrackCard #rotationForward{width:36px;padding:0;font-size:24px;line-height:1}
.score-bottom-row .last-point-summary{flex:1 1 55%}
.score-bottom-row .match-health:not(.hidden){flex:1 1 100%;max-width:100%;order:3;text-align:left}
.rotation-player-grid .rotation-bench{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;border-top:1px solid var(--line);padding-top:10px}
.rotation-bench h3{grid-column:1/-1;margin:0;font-size:11px;color:var(--muted)}
.rotation-bench .bench-card{display:flex;align-items:center;gap:10px;min-height:60px;padding:10px}
.rotation-bench .bench-card .jersey{flex:none}
.rotation-bench .bench-card .sub-button{margin-left:auto}
@media(orientation:portrait){.rotation-player-grid .rotation-bench{grid-row:4;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.score-bottom-row{flex-wrap:wrap}.score-bottom-row .last-point-summary{flex:1 1 42%}.score-bottom-row .match-health{flex:1 1 42%;max-width:50%;order:2}.score-bottom-row #rotationTrackCard{order:3;flex-basis:100%}}
@media(max-width:600px){.rotation-bench .bench-card{flex-wrap:wrap}.rotation-bench .bench-card .sub-button{margin-left:0}}
.rotation-report-table .rotation-report-total{background:#253126;font-weight:900}
.rotation-report-table .rotation-report-total th:first-child{background:#253126;color:#9cebc0}
.rotation-report-table .rotation-report-total td,.rotation-report-table .rotation-report-total th{border-top:2px solid #398960}
.player-profile-records .player-profile-career{grid-column:1/-1}
.player-profile-career .modal-help{margin:4px 0 10px}
.player-profile-career small{color:#9cebc0;font-weight:800}
.player-profile-stats{border-collapse:separate;border-spacing:0;font-variant-numeric:tabular-nums}
#playerProfileTable .player-profile-stats th,#playerProfileTable .player-profile-stats td{box-sizing:border-box;min-width:68px;padding:10px 8px;border-right:1px solid #454b56;border-bottom:1px solid #454b56;text-align:center;white-space:nowrap}
#playerProfileTable .player-profile-stats .profile-year-heading,#playerProfileTable .player-profile-stats .profile-year-cell{position:sticky;left:0;z-index:2;min-width:135px;text-align:left;background:#242831}
#playerProfileTable .player-profile-stats .box-column-heading th:first-child{position:static;left:auto;z-index:auto;min-width:68px}
#playerProfileTable .player-profile-stats .box-group-heading th{background:#343c49;border-bottom:2px solid #6d879c}
#playerProfileTable .player-profile-stats .box-column-heading th{background:#292e38}
#playerProfileTable .player-profile-stats .group-start{border-left:3px solid #748fa2}
#playerProfileTable .player-profile-stats .team-totals th,#playerProfileTable .player-profile-stats .team-totals td{background:#334038;color:#e5ffef;font-weight:900;border-top:2px solid #62a981}

/* Keep set progression prominent and put one-time match actions in a compact menu. */
.scoreboard{overflow:visible}
.match-strip{position:relative;z-index:2}
.match-actions-menu{position:relative;justify-self:start}
.match-actions-menu>summary{list-style:none;display:flex;align-items:center;min-height:40px;padding:8px 12px;border:1px solid #555a67;border-radius:10px;background:#292c34;color:#fff;font-size:10px;font-weight:900;cursor:pointer;white-space:nowrap}
.match-actions-menu>summary::-webkit-details-marker{display:none}
.match-actions-menu>summary::after{content:'⌄';margin-left:8px;color:var(--muted);font-size:14px}
.match-actions-menu[open]>summary{border-color:var(--gold)}
.match-actions-popover{position:absolute;top:calc(100% + 6px);left:0;z-index:5;display:grid;gap:6px;width:max-content;min-width:190px;padding:8px;border:1px solid #555a67;border-radius:11px;background:#202329;box-shadow:0 14px 30px #0009}
.match-actions-popover button{width:100%;min-height:42px;padding:8px 10px;border:1px solid #555a67;border-radius:8px;background:#292c34;color:#fff;font-size:10px;font-weight:900;text-align:left}
.match-actions-popover #endMatch{justify-self:stretch;background:#292c34;border-color:#555a67}
.match-strip .score-set-tools button{min-height:36px;padding:7px 9px;font-size:9px}
.match-strip .score-set-tools #focusModeBtn:not([aria-pressed="true"]){background:transparent;color:#c6cbd3}
.match-strip .score-set-tools .rally-checks-toggle{background:#173b2c;border-color:#316d4b}
@media(min-width:601px) and (max-width:900px){
  .score-bottom-row{flex-wrap:wrap;gap:8px}
  .score-bottom-row .last-point-summary{flex:1 1 53%;min-width:0;order:1}
  .score-bottom-row #rotationTrackCard{flex:0 1 42%;max-width:42%;min-width:0;order:2;gap:3px 5px}
  .score-bottom-row #rotationTrackCard .rotation-track-actions{flex:none;flex-wrap:nowrap;gap:4px}
  .score-bottom-row #rotationTrackCard .rotation-track-actions button{min-width:32px;padding:5px 6px}
  .score-bottom-row .match-health{order:3;flex:1 1 100%;max-width:100%;text-align:left}
}

@media(max-width:600px){.score-bottom-row .last-point-summary{flex:1 1 100%}.score-bottom-row #rotationTrackCard{flex:1 1 100%;max-width:100%;order:2}.score-bottom-row #rotationTrackCard .rotation-track-actions{width:auto;display:flex;flex-wrap:nowrap;gap:4px}.score-bottom-row #rotationTrackCard .rotation-track-actions button{width:auto}.score-bottom-row #rotationTrackCard .rotation-track-actions #rotationTrackToggle{min-width:82px}.score-bottom-row #rotationTrackCard #rotationBackward,.score-bottom-row #rotationTrackCard #rotationForward{width:36px}.score-bottom-row .last-point-summary strong{white-space:normal}}

/* An archived match displays its final sets instead of an unused live 0–0. */
.scoreboard.match-ended .score-main-row{display:block}
.scoreboard.match-ended .score-team{display:none}
.scoreboard.match-ended .score-center-label{display:flex;min-height:82px;border:0;background:#183b2c;color:#c5f7d8;font-size:22px;letter-spacing:.08em}
.scoreboard.match-ended .score-info-row{display:block}
.scoreboard.match-ended .sub-total{display:none}
.scoreboard.match-ended .set-scores{min-height:90px;justify-content:center;gap:12px;padding:12px;border:0;flex-wrap:wrap}
.scoreboard.match-ended .set-chip{min-width:100px;padding:12px 18px;text-align:center}
.scoreboard.match-ended .set-chip b{font-size:11px}
.scoreboard.match-ended .set-chip strong{font-size:27px}
@media(max-width:600px){.scoreboard.match-ended .score-center-label{min-height:66px;font-size:18px}.scoreboard.match-ended .set-chip{min-width:80px;padding:10px}.scoreboard.match-ended .set-chip strong{font-size:22px}}

/* First-use school owner checklist. */
.quick-start-card ol{padding-left:23px;margin:16px 0;display:grid;gap:13px;line-height:1.45}.quick-start-card li::marker{color:var(--gold);font-weight:900}.quick-start-card p{line-height:1.5;color:#d5d8df}.quick-start-card strong{color:#fff}

/* Always show the school member's actual sign-in address. */
#adminMembers .member-email{display:block;color:#c8d1df;overflow-wrap:anywhere;margin:3px 0}

/* Empty save status areas should not look like blank controls. */
.invitation-status:empty{display:none}

.admin-fold{margin-top:10px;border:1px solid var(--line);border-radius:10px;background:#15171c}.admin-fold>summary,.admin-subfold>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;padding:10px 12px;font-size:11px;font-weight:900;letter-spacing:.04em}.admin-fold>summary::-webkit-details-marker,.admin-subfold>summary::-webkit-details-marker{display:none}.admin-fold>summary::before,.admin-subfold>summary::before{content:'›';display:inline-block;color:var(--gold);font-size:18px;line-height:12px;transition:transform .15s}.admin-fold[open]>summary::before,.admin-subfold[open]>summary::before{transform:rotate(90deg)}.admin-fold>summary:focus-visible,.admin-subfold>summary:focus-visible{outline:2px solid var(--gold);outline-offset:-2px}.admin-fold-count{margin-left:auto;color:var(--muted);font-size:10px;letter-spacing:0}.admin-fold>.admin-subfold{margin:0 10px 8px;border:1px solid var(--line);border-radius:8px}.admin-subfold>summary{padding:9px 10px}.admin-subfold[open]{padding-bottom:10px}.admin-subfold>.invite-compact-grid,.admin-subfold>#adminMembers,.admin-subfold>.compact-action,.admin-subfold>#inviteResult{margin-left:10px;margin-right:10px}.admin-fold.celebration-settings[open]{padding-bottom:10px}.admin-fold.celebration-settings>.celebration-toggle-grid,.admin-fold.celebration-settings>.celebration-custom-grid,.admin-fold.celebration-settings>.compact-action,.admin-fold.celebration-settings>.invitation-status{margin-left:10px;margin-right:10px}.celebration-settings .celebration-toggle-grid{gap:5px}.celebration-settings .celebration-toggle-grid label{padding:5px 8px;font-size:10px;min-height:34px}.celebration-settings .celebration-toggle-grid input{width:16px;height:16px;flex:none}.celebration-settings .celebration-custom-grid{grid-template-columns:90px minmax(0,1fr);gap:7px;margin-top:7px;margin-bottom:7px}.celebration-settings .celebration-custom-grid input{min-height:34px}.celebration-settings .compact-action{width:auto;min-height:36px}.celebration-settings #celebrationSettingsStatus:empty{display:none}#adminPrograms .admin-row:last-child{border-bottom:0}#adminModal .admin-row-actions{flex-wrap:wrap}
