* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d5b85; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #fff; user-select: none; -webkit-user-select: none; touch-action: none; }
canvas { display: block; width: 100vw; height: 100vh; height: 100dvh; }
.hidden { display: none !important; }

#hud { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; gap: 8px; justify-content: center; pointer-events: none; }
.pill { background: rgba(0, 40, 70, .45); border: 2px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 18px; text-shadow: 0 2px 0 rgba(0,0,0,.3); }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: radial-gradient(circle at 50% 40%, rgba(20,120,170,.55), rgba(5,40,70,.85)); }
.screen h1 { font-size: clamp(36px, 9vw, 64px); margin: 0 0 12px; color: #ffcf3f; text-shadow: 0 4px 0 #c3561b, 0 8px 18px rgba(0,0,0,.35); letter-spacing: 1px; }
.screen p { font-size: 18px; line-height: 1.45; margin: 6px 0; max-width: 420px; }
.screen .hint { font-size: 14px; opacity: .8; }
.btn { margin-top: 16px; min-width: 220px; font: inherit; font-size: 22px; font-weight: 800; color: #5a2300; background: #ffcf3f; border: none; border-radius: 18px; padding: 14px 28px; box-shadow: 0 6px 0 #c3561b; cursor: pointer; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #c3561b; }
.btn.ghost { font-size: 16px; color: #fff; background: rgba(255,255,255,.15); box-shadow: 0 4px 0 rgba(0,0,0,.25); border: 2px solid rgba(255,255,255,.5); }

#joy { position: fixed; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 3px solid rgba(255,255,255,.5); background: rgba(255,255,255,.1); pointer-events: none; }
#joy-knob { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: rgba(255,207,63,.85); }

#name { margin-top: 14px; width: 220px; font: inherit; font-size: 18px; text-align: center; padding: 10px 14px; border-radius: 14px; border: 2px solid rgba(255,255,255,.5); background: rgba(0,40,70,.4); color: #fff; outline: none; user-select: text; -webkit-user-select: text; }
#name::placeholder { color: rgba(255,255,255,.6); }
.top { list-style: none; counter-reset: r; margin: 18px 0 0; padding: 10px 16px; min-width: 240px; max-height: 32vh; overflow: auto; background: rgba(0,40,70,.4); border-radius: 14px; font-size: 15px; text-align: left; }
.top:empty { display: none; }
.top::before { content: "🏆 Лучшие"; display: block; text-align: center; font-weight: 800; margin-bottom: 6px; color: #ffcf3f; }
.top li { counter-increment: r; display: flex; gap: 8px; padding: 2px 0; }
.top li::before { content: counter(r) "."; width: 22px; opacity: .7; }
.top li b { margin-left: auto; }
.top li.me { color: #ffcf3f; }
