@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');
:root{color-scheme:dark;font-family:'DM Sans',Arial,sans-serif;color:#f3f7ff;background:#080e20}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 0,#263a62,transparent 70%),#080e20;min-height:100vh}button,a{-webkit-tap-highlight-color:transparent}button{font:700 14px 'DM Sans',sans-serif;color:inherit;border:1px solid #8ca8dd66;background:#233450;border-radius:10px;padding:11px 16px;cursor:pointer}button:hover{border-color:#8cf4ff;background:#314970}button:focus-visible,a:focus-visible{outline:3px solid #ffe17b;outline-offset:3px}header{max-width:1280px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 22px;font-family:'Space Grotesk',sans-serif}header>a{font-weight:700;color:#9ceaff;text-decoration:none;letter-spacing:2px}header>span{font-weight:600;letter-spacing:1px}header b{color:#ffda68}header>div{display:flex;gap:8px}main{max-width:1320px;margin:auto;padding:0 20px}.arena{position:relative;aspect-ratio:16/9;border:1px solid #7292b655;border-radius:20px;overflow:hidden;box-shadow:0 22px 90px #0008;background:#182a43}canvas{display:block;width:100%;height:100%;touch-action:none}.overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#06132cd9;backdrop-filter:blur(6px);padding:18px}.overlay[hidden]{display:none}.panel{width:min(760px,100%);text-align:center}.eyebrow{color:#a8eaff;letter-spacing:3px;font-size:12px;font-weight:700;margin:0 0 10px}h1{font:700 clamp(25px,4vw,55px)/1.05 'Space Grotesk',sans-serif;margin:0}h1 em{font-style:normal;color:#ffdc6f}p.intro{color:#c5d8ec;margin:14px 0 18px;font-size:16px}.heroes{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:20px}.hero{padding:8px 12px 12px;background:linear-gradient(135deg,#253757,#15253b);display:flex;flex-direction:column;align-items:center;border:2px solid #5a719633}.hero.selected{border-color:#ffda68;box-shadow:0 0 22px #ffca5922}.hero img{width:100%;height:clamp(80px,14vw,190px);object-fit:contain}.hero strong{font:700 21px 'Space Grotesk',sans-serif}.hero small{font-size:13px;color:#c2d3e5;margin-top:5px}.primary{background:linear-gradient(110deg,#ffcb53,#ffeb9f);color:#182441;font-size:18px;padding:13px 36px;border:0}.primary:hover{background:#ffe69c}.guide{font-size:14px;color:#b9cde4;line-height:1.6;margin:14px 0 0}#best{font-size:13px;color:#ffe191;margin:7px 0 0}.compact{max-width:500px;padding:30px;background:#12233ced;border:1px solid #8cc9de66;border-radius:20px}.compact h2{font:700 32px 'Space Grotesk',sans-serif;margin:0 0 12px}.compact p{color:#c8dcf0;white-space:pre-line;line-height:1.6}.compact button{margin:5px}#touch{position:absolute;bottom:18px;left:20px;right:20px;display:flex;gap:10px;pointer-events:none}#touch button{pointer-events:auto;background:#0e2448c9;border-color:#9adcf877;width:65px;height:65px;font-size:27px;padding:2px;touch-action:none;display:flex;align-items:center;justify-content:center;flex-direction:column}#touch button:nth-child(3){margin-left:auto}#touch small{font-size:10px;letter-spacing:1px}body:not(.playing) #touch{display:none}.below{text-align:center;font-size:14px;color:#97b3d0;margin:15px 0 22px}@media(hover:hover) and (pointer:fine){#touch{opacity:.35}#touch:hover{opacity:1}}@media(max-width:700px){header{padding:10px;font-size:12px}header>span{display:none}header button{font-size:12px;padding:8px}main{padding:0 6px}.arena{aspect-ratio:3/4;border-radius:12px}.overlay{padding:14px}.heroes{gap:8px}.hero{padding:8px 2px}.hero img{height:120px}.hero strong{font-size:18px}.hero small{font-size:11px}h1{font-size:34px}p.intro{font-size:14px}.guide{font-size:12px}#touch{bottom:12px;left:10px;right:10px}#touch button{width:54px;height:56px}.below{font-size:12px}.compact h2{font-size:25px}}@media(max-height:550px) and (min-width:701px){header{padding:6px 18px}main{max-width:1000px}.hero img{height:90px}h1{font-size:30px}.heroes{margin-bottom:8px}.guide{margin-top:8px;font-size:12px}.intro{margin:8px!important}.primary{padding:8px 28px}.eyebrow{margin-bottom:6px}}

@media(max-width:700px){body.playing .arena{aspect-ratio:16/9;overflow:visible;margin-bottom:80px}body.playing canvas{border-radius:12px}body.playing #touch{bottom:-72px}body.playing #touch button{background:#183858}body.playing .below{margin-top:10px}}

[hidden]{display:none!important}#home-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:28px 0}.difficulties{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:20px 0}.difficulties button{display:flex;flex-direction:column;gap:8px;padding:20px 12px}.difficulties strong{font-size:20px}.difficulties small{font-size:14px;color:#c5d8ec}.audio-controls{display:grid;gap:14px;text-align:left;margin:20px 0}.audio-controls label{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:16px}.audio-controls input[type=range]{width:52%;accent-color:#ffdc6f}.compact{max-height:100%;overflow:auto}.compact h2{font-size:26px}@media(max-width:700px){.difficulties{gap:6px}.difficulties button{padding:14px 6px}.difficulties strong{font-size:17px}.difficulties small{font-size:12px}#dialog .compact{padding:16px}.compact button{padding:10px 12px}#character-step h2,#difficulty-step h2{margin:10px}}
.audio-controls label:has(input[type=range]){display:grid;grid-template-columns:1fr 1fr auto;gap:8px;font-size:14px}.audio-controls input[type=range]{width:100%;min-width:0}.audio-controls output{font-size:13px;min-width:35px}

/* Menus scroll from their top edge instead of being centred beyond the viewport. */
.overlay{overflow-y:auto;overscroll-behavior:contain;align-items:safe center;-webkit-overflow-scrolling:touch}.overlay>.panel{flex-shrink:0;max-height:100%;overflow-y:auto;padding-block:10px}.overlay>.compact{padding:24px}.overlay:has(#character-step:not([hidden]))>.panel{max-height:100%;overflow:auto}
header{flex-wrap:wrap}header>div{flex-wrap:wrap;justify-content:flex-end}
@media(max-width:900px){body:not(.playing) .arena{aspect-ratio:auto;height:calc(100dvh - 130px);min-height:320px;max-height:800px}.overlay{align-items:flex-start;padding:12px}.overlay>.panel{max-height:none;overflow:visible;margin-block:auto}.overlay>.compact{max-height:none;padding:18px}.hero img{height:clamp(75px,18vh,140px)}.eyebrow{margin-top:4px}.guide{padding-bottom:8px}}
body.fullscreen-mode{position:fixed;inset:0;z-index:9999;height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column;background:#080e20}body.fullscreen-mode header{flex-shrink:0;width:100%;max-width:none;padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))}body.fullscreen-mode main{padding:0;width:100%;max-width:none;flex:1;min-height:0;display:flex;flex-direction:column}body.fullscreen-mode .arena{flex:1;width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:auto;border-radius:0;border:0;margin:0;overflow:hidden;display:flex;align-items:center;justify-content:center}body.fullscreen-mode canvas{width:auto;height:auto;max-width:100%;max-height:calc(100% - 84px);aspect-ratio:16/9;object-fit:contain;border-radius:0}body.fullscreen-mode .overlay{inset:0;max-height:100%;padding:16px}body.fullscreen-mode #touch{bottom:max(12px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}body.fullscreen-mode .below{display:none}
@media(min-width:901px) and (hover:hover){body.fullscreen-mode canvas{max-height:100%}}
@media(max-height:500px){body:not(.playing) .arena{min-height:240px}.overlay>.panel{margin-block:0}h1{font-size:28px}.hero img{height:75px}.heroes{margin-bottom:10px}.intro{margin:8px 0!important}}
