:root{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#f3f3ef;background:#0c161c;font-synthesis:none}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none}body{position:fixed;inset:0}button{font:inherit;cursor:pointer;border:1px solid rgba(255,255,255,.2);color:#fff;background:#06141aa8;backdrop-filter:blur(12px);border-radius:12px}button:active{transform:scale(.97)}#scene{position:fixed;inset:0;width:100vw;height:100dvh;display:block;touch-action:none}#hud{position:fixed;inset:0;pointer-events:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}#hud button,#joystick{pointer-events:auto}.topbar{padding:20px 24px 0;display:flex;align-items:center;justify-content:space-between;gap:14px}.brand{display:flex;align-items:center;gap:11px;text-shadow:0 1px 8px #000a}.brand-mark{display:grid;place-items:center;width:39px;height:39px;font-size:23px;font-weight:900;border:1px solid #dfcb9b;border-radius:10px;color:#efdcad;background:#142129c4}.brand strong{display:block;letter-spacing:.2em;font-size:13px}.brand small{display:block;margin-top:3px;color:#bbccc8;font-size:10px;letter-spacing:.14em}.top-actions{display:flex;gap:12px;align-items:center}#fps{font-size:11px;letter-spacing:.1em;color:#d1ddd7}#restart{font-size:26px;width:40px;height:40px}.hint{position:absolute;top:88px;left:50%;transform:translate(-50%);font-size:12px;font-weight:500;white-space:nowrap;max-width:90vw;text-overflow:ellipsis;overflow:hidden;color:#e9eeee;text-shadow:0 2px 7px #000}.legend{position:absolute;bottom:27px;left:24px;text-shadow:0 1px 5px #000}.legend>div{display:flex;align-items:center;gap:4px;font-size:11px}.legend small{font-size:11px;color:#b1c2bf;display:block;margin-top:7px}.key{display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;border:1px solid #8baca6;border-radius:5px;background:#0d2025bf;font-weight:700}.bottom-controls{position:absolute;bottom:22px;left:22px;right:22px;display:flex;justify-content:space-between;align-items:end}.joystick{width:130px;height:130px;border-radius:50%;border:2px solid #b7d4cb80;background:radial-gradient(circle,#7aaca24a 0,#0b1c2088 70%);position:relative;touch-action:none;user-select:none;display:none}#joystick-knob{width:58px;height:58px;border-radius:50%;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:radial-gradient(circle at 35% 30%,#e0d6b3,#847f73);border:2px solid #e8e3cb;box-shadow:0 6px 15px #0008}.right-buttons{display:none;flex-direction:column;gap:8px}.right-buttons button{min-height:41px;padding:9px 12px;font-size:12px}button.primary{background:#caaf7f;border:1px solid #ffe7b7;color:#18252a;font-weight:800}.loading,.error{position:absolute;inset:0;display:grid;place-content:center;padding:28px;text-align:center;font-size:16px;background:#0c161c;z-index:3}.error{background:#341b20;line-height:1.5}.result{position:absolute;inset:0;display:grid;place-items:center;background:#051218b8;z-index:2;backdrop-filter:blur(5px);pointer-events:auto}.result-card{width:min(86vw,400px);padding:36px 25px;border:1px solid #abcbbb6d;background:#11282de8;text-align:center;border-radius:20px}.result-card span{font-size:11px;letter-spacing:.2em;color:#9ce3bd}.result-card h1{font-size:48px;margin:12px 0}.result-card p{opacity:.8;margin-bottom:23px}.result-card button{padding:13px 24px}.hidden{display:none!important}.run-status{position:absolute;top:112px;left:14px;right:14px;display:flex;justify-content:space-between;padding:9px 14px;border-radius:12px;background:#102030b3;color:#70eaf3;font-size:14px;font-variant-numeric:tabular-nums}#lives{color:#f1bdac}.fall-status{position:absolute;top:165px;left:15%;right:15%;text-align:center;background:#4a202bd9;padding:12px;border-radius:12px}.result-card a{color:#70eaf3;font-size:12px;pointer-events:auto}.topbar{margin:12px;padding:12px 14px;background:#102030b3;border:1px solid #cad9e333;border-radius:16px}.brand strong{color:#e9d2a3}#pause,#restart{width:40px;height:40px;border-radius:50%;font-size:24px}#timer{display:block;font-variant-numeric:tabular-nums;font-size:18px;margin-top:4px}.hint{top:105px}.joystick{display:block;width:112px;height:112px}.right-buttons{display:flex}.legend{left:160px;bottom:35px}@media(pointer:coarse){.joystick{display:block}.right-buttons{display:flex}.legend{display:none}}@media(max-width:490px){.topbar{padding:12px 14px 0}.brand strong{letter-spacing:.12em;font-size:11px}.brand small{letter-spacing:.05em;font-size:9px}.hint{top:108px;font-size:10px}.bottom-controls{bottom:12px;left:12px;right:12px}.joystick{width:117px;height:117px}.right-buttons button{max-width:150px}.legend{display:none}}.topbar{margin:12px;padding:10px 12px;height:54px;background:#091018a3;border-color:#dfc59736;border-radius:10px}.brand strong{font-size:9px;letter-spacing:.18em}.brand small{display:none}#timer{font-size:19px;margin-top:2px;letter-spacing:.04em}.top-actions{gap:7px}#pause,#restart{width:34px;height:34px;font-size:20px;border-radius:8px;background:#10141b9c;backdrop-filter:none}.run-status{top:67px;left:13px;right:13px;padding:5px 10px;background:#09101899;border-radius:5px;font-size:12px}.hint{opacity:.72;font-size:9px}.fall-status{top:110px}.result{background:#080d1670;backdrop-filter:none}.result-card{background:linear-gradient(155deg,#18202aed,#090e18f5);border-color:#c3a77d66;border-radius:12px;box-shadow:0 24px 70px #0006}.result-card h1{font-size:36px;color:#f0e2c7}.result-card p{font-size:13px;line-height:1.6}.result-card span{color:#a8dfe5}button.primary{background:linear-gradient(#dfc997,#a78b59);border-color:#f8deaa;color:#16191f;box-shadow:0 3px 16px #0004}.quality-label{display:flex;align-items:center;justify-content:center;gap:12px;margin:14px 0;font-size:12px;color:#bbbfc8}#quality{pointer-events:auto;font:inherit;padding:6px 14px;color:#f0d8ab;border:1px solid #c8ab7160;border-radius:5px;background:#121923}.menu-logo{display:none}#paused.menu-scene{background:linear-gradient(#050a1433,transparent 40%,#080d1680)}.menu-scene .result-card{width:min(90vw,440px);height:100%;padding:calc(env(safe-area-inset-top) + 36px) 20px calc(env(safe-area-inset-bottom) + 14px);border:0;border-radius:0;background:none;box-shadow:none;display:flex;flex-direction:column;align-items:center}.menu-scene .menu-logo{display:block;font-size:34px;line-height:1.12;font-weight:300;letter-spacing:.22em;color:#ffe4ae;text-shadow:0 3px 12px #0009}.menu-logo b{font-size:47px;letter-spacing:.24em;font-weight:700}.menu-logo small{display:block;margin-top:10px;font-size:11px;letter-spacing:.4em;color:#eddbc0}.menu-scene #menu-subtitle{margin-top:20px;font-size:9px}.menu-scene #pause-title{font-size:22px;margin:6px 0 auto;font-weight:400;letter-spacing:.12em}.menu-scene #menu-instructions{margin:0;font-size:11px;text-shadow:0 1px 5px #000}.menu-scene #resume{width:220px;font-size:17px;text-transform:uppercase;letter-spacing:.15em}.menu-scene .result-card>p:last-child{margin:10px 0 0}body:has(.menu-scene:not(.hidden)) .topbar,body:has(.menu-scene:not(.hidden)) .run-status,body:has(.menu-scene:not(.hidden)) .bottom-controls,body:has(.menu-scene:not(.hidden)) .hint,body:has(.menu-scene:not(.hidden)) .legend{visibility:hidden}@media(max-width:490px){.topbar{padding:7px 12px}.brand strong{font-size:9px}.joystick{width:94px;height:94px;opacity:.8}#joystick-knob{width:44px;height:44px}.right-buttons button{font-size:10px;min-height:34px;padding:6px 10px}}@media(max-height:560px){.menu-scene .result-card{padding-top:14px}.menu-scene .menu-logo{font-size:20px}.menu-logo b{font-size:26px}.menu-logo small{margin-top:3px}.menu-scene #menu-subtitle{margin-top:8px}.menu-scene #menu-instructions{font-size:10px;line-height:1.25}}:root{--safe-top: calc(var(--app-safe-top, env(safe-area-inset-top, 0px)) + var(--app-content-top, 0px));--safe-right: calc(var(--app-safe-right, env(safe-area-inset-right, 0px)) + var(--app-content-right, 0px));--safe-bottom: calc(var(--app-safe-bottom, env(safe-area-inset-bottom, 0px)) + var(--app-content-bottom, 0px));--safe-left: calc(var(--app-safe-left, env(safe-area-inset-left, 0px)) + var(--app-content-left, 0px))}html,body{touch-action:none}#scene{height:var(--app-height, 100dvh)}#hud{bottom:auto;height:var(--app-height, 100dvh);padding:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left)}.run-status{top:calc(var(--safe-top) + 67px);left:calc(var(--safe-left) + 13px);right:calc(var(--safe-right) + 13px)}.hint{top:calc(var(--safe-top) + 92px);max-width:calc(90vw - var(--safe-left) - var(--safe-right))}.fall-status{top:calc(var(--safe-top) + 110px)}.bottom-controls{bottom:calc(var(--safe-bottom) + 12px);left:calc(var(--safe-left) + 12px);right:calc(var(--safe-right) + 12px)}.legend{bottom:calc(var(--safe-bottom) + 35px)}.sensor-status{font-size:10px;color:#c7e5e8;line-height:1.4;letter-spacing:0}.right-buttons{width:150px;align-items:stretch}.right-buttons .sensor-status{text-align:right;max-width:150px}.right-buttons button{min-height:44px}.menu-sensors{display:flex;gap:8px;margin-top:10px}.menu-sensors button{padding:9px 12px;min-height:44px;font-size:11px}.input-settings{margin-top:8px;width:100%;font-size:12px;color:#d0d6db;text-align:left;pointer-events:auto}.input-settings summary{cursor:pointer;text-align:center;padding:6px}.input-settings label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:9px 0}.input-settings input{pointer-events:auto;accent-color:#d0b685}.input-settings small{display:block;text-align:center;margin:6px 0}.input-settings button{width:100%;font-size:12px;padding:9px}button:disabled{opacity:.45;cursor:default}.result-card{max-height:calc(var(--app-height, 100dvh) - var(--safe-top) - var(--safe-bottom) - 20px);overflow-y:auto;touch-action:pan-y}.menu-scene .result-card{max-height:none;padding:calc(var(--safe-top) + 24px) 20px calc(var(--safe-bottom) + 14px)}.menu-scene .sensor-status{margin-top:5px;max-width:280px}.menu-scene .input-settings[open]~.quality-label{margin:8px 0}@media(max-height:560px){.menu-scene .menu-logo,.menu-scene #menu-subtitle,.menu-scene #menu-instructions{display:none}.menu-scene #pause-title{margin:0 0 auto}.menu-scene .result-card{padding-top:calc(var(--safe-top) + 8px)}.result-card{padding:12px 20px}.result-card h1{font-size:24px;margin:5px 0}.result-card p{margin:5px 0}.quality-label{margin:8px 0}}
