@font-face{font-family:Fredoka;src:url('./assets/fredoka.ttf') format('truetype');font-weight:300 700;font-style:normal;font-display:swap}
:root{--cream:#f4f1e7;--paper:#fffaf0;--pine:#244d42;--pine-dark:#193b32;--teal:#4fae9d;--teal-dark:#307b6c;--peach:#ee906e;--yellow:#f4ca62;--sky:#e0eee6;--muted:#567064;--line:#ced7c8;--radius:16px;color-scheme:light;font-family:Fredoka,'Trebuchet MS',sans-serif;color:var(--pine);background:var(--cream);font-synthesis:none}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body{user-select:none;-webkit-user-select:none}
button{font:inherit;color:inherit;cursor:pointer;border:0;touch-action:manipulation}
button:disabled{cursor:default;opacity:.5}
button:focus-visible{outline:3px solid var(--pine);outline-offset:4px}
button[hidden],[hidden]{display:none!important}
::selection{background:var(--yellow);color:var(--pine-dark)}
svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.icon-library{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.game-shell{height:100%;height:100dvh;max-width:1410px;margin:0 auto;padding:18px 38px 0;display:flex;flex-direction:column;gap:18px}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:0 0 44px}
.brand{background:none;padding:0;display:inline-flex;align-items:center;gap:9px;font-size:25px;font-weight:600;letter-spacing:-.025em;white-space:nowrap}
.brand>svg{width:43px;height:32px;stroke:none}
.brand-dot{color:var(--teal-dark)}
.top-actions{display:flex;align-items:center;gap:10px}
.text-button,.icon-button{background:transparent;min-height:44px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.text-button{padding:0 14px;font-size:15px;font-weight:450}
.icon-button{width:44px}
.text-button:hover,.icon-button:hover{background:#e6e8dc}
.icon-button[aria-pressed=false]{color:var(--muted)}
.arena{position:relative;width:100%;flex:1;min-height:0;overflow:hidden;border-radius:22px;background:var(--sky);isolation:isolate}
#court{display:block;width:100%;height:100%}
.menu-screen{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}
.menu-content{display:flex;flex-direction:column;align-items:center;pointer-events:auto;transform:translateY(-24px)}
.game-title{font-size:clamp(64px,7.1vw,106px);font-weight:650;line-height:.86;letter-spacing:-.035em;margin:0;text-align:center;position:relative}
.game-title>span{display:block;color:var(--teal-dark);transform:rotate(-3deg);margin-top:5px}
.title-period{color:var(--peach)}
.tagline{font-size:18px;font-weight:420;margin:23px 0 22px;letter-spacing:.01em}
.mode-switch{display:flex;padding:4px;background:#c6dacf;border-radius:12px;width:246px;gap:4px}
.mode-button{height:38px;flex:1;border-radius:8px;background:transparent;font-size:16px;font-weight:500;color:#355e50}
.mode-button.selected{background:var(--paper);color:var(--pine-dark);box-shadow:0 2px 5px #244d4214}
.mode-button:not(.selected):hover{background:#d5e3d9}
.play-button{width:246px;min-height:56px;margin-top:14px;background:var(--pine);color:var(--paper);border-radius:12px;font-size:23px;font-weight:550;display:flex;align-items:center;justify-content:center;gap:17px;box-shadow:0 5px 11px #244d4224;transition:background .16s ease,transform .16s ease}
.play-button:hover{background:var(--pine-dark);transform:translateY(-2px)}
.play-button:active{transform:translateY(1px)}
.play-button:focus-visible{outline-color:var(--teal-dark)}
.play-button svg{width:24px;height:24px;stroke:none}
.mode-detail{font-size:14px;color:#476857;margin:11px 0 0;min-height:18px}
.quiet-button{background:none;text-decoration:underline;text-underline-offset:4px;font-size:13px;min-height:32px;padding:3px 10px;margin-top:4px}
.character-choice{position:absolute;bottom:18px;left:23px;display:flex;align-items:center;gap:9px;pointer-events:auto}
.character-choice>span{font-size:13px;margin-right:4px}
.color-choice{width:24px;height:24px;border:3px solid transparent;border-radius:50%;background:var(--blob-color);background-clip:content-box;padding:0;position:relative}
.color-choice.selected{border-color:var(--pine);outline:2px solid #f4f1e799;outline-offset:-5px}
.color-choice:hover{transform:translateY(-2px)}
.menu-record{position:absolute;right:24px;bottom:23px;font-size:13px;letter-spacing:.04em}
.menu-record span{margin-left:6px;font-weight:600;font-variant-numeric:tabular-nums}
.hud{position:absolute;inset:24px 30px auto;display:flex;align-items:flex-start;justify-content:space-between;pointer-events:none}
.player-hud{min-width:155px}
.player-name{font-size:15px;font-weight:550;letter-spacing:.08em}
.right-hud{text-align:right}
.score-line{display:flex;align-items:center;gap:13px;margin-top:3px}
.right-hud .score-line{justify-content:flex-end}
.score-line strong{font-size:51px;line-height:1;font-weight:550;font-variant-numeric:tabular-nums}
.point-dots{display:flex;gap:5px}
.point-dots i{width:9px;height:9px;background:#b8cfc0;border-radius:50%}
.left-hud .point-dots i.filled{background:var(--teal-dark)}
.right-hud .point-dots i.filled{background:#b45c40}
.match-hud{text-align:center;display:flex;align-items:center;flex-direction:column;gap:7px;padding-top:1px}
#match-label{font-size:13px;letter-spacing:.1em;font-weight:550}
.first-to{font-size:12px;letter-spacing:.12em;color:#476857}
.arcade-score{font-size:12px;margin-top:4px;letter-spacing:.04em;font-variant-numeric:tabular-nums}
.rally-message{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:none;transform:translateY(-30px);gap:7px;text-align:center}
.rally-message>span{font-size:clamp(36px,5vw,64px);font-weight:600;letter-spacing:-.025em;color:var(--pine-dark);background:#e0eee6e8;border-radius:14px;padding:0 18px 4px}
.rally-message small{font-size:16px;font-weight:450;background:#e0eee6e8;padding:4px 12px;border-radius:8px}
.rally-replay{position:absolute;right:22px;bottom:22px;background:var(--paper);min-height:42px;display:flex;align-items:center;gap:7px;border-radius:10px;padding:0 12px;font-size:14px}
.rally-replay svg{width:17px;height:17px}
.rally-replay kbd{margin-left:6px;background:#ececdf;font-size:12px;min-width:34px}
.replay-controls{position:absolute;top:122px;left:0;right:0;display:flex;align-items:center;justify-content:center;gap:15px;font-size:12px;letter-spacing:.12em}
.small-button{font-size:13px;padding:8px 13px;background:var(--paper);border-radius:8px;min-height:36px;letter-spacing:0}
.save-notice{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);background:var(--paper);padding:8px 12px;border-radius:8px;font-size:12px;white-space:nowrap}
.save-notice button{background:none;text-decoration:underline;min-height:28px}
.game-footer{min-height:57px;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-shrink:0;padding-bottom:14px}
.desktop-hints{display:flex;align-items:center;gap:22px;font-size:13px;color:var(--muted)}
.desktop-hints>span{display:flex;align-items:center;gap:5px;white-space:nowrap}
kbd{font-family:inherit;font-size:12px;font-weight:500;min-width:21px;height:23px;display:inline-flex;align-items:center;justify-content:center;background:#e7e8dc;border-radius:5px;color:var(--pine);border-bottom:2px solid #d3d7c8;padding:2px 5px}
.footer-note{margin:0;font-size:13px;color:var(--muted);text-align:right}
.touch-controls{display:none;align-items:center;justify-content:space-between;width:100%;gap:14px;touch-action:none}
.touch-player{display:flex;gap:9px;align-items:center;width:100%}
.touch-button{width:64px;min-width:48px;height:60px;display:flex;align-items:center;justify-content:center;background:#e1e6da;border-radius:14px;touch-action:none;user-select:none;-webkit-user-select:none;transition:background .08s ease}
.touch-button svg{width:25px;height:25px;stroke-width:2.5}
.touch-button.pressed{background:#b6d6c6}
.jump-button{margin-left:auto;width:112px;gap:7px;background:var(--pine);color:var(--paper);font-size:13px;font-weight:550;letter-spacing:.04em}
.jump-button.pressed{background:var(--teal-dark)}
.touch-player-two .jump-button{background:#b45c40}
.duo .touch-player{width:auto;flex:1;gap:6px}
.duo .touch-button{width:49px;min-width:42px}
.duo .jump-button{width:72px;margin-left:0}
.duo .jump-button span{display:none}
.duo .footer-note{display:none}
.duo .touch-controls{display:flex}
.duo .desktop-hints{display:none}
.sr-only{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;margin:-1px;clip:rect(0,0,0,0);white-space:nowrap;border:0}
dialog{color:var(--pine);border:0;border-radius:20px;background:var(--paper);padding:0;max-width:440px;width:calc(100% - 36px);max-height:calc(100dvh - 32px);box-shadow:0 22px 70px #193b3233;overscroll-behavior:contain}
dialog::backdrop{background:#193b3263}
.dialog-body{padding:28px 30px 26px;text-align:center}
.dialog-body h2{font-size:36px;line-height:1.08;font-weight:600;letter-spacing:-.025em;margin:0 0 11px;text-wrap:balance}
.dialog-body>p{font-size:16px;line-height:1.5;margin:10px 0 18px;color:#476857}
.dialog-body .play-button{width:100%;margin-top:19px;font-size:20px;min-height:52px}
.dialog-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:11px}
.secondary-button{padding:11px 16px;border-radius:10px;background:#e6eadf;min-height:44px;font-size:15px;display:inline-flex;align-items:center;justify-content:center;gap:7px}
.secondary-button:hover{background:#d6dfd1}
.secondary-button svg{width:18px;height:18px}
.help-rules{text-align:left;padding:14px 0 0;border-top:1px solid var(--line);margin-top:18px}
.help-rules p{font-size:14px;line-height:1.5;margin:0 0 10px}
.help-keys{display:grid;grid-template-columns:1fr 1fr;gap:12px;text-align:left;margin:20px 0}
.help-keys strong{display:block;font-size:14px;margin-bottom:8px}
.help-keys p{font-size:12px;margin:6px 0;color:#476857}
.help-keys kbd{font-size:12px}
.help-foot{font-size:12px!important}
.result-score{font-size:52px;font-weight:550;letter-spacing:.02em;margin:16px 0 4px;font-variant-numeric:tabular-nums}
.result-score span{opacity:.45;padding:0 12px}
.result-best{font-size:14px;color:#476857;margin:8px 0}
.opponent-mark{display:flex;justify-content:center;gap:7px;margin:18px 0}
.opponent-mark i{width:26px;height:8px;border-radius:4px;background:#d5ded0}
.opponent-mark i.done{background:var(--teal-dark)}
.noscript{position:fixed;inset:30% 10% auto;text-align:center;background:var(--paper);padding:40px;border-radius:16px}
@media(min-width:1500px){.game-shell{padding-top:30px;padding-bottom:8px;gap:23px}}
@media(max-height:680px) and (min-width:761px){.game-shell{gap:10px;padding-top:8px}.game-footer{min-height:40px;padding-bottom:8px}.game-title{font-size:65px}.tagline{margin:14px 0 15px;font-size:16px}.menu-content{transform:translateY(-9px)}.play-button{min-height:48px;font-size:21px;margin-top:10px}.mode-button{height:33px}.mode-detail{margin-top:7px}.character-choice{bottom:15px}.menu-record{bottom:19px}}
@media(max-width:760px),(pointer:coarse){.game-shell{padding:10px 16px 0;gap:12px}.topbar{flex-basis:40px}.brand{font-size:22px;gap:5px}.brand>svg{width:35px}.top-actions{gap:2px}.text-button{padding:0 8px}.help-button>span{display:none}.top-actions .icon-button,.top-actions .text-button{width:40px;min-height:40px}.arena{border-radius:18px}.game-footer{min-height:87px;padding-bottom:max(12px,env(safe-area-inset-bottom));gap:0}.desktop-hints,.footer-note{display:none}.touch-controls{display:flex}.hud{inset:18px 18px auto}.player-hud{min-width:92px}.player-name{font-size:12px}.score-line{gap:7px}.score-line strong{font-size:38px}.point-dots{gap:3px;max-width:37px;flex-wrap:wrap}.point-dots i{width:8px;height:8px}.match-hud{gap:5px}#match-label{font-size:12px}.first-to{font-size:12px}.arcade-score{font-size:12px;margin-top:1px}.menu-content{transform:translateY(-20px)}.game-title{font-size:76px}.tagline{font-size:17px;margin:20px 0}.character-choice{left:16px;bottom:17px;gap:6px}.character-choice>span{font-size:12px;margin-right:2px}.menu-record{right:16px;bottom:23px;font-size:12px}.rally-replay{right:14px;bottom:14px;min-height:38px;font-size:13px}.rally-replay kbd{display:none}.rally-message{transform:translateY(-45px)}.replay-controls{top:110px}.duo .touch-controls{gap:12px}.duo .touch-player:first-child .touch-button{background:#c8e0d4}.duo .touch-player:first-child .jump-button{background:var(--pine)}.duo .touch-player-two .touch-button{background:#f0d8c9}.duo .touch-player-two .jump-button{background:#b45c40}.duo .touch-button.pressed{filter:brightness(.85)}}
@media(max-width:380px){.game-shell{padding-left:10px;padding-right:10px}.brand{font-size:20px}.brand>svg{width:30px}.top-actions .icon-button,.top-actions .text-button{width:36px}.game-title{font-size:68px}.mode-switch,.play-button{width:224px}.character-choice>span{display:none}.duo .touch-button{width:42px;min-width:40px}.duo .jump-button{width:52px}.dialog-body{padding:24px 22px}.help-keys{gap:8px}.touch-button{height:56px}}
@media(max-height:650px) and (max-width:760px) and (orientation:portrait){.game-shell{gap:7px}.game-title{font-size:57px}.tagline{font-size:15px;margin:14px 0}.menu-content{transform:translateY(-17px)}.mode-button{height:30px;font-size:14px}.play-button{min-height:45px;font-size:20px;margin-top:9px}.mode-detail{font-size:12px;margin-top:7px}.game-footer{min-height:72px}.touch-button{height:52px}.character-choice{bottom:12px}.menu-record{bottom:18px}}
@media(max-height:480px) and (orientation:landscape){.help-button>span{display:none}.game-shell{padding:5px max(12px,env(safe-area-inset-left)) 0;gap:5px}.topbar{flex-basis:34px}.brand{font-size:19px}.brand>svg{width:31px;height:25px}.top-actions .icon-button,.top-actions .text-button{width:34px;min-height:34px}.game-footer{min-height:57px;padding-bottom:5px}.touch-button{width:59px;height:46px;border-radius:11px}.jump-button{width:107px}.arena{border-radius:14px}.menu-content{transform:translateY(-2px)}.game-title{font-size:48px;line-height:.82}.tagline{font-size:13px;margin:10px 0}.mode-switch{width:215px;padding:3px}.mode-button{height:28px;font-size:13px}.play-button{min-height:39px;font-size:18px;width:215px;margin-top:7px}.mode-detail{font-size:12px;margin-top:5px}.character-choice{left:18px;bottom:13px}.character-choice>span{font-size:12px}.color-choice{width:22px;height:22px}.menu-record{right:18px;bottom:18px}.quiet-button{position:absolute;left:calc(100% + 15px);bottom:15px;white-space:nowrap}.hud{inset:12px 22px auto}.score-line strong{font-size:33px}.player-name{font-size:12px}.match-hud{gap:4px}#match-label{font-size:12px}.first-to{font-size:12px}.arcade-score{font-size:12px;margin-top:0}.rally-message{transform:translateY(0)}.rally-message>span{font-size:34px}.rally-message small{font-size:13px}.replay-controls{top:81px}.dialog-body{padding:20px 25px}.dialog-body h2{font-size:29px}.dialog-body>p{margin:8px 0 11px}.dialog-body .play-button{margin-top:12px}.help-rules{padding-top:10px;margin-top:10px}.help-keys{margin:12px 0}.result-score{font-size:40px;margin:8px 0}.opponent-mark{margin:12px 0}}
@media(max-width:760px) and (orientation:portrait){.game-shell.in-match .arena{flex:0 0 auto;height:min(380px,calc(100dvh - 165px));margin-top:auto}.game-shell.in-match .game-footer{margin-bottom:auto}}
@media(max-width:330px){.brand>span{display:none}.game-title{font-size:60px}.character-choice{gap:3px}.menu-record{font-size:12px}.player-hud{min-width:70px}.hud{inset:16px 12px auto}.score-line strong{font-size:33px}#match-label{font-size:12px}.match-hud{gap:4px}.duo .touch-controls{gap:8px}.duo .touch-player{gap:4px}.duo .touch-button{width:36px;min-width:36px}.duo .jump-button{width:42px}.touch-button{width:52px;min-width:44px}.jump-button{width:95px}.replay-controls{gap:8px;font-size:12px}.replay-controls .small-button{padding-inline:9px;font-size:12px}}
@media(max-height:340px) and (orientation:landscape){.menu-content{display:grid;grid-template-columns:190px 215px;column-gap:24px;transform:translateY(-4px)}.game-title{grid-column:1;grid-row:1 / 4;font-size:53px}.tagline{display:none}.mode-switch{grid-column:2;grid-row:1}.menu-content>.play-button{grid-column:2;grid-row:2}.mode-detail{grid-column:2;grid-row:3;text-align:center}.quiet-button{left:0;bottom:-25px;font-size:12px}.character-choice{bottom:8px}.menu-record{bottom:13px}.hud{inset:7px 18px auto}.player-name{font-size:12px}.score-line strong{font-size:28px}.arcade-score{margin-top:0}.rally-message>span{font-size:30px}.rally-message small{font-size:12px}.replay-controls{top:64px}.rally-replay{bottom:8px;min-height:32px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* Keep compact artwork, but give every control a finger-sized hit area. */
button,.top-actions .icon-button,.top-actions .text-button,.save-notice button{min-width:44px;min-height:44px}
.play-button,.mode-button,.quiet-button,.rally-replay,.small-button{min-height:44px}
.topbar{flex-basis:44px}
.top-actions .icon-button,.top-actions .text-button{width:44px}
.brand{min-height:44px}
.color-choice{width:44px;height:44px;border:0;padding:10px;background:transparent;outline:none}
.color-choice::before{content:'';display:block;width:24px;height:24px;border:3px solid transparent;border-radius:50%;background:var(--blob-color);background-clip:content-box}
.color-choice.selected::before{border-color:var(--pine);outline:2px solid #f4f1e799;outline-offset:-5px}
.character-choice{gap:2px;bottom:8px}
@media(max-width:350px){.brand>span{display:none}.menu-record{bottom:58px}}
@media(max-width:380px){
  .duo .touch-player{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  .duo .touch-button{width:100%;min-width:44px;height:44px}
  .duo .jump-button{grid-column:1 / -1;width:100%}
  .duo .game-footer{min-height:112px}
  .game-shell.duo.in-match .arena{height:min(380px,calc(100dvh - 200px))}
}
@media(max-height:340px) and (orientation:landscape){
  .menu-content{grid-template-columns:190px 215px;transform:translateY(-7px)}
  .menu-content>.mode-detail{display:none}
  .game-title{grid-row:1 / 3}
  .character-choice{left:6px;bottom:0}
  .character-choice>span{display:none}
}
