:root { --panel: rgba(12, 10, 30, 0.62); --line: rgba(255, 255, 255, 0.14); --text: #eef0ff; --dim: #9ea3c9; --accent: #ffd27a; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05040f; color: var(--text); font-family: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#sky { position: fixed; inset: 0; width: 100vw; height: 100vh; touch-action: none; cursor: crosshair; display: block; }
button, select { font: inherit; color: inherit; cursor: pointer; }

#hud { position: fixed; top: 14px; left: 16px; pointer-events: none; }
h1 { margin: 0 0 6px; font-size: 13px; letter-spacing: 4px; color: var(--dim); font-weight: 600; }
h1 span { color: var(--accent); }
.score b { font-size: 34px; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(255, 210, 122, 0.45); }
.score small { margin-left: 6px; color: var(--dim); font-size: 13px; }
.stats { display: flex; gap: 12px; margin-top: 4px; font-size: 13px; color: var(--dim); }
.stats b { color: var(--text); font-variant-numeric: tabular-nums; }

#topRight { position: fixed; top: 14px; right: 16px; display: flex; gap: 8px; align-items: flex-start; }
#topRight > select, #topRight > button { height: 38px; padding: 0 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(8px); }
#topRight select option { background: #14122e; }
#achPanel { display: none; position: absolute; top: 46px; right: 0; width: 260px; background: rgba(12, 10, 30, 0.92); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
#achPanel.open { display: block; }
#achList { list-style: none; margin: 0; padding: 0; }
#achList li { display: flex; gap: 10px; align-items: center; padding: 6px; opacity: 0.45; font-size: 14px; }
#achList li.on { opacity: 1; }
#achList span { font-size: 20px; }
#achList small { display: block; color: var(--dim); font-size: 12px; }

#hint { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 20px; font-size: 14px; color: var(--dim); pointer-events: none; transition: opacity 0.6s; width: max-content; max-width: calc(100vw - 32px); backdrop-filter: blur(8px); }
#hint b { color: var(--text); font-size: 17px; }
#hint.hidden { opacity: 0; }

#toolbar { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 10px; padding: 8px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); }
#toolbar .types, #toolbar .ctrl { display: flex; gap: 6px; }
#toolbar .ctrl { padding-left: 10px; border-left: 1px solid var(--line); }
#toolbar button { min-width: 48px; height: 52px; border-radius: 13px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.06); font-size: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
#toolbar button small { font-size: 11px; margin-top: 4px; color: var(--dim); }
#toolbar button:hover { background: rgba(255, 255, 255, 0.12); }
#toolbar button.on { border-color: var(--accent); background: rgba(255, 210, 122, 0.14); }
#speed { font-size: 15px !important; font-weight: 700; font-variant-numeric: tabular-nums; }

#toasts { position: fixed; top: 90px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: rgba(12, 10, 30, 0.9); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; font-size: 14px; animation: pop 0.3s ease-out; transition: opacity 0.4s; white-space: nowrap; }
.toast.gold { border-color: var(--accent); color: #fff3d1; }
.toast.out { opacity: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 640px) {
  #hud { top: 10px; left: 12px; }
  .score b { font-size: 26px; }
  .stats { gap: 8px; font-size: 11.5px; }
  #topRight { top: auto; bottom: 156px; right: 10px; flex-direction: column; align-items: flex-end; }
  #achPanel { top: auto; bottom: 46px; }
  #toolbar { flex-direction: column; gap: 6px; width: calc(100vw - 20px); }
  #toolbar .types, #toolbar .ctrl { justify-content: space-between; }
  #toolbar .ctrl { padding: 6px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  #toolbar .types button { flex: 1; }
  #toolbar button { height: 46px; min-width: 44px; font-size: 18px; }
  #toolbar .ctrl button { flex: 1; height: 38px; }
  #hint { top: 16%; font-size: 13px; }
  .toast { white-space: normal; text-align: center; max-width: calc(100vw - 32px); }
}
