/* 모든 게임이 같이 쓰는 기본 모양: 색, 머리말, 덮개 화면, 이름 입력, TOP 10 목록 */
:root {
  --bg: #0d0f1a; --panel: #161a2b; --line: #2a3050; --line-strong: #6b77b8;
  --text: #e8ebff; --dim: #8089b3; --accent: #ffd23f; --hot: #ff4d6d; --ok: #3ddc97;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--mono); }
body { min-height: 100dvh; display: flex; justify-content: center; padding: 16px 12px 32px; }
main { width: 100%; max-width: 420px; }
header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
h1 { font-size: 18px; letter-spacing: 3px; margin: 0; color: var(--accent); text-shadow: 0 0 12px rgba(255,210,63,.45); }
h1 a { color: inherit; text-decoration: none; }
.meter { font-size: 22px; font-variant-numeric: tabular-nums; }
#note { min-height: 18px; font-size: 12px; color: var(--dim); margin: 0 0 8px; }
#stage { position: relative; }

.overlay { position: absolute; inset: 0; background: rgba(13,15,26,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; z-index: 5; border-radius: 6px; }
.overlay[hidden] { display: none; }
.overlay p { margin: 0; color: var(--dim); font-size: 13px; line-height: 1.6; }
.big { font-size: 34px; color: var(--accent); font-variant-numeric: tabular-nums; }
.rank { font-size: 16px; color: var(--ok); }
.btn { font: inherit; font-size: 16px; letter-spacing: 2px; padding: 12px 22px; color: var(--bg); background: var(--accent); border: 0; border-radius: 6px; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { color: var(--text); background: none; border: 1px solid var(--line-strong); }
.name-input { font: inherit; font-size: 20px; text-align: center; width: 100%; max-width: 260px; padding: 10px; color: var(--text); background: var(--bg); border: 2px solid var(--accent); border-radius: 6px; }
.name-err { color: var(--hot); min-height: 16px; font-size: 12px; }
.name-box { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.name-box[hidden] { display: none; }

.ranking { margin-top: 22px; }
.ranking h2 { font-size: 13px; letter-spacing: 2px; color: var(--dim); margin: 0 0 8px; display: flex; justify-content: space-between; font-weight: normal; }
.ranking ol { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.ranking li { display: grid; grid-template-columns: 32px 1fr auto; gap: 8px; padding: 8px 12px; font-size: 14px; border-bottom: 1px solid var(--line); }
.ranking li:last-child { border-bottom: 0; }
.ranking li .n { color: var(--dim); }
.ranking li .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: system-ui, sans-serif; }
.ranking li .t { font-variant-numeric: tabular-nums; }
.ranking li:nth-child(1) .n, .ranking li:nth-child(1) .t { color: var(--accent); }
.ranking li.empty .who, .ranking li.empty .t { color: var(--line-strong); }
.ranking li.me { background: rgba(61,220,151,.14); }
