/* Tracker redesign. Scoring controls keep their established grouping and gestures. */
body[data-view]{background:#edf1f8}
body[data-view] main{background:var(--paper);min-height:calc(100dvh - 62px)}
.topbar{background:var(--navy);border:0;border-top:3px solid var(--red);min-height:62px;padding-top:9px;padding-bottom:9px;gap:14px}
.topbar .brand .rally-wordmark{color:#fff;font-size:22px}.topbar .brand .rally-wordmark strong{color:#ff697c}
.topbar .rally-mark{width:34px;height:34px;border-radius:8px}
.topbar .save-status{color:#c2d0e8}.topbar .save-status::first-letter{color:#8bb4ef}
.topbar .outline,.topbar .icon-button,.topbar .help-button{background:#ffffff0a;color:#fff;border-color:#ffffff30;border-radius:8px}
.topbar .finish-set-button{background:var(--red);border-color:var(--red);color:#fff;border-radius:8px}
.topbar .finish-set-button:hover:not(:disabled){background:var(--red-dark)}
.player-profile{background:#fff;border:1px solid var(--line);border-left:3px solid var(--red);border-radius:10px}
.profile-number{background:var(--navy);color:#fff;border-radius:9px}
.match-details{color:var(--muted)}
.scoreboard{background:var(--navy);border:1px solid #17355f;border-top:3px solid var(--red);border-radius:14px;box-shadow:0 5px 14px #10264a12}
.score-head{color:#bacce5}.live{color:#ffc2cb}.live i{background:#f45368;box-shadow:0 0 0 3px #f4536820}
.score-numbers{font-weight:800}.score-numbers b{color:#7891b5}
.scoreboard .team{background:#ffffff07;border-color:#ffffff21}.scoreboard .team:hover{background:#ffffff12}
.score-bottom>span,#scoreHint{color:#c3d1e5}.set-pill{background:#ffffff0c;color:#d8e5f7}.set-history{color:#d8e5f7}
.pool-summary{background:#ffffff08;border-color:#ffffff20}.pool-summary span,.pool-summary strong{color:#fff}.pool-summary p{color:#c3d1e5}
.action{border-color:#d8e1ee;box-shadow:0 2px 0 #10264a04;border-radius:10px;background:#fff}
.action:hover{background:#f0f5fd;border-color:#a4bad9}.action .symbol{color:var(--blue)}
.action.negative{background:#fff0f2;border-color:#efbac2}.action.negative .symbol{color:#bc263b}.action.negative:hover{background:#ffe3e8}
.stat-count{background:#eaf0fa;color:#174f91;border:1px solid #d5e1f3}.action.negative .stat-count{background:#fce0e5;color:#a21d31;border-color:#f2bdc6}
.serving-group{background:#eaf0f9;border-color:#d2def0;border-radius:10px}.serving-group legend{color:#284b7b}.serving-group legend svg{color:var(--red)}
.tabs button[aria-selected=true]{border-color:var(--red);color:var(--red)}
#stats .match-context{background:var(--navy);border-color:var(--navy);color:#fff}#stats .match-context p span,#stats .match-context small{color:#c8d6e9}
#stats .match-summary-compact{background:#e6edf8;border-color:#d3dff0}
.match-total-group,.tournament-card,.snapshot,.history-item,.tournament-empty{border-color:var(--line);box-shadow:0 2px 8px #10264a03}
.match-total-group h3{color:var(--navy);border-bottom-color:var(--line)}
.match-total-group dd,.snapshot-row strong{color:var(--navy)}
.history-score-strip{background:#eaf0f9}.standings-place{background:var(--navy);color:#fff}
#toast{background:var(--navy);border-left:4px solid var(--red)}
dialog{border-top:4px solid var(--red);background:#fff;box-shadow:0 22px 70px #10264a26}
dialog::backdrop{background:#07172f77}
body[data-access="locked"]{background:radial-gradient(ellipse at top,#203f6d 0,#10264a 65%);min-height:100dvh}
body[data-access="locked"] #syncDialog{border:1px solid #dce3ef;border-top:5px solid var(--red);padding:28px;border-radius:18px;box-shadow:0 24px 80px #00000030}
body[data-access="locked"] #syncDialog .dialog-heading h2{color:var(--navy);font-size:23px;letter-spacing:-.7px}
.auth-brand{display:none}body[data-access="locked"] .auth-brand{display:flex;align-items:center;gap:10px;margin-bottom:26px}
.auth-brand .rally-mark{width:44px;height:44px;border-radius:11px}.auth-brand .rally-wordmark{font-size:28px}
#syncStatus{background:#edf2fb;color:#264f84}#syncAuthHint{color:#536781}
.sync-auth-switch{background:#eaf0fa;padding:4px;border-radius:10px}.sync-auth-switch button{color:#526b8c}.sync-auth-switch button[aria-pressed="true"]{background:var(--navy);color:#fff;border-radius:7px}
#syncDialog .primary{background:var(--red)}#syncDialog .primary:hover{background:var(--red-dark)}
#appUpdate{background:#edf3ff;border-color:#b6cbee;color:var(--navy)}#appUpdate button{background:var(--navy)}
/* Blue additions and red corrections keep feedback distinct within the new palette. */
#capture .action.touch-added,.scoreboard .team.touch-added{background:#cee2ff!important;border-color:#4f84c9!important;color:#123f79!important;box-shadow:inset 0 0 0 2px #7aa5df}
#capture .action.touch-added .symbol,#capture .action.touch-added strong,.scoreboard .team.touch-added .team-name{color:#123f79!important}
#capture .action.touch-added .stat-count{background:#f0f6ff!important;color:#123f79!important}
@media(min-width:601px){body[data-view] main{max-width:1000px;padding:22px 28px 30px}body[data-view] .topbar{max-width:none;padding-inline:max(28px,calc((100vw - 944px)/2))}.player-profile{padding:12px 16px;margin-bottom:8px}.scoreboard{padding:16px 24px 2px}.score-grid{padding:12px 0}.score-numbers{font-size:58px}.scoreboard .team{min-height:76px}.tabs{margin:18px 0 20px;gap:12px}.tabs button{border-radius:8px 8px 0 0}.actions .action{min-height:80px}.stat-count{font-size:13px;padding:3px 7px}.rating-groups{gap:16px}.serving-group{padding:12px;margin-top:16px}}
@media(max-width:600px){
 body[data-view]{--phone-panel-width:430px}
 body[data-view] .topbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;column-gap:8px;row-gap:7px;padding:9px 12px 8px;min-height:88px}
 .topbar .brand{grid-column:1;grid-row:1;gap:8px}.topbar .brand .rally-wordmark{font-size:21px;gap:4px}.topbar .rally-mark{width:30px;height:30px}
 .topbar .help-button{grid-column:2;grid-row:1;min-height:32px;padding:6px 10px}.topbar #setupBtn{grid-column:3;grid-row:1;width:32px;height:32px}
 .topbar #newBtn{grid-column:1;grid-row:2;justify-self:start;margin:0;min-height:30px;padding:6px 11px;font-size:10px}
 .topbar #endSet{grid-column:2/4;grid-row:2;min-height:30px;font-size:10px;padding:6px 12px}
 body[data-view] main{padding:9px 10px calc(90px + env(safe-area-inset-bottom))}
 .player-profile{margin-bottom:3px}.scoreboard{border-radius:12px}.score-numbers{font-size:38px}
 body[data-view] .tabs{background:var(--navy);border:0;border-top:3px solid var(--red);box-shadow:0 -5px 18px #10264a15;padding-top:6px;padding-bottom:calc(7px + env(safe-area-inset-bottom));gap:3px}
 body[data-view] .tabs button{color:#b9cbea;border:0;border-radius:9px}
 body[data-view] .tabs button[aria-selected="true"]{background:#ffffff15;color:#fff;box-shadow:inset 0 -3px 0 #ff536c}
 body[data-view] .tabs .tab-icon{font-size:19px}.capture-note{color:#526782}
 footer{font-size:9px;gap:8px;flex-wrap:wrap}footer>div{gap:5px}
}
@media(max-width:359px){.topbar .brand .rally-wordmark{font-size:19px}.topbar .rally-mark{width:28px;height:28px}.topbar .brand{gap:6px}body[data-access="locked"] #syncDialog{padding:22px}.auth-brand .rally-wordmark{font-size:25px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
