:root{--bg:#f5f6f7;--line:#e5e7eb;--muted:#6b7280;--danger:#b42318}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial;color:#111}[hidden]{display:none!important}button,input,select{font:inherit}button{border:0;border-radius:11px;padding:10px 13px;background:#111;color:#fff;font-weight:800;cursor:pointer}.ghost{background:#fff;color:#111;border:1px solid var(--line)}.danger{background:var(--danger)}input,select{width:100%;padding:11px;border:1px solid var(--line);border-radius:10px;background:#fff}.center{min-height:100vh;display:grid;place-items:center;padding:20px}.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px}.auth{width:min(420px,100%);display:grid;gap:10px;text-align:center}.ball{font-size:44px}.auth h1{margin:0}.muted{color:var(--muted);font-size:14px}.topbar{position:sticky;top:0;z-index:10;background:#fff;padding:14px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.topbar h1{margin:0}.headBtns{display:flex;gap:6px}.tabs{position:sticky;top:70px;z-index:9;display:grid;grid-template-columns:repeat(4,1fr);background:#fff}.tab{background:#fff;color:#777;border-radius:0}.tab.active{color:#111;border-bottom:3px solid #111}main{max-width:900px;margin:auto;padding:12px}.panel{display:none}.panel.active{display:block}.scoreboard{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;text-align:center;gap:10px;margin-bottom:12px}.score-team{display:grid;gap:6px}.score-team strong{font-size:42px}.score-team div{display:flex;justify-content:center;gap:4px;flex-wrap:wrap}.score-team button{padding:7px 9px}.period{display:grid;gap:7px;font-size:12px}.game-controls{display:flex;gap:8px;margin-bottom:12px}.game-controls select{flex:1}.player-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px;margin-bottom:10px}.playerTop{display:flex;gap:10px;align-items:center;margin-bottom:10px}.playerTop small{display:block;color:#777}.avatar{width:48px;height:48px;border-radius:50%;background:#111;color:#fff;display:grid;place-items:center;font-weight:900}.statgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.stat{background:#f7f7f7;color:#111;border:1px solid var(--line);min-height:64px;display:grid;place-items:center}.stat strong{font-size:19px}.stat small{font-size:10px}.row{display:grid;grid-template-columns:1fr 70px 44px;gap:7px;padding:7px 0}.add{display:grid;grid-template-columns:1fr 70px auto;gap:7px;margin-top:12px}.leaders{margin:15px 0}.leaders p{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:7px}.ok{background:#dcfce7;padding:10px;border-radius:10px}.overlay{position:fixed;inset:0;background:#0008;z-index:30;display:grid;place-items:center;padding:20px}.modal{width:min(450px,100%)}.modal label{display:block;font-weight:800;font-size:13px;margin:12px 0 5px}.modalBtns{display:flex;justify-content:flex-end;gap:7px;margin-top:15px}#toast{position:fixed;z-index:50;bottom:22px;left:50%;transform:translateX(-50%);background:#111;color:#fff;border-radius:99px;padding:10px 14px;opacity:0;pointer-events:none}#toast.show{opacity:1}@media(max-width:520px){.statgrid{grid-template-columns:repeat(4,1fr)}.add{grid-template-columns:1fr 65px}.add button{grid-column:1/-1}.scoreboard{grid-template-columns:1fr 80px 1fr}.headBtns #signOutBtn{display:none}}
.shareBtns{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.buttonLink{display:inline-block;text-decoration:none;border-radius:11px;padding:10px 13px;font-weight:800}.accountCard{margin-top:12px}.liveWrap{max-width:760px;margin:auto;padding:14px}.liveHead{text-align:center;margin-bottom:12px}.liveScore{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;text-align:center}.liveScore strong{font-size:52px}.livePeriod{text-align:center;margin:10px 0}.livePlayer{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:11px 0}.liveStats{font-size:13px;color:var(--muted);text-align:right}.updated{text-align:center;color:var(--muted);font-size:12px;margin-top:10px}

.teamList{display:grid;gap:10px;margin:14px 0}
.teamChoice{display:flex;justify-content:space-between;align-items:center;text-align:left;padding:16px;width:100%}
.teamChoice strong{font-size:18px}
.teamChoice small{opacity:.8}
.teamsCard{width:min(520px,92vw)}
@media(max-width:520px){.headBtns{gap:6px}.headBtns button{padding:9px 10px;font-size:13px}}

.sectionHead{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.sectionHead h2{margin-bottom:3px}
.historyGame{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-top:1px solid #e7e7e7}
.historyGame:first-child{border-top:0}
.historyGame.current{font-weight:600}
.historyMain{display:flex;align-items:center;justify-content:space-between;gap:18px;flex:1}
.historyMain div{display:flex;flex-direction:column;gap:4px}
.historyMain small{font-weight:400;color:#666}
.historyMain strong{font-size:20px;white-space:nowrap}
@media(max-width:520px){
  .sectionHead{align-items:flex-start;flex-direction:column}
  .sectionHead button{width:100%}
  .historyGame{align-items:stretch;flex-direction:column}
  .historyMain{width:100%}
  .historyGame>button{width:100%}
}

.finalEdit{margin:10px 0;padding:10px 14px;border:1px solid #d8d8d8;border-radius:10px;font-weight:700;text-align:center;background:#f7f7f7}
.game-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.game-controls select{flex:1;min-width:180px}
@media(max-width:520px){.game-controls>*{width:100%}}

/* Game History cards v10 */
#gameHistory{display:grid!important;gap:14px!important;margin-top:12px}
.game-history-card{display:block!important;padding:16px!important;border:1px solid #dfe3e8!important;border-radius:12px!important;background:#fff!important}
.game-history-card.current{border:2px solid #222!important}
.gh-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important}
.gh-title{font-size:17px!important;font-weight:700!important;line-height:1.25!important}
.gh-badge{display:inline-flex!important;padding:5px 9px!important;border-radius:999px!important;font-size:11px!important;font-weight:800!important;letter-spacing:.04em!important;white-space:nowrap!important}
.gh-final{background:#eceff1!important;color:#37474f!important}
.gh-progress{background:#e8f5e9!important;color:#1b5e20!important}
.gh-date{margin-top:5px!important;color:#667085!important;font-size:13px!important}
.gh-score{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;align-items:center!important;gap:10px!important;margin:14px 0 12px!important;padding:12px!important;border-radius:10px!important;background:#f5f6f8!important}
.gh-score span:last-child{text-align:right!important}
.gh-score strong{font-size:22px!important;white-space:nowrap!important}
.gh-open{width:100%!important;min-height:40px!important}
@media(max-width:520px){
 .gh-head{align-items:flex-start!important}
 .gh-title{font-size:16px!important}
 .gh-score{gap:7px!important;padding:10px 8px!important}
 .gh-score span{font-size:13px!important}
 .gh-score strong{font-size:20px!important}
}

/* Team identity + optional logo v11 */
.ourTeamName{font-weight:900!important}
.vsText{font-weight:400;color:#667085}
.score-team.ourTeam{background:#f7f8fa;border-radius:12px;padding:10px}
.scoreTeamIdentity{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:4px}
.scoreTeamIdentity>div:last-child{display:flex;flex-direction:column;align-items:flex-start}
.yourTeamLabel{font-size:9px;font-weight:900;letter-spacing:.08em;color:#667085;line-height:1.1}
.scoreLogoFallback,.teamLogoPlaceholder{display:flex;align-items:center;justify-content:center;overflow:hidden;background:#f1f3f5;border:1px solid #dfe3e8}
.scoreLogoFallback{width:38px;height:38px;border-radius:50%;font-size:20px}
.scoreLogoFallback img,.teamLogoPlaceholder img,.teamChoiceLogo img{width:100%;height:100%;object-fit:contain}
.logoSettings{display:flex;align-items:center;gap:16px;margin-top:12px}
.teamLogoPlaceholder{width:84px;height:84px;border-radius:16px;font-size:38px;flex:0 0 auto}
.logoActions{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.uploadButton{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 14px;border-radius:8px;background:#111;color:#fff;font-weight:700;cursor:pointer}
.teamChoice{display:flex!important;align-items:center!important;gap:12px!important;text-align:left!important}
.teamChoiceLogo{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:10px;overflow:hidden;background:#f1f3f5;flex:0 0 auto;font-size:22px}
.teamChoiceText{display:flex;flex-direction:column;min-width:0}
@media(max-width:520px){.logoSettings{align-items:flex-start}.teamLogoPlaceholder{width:70px;height:70px}.score-team.ourTeam{padding:7px}}

.logoFinderLinks{display:flex;gap:12px;flex-wrap:wrap}
.logoFinderLinks a{font-size:13px;font-weight:700;text-decoration:none}
.logoFinderLinks a:hover{text-decoration:underline}


/* Game Recap v13 */
.recapModal{width:min(680px,100%);max-height:92vh;overflow:auto}
.recapTop{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.recapTop h2{margin:2px 0 0}
.recapEyebrow{font-size:11px;font-weight:900;letter-spacing:.12em;color:#667085}
.recapScore{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:center;padding:18px 10px;border:1px solid var(--line);border-radius:14px;background:#f7f8fa}
.recapTeam{display:grid;justify-items:center;text-align:center;gap:6px;min-width:0}
.recapTeam>strong{font-size:15px;overflow-wrap:anywhere}
.recapTeam>b{font-size:38px}
.ourRecapTeam>strong{font-weight:900}
.recapLogo{width:58px;height:58px;border-radius:14px;background:#fff;border:1px solid var(--line);display:grid;place-items:center;overflow:hidden;font-size:28px}
.recapLogo img{width:100%;height:100%;object-fit:contain}
.recapFinal{display:grid;justify-items:center;gap:4px;text-align:center}
.recapFinal span{font-size:12px;font-weight:900;letter-spacing:.08em;padding:5px 8px;border-radius:999px;background:#e8eaed}
.recapFinal small{font-size:11px;color:#667085;white-space:nowrap}
.recapPlayers{margin-top:14px;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.recapPlayer{padding:13px 14px;border-top:1px solid var(--line)}
.recapPlayer:first-child{border-top:0}
.recapPlayerName{display:flex;align-items:center;gap:7px;margin-bottom:7px}
.recapPlayerName span{font-size:12px;font-weight:800;color:#667085}
.recapStats{display:flex;gap:7px;flex-wrap:wrap}
.recapStats span{font-size:12px;background:#f5f6f7;border-radius:999px;padding:6px 8px}
.recapEmpty{padding:14px;margin:0}
.recapActions,.gh-actions{display:flex;gap:8px}
.recapActions{margin-top:14px}
.recapActions button{flex:1}
.gh-actions button{flex:1}
@media(max-width:520px){
  .recapModal{padding:12px}
  .recapScore{gap:7px;padding:14px 6px}
  .recapTeam>b{font-size:32px}
  .recapLogo{width:48px;height:48px}
  .recapActions{flex-direction:column}
}

.recapActions{flex-wrap:wrap}.recapActions #shareRecapImage{flex:2 1 220px}.recapActions .ghost{flex:1 1 120px}

.parentQrBox{display:flex;align-items:center;gap:16px;margin:12px 0;padding:14px;border:1px solid var(--line);border-radius:14px;background:#f7f8fa}
.parentQr{width:166px;min-width:166px;height:166px;background:#fff;border:1px solid var(--line);border-radius:12px;display:grid;place-items:center;padding:8px}
.parentQr img,.parentQr canvas{max-width:150px!important;max-height:150px!important}
.parentQrText{display:grid;gap:6px}.parentQrText strong{font-size:16px}.parentQrText small{color:#667085;line-height:1.4}
@media(max-width:520px){.parentQrBox{flex-direction:column;text-align:center}}

/* Seasons */
.seasonBar{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:12px 0;padding:12px 14px}
.seasonBar>div{display:grid;gap:4px;min-width:220px}
.seasonLabel{font-weight:800;letter-spacing:.08em;color:#667085}
#seasonSelect{font-weight:800}
@media(max-width:520px){.seasonBar{align-items:stretch}.seasonBar>div{min-width:0;flex:1}}

.playerHistoryModal{max-width:620px;width:min(620px,94vw);max-height:86vh;overflow:auto}.historyModalHead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.historyModalHead h2{margin:2px 0}.historyModalHead small{font-weight:800;letter-spacing:.08em;color:#667085}.historySeasonCard,.historyCareer{border:1px solid var(--line);border-radius:14px;padding:14px;margin:10px 0;background:#fff}.historyCareer{background:#f7f8fa}.historySeasonHead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.historySeasonHead span{font-size:13px;color:#667085}.historyStats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.historyStats>div{display:flex;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:10px;background:#f7f8fa}.historyStats b{font-size:16px}.historyEmpty{color:#667085;padding:5px 0}@media(max-width:520px){.historyStats{grid-template-columns:1fr}}

/* Player History roster action fix */
.rosterActions{display:flex;align-items:center;gap:6px}
.rosterActions .historyBtn,.rosterActions .removeBtn{width:auto;min-width:0;margin:0;white-space:nowrap}
.rosterActions .removeBtn{padding-left:12px;padding-right:12px}

/* Roster spacing + password link */
.rosterRow{grid-template-columns:minmax(180px,1fr) 72px auto!important;gap:10px!important;align-items:center}
.rosterActions{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:126px}
.rosterActions .historyBtn{padding-left:12px!important;padding-right:12px!important}
.rosterActions .removeBtn{width:38px!important;height:38px!important;min-width:38px!important;padding:0!important;display:grid!important;place-items:center}
.linkBtn{background:transparent!important;color:#344054!important;border:0!important;box-shadow:none!important;text-decoration:underline;padding:8px!important;margin:0 auto 4px!important;width:auto!important}
@media(max-width:560px){
 .rosterRow{grid-template-columns:minmax(0,1fr) 62px!important}
 .rosterActions{grid-column:1/-1;justify-content:flex-end}
}

.parentCard{max-width:620px}.parentAddRow{display:grid;grid-template-columns:1fr auto;gap:8px;margin:12px 0}.athleteCard{display:grid;gap:3px;text-align:left;border:1px solid var(--line);border-radius:12px;padding:12px;margin:8px 0;background:#fff}.athleteCard span,.athleteCard small{color:#667085}.parentCodePanel{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px;padding:8px 10px;background:#f7f8fa;border-radius:10px}.parentCodePanel span{font-size:12px;color:#667085}.parentCodePanel strong{letter-spacing:.08em}.parentCodePanel button{margin-left:auto}@media(max-width:520px){.parentAddRow{grid-template-columns:1fr}.parentCodePanel button{margin-left:0}}

.athleteCard{cursor:pointer}.athleteCard:hover{background:#f7f8fa}.athleteCard:focus{outline:2px solid #111;outline-offset:2px}

.linkExistingBox{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.linkExistingBox>strong{display:block;margin-bottom:4px}
.athleteTeamBlock{margin-top:16px;padding-top:4px;border-top:2px solid var(--line)}
.athleteTeamTitle{display:flex;justify-content:space-between;align-items:center;padding:8px 2px 2px;font-size:17px}
.athleteTeamTitle span{color:var(--muted);font-weight:800}

/* Sports Theme v30 — visual only */
:root{
 --bg:#eef3f8;
 --line:#d9e2ec;
 --muted:#66788a;
 --danger:#c62828;
 --navy:#102a43;
 --navy2:#173f5f;
 --blue:#1976d2;
 --blueSoft:#e8f2ff;
 --green:#16875d;
 --greenSoft:#e7f7ef;
 --gold:#f2b134;
 --card:#ffffff;
}
body{background:linear-gradient(180deg,#eaf2f9 0,#f6f8fa 240px,#f6f8fa 100%);color:#102a43}
.card{background:var(--card);border-color:#d8e2eb;box-shadow:0 2px 8px rgba(16,42,67,.055)}
.topbar{background:var(--navy);color:#fff;border-bottom:0;box-shadow:0 2px 10px rgba(16,42,67,.18)}
.topbar .muted{color:#c9d8e6}
.topbar .ghost{background:#fff;color:var(--navy);border-color:#fff}
button{background:var(--blue);box-shadow:0 1px 2px rgba(16,42,67,.12)}
button:hover{filter:brightness(.97)}
.ghost{background:#fff;color:var(--navy);border-color:#cbd8e3;box-shadow:none}
.danger{background:var(--danger)}
.tabs{background:#fff;border-bottom:1px solid #dbe5ee}
.tab{color:#6b7f91;background:#fff}
.tab.active{color:var(--blue);border-bottom-color:var(--blue);background:#f8fbff}
.seasonBar{border-left:4px solid var(--blue)}
#seasonSelect{color:var(--navy);background:#f8fbff}
.scoreboard{border-top:4px solid var(--blue)}
.score-team.ourTeam{background:var(--blueSoft);border:1px solid #cfe3fb}
.score-team.ourTeam>strong{color:var(--blue)}
.yourTeamLabel{color:var(--blue)}
.period b{color:var(--navy)}
.finalEdit{background:#eef2f6;color:var(--navy);border-color:#d7e0e8}
.player-card{border-left:4px solid #bfd7ee}
.avatar{background:var(--navy)}
.stat{background:#f7fafc;border-color:#dce6ef}
.stat:hover{background:var(--blueSoft);border-color:#b9d7f5}
.stat strong{color:var(--navy)}
.game-history-card.current{border-color:var(--blue)!important}
.gh-progress{background:var(--greenSoft)!important;color:var(--green)!important}
.gh-final{background:#edf1f5!important;color:#41566b!important}
.historyCareer{background:var(--blueSoft);border-color:#cfe3fb}
.historySeasonCard{border-color:#d8e3ed}
.historyStats>div{background:#f5f8fb}
.athleteCard{border-left:4px solid var(--blue)}
.athleteCard:hover{background:var(--blueSoft)}
.parentCodePanel{background:#fff8e6;border:1px solid #f6df9d}
.parentCodePanel strong{color:#8a5b00}
.parentQrBox{background:#f4f9ff;border-color:#cfe3fb}
.liveHead{border-top:4px solid var(--green)}
.livePeriod{color:var(--green);font-weight:800}
.logoSettings{padding:8px 0}
.ok{background:var(--greenSoft);color:#126844}
.linkExistingBox{background:#f8fbff;border:1px solid #d6e7f7;border-radius:12px;padding:14px;margin-top:18px}
.recapScore{background:#f3f7fb}
.recapFinal span{background:var(--navy);color:#fff}
#toast{background:var(--navy)}
@media(max-width:520px){
 body{background:#f4f7fa}
 .topbar{padding:12px}
 .tabs{top:67px}
}

/* Team-specific accent v31 */
:root{--teamAccent:#1976d2}
.tab.active{color:var(--teamAccent)!important;border-bottom-color:var(--teamAccent)!important}
.seasonBar{border-left-color:var(--teamAccent)!important}
.scoreboard{border-top-color:var(--teamAccent)!important}
.score-team.ourTeam{border-color:color-mix(in srgb,var(--teamAccent) 28%,white)!important;background:color-mix(in srgb,var(--teamAccent) 10%,white)!important}
.score-team.ourTeam>strong,.yourTeamLabel{color:var(--teamAccent)!important}
.score-team.ourTeam button:not(.ghost){background:var(--teamAccent)!important}
.player-card{border-left-color:color-mix(in srgb,var(--teamAccent) 55%,white)!important}
.game-history-card.current{border-color:var(--teamAccent)!important}
.athleteCard{border-left-color:var(--teamAccent)!important}
.teamColorSettings{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0 4px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f8fbff}
.teamColorSettings>div:first-child{display:grid;gap:3px}
.colorPresets{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.colorDot{width:32px;height:32px;min-width:32px;padding:0;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px #cbd5df}
.colorDot[data-team-color="#1976d2"]{background:#1976d2}.colorDot[data-team-color="#f57c00"]{background:#f57c00}.colorDot[data-team-color="#00897b"]{background:#00897b}.colorDot[data-team-color="#2e7d32"]{background:#2e7d32}.colorDot[data-team-color="#7b1fa2"]{background:#7b1fa2}.colorDot[data-team-color="#c62828"]{background:#c62828}
.colorDot.selected{box-shadow:0 0 0 3px #102a43}
.customColorLabel{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:800}
#teamColorPicker{width:38px;height:32px;padding:2px;border-radius:8px}
@media(max-width:600px){.teamColorSettings{align-items:flex-start;flex-direction:column}}

/* Player photos v32 */
.playerPhotoSettings{display:flex;align-items:center;gap:12px;margin:10px 0 4px}
.playerPhotoSettings>div:last-child{display:flex;align-items:flex-start;flex-direction:column;gap:7px}
.playerPhotoLarge{width:84px;height:84px;min-width:84px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#102a43;color:#fff;font-size:25px;font-weight:900;border:3px solid #fff;box-shadow:0 0 0 1px #ccd8e3}
.playerPhotoLarge img,.avatar img,.athleteThumb{width:100%;height:100%;object-fit:cover}
.avatar{overflow:hidden}
.athleteThumb{width:48px;height:48px;border-radius:50%;grid-row:1/4;grid-column:1;margin-right:8px}
.athleteCard:has(.athleteThumb){grid-template-columns:56px 1fr}.athleteCard:has(.athleteThumb)>strong,.athleteCard:has(.athleteThumb)>span,.athleteCard:has(.athleteThumb)>small{grid-column:2}
.parentAthletePhoto{width:70px;height:70px;border-radius:50%;object-fit:cover;margin-bottom:8px;border:3px solid #fff;box-shadow:0 0 0 1px #ccd8e3}

/* Mobile-first Trial UI v38 */
.mobileCoachNav{display:none}
.mobileBack{display:none}
@media(max-width:700px){
 body{padding-bottom:78px}
 .topbar{position:sticky;top:0;min-height:58px;padding:9px 11px}
 .topbar h1{font-size:20px}
 .topbar .headBtns #undoBtn{display:inline-flex}
 .topbar .headBtns #myTeamsBtn{font-size:12px;padding:8px}
 .tabs{display:none!important}
 .seasonBar{position:relative;margin:8px 8px 10px;padding:9px 10px;gap:8px}
 .seasonBar>div{min-width:0;flex:1}
 .seasonActions{width:auto!important}.seasonActions button{font-size:11px;padding:8px!important}
 main{padding:8px}
 .scoreboard{grid-template-columns:1fr 66px 1fr;gap:6px;padding:10px 7px;margin-bottom:8px}
 .score-team strong{font-size:38px}
 .score-team button{min-width:42px;min-height:40px;font-size:15px;padding:7px!important}
 .period{font-size:11px}.period button{font-size:11px;padding:7px}
 .game-controls{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:9px;margin-bottom:8px}
 .game-controls select{grid-column:1/-1;min-width:0}.game-controls button{min-height:42px}
 .player-card{padding:10px;margin-bottom:8px;border-radius:14px}
 .playerTop{margin-bottom:7px}.avatar{width:44px;height:44px}
 .statgrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 .stat{min-height:66px;padding:5px 2px!important;border-radius:10px}
 .stat strong{font-size:21px}.stat small{font-size:9px;line-height:1.15}
 .mobileCoachNav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:25;background:#fff;border-top:1px solid #d7e2ec;box-shadow:0 -3px 14px rgba(16,42,67,.12);padding:5px max(5px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left))}
 .mobileCoachNav button{background:transparent;color:#708296;border-radius:10px;padding:5px 2px;display:grid;place-items:center;gap:1px;box-shadow:none}
 .mobileCoachNav button span{font-size:19px}.mobileCoachNav button small{font-size:10px;font-weight:800}
 .mobileCoachNav button.active{color:var(--teamAccent,#1976d2);background:color-mix(in srgb,var(--teamAccent,#1976d2) 10%,white)}
 .mobileBack{display:inline-flex;background:transparent!important;color:#1976d2!important;box-shadow:none!important;padding:4px 0!important;margin-bottom:8px}
 .playerHistoryModal{width:100%!important;max-height:94vh!important;border-radius:18px 18px 0 0!important;align-self:end}
 #parentAthleteModal{align-items:end!important;padding:0!important}
 .parentCard{width:100%!important;min-height:100vh;border-radius:0!important;border:0!important}
 .athleteCard{min-height:96px}
}

/* Mobile shell correction v39 */
@media(max-width:700px){
 html,body{max-width:100%;overflow-x:hidden}
 body{padding-bottom:86px!important}
 .topbar{width:100%;display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center;padding:8px 9px!important;overflow:hidden}
 .topbar>div:first-child{min-width:0;overflow:hidden}
 .topbar h1{font-size:20px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}
 .topbar .muted{font-size:11px!important;color:#d7e4ef!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .headBtns{display:flex!important;gap:4px!important}.headBtns button{min-height:38px!important;padding:7px 8px!important;font-size:11px!important;white-space:nowrap}
 .headBtns #signOutBtn{display:none!important}
 .tabs{display:none!important;height:0!important;min-height:0!important;overflow:hidden!important;border:0!important;padding:0!important;margin:0!important}
 .seasonBar{margin:7px 7px!important;padding:7px 9px!important;gap:6px!important}.seasonBar>div{min-width:0!important}
 .seasonBar select{padding:7px!important;font-size:12px!important}.seasonActions #archiveSeasonBtn{display:none!important}.seasonActions #newSeasonBtn{padding:7px 8px!important;font-size:10px!important}
 main{padding:7px!important;width:100%!important;overflow:hidden}
 .scoreboard{margin:0 0 7px!important;padding:8px 5px!important;grid-template-columns:minmax(0,1fr) 56px minmax(0,1fr)!important;gap:4px!important}
 .scoreLogoFallback{width:30px!important;height:30px!important}.score-team strong{font-size:32px!important}
 .score-team button{min-width:35px!important;min-height:36px!important;padding:5px!important;font-size:13px!important}
 .period{font-size:10px!important}.period button{padding:6px 4px!important;font-size:9px!important}
 .finalEdit{margin:5px 0!important;padding:6px!important;font-size:11px!important}
 .game-controls{padding:7px!important;margin-bottom:7px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important}
 .game-controls select{grid-column:auto!important;min-width:0!important;min-height:40px!important;padding:8px!important}
 .game-controls button{width:auto!important;min-height:40px!important;padding:8px 10px!important;font-size:11px!important}
 .player-card{width:100%!important;overflow:hidden!important;padding:10px!important}.playerTop{margin-bottom:7px!important}
 .statgrid{width:100%!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
 .stat{width:100%!important;min-width:0!important;min-height:70px!important;padding:5px 2px!important;overflow:hidden!important}.stat strong{font-size:21px!important}.stat small{font-size:9px!important;line-height:1.12!important;overflow-wrap:anywhere}
 .mobileCoachNav{display:grid!important;visibility:visible!important;opacity:1!important;grid-template-columns:repeat(5,1fr)!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:100!important;background:#fff!important;border-top:1px solid #d7e2ec!important;box-shadow:0 -3px 14px rgba(16,42,67,.15)!important;padding:5px 5px calc(5px + env(safe-area-inset-bottom))!important}
 .mobileCoachNav button{background:transparent!important;color:#708296!important;padding:5px 2px!important;box-shadow:none!important;min-height:50px!important}.mobileCoachNav button span{font-size:19px!important}.mobileCoachNav button small{font-size:10px!important}
 .mobileCoachNav button.active{color:var(--teamAccent,#1976d2)!important;background:color-mix(in srgb,var(--teamAccent,#1976d2) 10%,white)!important}
}

/* Final mobile coach game compression v40 */
@media(max-width:700px){
 /* compact header */
 .topbar{min-height:50px!important;padding:6px 8px!important}
 .topbar h1{font-size:18px!important;line-height:1.05!important}
 .topbar .muted{font-size:10px!important}
 .headBtns button{min-height:34px!important;padding:5px 7px!important;font-size:10px!important}
 /* season becomes a slim utility row */
 .seasonBar{margin:5px 6px!important;padding:5px 7px!important;border-radius:10px!important}
 .seasonBar .seasonLabel{font-size:8px!important}
 .seasonBar select{min-height:34px!important;padding:5px 7px!important;font-size:11px!important}
 .seasonActions #newSeasonBtn{min-height:34px!important;padding:5px 7px!important}
 /* scoreboard tighter but fully usable */
 .scoreboard{padding:6px 4px!important;margin-bottom:5px!important;border-radius:12px!important}
 .scoreTeamIdentity{margin-bottom:1px!important}
 .scoreLogoFallback{width:27px!important;height:27px!important;font-size:15px!important}
 .yourTeamLabel{font-size:7px!important}
 .score-team b{font-size:11px!important}
 .score-team strong{font-size:29px!important;line-height:1!important}
 .score-team{gap:3px!important}
 .score-team button{min-width:34px!important;min-height:33px!important;padding:3px 5px!important;font-size:12px!important}
 .period{gap:3px!important;font-size:9px!important}
 .period button{padding:4px 3px!important;font-size:8px!important;min-height:30px!important}
 .finalEdit{margin:4px 0!important;padding:5px!important;font-size:10px!important}
 /* current game selector + new game one compact line */
 .game-controls{padding:5px!important;margin-bottom:5px!important;gap:5px!important;border-radius:11px!important}
 .game-controls select{min-height:36px!important;padding:6px!important;font-size:11px!important}
 .game-controls button{min-height:36px!important;padding:6px 8px!important;font-size:10px!important}
 /* player identity compact; stat buttons stay big */
 .player-card{padding:8px!important;margin-bottom:6px!important}
 .playerTop{gap:8px!important;margin-bottom:5px!important}
 .playerTop .avatar{width:40px!important;height:40px!important;min-width:40px!important;font-size:12px!important}
 .playerTop b{font-size:15px!important}.playerTop small{font-size:10px!important}
 .statgrid{gap:4px!important}
 .stat{min-height:67px!important;padding:4px 1px!important;border-radius:9px!important}
 .stat strong{font-size:21px!important;line-height:1!important}
 .stat small{font-size:8.5px!important;line-height:1.05!important}
 /* maximize content above fixed thumb nav */
 main{padding:5px!important}
 .mobileCoachNav button{min-height:47px!important;padding:3px 1px!important}
 .mobileCoachNav button span{font-size:18px!important}
 .mobileCoachNav button small{font-size:9px!important}
}

/* BJ4 Sports Beta brand */
.bj4Brand{display:inline-grid;justify-items:center;line-height:1;margin:4px auto 10px}.bj4Mark{position:relative;display:flex;align-items:baseline;font-family:Arial Black,Arial,sans-serif;font-style:italic;font-weight:900;letter-spacing:-7px;font-size:58px;color:#102a43;padding-right:5px}.bj4Mark:after{content:"";position:absolute;left:1px;right:-4px;bottom:4px;height:5px;background:#1687ff;transform:skewX(-32deg) rotate(-5deg);border-radius:6px}.bj4Mark b{color:#1687ff;font-size:1.08em}.bj4Sports{font-size:14px;font-weight:900;letter-spacing:8px;color:#102a43;margin-left:8px}.parentHero>.bj4Brand{margin:0 6px 0 0;transform:scale(.7);transform-origin:left center}@media(max-width:700px){.bj4Mark{font-size:48px}.bj4Sports{font-size:11px;letter-spacing:6px}.parentHero>.bj4Brand{transform:scale(.62);width:82px}}

/* BJ4 beta login/legal polish v42 */
#authView .card>.bj4Brand{margin-top:8px;margin-bottom:18px}
#authView .card>p.muted{font-size:15px;line-height:1.35;margin:4px auto 20px;max-width:330px}
.legalLinks{display:flex;justify-content:center;align-items:center;gap:9px;margin:18px 0 4px;font-size:12px}
.legalLinks a{color:#60758a;text-decoration:none;font-weight:800}.legalLinks a:hover{text-decoration:underline}

/* Login legal links exact placement v43 */
#authView #loginLegalLinks{display:flex!important;visibility:visible!important;opacity:1!important;justify-content:center;align-items:center;gap:9px;width:100%;margin:12px 0 2px!important;font-size:12px!important}
#authView #loginLegalLinks a{display:inline!important;color:#60758a!important;text-decoration:none!important;font-weight:800!important}
#authView #loginLegalLinks span{display:inline!important;color:#9aabba!important}
.roleCard{width:min(620px,94vw);text-align:center;padding:24px;border-top:5px solid #1687ff}.roleChoices{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}.roleChoice{min-height:150px;border-radius:18px;display:grid;place-items:center;align-content:center;gap:7px;background:#102a43}.roleChoice.parentChoice{background:#1976d2}.roleChoice span{font-size:38px}.roleChoice strong{font-size:22px}.roleChoice small{color:#e7eff7}@media(max-width:560px){.roleChoices{grid-template-columns:1fr}.roleChoice{min-height:125px}}