@font-face { font-family: Chango; src: url(/fonts/chango-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Racing Sans One"; src: url(/fonts/racing-sans-one-latin-400-normal.woff2) format("woff2"); font-display: swap; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: linear-gradient(100deg, #bfe3ff 49.6%, #fff 49.6% 50.4%, #2b0f63 50.4%); color: #34123f; font: 500 16px/1.4 Lexend, system-ui, sans-serif; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: 0; }

header { position: fixed; z-index: 3; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); pointer-events: none; }
h1 { margin: 0; font-size: 24px; font-weight: 700; paint-order: stroke fill; -webkit-text-stroke: 6px #fff; }
.tools { display: flex; gap: 8px; }
.tools > * { pointer-events: auto; box-sizing: border-box; display: flex; align-items: center; gap: 8px; min-height: 44px; max-width: 46vw; padding: 8px 16px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .95); color: #34123f; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 0 3px 12px rgba(30, 10, 60, .25); }
.tools > *:focus-visible { outline: 4px solid #7c3aed; outline-offset: 2px; }
#meName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#hint { position: fixed; z-index: 2; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); box-sizing: border-box; width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 10px 20px; border-radius: 18px; background: rgba(255, 255, 255, .95); text-align: center; pointer-events: none; transition: opacity .6s; box-shadow: 0 3px 12px rgba(30, 10, 60, .25); }
body.moved #hint { opacity: 0; }
#hint span { display: block; }
#hint .byTouch, #hint .byPad { display: none; }
body.touch #hint .byKeys { display: none; }
body.touch #hint .byTouch { display: block; }
body.pad #hint .byKeys, body.pad #hint .byTouch { display: none; }
body.pad #hint .byPad { display: block; }
body.touch #hint { bottom: auto; top: 76px; }

#touch { display: none; }
body.touch #touch { display: block; }
#stick { position: fixed; z-index: 2; display: none; width: 130px; height: 130px; margin: -65px 0 0 -65px; border-radius: 50%; background: rgba(255, 255, 255, .25); border: 2px solid rgba(255, 255, 255, .75); box-sizing: border-box; pointer-events: none; }
#knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255, 255, 255, .9); }
#jumpBtn { position: fixed; z-index: 2; right: max(26px, calc(8px + env(safe-area-inset-right))); bottom: max(30px, calc(12px + env(safe-area-inset-bottom))); width: 96px; height: 96px; border: 3px solid rgba(255, 255, 255, .9); border-radius: 50%; background: rgba(124, 58, 237, .85); color: #fff; font: inherit; font-size: 19px; font-weight: 700; touch-action: none; }
#jumpBtn.down { transform: scale(.94); background: #5b21b6; }

#fade { position: fixed; z-index: 4; inset: 0; opacity: 0; pointer-events: none; transition: opacity .45s; }
#fade.on { opacity: 1; }
#no3d { display: none; }
body.no3d #no3d { display: block; position: fixed; z-index: 2; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 40px)); padding: 22px; border-radius: 20px; background: #fff; text-align: center; }
body.no3d #hint, body.no3d #touch { display: none; }

@media (max-height: 480px) { body #hint, body.touch #hint { top: auto; bottom: 10px; max-width: 62vw; padding: 7px 16px; font-size: 14px; } }
@media (max-width: 480px) { h1 { font-size: 19px; } .tools > * { padding: 8px 13px; font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { #fade, #hint { transition: none; } }
