:root{color-scheme:dark;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#74865d;--ink:#f2f2e8;--muted:#b9c3b0;--accent:#d8dfbc}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{overscroll-behavior:none;user-select:none;-webkit-user-select:none}button{font:inherit;cursor:pointer}button:focus-visible{outline:2px solid #f4f0ce;outline-offset:4px}
.game-shell{position:relative;width:100vw;height:100dvh;min-width:320px;overflow:hidden;background:#7e9565;isolation:isolate}#game{display:block;width:100%;height:100%;touch-action:none}.hidden{display:none!important}
.match-hud{position:absolute;inset:0;z-index:2;pointer-events:none}
/* Compact broadcast scorebug: games won and current points. */
.scoreboard{position:absolute;top:22px;left:24px;width:304px;overflow:hidden;border:1px solid #ffffff20;border-top:3px solid #d7f55b;border-radius:5px;background:#0d2032f5;color:#f7f9fc;box-shadow:0 6px 24px #06111e30;font-variant-numeric:tabular-nums}
.practice-hud{position:absolute;top:22px;left:24px;width:330px;overflow:hidden;border:1px solid #ffffff24;border-top:3px solid #d7f55b;border-radius:5px;background:#0d2032f5;color:#f7f9fc;box-shadow:0 6px 24px #06111e30;font-variant-numeric:tabular-nums}.practice-hud-top{height:34px;display:flex;align-items:center;justify-content:space-between;padding:0 13px;background:#162c40;font-size:9px;letter-spacing:.12em}.practice-hud-top strong{color:#d7f55b;font-size:9px}.practice-hud-grid{display:grid;grid-template-columns:repeat(3,1fr);padding:13px}.practice-hud-grid span{display:grid;gap:5px}.practice-hud-grid small{color:#9db0c0;font-size:7px;letter-spacing:.1em}.practice-hud-grid b{font-size:17px;letter-spacing:-.03em}.practice-hud-last{min-height:30px;padding:8px 13px;border-top:1px solid #ffffff16;color:#c8d7e2;font-size:8px;line-height:1.45;letter-spacing:.04em}
.scoreboard-topline{height:29px;display:flex;align-items:center;justify-content:space-between;padding:0 13px;background:#162c40;color:#b7c8d8;font-size:8px;font-weight:700;letter-spacing:.12em}
.scoreboard-brand{color:#e5f3ff;font-size:10px;font-weight:800;letter-spacing:.19em}
.score-table{width:100%;table-layout:fixed;border-collapse:collapse;text-align:center}
.score-table thead{height:23px;color:#9db0c2;font-size:8px;letter-spacing:.09em}
.score-table th{font-weight:650}.score-table th:first-child{text-align:left;padding-left:13px}.score-table thead th:nth-child(2){width:52px}.score-table thead th:last-child{width:62px}
.score-row{height:39px;border-top:1px solid #ffffff0d}.score-row.serving{background:#ffffff05}
.score-player{display:flex;align-items:center;gap:8px;min-width:0;padding-right:8px}
.score-kit{flex:0 0 3px;height:15px;border-radius:1px}.score-kit-you{background:#eceedd}.score-kit-cpu{background:#f78b76}
.score-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:700;letter-spacing:.04em}
.serve-marker{flex:0 0 7px;width:7px;height:7px;margin-left:auto;border-radius:50%;background:#d7f55b;box-shadow:0 0 0 3px #d7f55b12}.serve-marker[hidden]{display:none}
.score-games{color:#e9f1f9;background:#ffffff05;font-size:22px;font-weight:650}.score-points{color:#e6f596;background:#d7f55b0e;font-size:24px;font-weight:750;line-height:1}
.score-row.serving .score-points{color:#12242c;background:#d7f55b}
.score-winner{display:none;color:#d7f55b;margin-left:auto;font-size:13px}.score-row.winner .score-winner{display:block}.score-row.winner .score-games{color:#12242c;background:#d7f55b}.scoreboard.complete .score-points{color:#a7b9c9;background:transparent;font-size:18px}
.scoreboard-footer{min-height:27px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 13px;border-top:1px solid #ffffff12;font-size:8px;font-weight:650;letter-spacing:.06em;color:#91a7bc}.scoreboard-footer #hud-score-status{color:#d7f55b;white-space:nowrap}.scoreboard-footer #hud-score-format{text-align:right}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.power-hud{position:absolute;top:196px;left:24px;width:126px;padding:7px 9px;border-radius:6px;background:#14201fb5;color:#e7edd2;font-size:8px;letter-spacing:.065em}.power-caption{display:flex;justify-content:space-between;gap:6px;margin-bottom:5px;font-variant-numeric:tabular-nums}.power-meter{position:relative;height:4px;background:#ffffff24;border-radius:2px;overflow:hidden}.power-meter>span{display:block;width:100%;height:100%;background:#d8df9c;transform-origin:left center}.power-meter::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent 37%,#182a27 37% 39%,transparent 39% 75%,#182a27 75% 77%,transparent 77%)}.power-hud.low .power-meter>span{background:#b4bca4}.power-hud.armed .power-meter>span{background:#f1d77d}.power-hud.aiming{outline:1px solid #e0e6bd66}.power-hud.denied{color:#f1cb93}
.court-call{position:absolute;top:27px;left:50%;transform:translateX(-50%);max-width:45%;padding:10px 15px;border-radius:7px;background:#1a2a2399;color:#f4f4dd;font-size:11px;font-weight:600;text-align:center;letter-spacing:.025em}
.out-feedback{position:absolute;top:43%;left:50%;transform:translate(-50%,-50%);pointer-events:none;--out-pulse:0}
.out-badge{display:flex;align-items:center;gap:12px;padding:13px 22px 13px 17px;border:1px solid rgb(255 112 100 / calc(.32 + var(--out-pulse)*.42));border-radius:7px;background:#281d23ed;box-shadow:0 5px 20px #140a1633,0 0 calc(8px + var(--out-pulse)*15px) rgb(244 82 70 / calc(.06 + var(--out-pulse)*.2));color:#fff4ef;font-size:27px;font-weight:750;line-height:1;letter-spacing:.12em}
.out-light{flex:0 0 7px;width:7px;height:7px;border-radius:50%;background:#ff7669;opacity:calc(.5 + var(--out-pulse)*.5);box-shadow:0 0 0 calc(3px + var(--out-pulse)*3px) rgb(255 95 82 / calc(.08 + var(--out-pulse)*.12))}
@media(pointer:coarse),(max-width:760px){.out-badge{font-size:23px;padding:11px 18px 11px 14px;gap:10px}}
@media(max-height:440px){.out-feedback{top:61%}.out-badge{font-size:21px;padding:10px 16px 10px 13px}}
.court-status{position:absolute;bottom:22px;left:24px;display:flex;gap:18px;color:#edf0dc;text-shadow:0 1px 4px #142017;font-size:10px;font-weight:600;letter-spacing:.06em}
.court-caption{position:absolute;bottom:22px;right:130px;color:#edf0dcc0;font-size:10px;letter-spacing:.055em;text-transform:uppercase}
.speedometer{position:absolute;top:96px;right:24px;width:148px;padding:11px 12px 9px;border:1px solid #ffffff20;border-radius:6px;background:#0d2032ee;color:#f7f9fc;box-shadow:0 5px 20px #06111e25;font-variant-numeric:tabular-nums}
.speedometer-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;color:#b7c8d8;font-size:8px;font-weight:700;letter-spacing:.08em}.speed-live{color:#8da0b1;font-size:6px;letter-spacing:.04em}.speed-live::before{content:'';display:inline-block;width:4px;height:4px;margin-right:3px;border-radius:50%;background:currentColor}.speed-live.moving{color:#d7f55b}
.speedometer-dial{position:relative;margin-top:7px}.speedometer-dial svg{display:block;width:100%;overflow:visible}.speed-track,.speed-arc{fill:none;stroke-width:5;stroke-linecap:round}.speed-track{stroke:#ffffff18}.speed-arc{stroke:#d7f55b}.speed-ticks{fill:none;stroke:#92a7b880;stroke-width:1}.speed-needle{fill:none;stroke:#fff;stroke-width:2}.speedometer-dial text{fill:#91a7bc;font:6px sans-serif;text-anchor:middle}
.speedometer-reading{position:absolute;inset:31% 15% auto;display:grid;text-align:center;line-height:1}.speedometer-reading #hud-speed{font-size:29px;font-weight:750;letter-spacing:-.04em}.speed-unit{margin-top:4px;font-size:8px;color:#a7bbcd}.speedometer-last{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-top:7px;padding-top:7px;border-top:1px solid #ffffff14;font-size:7px;color:#91a7bc;letter-spacing:.04em}.speedometer-last #hud-last-speed{color:#e6f596;font-size:9px;font-weight:650;letter-spacing:0}
@media(pointer:coarse),(max-width:760px){.speedometer{top:165px;right:14px;width:112px;padding:8px}.speedometer-heading{font-size:6px;gap:3px}.speed-live{font-size:5px}.speedometer-dial{margin-top:4px}.speedometer-reading #hud-speed{font-size:23px}.speed-unit{font-size:7px;margin-top:3px}.speedometer-last{font-size:6px;margin-top:5px;padding-top:5px}.speedometer-last #hud-last-speed{font-size:8px}}
@media(max-height:440px){.speedometer{top:165px;right:14px;width:100px;padding:7px}.speedometer-heading{font-size:6px}.speed-live{font-size:5px}.speedometer-reading #hud-speed{font-size:21px}.speedometer-dial{margin-top:4px}.speed-unit{font-size:6px;margin-top:2px}.speedometer-last{font-size:6px;margin-top:4px;padding-top:5px}.speedometer-last #hud-last-speed{font-size:7px}}
@media(max-height:380px) and (min-width:500px){.speedometer{top:64px;right:64px}}
.icon-btn{position:absolute;z-index:4;display:grid;place-items:center;color:#f2f4e7;border:1px solid #ffffff0c;border-radius:8px;background:#14201fe8;box-shadow:0 5px 15px #162a1520}.pause-btn{top:22px;right:24px;width:50px;height:54px;font-size:25px;font-weight:800}.sound-btn,.fullscreen-btn{bottom:17px;width:34px;height:34px;opacity:.82}.sound-btn{right:24px}.fullscreen-btn{right:66px}.icon-btn:hover{background:#25392f;opacity:1}.icon-btn.muted{color:#8e9a89}
.menu-card,.result-card,.pause-card{position:absolute;z-index:5;top:50%;left:5vw;transform:translateY(-50%);width:394px;max-width:calc(100% - 36px);max-height:calc(100% - 36px);overflow-y:auto;padding:30px;color:var(--ink);border:1px solid #dee2c32a;border-radius:18px;background:linear-gradient(145deg,#172b24f5,#12231ff0);box-shadow:0 24px 70px #10221738;backdrop-filter:blur(16px)}
.eyebrow{display:flex;align-items:center;gap:8px;color:#cad5b5;font-size:10px;font-weight:600;letter-spacing:.17em;text-transform:uppercase}.eyebrow span{width:6px;height:6px;background:#d4e3aa;border-radius:50%}.eyebrow b{font:inherit}
h1,h2{margin:20px 0 0;color:#f2f1e7;font-size:62px;font-weight:650;line-height:.95;letter-spacing:-.065em}h1 span{color:inherit}h2{font-size:48px}
.tagline{margin:16px 0 6px;font-size:14px;color:#c7d0bb;line-height:1.5}.match-format{margin:0 0 20px;font-size:10px;line-height:1.5;color:#94a78d}
.difficulty{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.difficulty-btn{grid-column:span 2;display:grid;gap:5px;padding:12px 9px;text-align:left;color:#c4cebb;border:1px solid #e1e6d323;border-radius:8px;background:#d0ddae08}.difficulty-btn:nth-child(n+4){grid-column:span 3}.difficulty-btn span{font-size:12px;font-weight:650}.difficulty-btn small{font-size:8px;line-height:1.35;color:#91a58e}.difficulty-btn.active{border-color:#d8dfbc87;background:#d4dfba15;color:#f2f3e3}
.manual-controls-note{margin:15px 0 19px;color:#e1e6d5;font-size:10px}.manual-controls-note small{display:block;margin-top:4px;color:#92a68e;font-size:9px}
.option-label{display:block;margin-bottom:8px;color:#8eaa90;font-size:9px;font-weight:600;letter-spacing:.12em;text-transform:uppercase}.venue-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.venue-btn{display:grid;grid-template-columns:17px 1fr;column-gap:7px;padding:10px 8px;border:1px solid #e1e6d323;border-radius:8px;color:#b8c9b6;background:#f2f8d905;text-align:left}.venue-btn span{grid-column:2;font-size:10px;font-weight:650}.venue-btn small{grid-column:2;font-size:8px;color:#89a38d;text-transform:uppercase}.venue-btn.active{background:#d8dfbc;color:#203629;border-color:#d8dfbc}.venue-btn.active small{color:#62735b}
.venue-swatch{grid-row:1/3;width:17px;height:24px;align-self:center;border:1.5px solid #ecebdd;border-radius:2px}.hard-swatch{background:#3c619a}.grass-swatch{background:repeating-linear-gradient(90deg,#4b784d 0 4px,#568254 4px 8px)}.clay-swatch{background:#bb6947}
.primary-btn{width:100%;display:flex;align-items:center;justify-content:space-between;margin-top:17px;padding:15px;background:#dce3c3;color:#203526;border:0;border-radius:8px;font-weight:750;font-size:13px;letter-spacing:.07em;text-transform:uppercase}.primary-btn b{font-size:10px;opacity:.55}.primary-btn:hover{background:#eaf0d7}
.secondary-btn{width:100%;margin-top:11px;padding:12px;color:#dae4d0;border:1px solid #dbe5cb30;background:#dae3c708;border-radius:8px;font-size:11px}.secondary-btn:hover{background:#dae3c718}
.controls-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 6px;margin-top:21px;color:#9caf9c;font-size:8px;letter-spacing:.025em}.controls-grid div{display:flex;align-items:center;gap:4px}.controls-grid .wide-control{grid-column:1/-1}kbd{font:inherit;padding:4px 5px;border:1px solid #d2dfca28;border-radius:4px;color:#d0dbc5;min-width:19px;text-align:center;background:#f3f6e406}
.pause-card{left:50%;width:328px;transform:translate(-50%,-50%)}.pause-card h2{margin-bottom:22px}.result-card{width:350px}.result-card #result-score{margin:22px 0;font-size:32px;color:#e3e7d3;letter-spacing:.12em}.result-stats{color:#afc0a8;font-size:11px;line-height:1.6}
.graphics-setting{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px;color:#dce4d5;font-size:13px}.graphics-setting select{font:inherit;color:#f1f4e8;background:#20352f;border:1px solid #a3b69c66;border-radius:6px;padding:8px 12px}.graphics-setting select:focus-visible{outline:2px solid #daf13d;outline-offset:3px}
.render-error{position:absolute;z-index:10;top:20px;left:15%;right:15%;padding:20px;background:#273c2b;color:#fff;border-radius:9px}
@media(pointer:coarse),(max-width:760px){
.menu-card{left:18px;top:auto;bottom:18px;transform:none;width:calc(100% - 36px);padding:24px}h1{font-size:52px}.controls-grid{display:none}
.scoreboard{top:14px;left:14px;width:min(260px,calc(100vw - 78px))}.scoreboard-topline{height:25px;padding:0 10px;font-size:7px}.scoreboard-brand{font-size:9px}.score-table thead{height:20px;font-size:8px}.score-table th:first-child{padding-left:10px}.score-table thead th:nth-child(2){width:45px}.score-table thead th:last-child{width:54px}.score-row{height:33px}.score-player{gap:6px;padding-right:7px}.score-label{font-size:11px}.score-games{font-size:19px}.score-points{font-size:21px}.scoreboard-footer{min-height:25px;padding:5px 10px;font-size:7px;gap:6px}.pause-btn{top:18px;right:14px;width:38px;height:42px;font-size:21px}
.practice-hud{top:14px;left:14px;width:min(310px,calc(100vw - 78px))}.practice-hud-top{height:29px;padding:0 10px;font-size:7px}.practice-hud-top strong{font-size:8px}.practice-hud-grid{padding:10px}.practice-hud-grid small{font-size:6px}.practice-hud-grid b{font-size:15px}.practice-hud-last{min-height:26px;padding:7px 10px;font-size:7px}
.power-hud{top:165px;left:14px;width:126px}
.sound-btn,.fullscreen-btn{bottom:auto;right:18px;width:30px;height:32px}.sound-btn{top:70px}.fullscreen-btn{top:110px}
.court-call{top:110px;max-width:calc(100% - 30px);width:max-content;font-size:9px;padding:8px 11px}.court-status{bottom:max(18px,env(safe-area-inset-bottom));left:18px;right:18px;justify-content:space-between;font-size:9px}.court-caption{display:none}
}
@media(max-height:680px){.menu-card{padding:22px}.controls-grid{display:none}h1{font-size:46px}.tagline{margin:12px 0 4px}.match-format{margin-bottom:13px}}
@media(max-width:760px) and (min-height:600px),(pointer:coarse) and (orientation:portrait) and (min-height:600px){.court-call{top:auto;bottom:max(54px,calc(env(safe-area-inset-bottom) + 36px))}}
@media(max-width:760px) and (min-height:600px),(pointer:coarse) and (orientation:portrait) and (min-height:600px){.speedometer{top:auto;bottom:max(72px,calc(env(safe-area-inset-bottom) + 54px))}.court-call{left:18px;transform:none;max-width:calc(100% - 158px)}}
@media(max-height:440px){.menu-card{top:14px;bottom:14px;left:18px;width:355px;transform:none;max-height:calc(100% - 28px);padding:18px 22px}h1{font-size:36px;margin-top:11px}.tagline{font-size:12px}.manual-controls-note{margin:8px 0}.difficulty-btn{padding:8px}.venue-btn{padding:7px}.primary-btn{padding:11px;margin-top:10px}.court-status{display:none}.court-call{top:16px;max-width:42%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto;transition:none!important}}

/* Online exhibitions share the existing court, type, and quiet green palette. */
.online-entry{margin:14px 0 4px;padding-top:12px;border-top:1px solid #ffffff24;display:grid;gap:8px}.online-entry label{font-size:11px;text-transform:uppercase;letter-spacing:.12em}.online-entry input,.online-panel input:not([type=checkbox]){width:100%;min-width:0;border:1px solid #a9bcaa66;background:#eef1e9;color:#14251c;padding:10px 12px;border-radius:8px;font:inherit}.online-entry-actions{display:flex;gap:8px}.online-entry-actions button{flex:1;margin:0}.online-entry small{font-size:10px;opacity:.7}.online-panel{position:absolute;z-index:40;left:50%;top:50%;transform:translate(-50%,-50%);width:min(440px,calc(100% - 32px));max-height:calc(100% - 36px);overflow:auto;background:#f1f0e7;color:#223a2d;border:1px solid #fff9;border-radius:18px;padding:26px;box-shadow:0 15px 70px #10221c55;display:grid;gap:12px}.online-panel h2{font-size:30px;line-height:1.1;margin:0}.online-panel p{font-size:14px;line-height:1.5;margin:0}.online-panel .eyebrow{color:#496953}.online-panel button{margin:0}.online-panel .secondary-btn{color:#243f2e;border-color:#667a6655;background:#e2e7dc}.online-panel .primary-btn{background:#264f3a;color:#fff}.online-panel label{font-size:13px;line-height:1.5}.online-panel [hidden],.online-entry [hidden]{display:none!important}.online-panel button:disabled{opacity:.55;cursor:default}.online-connection{position:absolute;z-index:12;top:14px;right:68px;max-width:45%;padding:7px 10px;background:#eef1e9e8;border-radius:6px;color:#264333;font:600 10px/1.3 sans-serif;letter-spacing:.05em;pointer-events:none}.menu-card{max-height:calc(100% - 28px);overflow-y:auto}.online-panel.hidden,.online-connection.hidden{display:none}
@media(max-width:760px){.online-panel{padding:20px}.online-panel h2{font-size:25px}.online-connection{top:10px;right:48px;font-size:9px;max-width:40%}.online-entry-actions{flex-wrap:wrap}.online-entry-actions button{min-width:110px}}
.online-panel h2{color:#223a2d;letter-spacing:-.035em}

@media(max-width:760px){.online-connection{top:205px;right:14px;max-width:calc(100% - 28px);font-size:9px}}

#online-score{font-size:32px;font-weight:650;letter-spacing:.1em}

@media(min-width:761px) and (max-width:1100px){.court-call{top:22px;left:348px;right:92px;transform:none;max-width:none;font-size:10px}}
@media(max-height:440px){.court-call{top:16px;left:290px;right:72px;transform:none;width:auto;max-width:none}.power-hud{top:165px}}
/* Keep the final score visible beside the result card on short screens. */
@media(max-height:440px) and (min-width:500px){.result-card{left:344px;right:14px;width:auto;max-width:350px;padding:22px;transform:translateY(-50%)}.result-card h2{font-size:34px}}
@media(max-height:440px) and (min-width:500px) and (pointer:coarse),(max-height:440px) and (min-width:500px) and (max-width:760px){.result-card{left:290px}}
@media(max-height:440px) and (max-width:499px){.result-card{top:165px;bottom:12px;left:14px;transform:none;width:calc(100% - 28px);max-height:calc(100% - 177px);padding:18px}}
.game-shell[data-mode=gameover] .power-hud{display:none}

/* Player introduction and match result. */
.player-entry{display:grid;gap:7px;margin:0 0 17px}.player-entry label{color:#e4ecd9;font-size:12px;font-weight:650}.player-entry input{width:100%;min-width:0;padding:11px 12px;border:1px solid #a8bc9566;border-radius:8px;background:#eef1e9;color:#14251c;font:inherit;font-size:16px;user-select:text;-webkit-user-select:text}.player-entry input:focus-visible{outline:2px solid #d7f55b;outline-offset:2px}.player-entry small{font-size:9px;color:#a8b99c;line-height:1.5}
.result-card #result-score{font-size:29px;letter-spacing:.04em}.result-card #result-matchup{overflow-wrap:anywhere}

/* Preserve centered desktop results while keeping clear of the final score. */
@media(min-width:761px) and (min-height:441px){
.result-card{transform:translateY(max(-50%,calc(191px - 50dvh)));max-height:calc(100% - 209px)}
}

/* Keep the final games score above the result on portrait phones. */
@media(max-width:760px) and (orientation:portrait) and (max-height:760px),(pointer:coarse) and (orientation:portrait) and (max-height:760px){
.result-card{top:164px;bottom:auto;left:14px;transform:none;width:calc(100% - 28px);max-width:calc(100% - 28px);max-height:calc(100% - 178px);padding:24px}
}

/* Keep short portrait screens clear above both baselines. */
@media (max-width:760px) and (orientation:portrait) and (max-height:599px),(pointer:coarse) and (orientation:portrait) and (max-height:599px){
.scoreboard{width:min(240px,calc(100vw - 78px))}.scoreboard-topline{height:18px}.score-table thead{height:16px}.score-row{height:24px}.scoreboard-footer{min-height:20px;padding:4px 8px;font-size:6px}.score-games{font-size:16px}.score-points{font-size:18px}
.power-hud{top:auto;bottom:max(18px,env(safe-area-inset-bottom));width:110px}.court-call{top:auto;bottom:max(68px,calc(env(safe-area-inset-bottom) + 50px));left:14px;transform:none;max-width:calc(100% - 28px)}
.speedometer{top:auto;bottom:max(18px,env(safe-area-inset-bottom));width:96px;padding:7px}.speedometer-dial svg,.speedometer-last{display:none}.speedometer-reading{position:static;display:flex;align-items:baseline;justify-content:center;gap:5px}.speedometer-reading #hud-speed{font-size:20px}.speed-unit{margin:0}
.court-status{display:none}
.result-card{top:132px;max-height:calc(100% - 146px);padding:20px}.result-card h2{font-size:36px;margin-top:14px}.result-card #result-score{margin:16px 0}
}

.sponsor-board-link{position:absolute;z-index:1;display:block;cursor:pointer;border-radius:3px;touch-action:manipulation}.sponsor-board-link[hidden]{display:none}.sponsor-board-link:hover,.sponsor-board-link:focus-visible{outline:2px solid #d9ff4f;outline-offset:3px;background:#ffffff15}
.games-played{color:#d9ff4f;font-size:12px;letter-spacing:.04em;margin:16px 0}
.play-stats{display:flex;flex-wrap:wrap;gap:8px 24px;margin:16px 0}
.play-stats .games-played{margin:0}

/* Mobile analog controller. Desktop layout and input are unchanged. */
.touch-controls{display:none;position:absolute;inset:0;pointer-events:none}
.touch-controls[hidden]{display:none}
.touch-joystick,.touch-hit{position:absolute;pointer-events:auto;touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
.touch-joystick{left:max(10px,env(safe-area-inset-left));bottom:calc(env(safe-area-inset-bottom) + 10px);width:clamp(112px,34vw,136px);height:clamp(112px,34vw,136px);display:grid;place-items:center;border:1px solid #ffffff55;border-radius:50%;background:radial-gradient(circle,#263a4659 0 34%,#0d20324d 35% 64%,#ffffff0a 65%);box-shadow:inset 0 2px 12px #07131f66,0 3px 15px #07131f33}
.touch-stick-thumb{width:56px;height:56px;border:1px solid #f2f4e780;border-radius:50%;background:radial-gradient(circle at 38% 30%,#7a898db3,#3b4c5699 68%);box-shadow:inset 0 2px 4px #ffffff30,0 4px 10px #07131f80;pointer-events:none}
.touch-joystick.active{border-color:#d7f55b99}.touch-joystick.active .touch-stick-thumb{border-color:#d7f55b}
.touch-hit{right:max(10px,env(safe-area-inset-right));bottom:calc(env(safe-area-inset-bottom) + 18px);width:clamp(88px,27vw,108px);height:clamp(88px,27vw,108px);padding:0;border:2px solid #efffa7aa;border-radius:50%;background:#d7f55ba6;color:#10232c;font-size:20px;font-weight:800;letter-spacing:.06em;box-shadow:inset 0 2px 5px #ffffff55,0 4px 14px #07131f55}
.touch-hit.pressed{transform:scale(.94);background:#d7f55bc7;box-shadow:inset 0 3px 8px #14263044}
@media(pointer:coarse),(max-width:760px){.touch-controls:not([hidden]){display:block}.speedometer{display:none}}
@media(pointer:coarse),(max-width:760px){
.game-shell{--control-space:112px}
#game{height:calc(100% - var(--control-space) - env(safe-area-inset-bottom))}
.touch-controls{padding-bottom:env(safe-area-inset-bottom)}
.touch-controls::before{content:'';position:absolute;bottom:0;left:0;right:0;height:calc(var(--control-space) + env(safe-area-inset-bottom));background:linear-gradient(110deg,#0c202b,#142e39);border-top:1px solid #ffffff18}
body:has(.game-shell[data-mode=playing]) #feedback-widget-button{display:none!important}
}
@media(pointer:coarse) and (orientation:landscape),(max-width:760px) and (orientation:landscape){
.game-shell{--control-space:88px}.touch-joystick{width:96px;height:96px;bottom:calc(env(safe-area-inset-bottom) + 8px)}.touch-stick-thumb{width:44px;height:44px}.touch-hit{width:84px;height:84px;bottom:calc(env(safe-area-inset-bottom) + 14px)}
}
@media(max-width:760px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
.game-shell[data-mode=playing] .court-call{bottom:max(194px,calc(env(safe-area-inset-bottom) + 178px));top:auto}
}
@media(max-width:760px) and (orientation:portrait) and (max-height:599px),(pointer:coarse) and (orientation:portrait) and (max-height:599px){
.game-shell[data-mode=playing] .power-hud{top:132px;bottom:auto}
}

/* Portrait phones have separate score, court, and control areas. */
@media(max-width:760px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
.game-shell{--score-space:120px;background:#0c202b}
#game{margin-top:calc(var(--score-space) + env(safe-area-inset-top));height:calc(100% - var(--score-space) - var(--control-space) - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
.scoreboard,.practice-hud{top:calc(6px + env(safe-area-inset-top));left:8px;width:calc(100% - 68px);box-shadow:none}
.scoreboard-topline{height:18px;padding:0 8px}.scoreboard-brand{font-size:8px}
.score-table thead{height:16px;font-size:7px}.score-table th:first-child{padding-left:8px}
.score-row{height:24px}.score-label{font-size:11px}.score-games{font-size:17px}.score-points{font-size:19px}
.scoreboard-footer{min-height:20px;padding:3px 8px;font-size:6px}
.practice-hud-top{height:22px}.practice-hud-grid{padding:7px 10px}.practice-hud-last{min-height:24px;padding:5px 10px}
.pause-btn,.sound-btn{right:8px;width:44px;height:44px}
.pause-btn{top:calc(6px + env(safe-area-inset-top))}.sound-btn{top:calc(58px + env(safe-area-inset-top))}
.fullscreen-btn{top:auto;bottom:calc(12px + env(safe-area-inset-bottom));right:calc(50% - 22px);width:44px;height:44px}
.game-shell .power-hud,.game-shell[data-mode=playing] .power-hud{z-index:1;top:auto;bottom:calc(70px + env(safe-area-inset-bottom));left:calc(50% - 34px);width:68px;padding:6px 8px}
.game-shell[data-mode=playing] .court-call{bottom:calc(var(--control-space) + env(safe-area-inset-bottom) + 40px);max-width:calc(100% - 36px);padding:5px 8px}
}
/* A native modal covers the court and page widgets, including in fullscreen. */
#work-sheet { position:fixed; inset:0; margin:0; width:100vw; height:100dvh; max-width:none; max-height:none; border:0; padding:0; background:#fff; color:#26332e; font:13px Arial,sans-serif; text-align:left; }
#work-sheet[open] { display:flex; flex-direction:column; }
#work-sheet::backdrop { background:#fff; }
.work-title { display:flex; align-items:center; gap:14px; padding:16px 24px; background:#217346; color:white; font-size:16px; }
.work-title span { margin-left:24px; font-size:12px; opacity:.8; }
.work-toolbar,.work-format { display:flex; gap:28px; padding:13px 24px; border-bottom:1px solid #d4dad6; background:#f5f6f5; white-space:nowrap; }
.work-format { gap:24px; color:#58615b; }
.work-formula { display:flex; align-items:center; gap:20px; padding:7px 12px; border-bottom:1px solid #cbd3ce; }
.work-formula span:first-child { width:75px; padding:4px; border:1px solid #d4dad6; }
.work-grid { flex:1; overflow:auto; background:repeating-linear-gradient(to bottom,transparent 0,transparent 27px,#e2e6e3 27px,#e2e6e3 28px); }
.work-grid table { border-collapse:collapse; table-layout:fixed; width:100%; min-width:1000px; font:13px Arial,sans-serif; }
.work-grid th,.work-grid td { height:28px; padding:0 10px; border:1px solid #dce2de; white-space:nowrap; }
.work-grid th { background:#f1f3f2; color:#66726b; font-weight:normal; text-align:center; }
.work-grid th:first-child { width:42px; }
.work-grid td { background:white; text-align:right; }
.work-grid td:first-of-type,.work-grid td:nth-child(6) { text-align:left; }
.work-grid .work-heading { height:48px; font-size:16px; font-weight:bold; text-align:left; }
.work-grid .work-label { background:#e9f0ec; font-weight:bold; }
.work-grid .work-selected { outline:2px solid #217346; outline-offset:-2px; background:#f1f8f3; }
.work-grid td { padding:0; overflow:hidden; }
.work-grid td input { display:block; width:100%; min-width:0; height:27px; margin:0; padding:0 10px; border:0; border-radius:0; outline:none; background:transparent; color:inherit; font:inherit; text-align:inherit; user-select:text; -webkit-user-select:text; }
.work-grid .work-heading input { height:47px; }
.work-formula span:last-child { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.work-footer { display:flex; gap:32px; padding:14px 30px; border-top:1px solid #cbd3ce; background:#f5f6f5; color:#526159; }
.work-footer strong { color:#217346; }

@media(max-width:600px){.difficulty{grid-template-columns:repeat(2,minmax(0,1fr))}.difficulty-btn,.difficulty-btn:nth-child(n+4){grid-column:span 1}.difficulty-btn[data-difficulty=legend]{grid-column:1/-1}}

/* PRO and LEGEND add a shot choice within the existing mobile control strip. */
.difficulty-note{margin:12px 0 0;color:#b9c9bf;font-size:11px;line-height:1.6}.difficulty-note[hidden]{display:none}
.touch-lob{position:absolute;left:50%;bottom:calc(env(safe-area-inset-bottom) + 12px);transform:translateX(-50%);min-width:64px;min-height:48px;padding:8px 12px;pointer-events:auto;touch-action:manipulation;border:1px solid #d7f55b80;border-radius:12px;background:#142e39;color:#e5efc9;font-size:12px;font-weight:800;letter-spacing:.06em}.touch-lob[hidden]{display:none}.touch-lob.active{background:#d7f55b;color:#10232c;border-color:#efffa7;box-shadow:0 0 0 3px #d7f55b30}.touch-lob:focus-visible{outline:2px solid white;outline-offset:3px}
@media(pointer:coarse),(max-width:760px){.game-shell:has(.touch-lob:not([hidden])) .fullscreen-btn{top:auto;right:8px;bottom:calc(var(--control-space) + env(safe-area-inset-bottom) + 8px)}}
@media(pointer:coarse) and (orientation:landscape),(max-width:760px) and (orientation:landscape){.touch-lob{bottom:calc(env(safe-area-inset-bottom) + 22px)}}

@media(pointer:coarse),(max-width:760px){.desktop-only{display:none!important}}
