:root {
  --paper: #eef1ee;
  --card: #ffffff;
  --ink: #1b2436;
  --muted: #6a7686;
  --line: #e5e9e4;
  --primary: #0ea47f;
  --primary-d: #0b7d5f;
  --primary-soft: #e2f5ee;
  --coral: #ff7a59;
  --coral-soft: #ffe8e1;
  --coral-ink: #c4472a;
  --gold: #f4b429;
  --gold-2: #f59e0b;
  --gold-soft: #fdf0d0;
  --gold-ink: #9a6a05;
  --field: #f7faf8;
  --shadow: 0 14px 40px rgba(23, 42, 34, 0.13);
  --shadow-s: 0 6px 18px rgba(23, 42, 34, 0.09);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111820; --card: #18202a; --ink: #eaf0ee; --muted: #93a1b0; --line: #28313d;
    --primary: #22c39a; --primary-d: #18a382; --primary-soft: #0f2c25;
    --coral: #ff8a6b; --coral-soft: #2c1712; --coral-ink: #ff9c81;
    --gold: #f6c24b; --gold-2: #f2ab2b; --gold-soft: #2e2510; --gold-ink: #f6c24b;
    --field: #131b24; --shadow: 0 16px 44px rgba(0,0,0,.5); --shadow-s: 0 6px 18px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --paper: #111820; --card: #18202a; --ink: #eaf0ee; --muted: #93a1b0; --line: #28313d;
  --primary: #22c39a; --primary-d: #18a382; --primary-soft: #0f2c25;
  --coral: #ff8a6b; --coral-soft: #2c1712; --coral-ink: #ff9c81;
  --gold: #f6c24b; --gold-2: #f2ab2b; --gold-soft: #2e2510; --gold-ink: #f6c24b;
  --field: #131b24; --shadow: 0 16px 44px rgba(0,0,0,.5); --shadow-s: 0 6px 18px rgba(0,0,0,.4);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
    "Malgun Gothic", sans-serif;
  color: var(--ink);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background:
    radial-gradient(680px 380px at 92% -6%, color-mix(in srgb, var(--primary) 13%, transparent), transparent 60%),
    radial-gradient(620px 380px at 2% 4%, color-mix(in srgb, var(--coral) 12%, transparent), transparent 58%),
    var(--paper);
  background-attachment: fixed;
  overflow-x: hidden;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 20px 16px 72px; }
img, .qr { max-width: 100%; }

/* ---- header ---- */
header.top { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 0 12px; }
header.top .logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 24px; font-weight: 900; letter-spacing: -0.6px;
}
header.top .logo::before {
  content: "✓"; color: #fff; font-size: 17px; font-weight: 900;
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--primary), var(--primary-d));
  box-shadow: var(--shadow-s);
}
header.top .logo .dot { display: none; }
a.logo { text-decoration: none; color: inherit; cursor: pointer; }
.opt { color: var(--muted); font-weight: 600; font-size: 12px; }
header.top .sub {
  max-width: 100%;
  color: var(--primary-d); font-size: 13px; font-weight: 700;
  background: var(--card); padding: 6px 15px; border-radius: 999px;
  box-shadow: var(--shadow-s);
}

/* ---- hub (홈 도구 허브) ---- */
.hub-intro { text-align: center; padding: 10px 0 2px; }
.hub-intro h1 { font-size: 22px; }
.tool-tile {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-s); padding: 18px; margin-top: 13px;
  text-decoration: none; color: var(--ink);
  transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease;
}
.tool-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.tool-tile:active { transform: translateY(0) scale(.99); }
.tt-emoji { width: 52px; height: 52px; border-radius: 15px; flex: none; display: grid; place-items: center; font-size: 27px; background: var(--primary-soft); }
.tool-tile:nth-of-type(2) .tt-emoji { background: var(--coral-soft); }
.tool-tile:nth-of-type(3) .tt-emoji { background: var(--gold-soft); }
.tt-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.tt-name { font-weight: 900; font-size: 17px; letter-spacing: -0.3px; }
.tt-desc { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.tt-arrow { color: var(--muted); font-size: 20px; font-weight: 700; flex: none; }
.tool-tile:hover .tt-arrow { color: var(--primary); }

/* ---- card ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
  padding: 22px;
  margin-top: 16px;
}
h1 { font-size: 22px; margin: 4px 0 5px; letter-spacing: -0.5px; font-weight: 900; }
h2 { font-size: 17px; margin: 0 0 12px; letter-spacing: -0.3px; font-weight: 800; }
.hint { color: var(--muted); font-size: 13.5px; margin: 0 0 15px; }

/* ---- inputs ---- */
label { display: block; font-size: 13px; font-weight: 800; margin: 15px 0 7px; }
input[type=text] {
  width: 100%; font-size: 16px; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--field); color: var(--ink); outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
input[type=text]::placeholder { color: var(--muted); opacity: .8; }
input[type=text]:focus {
  border-color: var(--primary); background: var(--card);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ---- buttons ---- */
button {
  font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
  border: none; border-radius: 12px; padding: 14px 18px;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
}
button:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(150deg, var(--primary), var(--primary-d));
  color: #fff; width: 100%;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 38%, transparent);
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-primary:disabled { opacity: .5; box-shadow: none; cursor: default; }
.btn-ghost { background: var(--primary-soft); color: var(--primary-d); }
.btn-line { background: var(--card); border: 1.5px solid var(--line); color: var(--ink); }
.btn-line:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.btn-warn { background: var(--card); border: 1.5px solid var(--line); color: var(--coral-ink); }
.btn-good { background: var(--primary-soft); color: var(--primary-d); }
.btn-sm { font-size: 13.5px; padding: 10px 13px; border-radius: 11px; }

/* ---- poll builder ---- */
.poll-block { border: 1.5px solid var(--line); border-radius: 14px; padding: 0; margin-top: 14px; background: var(--card); overflow: hidden; }
/* 항목 헤더 띠 — 후보 목록과 위계를 분리 */
.poll-block .poll-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  background: var(--primary-soft);
  border-bottom: 1.5px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  padding: 12px 13px;
}
.poll-block .poll-head::before {
  content: "🗳 투표 항목"; flex-basis: 100%;
  font-size: 10.5px; font-weight: 900; letter-spacing: .8px;
  color: var(--primary-d);
}
.poll-block .poll-head .ptitle {
  flex: 1; font-weight: 800; font-size: 16px;
  background: var(--card); color: var(--ink);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}
.poll-block .poll-head .icon-btn { background: var(--card); }
.poll-block .poll-head .icon-btn:hover { background: var(--coral-soft); color: var(--coral-ink); }
.poll-block .cands { padding: 13px 13px 0; }
.poll-block .row-actions { padding: 0 13px 14px; margin-top: 11px; }
.cand-row { display: flex; gap: 8px; margin-top: 8px; }
.cand-row input { flex: 1; background: var(--field); font-size: 15px; }
.icon-btn {
  background: color-mix(in srgb, var(--line) 60%, var(--card)); color: var(--muted);
  border-radius: 10px; padding: 0 14px; font-size: 18px; line-height: 46px; font-weight: 700;
}
.icon-btn:hover { background: var(--coral-soft); color: var(--coral-ink); }
.row-actions { margin-top: 12px; }
.tip { font-size: 12px; color: var(--muted); margin: 10px 2px 0; display: flex; align-items: center; gap: 6px; justify-content: center; }
.tip b { color: var(--primary-d); }

/* ---- code / qr ---- */
.code-box {
  text-align: center; padding: 16px 10px 14px; margin-top: 8px;
  background: linear-gradient(150deg, var(--primary-soft), color-mix(in srgb, var(--coral-soft) 55%, var(--card)));
  border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, var(--line));
}
.code-box .code-label { color: var(--primary-d); font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.code-box .code {
  font-size: 42px; font-weight: 900; letter-spacing: 8px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.qr { display: block; margin: 15px auto; width: 200px; height: 200px; border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 8px; }
.share-link { word-break: break-all; font-size: 12.5px; color: var(--muted); text-align: center; }
.save-note {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 12px;
  background: var(--coral-soft); border-radius: 12px; padding: 11px 12px;
  color: var(--coral-ink); font-size: 12.5px; font-weight: 600; line-height: 1.45;
}
.save-note .ic { flex: none; font-size: 14px; line-height: 1.3; }

/* ---- done view: 단계 안내 ---- */
.done-top { text-align: center; padding: 10px 0 2px; }
.done-top .done-badge { font-size: 42px; animation: pop .4s cubic-bezier(.22,1.5,.36,1); }
.done-top h1 { margin: 6px 0 4px; }
.card.step { margin-top: 14px; }
.step-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 900; letter-spacing: -0.3px; margin-bottom: 5px; }
.step-num { width: 25px; height: 25px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; color: #fff; background: linear-gradient(150deg, var(--primary), var(--primary-d)); box-shadow: var(--shadow-s); }
.stack { width: 100%; margin-top: 9px; }

/* ---- status pill ---- */
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 900; padding: 5px 13px; border-radius: 999px; }
.status-open { background: var(--primary-soft); color: var(--primary-d); }
.status-open::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.status-closed { background: color-mix(in srgb, var(--line) 55%, var(--card)); color: var(--muted); }
.status-closed::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }

/* ---- results / bars ---- */
.result-poll { margin-top: 20px; }
.result-poll h2 { display: flex; justify-content: space-between; align-items: baseline; }
.result-poll h2 .vt { font-size: 12px; color: var(--muted); font-weight: 700; }
.bar-row { margin: 9px 0; padding: 10px 12px; border-radius: 13px; background: var(--field); border: 1.5px solid transparent; }
.bar-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; }
.bar-top .nm { font-weight: 800; }
.bar-top .vt { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.bar-track { background: color-mix(in srgb, var(--line) 70%, var(--card)); border-radius: 999px; height: 14px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 62%, var(--primary-d))); border-radius: 999px; transition: width .5s cubic-bezier(.22,1,.36,1); }
.bar-row.lead { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.bar-row.lead .bar-fill { background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.bar-row.lead .nm::after { content: " 👑"; }
.tie-badge { display: inline-block; font-size: 10.5px; font-weight: 900; color: var(--gold-ink); background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: 6px; padding: 1px 7px; margin-left: 7px; vertical-align: 1px; }
.tally-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 12px; border: 1.5px dashed var(--line); border-radius: 13px; margin-top: 16px; }
.tally-empty .em { font-size: 30px; display: block; margin-bottom: 8px; }

/* ---- vote choices + progress ---- */
.vote-progress { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.vote-progress .pbar { flex: 1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.vote-progress .pbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--primary-d)); transition: width .35s cubic-bezier(.22,1,.36,1); }
.vote-progress .pcount { font-size: 12.5px; font-weight: 800; color: var(--primary-d); font-variant-numeric: tabular-nums; }
.choice {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--line); border-radius: 14px;
  padding: 15px; margin-top: 9px; cursor: pointer; background: var(--card);
  font-size: 16px; font-weight: 600;
  transition: transform .1s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.choice:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.choice.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  font-weight: 800;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 20%, transparent);
}
.choice .radio { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--line); flex: none; display: flex; align-items: center; justify-content: center; transition: all .15s ease; }
.choice.selected .radio { border-color: var(--primary); background: var(--primary); }
.choice.selected .radio::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 900; line-height: 1; }

/* ---- confirm sheet ---- */
.sheet-scrim { position: fixed; inset: 0; background: rgba(15,25,20,.4); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
.sheet-scrim.show { opacity: 1; pointer-events: auto; }
.vote-sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  width: 100%; max-width: 640px; background: var(--card);
  border-radius: 22px 22px 0 0; box-shadow: 0 -14px 44px rgba(23,42,34,.22);
  border-top: 1px solid var(--line); padding: 18px 18px calc(20px + env(safe-area-inset-bottom));
  transition: transform .28s cubic-bezier(.22,1,.36,1); z-index: 61;
}
.vote-sheet.show { transform: translate(-50%, 0); }
.vote-sheet .grip { width: 40px; height: 4px; border-radius: 9px; background: var(--line); margin: 0 auto 14px; }
.vote-sheet h2 { margin: 0 0 4px; }
.vote-sheet .warn { color: var(--coral-ink); font-size: 12.5px; font-weight: 700; margin: 0 0 14px; }
.review-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 13px; border-radius: 12px; background: var(--field); font-size: 15px; margin-top: 8px; }
.review-row .rk { color: var(--muted); font-weight: 700; font-size: 13px; }
.review-row .rv { font-weight: 800; }

/* ---- present (projector) overlay ---- */
.present-overlay {
  position: fixed; inset: 0; z-index: 80; display: none;
  background: radial-gradient(130% 90% at 50% 0%, #14312a, #08150f);
  color: #eafff8; padding: 30px 20px;
  flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center;
}
.present-overlay.show { display: flex; }
.present-overlay .plabel { font-size: 13px; font-weight: 800; letter-spacing: 3px; color: #7fe9c8; text-transform: uppercase; }
.present-overlay .pttl { font-size: clamp(18px, 4vw, 28px); font-weight: 800; color: #cdece2; }
.present-overlay .pcode { font-size: clamp(56px, 15vw, 128px); font-weight: 900; letter-spacing: .12em; font-variant-numeric: tabular-nums; line-height: 1; }
.present-overlay .pqr { width: clamp(180px, 40vw, 300px); height: auto; border-radius: 16px; background: #fff; padding: 12px; }
.present-overlay .pfoot { font-size: 14px; color: #8fc5b6; font-weight: 600; }
.present-overlay .pclose { position: absolute; top: 18px; right: 18px; background: rgba(255,255,255,.12); color: #eafff8; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; padding: 0; }

/* ---- big message ---- */
.big-msg { text-align: center; padding: 34px 12px; }
.big-msg .emoji { font-size: 54px; animation: pop .4s cubic-bezier(.22,1.5,.36,1); }
@keyframes pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.big-msg h1 { margin-top: 12px; }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(10px); background: var(--ink); color: var(--card); padding: 13px 20px; border-radius: 13px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- misc ---- */
footer.site { text-align: center; color: var(--muted); font-size: 12px; margin-top: 28px; }
footer.site a { color: var(--muted); }
.divider { height: 0; margin: 18px 0; border: 0; border-top: 1.5px dashed var(--line); }
.spread { display: flex; gap: 10px; }
.spread > * { flex: 1; }

/* ---- 사다리 타기 ---- */
.count-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.count-lab { font-weight: 800; font-size: 13px; }
.stepper { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-d); font-size: 20px; font-weight: 900; padding: 0; }
.count-num { font-size: 18px; font-weight: 900; min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.ll-cols { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 8px; margin-top: 16px; font-size: 11px; font-weight: 900; letter-spacing: .5px; color: var(--muted); }
.ll-cols span:last-child { text-align: right; }
.pair-row { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 8px; align-items: center; margin-top: 8px; }
.pair-row input { width: 100%; font-size: 15px; }
.pair-arrow { text-align: center; color: var(--muted); font-weight: 800; }
.ll-top, .ll-bottom { display: grid; gap: 5px; }
.ll-top { margin-bottom: 6px; }
.ll-bottom { margin-top: 6px; }
.ll-name, .ll-result { border: 2px solid var(--line); border-radius: 10px; padding: 9px 4px; font-size: 12.5px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--field); }
.ll-name { font-weight: 800; color: var(--ink); cursor: pointer; }
.ll-name.on { border-color: var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.ll-result { font-weight: 700; }
.ll-result.hit { border-color: var(--c); color: var(--c); font-weight: 900; background: color-mix(in srgb, var(--c) 14%, var(--card)); }
.ll-svg { margin: 2px 0; }

/* ---- 랜덤 뽑기 ---- */
.rng-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; margin-top: 10px; }
.rng-field .k { display: block; font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.rng-tilde { font-size: 20px; font-weight: 900; color: var(--muted); padding-bottom: 12px; }
.num-input { text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.switch-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.pick-stage { text-align: center; }
.pick-display { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; min-height: 116px; padding: 8px 0 18px; }
.pick-num { font-size: 60px; font-weight: 900; color: var(--primary-d); font-variant-numeric: tabular-nums; letter-spacing: -1px; line-height: 1; }
.pick-num.settle { animation: pop .35s cubic-bezier(.22,1.5,.36,1); }
.pick-chip { font-size: 32px; font-weight: 900; color: var(--primary-d); background: var(--primary-soft); border-radius: 14px; padding: 8px 16px; font-variant-numeric: tabular-nums; }
.pick-chip.settle { animation: pop .35s cubic-bezier(.22,1.5,.36,1); }
.pick-ph { font-size: 46px; font-weight: 900; color: var(--line); }
.drawn-wrap { margin-top: 16px; text-align: left; }
.drawn-head { font-size: 12.5px; font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.linkbtn { background: none; color: var(--coral-ink); font-size: 12px; font-weight: 800; padding: 2px 6px; margin-left: auto; }
.drawn-list { display: flex; flex-wrap: wrap; gap: 6px; }
.drawn-chip { background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 4px 11px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---- 결과 발표(개표쇼) ---- */
.btn-celebrate {
  width: 100%; margin-top: 10px; color: #7a4d00;
  background: linear-gradient(150deg, var(--gold), var(--gold-2));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--gold) 45%, transparent);
}
.btn-celebrate:hover { filter: brightness(1.04); }
.reveal-overlay {
  position: fixed; inset: 0; z-index: 85; display: none;
  flex-direction: column; align-items: center; justify-content: center;
  padding: 28px 20px; color: #eafff8; overflow: hidden;
  background: radial-gradient(130% 90% at 50% 0%, #163a30, #08130f);
}
.reveal-overlay.show { display: flex; }
.rv-inner { width: 100%; max-width: 560px; text-align: center; z-index: 2; }
.rv-poll-idx { font-size: 13px; font-weight: 800; letter-spacing: 2px; color: #7fe9c8; min-height: 16px; }
.rv-title { font-size: clamp(22px, 5vw, 34px); font-weight: 900; margin: 4px 0 2px; }
.rv-count { font-size: 14px; font-weight: 800; color: #9fd8c6; font-variant-numeric: tabular-nums; margin-bottom: 20px; }
.rv-bars { display: flex; flex-direction: column; gap: 13px; }
.rv-bar { text-align: left; }
.rv-bar .rvt { display: flex; justify-content: space-between; align-items: baseline; font-size: clamp(15px, 3.6vw, 19px); font-weight: 800; margin-bottom: 6px; }
.rv-bar .rvv { font-variant-numeric: tabular-nums; color: #bfe9dc; }
.rv-track { height: 22px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.rv-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #2fd0a6, #22c39a); transition: width .16s linear; }
.rv-bar.lead .rv-fill { background: linear-gradient(90deg, #f5b833, #f59e0b); }
.rv-bar.lead .rvn::after { content: " 👑"; }
.rv-bar.win .rv-fill { background: linear-gradient(90deg, #ffd76b, #f59e0b); box-shadow: 0 0 20px rgba(245,180,51,.6); }
.rv-winner { margin-top: 22px; font-size: clamp(20px, 4.6vw, 30px); font-weight: 900; opacity: 0; transform: scale(.8); transition: opacity .3s, transform .3s cubic-bezier(.22,1.5,.36,1); }
.rv-winner.show { opacity: 1; transform: scale(1); }
.rv-winner .who { color: #ffd76b; }
.rv-controls { position: absolute; bottom: 24px; display: flex; gap: 12px; z-index: 2; }
.rv-controls .btn-line, .rv-controls .btn-primary { width: auto; white-space: nowrap; padding: 13px 24px; }
.rv-controls .btn-line { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #eafff8; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.confetti i { position: absolute; top: -24px; width: 9px; height: 15px; border-radius: 2px; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translateY(112vh) rotate(560deg); opacity: .85; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
