body.coachMode .coachOnly{display:block!important}
body.coachMode .timingFields,body.coachMode .coachStoredField,body.coachMode #session article:first-of-type,body.coachMode .normalRosterActions,body.coachMode nav [data-tab="members"],body.coachMode nav [data-tab="settings"],body.coachMode #saveRanking,body.coachMode #exportRanking,body.coachMode #uploadSession{display:none!important}
body.coachMode #session article:nth-of-type(2)>label:first-of-type,body.coachMode #session article:nth-of-type(2)>.row:first-of-type{display:none}
body.coachMode.coachNoScores nav [data-tab="standings"],body.coachMode.coachNoScores #standings{display:none!important}
.coachOptions{margin:16px 0 4px;padding-top:15px;border-top:1px solid #d8e0e7}.coachOptions>label{display:block;margin:0 0 14px}.coachOptions .tick{margin-top:16px!important}.noScoreMatch{cursor:default!important}.noScoreMatch .teams strong,.noScoreMatch .vs{display:none}.noScoreMatch .teams{grid-template-columns:1fr 1fr}.noScoreMatch .teams span:last-child{text-align:right}
.coachCompleteRound{width:calc(100% - 24px);margin:12px;border:0;border-radius:11px;padding:14px;background:#c7f000;color:#071b33;font-weight:900}.coachCompleteRound.complete{background:#d9dee3;color:#536170}.coachNoScores .roundDone{opacity:.58;filter:grayscale(.7)}.coachNoScores .roundCurrent{box-shadow:0 0 0 3px #c7f000}.coachNoScores .roundUpcoming{opacity:.78}
#coachFirstDealer{margin:18px 0 10px;border-style:solid;background:#fff;color:#071b33}
.coachPrivacy{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:16px;padding:10px max(16px,calc((100vw - 1500px)/2));background:#c8f000;color:#071d34}
.coachSportIdentity{display:flex;align-items:center;gap:12px;min-width:0}.coachSportIdentity img{width:176px;height:auto;max-height:30px;flex:0 0 176px;object-fit:contain;object-position:left center}.coachSportIdentity b{white-space:nowrap}.coachPrivacy span{flex:1}.coachPrivacy button{width:auto;padding:9px 14px;background:#071d34;color:#fff;border:0;border-radius:10px}
body.coachMode{--coach-accent:#c7f000}body.coachMode.sportPadel{--coach-accent:#52d6e8}body.coachMode.sportTennis{--coach-accent:#f4e54b}body.coachMode.sportBadminton{--coach-accent:#ff8f70}.coachMode .coachPrivacy,.coachMode .coachCompleteRound{background:var(--coach-accent)}.coachMode .roundCurrent{box-shadow:0 0 0 3px var(--coach-accent)!important}.coachMode #coachFirstDealer{border-color:var(--coach-accent);box-shadow:inset 5px 0 0 var(--coach-accent)}.coachMode .coachOptions{border-top:4px solid var(--coach-accent)}
.scanButton{display:block;text-align:center;cursor:pointer;padding:16px;border-radius:12px}
#coachScanStatus{display:block;margin:15px 2px 0;line-height:1.45}
.coachScan.scanning .scanButton{pointer-events:none;opacity:.55}.coachScan.scanning #coachScanStatus{color:#173f68;font-weight:800}.coachScan.scanning #coachScanStatus:before{content:'●';display:inline-block;margin-right:7px;color:#9fc000;animation:scanPulse .9s infinite alternate}@keyframes scanPulse{to{opacity:.25}}
.coachReviewSheet{width:min(680px,94vw);max-height:92vh;overflow:auto;background:#fff;border-radius:22px;padding:24px}
.coachReviewSheet textarea{width:100%;box-sizing:border-box;font:inherit;font-size:18px;line-height:1.5;padding:14px;border:1px solid #b8c5d1;border-radius:12px;resize:vertical}
@media(max-width:650px){
  body.coachMode{overflow-x:hidden;padding-bottom:calc(70px + env(safe-area-inset-bottom))}
  .coachPrivacy{position:relative;top:auto;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 12px;line-height:1.25}
  .coachSportIdentity{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,145px) 1fr}.coachSportIdentity img{width:145px;max-height:26px;flex-basis:auto}.coachSportIdentity b{font-size:14px;white-space:normal;line-height:1.2}
  .coachPrivacy span{grid-column:1/-1;grid-row:auto;font-size:12px;overflow-wrap:anywhere}
  .coachPrivacy button{width:100%;min-width:0;margin:0;padding:10px 6px;font-size:12px;white-space:normal;line-height:1.2}
  body.coachMode header{top:0;min-height:54px}
  body.coachMode header nav{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.coachMode.coachNoScores header nav{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.coachMode header nav button{width:100%;min-width:0;white-space:nowrap}
  body.coachMode main{padding:14px 10px 28px;overflow:hidden}
  body.coachMode .hero{margin-bottom:12px}
  body.coachMode .hero h1{font-size:28px;line-height:1.05;margin:6px 0 8px}
  body.coachMode .hero p{font-size:13px;line-height:1.4}
  body.coachMode .card{width:100%;padding:17px 14px;margin-bottom:18px;overflow:hidden}
  body.coachMode .card h2{font-size:17px;line-height:1.2;margin-bottom:13px}
  body.coachMode label,body.coachMode .hint{display:block;position:static;clear:both;margin-top:14px;margin-bottom:10px;overflow-wrap:anywhere;line-height:1.4}
  body.coachMode input,body.coachMode select,body.coachMode button{max-width:100%;min-width:0}
  body.coachMode .coachOnly small{display:block;margin-top:6px;font-weight:500;line-height:1.4}
  body.coachMode #competitiveOptions .tick{display:grid!important;grid-template-columns:22px minmax(0,1fr);width:100%}
  body.coachMode #competitiveOptions .tick span{min-width:0}
  body.coachMode .player{width:100%;gap:6px}
  body.coachMode .player input,body.coachMode .player select,body.coachMode .player button{font-size:14px;padding:10px 7px;overflow:hidden;text-overflow:ellipsis}
  body.coachMode .roundActions{width:100%}
  body.coachMode .roundActions button{white-space:normal;line-height:1.25}
  body.coachMode #players{margin-top:16px}
  body.coachMode #generate,body.coachMode #recalculate,body.coachMode #continueRotation,body.coachMode #nextLadder,body.coachMode #nextBox{margin-top:16px;margin-bottom:12px}
  body.coachMode .roundScreen{margin-top:18px;margin-bottom:26px}
  .coachReviewSheet{width:100%;max-height:100dvh;padding:16px;border-radius:14px}
  .coachReviewSheet .scoreTop{align-items:flex-start;gap:8px}
  .coachReviewSheet .scoreTop h2{font-size:22px;line-height:1.1}
  .coachReviewSheet .scoreTop p{font-size:13px;line-height:1.4}
}

@media(max-width:650px){body.coachMode{padding-bottom:0}body.coachMode header nav{position:static!important;transform:none;padding-bottom:0;background:#071b33;box-shadow:none}body.coachMode .roundScreen{scroll-margin-top:110px}}

@media(max-width:380px){
  .coachPrivacy{padding-left:8px;padding-right:8px}
  body.coachMode .hero h1{font-size:25px}
  body.coachMode .player.simple{grid-template-columns:minmax(0,1fr) 74px 38px!important}
  body.coachMode .player:not(.simple){grid-template-columns:minmax(0,1fr) 78px 38px!important}
}
