/* Every control is positioned against the actual full-viewport playfield. */
#stage{width:100vw;height:100vh;height:100dvh}
#stage:fullscreen{width:100vw!important;height:100dvh!important}
.touchBtn{width:48px;height:48px;border-radius:16px;background:#142b3d65;box-shadow:inset 0 1px #ffffff33}
.touchBtn.jump{width:62px;height:62px;background:#32537070}
.touchBtn.dash{width:48px;height:48px;background:#142b3d65}
.pad,.actions{bottom:max(10px,env(safe-area-inset-bottom));gap:6px}
.pad{left:max(8px,env(safe-area-inset-left))}.actions{right:max(8px,env(safe-area-inset-right))}
.top-actions button{width:44px;height:44px;background:#0b1d3288}
#overlay{padding-top:max(18px,env(safe-area-inset-top));padding-bottom:max(18px,env(safe-area-inset-bottom))}
@container(max-width:500px){.hud-main{max-width:calc(100% - 122px);padding:7px 8px}.hud-main b{font-size:12px}.hud-main small{font-size:10px}.hud-main span{font-size:16px}.touchBtn{width:48px;height:48px}.touchBtn.jump{width:62px;height:62px}.touchBtn.dash{width:48px;height:48px}#boss-hud{top:105px}#banner{top:23%;left:8%;right:8%}}
/* Lock the document itself as well as the canvas, including Safari rubber-band. */
html,body{position:fixed;inset:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none;touch-action:none}
#stage{touch-action:none;overscroll-behavior:none}
.pad .touchBtn{width:60px;height:60px;font-size:26px}
#overlay{touch-action:pan-y;overscroll-behavior:contain}
#overlay[data-mode="intro"] #message,#overlay[data-mode="victory"] #message{font-size:clamp(23px,3.2cqw,32px);line-height:1.65;font-weight:650}
@container(max-height:450px){#overlay[data-mode="intro"] #message,#overlay[data-mode="victory"] #message{font-size:22px;line-height:1.45;margin:8px auto}}
#overlay[data-mode="select"] h1{font-family:system-ui;font-size:clamp(27px,5cqw,48px);font-weight:750;letter-spacing:.02em}
#overlay[data-mode="intro"] #title{display:none}
#choices button{width:44%;max-width:220px}
#choices small{display:block;font-size:12px;line-height:1.5;min-height:3em}
@container(max-width:500px){#choices small{font-size:11px}#choices{gap:12px}}
@container(max-height:450px){#choices img{height:78px}#choices small{font-size:11px;min-height:1.5em}}
#overlay[data-mode="victory"] #title{display:none}
#overlay[data-mode="intro"] #eyebrow,#overlay[data-mode="victory"] #eyebrow{display:block;font-size:18px;letter-spacing:.08em;line-height:1.5;margin-bottom:14px}
#overlay[data-mode="victory"] #message{font-size:clamp(24px,6.4cqw,36px);line-height:1.7;white-space:normal}
.ending-line{display:block}
.ending-heart{color:#ef3340;text-shadow:0 1px 8px #b4163044}
@container(max-height:450px){#overlay[data-mode="victory"] #message{font-size:25px;line-height:1.5;margin:8px auto}}
#distance{font-size:13px;color:#ffe7ac;white-space:nowrap}
#records{max-width:460px;margin:10px auto;padding:12px 16px;background:#0b1c30de;border:1px solid #c7ad7355;border-radius:10px;text-align:left;font-size:14px;line-height:1.5}
#records .current-record{font-size:18px;font-weight:750;color:#ffe7ac;margin:0 0 10px}
#records h2{font-size:14px;margin:0 0 6px}
#records ol{padding-left:24px;margin:0 0 10px}
#records li{padding:3px 0}#records small{display:block;font-size:11px;color:#cbd6df}
#overlay[data-mode="gameover"] .panel{margin:auto}
#overlay[data-mode="gameover"] #title{font-size:clamp(28px,5cqw,40px);margin:8px 0}
#overlay[data-mode="gameover"] #message{font-size:14px;margin:6px auto}
@container(max-width:500px){#distance{font-size:12px}#records{padding:10px 12px;font-size:12px}#records .current-record{font-size:16px}}
/* Use the stage announcement typeface throughout the game UI. */
#stage,#stage *{font-family:system-ui,-apple-system,"Noto Sans JP",sans-serif!important;font-weight:800!important}

/* Enlarge the failure heading and ranking for comfortable reading. */
#overlay[data-mode="gameover"] #eyebrow{font-size:15px}
#overlay[data-mode="gameover"] #title{font-size:clamp(32px,5.8cqw,46px)}
#overlay[data-mode="gameover"] #message{font-size:16px}
#records{max-width:530px;padding:16px 18px;font-size:16px}
#records .current-record{font-size:21px}
#records h2{font-size:16px}
#records small{font-size:13px}
@container(max-width:500px){#records{padding:12px 14px;font-size:14px}#records .current-record{font-size:19px}#records small{font-size:12px}}
