:root{color-scheme:light;--navy:#103e60;--blue:#237eae;--cream:#fff1d2;--lemon:#ffe24a;--red:#c82e38}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#0c3550;color:var(--cream);font-family:ui-rounded,"Trebuchet MS",system-ui,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;font-weight:800;cursor:pointer;touch-action:manipulation}button:focus-visible,a:focus-visible,[role=slider]:focus-visible,canvas:focus-visible{outline:3px solid #fff5bc;outline-offset:-3px}button:disabled{cursor:default;opacity:.65}a{color:inherit}button{color:var(--cream)}.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}
.first-screen{min-height:100svh;min-height:100dvh;display:grid;place-items:center;padding:env(safe-area-inset-top) 12px env(safe-area-inset-bottom);background:radial-gradient(ellipse at 50% 35%,#2586b3,#123e5b 78%)}.cabinet{width:min(100%,480px);background:#237eae;box-shadow:0 22px 70px #041b2b77;border:1px solid #88bdd044;border-radius:20px;overflow:hidden}.topbar{height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 10px;background:#123f5d;font-size:11px;letter-spacing:1px}.topbar a{display:flex;align-items:center;min-height:44px;text-decoration:none;font-size:12px;letter-spacing:0}.topbar button{width:48px;height:44px;border:0;background:none;font-size:28px}.title-art{width:100%;height:auto;display:block}.flight-hud{height:34px;display:flex;gap:10px;align-items:center;padding:0 13px;background:linear-gradient(#2c8fbd,#2586b5);font-weight:900}.flight-hud #hull{white-space:nowrap;color:#ed4552;font-size:20px;text-shadow:1px 1px #fff2cd,-1px -1px #fff2cd}.flight-hud #clock{font-size:14px;min-width:28px;text-align:right}#bell-marks{display:grid;grid-template-columns:repeat(16,1fr);gap:3px;flex:1}#bell-marks i{height:9px;width:9px;max-width:100%;border:2px solid #ffe7be;border-radius:50%;box-shadow:0 1px 2px #143e5d}#bell-marks i.rung{background:#ffe24a;border-color:#fff5c1}
.stage-wrap{position:relative;aspect-ratio:960/660;isolation:isolate}canvas{width:100%;height:100%;display:block;touch-action:none;user-select:none;outline:0}.stage-heading{pointer-events:none;position:absolute;top:8px;left:9px;right:9px;display:flex;justify-content:space-between;gap:8px;font-size:10px;letter-spacing:.5px;font-weight:900}.stage-heading span{background:#113c5ad9;padding:5px 7px;border-radius:12px}.state-card{position:absolute;left:12%;right:12%;top:8%;text-align:center;pointer-events:none;display:flex;flex-direction:column;gap:4px;text-shadow:0 2px 3px #145278}.state-card strong{font-size:clamp(18px,5vw,25px);letter-spacing:-.5px}.state-card span{font-size:12px;font-weight:700}.state-card.result{top:21%;left:9%;right:9%;padding:17px 12px;border:3px solid #ffdf9f;background:#124867ed;border-radius:22px;box-shadow:0 8px 0 #072e4999;text-shadow:none}.state-card.result strong{color:var(--lemon);font-size:30px}.state-card.result span{line-height:1.55}.feedback{position:absolute;top:83%;width:100%;text-align:center;color:#fff5cf;text-shadow:0 2px 3px #082d47;font-weight:900;font-size:12px;pointer-events:none}
.console{position:relative;width:100%;aspect-ratio:1024/526;margin-top:-1px;touch-action:none;user-select:none}.console>img{width:100%;height:100%;display:block;pointer-events:none}.console button{position:absolute;border:0;background:transparent;text-shadow:0 2px 2px #78200f}.steering-control{position:absolute;left:8%;top:8%;width:18%;height:47%;text-align:center}.control-label{position:absolute;bottom:-23px;left:0;right:0;font-size:11px;font-weight:900;letter-spacing:1px;text-shadow:0 1px 2px #0b3d5f}#steer{position:relative;min-width:64px;width:100%;height:100%;min-height:64px;touch-action:none;cursor:ns-resize;background:url('../assets/play/bellskimmer/wood.webp') center/cover;border-radius:18px}.steer-rail{position:absolute;left:37%;right:31%;top:1%;bottom:1%;background:#082f4c;border:3px solid #75b7c8;border-radius:20px;box-shadow:inset 3px 4px 6px #031c30}#steer-thumb{position:absolute;left:11%;width:78%;height:25%;top:37%;border-radius:11px;background:linear-gradient(#6ac9ed,#2894be 70%,#176c98);border:2px solid #7bd3ec;box-shadow:0 5px 4px #073b5d99;pointer-events:none}.tone-control{left:32%;top:20%;width:32%;height:28%;min-height:48px;border-radius:25px!important;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px}.tone-control span{background:#842b32ed;padding:5px 7px;border-radius:8px;font-size:12px;color:#fff5d8;text-shadow:none}.tone-control[data-tone="1"] span{background:#ffe150;color:#223d54}.tone-control .key-hint{padding:1px 5px;font-size:8px;letter-spacing:1px;background:#163e59bf;color:#fff4d4}.fire-control{left:68%;top:9%;width:27%;height:48%;min-width:64px;min-height:64px;border-radius:50%;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:4px}.fire-control span{font-size:21px;letter-spacing:1px}.fire-control small{font-size:8px}.fire-control.pressed{background:#670b2544;transform:scale(.96)}.start-control{left:23%;top:64%;width:54%;height:29%;min-height:48px;color:#173e5d!important;font-size:16px;letter-spacing:.5px;text-shadow:0 1px #fff4a8!important;border-radius:35px!important}.start-control span{margin-left:8px}.start-control:active{transform:translateY(3px)}
.utility{display:flex;gap:6px;padding:6px 12px;background:#174c70}.utility button{flex:1;min-width:0;min-height:48px;border:1px solid #8ac7de55;border-radius:11px;background:#22698e;font-size:13px;box-shadow:0 3px #0d3856}.flight-note{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:34px;padding:0 13px;background:#123f5d;font-size:10px;color:#e4edf0}.flight-note a{min-height:32px;display:flex;align-items:center}.help{max-width:760px;margin:0 auto;padding:72px 24px 100px;line-height:1.8;color:#d9e8ec}.help h2{font-size:36px;line-height:1.1;color:#fff0ca;margin:12px 0 28px;letter-spacing:-1px}.help h3{margin-top:36px;color:#ffe27a}.eyebrow{font-size:11px;letter-spacing:3px;color:#7bc7eb}.back-top{display:inline-block;margin-top:20px}.small{font-size:12px;line-height:1.5}
dialog{width:min(90vw,420px);max-height:90dvh;overflow:auto;border:3px solid #f5d6a1;border-radius:22px;background:#174e70;color:var(--cream);padding:22px;box-shadow:0 20px 70px #031626aa}dialog::backdrop{background:#082b40b8}dialog h2{margin:0;font-size:25px}dialog button{min-height:48px;border-radius:12px;border:1px solid #90c6df;background:#236f96;padding:10px 14px}.dialog-top{display:flex;align-items:center;justify-content:space-between}.dialog-top button{font-size:20px}.stage-card{display:flex;flex-direction:column;gap:8px;border:1px solid #77afc777;border-radius:13px;padding:13px;font-size:12px;margin:18px 0;background:#103f5f}.stage-card strong{color:var(--lemon);letter-spacing:1px}.setting{display:block;width:100%;margin:8px 0;text-align:left}.setting:disabled{opacity:.55}.dialog-actions{display:flex;gap:10px}.dialog-actions button{flex:1}#restart-confirm{background:#ffe24a;color:#163d58}.cabinet:fullscreen{width:100vw;height:100dvh;border-radius:0;display:flex;flex-direction:column;align-items:center;background:#123f5d;overflow:auto}.cabinet:fullscreen>*{width:min(100%,480px)}.cabinet:fullscreen .stage-wrap{width:min(100%,480px);flex:none}.cabinet:fullscreen .console{flex:none}
@media(max-width:420px){.first-screen{padding-left:0;padding-right:0}.cabinet{border-radius:0;border:0;max-width:100%}.topbar{height:42px}.topbar>span{font-size:9px}.flight-hud{gap:7px}#bell-marks{gap:2px}#bell-marks i{width:8px;height:8px}.stage-heading{font-size:9px}.state-card{top:13%}.console .start-control{font-size:14px}}
@media(max-height:760px){.cabinet{width:min(100%,420px)}.topbar{height:40px}.title-art{max-height:110px;object-fit:cover}.flight-hud{height:28px}.utility{padding-top:4px;padding-bottom:4px}.flight-note{min-height:28px}.console{max-height:195px}.stage-wrap{max-height:280px}.first-screen{padding-top:0;padding-bottom:0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}body.reduced-motion *{scroll-behavior:auto!important}
/* Fit the entire cabinet by height as well as width, including full screen. */
:root{--game-width:min(100vw,480px,calc((100dvh - 180px)*.66))}
.cabinet{width:min(100%,var(--game-width))}
.cabinet:fullscreen{justify-content:center;overflow:hidden}
.cabinet:fullscreen>*,.cabinet:fullscreen .stage-wrap{width:var(--game-width);flex-shrink:0}
