/* Home hub and one-tap access to live Capture. */
body[data-view="home"] .player-profile,body[data-view="home"] .match-utility-row,body[data-view="home"] .scoreboard{display:none}
body[data-view="home"] .topbar #newBtn,body[data-view="home"] .topbar #endSet{display:none}
.home-page{padding-bottom:10px}.home-welcome{padding:8px 0 20px}.home-welcome .eyebrow{margin-bottom:8px;color:var(--red);font-size:9px;letter-spacing:1.7px}.home-welcome h1{font-size:30px;letter-spacing:-1px;line-height:1.2;margin:0 0 7px}.home-welcome>p:last-child{color:var(--muted);font-size:13px}
.home-match-card{padding:22px;background:var(--navy);color:#fff;border-top:4px solid var(--red);border-radius:16px;box-shadow:0 8px 24px #10264a12}.home-match-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:18px}.home-badge{color:#ffb9c4;font-size:9px;letter-spacing:1.3px;font-weight:800}.home-format{font-size:9px;color:#bacce5}.home-match-card h2{font-size:23px;line-height:1.3;letter-spacing:-.5px;overflow-wrap:anywhere;margin:0 0 7px}.home-match-card>p:not(.home-match-note){color:#c4d3e8;font-size:12px}.home-live-score{font:800 39px/1.2 Manrope,system-ui,sans-serif;margin:15px 0 0;font-variant-numeric:tabular-nums;letter-spacing:-1px}.home-match-card .primary{background:var(--red);border:1px solid var(--red);color:#fff;min-height:48px;margin-top:18px;font-size:14px;display:flex;align-items:center;justify-content:center;gap:24px}.home-match-card .outline{background:#ffffff08;border:1px solid #ffffff35;color:#fff;width:100%;margin-top:9px;min-height:42px;font-size:12px}.home-match-note{font-size:10px;line-height:1.5;color:#b5c9e4;text-align:center;margin-top:12px}.home-match-card [hidden]{display:none!important}
.home-player-card{margin:16px 0 22px;display:flex;align-items:center;gap:11px;background:white;border:1px solid var(--line);border-radius:12px;padding:14px;min-width:0}.home-jersey{width:42px;height:42px;border-radius:10px;display:grid;place-items:center;background:#e8eff9;color:var(--navy);font:800 21px Manrope,system-ui,sans-serif;flex-shrink:0}.home-player-card>div{min-width:0}.home-player-card .eyebrow{display:block;margin-bottom:4px;font-size:8px;letter-spacing:1px}.home-player-card h2{font-size:16px;overflow-wrap:anywhere}.home-player-card .text-button{margin-left:auto;font-size:11px;flex-shrink:0;padding-left:8px;min-height:40px}
.home-tools{margin-bottom:22px}.home-tools .section-title{margin-bottom:10px}.home-tools .section-title h2{font-size:14px}.home-tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.home-tool{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:5px;padding:14px;background:#fff;border:1px solid var(--line);border-radius:12px;color:var(--ink);text-decoration:none;min-width:0;min-height:100px;font:inherit;cursor:pointer}.home-tool:hover{border-color:#8eabcf;background:#f7faff}.home-tool>span{font-size:21px;color:var(--blue);line-height:1;margin-bottom:3px}.home-tool strong{font-size:12px;line-height:1.4}.home-tool small{font-size:10px;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}.home-tool[data-feedback-open],.home-tool[data-contact-open]{font:inherit;padding:14px;min-height:100px;color:var(--ink)}
.topbar .brand{cursor:pointer}
.home-tool#syncOpen{margin:0;width:auto}
@media(min-width:601px){.home-page{max-width:650px;margin:auto}.home-welcome{padding-top:15px}.home-welcome h1{font-size:34px}.home-tool-grid{gap:12px}.home-tool{min-height:110px}.home-match-card{padding:28px}.home-player-card{padding:17px}.home-player-card h2{font-size:18px}.home-tools .section-title h2{font-size:16px}}
@media(max-width:600px){body[data-view="home"] .topbar{min-height:57px;row-gap:0;grid-template-columns:minmax(0,1fr) auto}body[data-view] .topbar{grid-template-columns:minmax(0,1fr) auto}.topbar .help-button{grid-column:2}.topbar #endSet{grid-column:2;grid-row:2}body[data-view="home"] main{padding:16px 14px calc(85px + env(safe-area-inset-bottom))}.home-welcome h1{font-size:27px}.home-match-card{padding:19px}.home-match-card h2{font-size:21px}.home-player-card{padding:12px;margin-bottom:20px}.home-tool-grid{gap:8px}body[data-view] .tabs{gap:1px;padding-inline:max(3px,env(safe-area-inset-left))}body[data-view] .tabs button{padding-inline:1px;font-size:9px}body[data-view] .tabs .tab-icon{font-size:19px}}
@media(max-width:359px){.home-welcome h1{font-size:24px}.home-match-card{padding:16px}.home-match-card h2{font-size:19px}.home-player-card h2{font-size:14px}.home-player-card .text-button{font-size:10px}.home-tool{padding:11px}.home-tool strong{font-size:11px}body[data-view] .tabs button{font-size:8px}}

/* Keep all five Capture control rows above the navigation in the usable viewport. */
@media(max-width:600px){
 body[data-view="capture"]{--capture-row:clamp(44px,calc((100dvh - 515px - env(safe-area-inset-bottom,0px))/5),64px)}
 body[data-view="capture"] .topbar{display:flex;flex-wrap:nowrap;min-height:44px;height:44px;padding:4px 8px;gap:6px}
 body[data-view="capture"] .topbar .brand{flex-shrink:0;gap:5px}
 body[data-view="capture"] .topbar .brand .rally-wordmark{font-size:18px;gap:3px}
 body[data-view="capture"] .topbar .rally-mark{width:26px;height:26px;border-radius:7px}
 body[data-view="capture"] .topbar .help-button,body[data-view="capture"] .topbar .save-status{display:none}
 body[data-view="capture"] .topbar #newBtn{margin-left:auto;min-height:32px;padding:5px 7px;font-size:10px}
 body[data-view="capture"] .topbar #endSet{min-height:32px;padding:5px 8px;font-size:10px}
 body[data-view="capture"] main{padding:5px 8px calc(84px + env(safe-area-inset-bottom))}
 body[data-view="capture"] .player-profile{min-height:32px;padding:3px 8px;margin:0}
 body[data-view="capture"] .profile-number{width:25px;height:25px;font-size:14px}
 body[data-view="capture"] .profile-details h2{font-size:14px}
 body[data-view="capture"] .match-utility-row{min-height:25px;margin:0;gap:5px}
 body[data-view="capture"] .match-details{font-size:9px;min-height:23px;padding:3px 0}
 body[data-view="capture"] .match-utility-row .share-button{min-height:25px;padding:4px 7px;font-size:9px}
 body[data-view="capture"] .scoreboard{padding:7px 9px 0;border-radius:10px}
 body[data-view="capture"] .score-grid{padding:4px 0}
 body[data-view="capture"] .scoreboard button.team{min-height:45px;padding:4px}
 body[data-view="capture"] .score-numbers{font-size:34px}
 body[data-view="capture"] .score-bottom{padding:3px 0}
 body[data-view="capture"] .pool-summary{padding:3px 7px;margin:0 0 4px}
 body[data-view="capture"] .pool-summary p{display:inline;margin:0 0 0 5px;font-size:7px}
 body[data-view="capture"] .pool-summary strong{font-size:18px}
 body[data-view="capture"] #capture>.section-title{min-height:26px;margin:2px 0 3px}
 body[data-view="capture"] #capture>.actions{gap:5px}
 body[data-view="capture"] #capture>.actions .action,
 body[data-view="capture"]:has(#poolSummary:not([hidden])) #capture>.actions .action{min-height:var(--capture-row);padding:19px 5px 5px;border-radius:9px}
 body[data-view="capture"] #capture>.actions .action strong,
 body[data-view="capture"]:has(#poolSummary:not([hidden])) #capture>.actions .action strong{font-size:12px;line-height:1.2}
 body[data-view="capture"] #capture .stat-count{font-size:11px;min-width:18px;padding:1px 4px}
 body[data-view="capture"] #capture .serving-group,
 body[data-view="capture"]:has(#poolSummary:not([hidden])) #capture .serving-group{margin-top:6px;padding:5px;border-radius:9px}
 body[data-view="capture"] #capture .serving-group legend{font-size:11px;line-height:16px}
 body[data-view="capture"] #capture .serving-actions .action,body[data-view="capture"] #capture .receive-actions .action,
 body[data-view="capture"]:has(#poolSummary:not([hidden])) #capture .serving-actions .action,body[data-view="capture"]:has(#poolSummary:not([hidden])) #capture .receive-actions .action{min-height:var(--capture-row);padding:17px 2px 5px;border-radius:8px}
 body[data-view="capture"] #capture .serving-actions .action strong,body[data-view="capture"] #capture .receive-actions .action strong{font-size:11px;line-height:1.15}
 body[data-view="capture"] .capture-note{font-size:8px;margin:3px 0 0}
}
@media(max-width:359px){body[data-view="capture"] .topbar .brand .rally-wordmark{font-size:16px}body[data-view="capture"] .topbar #newBtn,body[data-view="capture"] .topbar #endSet{font-size:9px;padding-inline:6px}}

/* Spend the remaining screen height on the controls instead of bottom whitespace. */
@media(max-width:600px){
 body[data-view="capture"] main{display:flex;flex-direction:column;height:calc(100dvh - 114px - env(safe-area-inset-bottom,0px));min-height:0;padding:5px 8px 5px;gap:0}
 body[data-view="capture"] main>.player-profile,body[data-view="capture"] main>.match-utility-row,body[data-view="capture"] main>.scoreboard{flex-shrink:0}
 body[data-view="capture"] main>footer{display:none}
 body[data-view="capture"] #capture{display:grid;grid-template-rows:26px minmax(132px,3fr) minmax(136px,2.8fr) 11px;gap:5px;flex:1;min-height:320px;margin-top:3px}
 body[data-view="capture"] #capture>.section-title{margin:0;min-height:26px}
 body[data-view="capture"] #capture>.actions{height:100%;grid-template-rows:repeat(3,minmax(44px,1fr));gap:5px;min-height:0}
 body[data-view="capture"] #capture .rating-groups{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:5px;min-height:0}
 body[data-view="capture"] #capture .rating-groups .serving-group{display:flex;flex-direction:column;min-height:0;margin:0!important;padding:5px}
 body[data-view="capture"] #capture .rating-groups .actions{flex:1;min-height:44px;grid-template-rows:minmax(44px,1fr);align-items:stretch}
 body[data-view="capture"] #capture .action{min-height:44px!important;height:100%;max-height:none}
 body[data-view="capture"] #capture>.actions .action strong{font-size:13px;line-height:1.15}
 body[data-view="capture"] #capture .serving-actions .action strong,body[data-view="capture"] #capture .receive-actions .action strong{font-size:12px;line-height:1.15}
 body[data-view="capture"] #capture .capture-note{margin:0;line-height:11px;font-size:9px;text-align:center}
}
