*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;overflow:hidden;font-family:-apple-system,system-ui,"Segoe UI",Roboto,sans-serif;background:#1f2a33;color:#fff;touch-action:none;-webkit-user-select:none;user-select:none}
[hidden]{display:none!important}
button{font:inherit;border:0;cursor:pointer}
#home{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;padding:24px;text-align:center}
.logo{display:block;width:170px;height:auto;margin:0 auto 18px}
h1{margin:10px 0 6px;font-size:30px;font-weight:600}
#home p{margin:0;opacity:.75}
#home .small{font-size:13px;opacity:.5}
.big{background:#e8eef2;color:#1f2a33;font-size:19px;font-weight:600;padding:16px 46px;border-radius:14px}
#viewer{position:fixed;inset:0}
#c{width:100%;height:100%;display:block;touch-action:none}
header{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;gap:10px;padding:calc(env(safe-area-inset-top) + 8px) 10px 8px;background:linear-gradient(#1f2a33e6,#1f2a3300)}
header button{background:#ffffffe6;color:#1f2a33;font-weight:600;min-width:44px;height:40px;border-radius:10px;padding:0 12px;font-size:16px}
#title{flex:1;text-align:center;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 3px #0008}
.modes{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(env(safe-area-inset-bottom) + 16px);display:flex;background:#1f2a33d9;border-radius:12px;padding:4px}
.modes button{background:none;color:#fff;padding:10px 20px;border-radius:9px;font-weight:600}
.modes button.on{background:#e8eef2;color:#1f2a33}
#joy{position:absolute;left:22px;bottom:calc(env(safe-area-inset-bottom) + 80px);width:120px;height:120px;border-radius:50%;background:#1f2a3355;border:2px solid #ffffff88;display:none;touch-action:none}
#knob{position:absolute;left:35px;top:35px;width:46px;height:46px;border-radius:50%;background:#ffffffd9;pointer-events:none}
.updown{position:absolute;right:18px;bottom:calc(env(safe-area-inset-bottom) + 86px);display:none;flex-direction:column;gap:10px}
.updown button{width:52px;height:52px;border-radius:50%;background:#1f2a33b3;color:#fff;font-size:18px;border:2px solid #ffffff88;touch-action:none}
body.walk #joy{display:block}
body.walk .updown{display:flex}
#hint{position:absolute;top:calc(env(safe-area-inset-top) + 64px);left:50%;transform:translateX(-50%);background:#1f2a33e6;padding:10px 16px;border-radius:10px;font-size:14px;white-space:nowrap}
#busy{position:fixed;inset:0;background:#1f2a33cc;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;z-index:9}
.spin{width:42px;height:42px;border:4px solid #ffffff44;border-top-color:#fff;border-radius:50%;animation:s 0.9s linear infinite}
@keyframes s{to{transform:rotate(360deg)}}
