/* Decision Maker — irvinPH. Same tokens and look as Cropper, Name Tags and QR Code. */

:root {
  --bg: #050c18;
  --panel: rgba(10, 23, 40, 0.6);
  --panel-solid: #0d1526;
  --field: rgba(15, 33, 54, 0.8);
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #64748b;
  --accent: #3fbef7;
  --accent-light: #6fd4ff;
  --accent-strong: #3aa8ea;
  --lime: #94f2b9;
  --danger: #ff8a8a;
  --ink: #07111f;
  --ink-950: #040b16;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --grad: linear-gradient(135deg, var(--accent-light), var(--accent-strong));
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  font-family: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(60rem 40rem at 72% -10%, rgb(30 110 190 / 0.22), transparent 65%),
    radial-gradient(50rem 35rem at 110% 110%, rgb(20 90 170 / 0.18), transparent 60%),
    radial-gradient(40rem 30rem at -10% 40%, rgb(20 70 140 / 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.1) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 999px; }

.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-accent { color: var(--accent); }
.flex-col { display: flex; flex-direction: column; }
.gap-3 { gap: 12px; }

kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px;
  padding: 1px 6px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06); font: inherit; font-size: 11px; font-weight: 700; color: #e2e8f0;
}

/* ---------- Layout ---------- */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.shell { flex: 1; display: flex; flex-direction: column; }
.sidebar {
  display: flex; flex-direction: column; gap: 24px; padding: 24px;
  background: rgba(4, 11, 22, 0.5);
}
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main { flex: 1; padding: 16px; }
.footer { flex-shrink: 0; padding: 10px 24px; border-top: 1px solid rgba(255, 255, 255, .1); text-align: center; font-size: 12px; color: var(--muted); }
.footer a { color: var(--text); font-weight: 700; text-decoration: none; transition: color .15s; }
.footer a:hover { color: var(--accent); }
.lg-only { display: none; }

@media (min-width: 1024px) {
  .page { height: 100vh; }
  .shell { flex-direction: row; min-height: 0; }
  .main-col { overflow-y: auto; }
  .sidebar {
    width: 320px; overflow-y: auto; flex-shrink: 0;
    padding: 24px 28px; border-right: 1px solid rgba(255, 255, 255, 0.06);
  }
  .main { padding: 20px; }
  .lg-only { display: revert; }
}

/* ---------- Sidebar ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand a { border-radius: 8px; transition: opacity .15s; }
.brand a:hover { opacity: .85; }
.brand-icon { width: 56px; height: 56px; object-fit: contain; }
.brand-logo { height: 60px; width: auto; }

.eyebrow { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.hero-title { margin: 8px 0 0; font-size: 32px; line-height: 1.12; font-weight: 900; letter-spacing: -.025em; color: #fff; }
.hero-copy { margin: 12px 0 0; font-size: 14px; line-height: 1.625; color: var(--muted); }
.divider { height: 1px; border: 0; margin: 0; background: rgba(255, 255, 255, 0.06); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.step-item { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 12px; transition: all .2s; }
.step-circle {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.25); color: #fff; font-size: 14px; font-weight: 800; transition: all .2s;
}
.step-name { display: block; font-size: 15px; font-weight: 800; color: #fff; }
.step-hint { display: block; font-size: 13px; color: var(--muted); }
.step-check { display: none; width: 16px; height: 16px; color: var(--accent-light); }
.step-item[data-state="active"] { background: linear-gradient(to right, var(--accent-light), var(--accent)); box-shadow: 0 10px 15px -3px rgba(63, 190, 247, .2); }
.step-item[data-state="active"] .step-circle { background: var(--ink); border-color: transparent; }
.step-item[data-state="active"] .step-name { color: var(--ink-950); }
.step-item[data-state="active"] .step-hint { color: rgba(7, 17, 31, .7); }
.step-item[data-state="done"] .step-circle { background: rgba(63, 190, 247, .15); border-color: var(--accent); }
.step-item[data-state="done"] .step-num { display: none; }
.step-item[data-state="done"] .step-check { display: block; }

.section-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.section-label svg { width: 14px; height: 14px; }
.preset-list { display: flex; flex-direction: column; gap: 4px; }
.preset-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 1px solid transparent;
  border-radius: 14px; background: none; text-align: left; transition: background .15s, border-color .15s;
}
.preset-btn:hover { background: rgba(255, 255, 255, .05); }
.preset-btn.active { background: rgba(63, 190, 247, .12); border-color: rgba(63, 190, 247, .3); }
.preset-emoji { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: rgba(255, 255, 255, .06); font-size: 18px; flex-shrink: 0; }
.preset-btn strong { display: block; font-size: 14px; }
.preset-btn small { display: block; font-size: 12px; color: var(--muted); }
.preset-btn.active strong { color: var(--accent); }
@media (max-width: 1023px) {
  .preset-list { flex-direction: row; overflow-x: auto; margin: 0 -24px; padding: 0 24px 4px; scrollbar-width: none; }
  .preset-btn { width: auto; flex-shrink: 0; border-color: var(--line); background: rgba(255, 255, 255, .03); white-space: nowrap; }
}

/* ---------- Workspace card ---------- */
.card { border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.workspace { display: flex; flex-direction: column; overflow: hidden; background: rgba(7, 17, 31, .4); }
@media (min-width: 1200px) {
  .workspace { flex-direction: row; height: calc(100dvh - 80px); min-height: 600px; }
}

/* Stage */
.stage {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 50% 45%, rgb(24 70 120 / .45), transparent 70%), #060f1c;
}
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.title-field {
  flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
  border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid transparent; transition: border-color .15s;
}
.title-field:focus-within { border-color: var(--accent); }
.title-field svg { width: 18px; height: 18px; color: var(--accent); }
.title-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; font-weight: 800; }
.title-field input::placeholder { color: var(--dim); }

.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.segmented button {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 0; border-radius: 999px;
  background: none; font-size: 14px; font-weight: 800; color: var(--muted); white-space: nowrap; transition: all .2s;
}
.segmented button svg { width: 16px; height: 16px; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-selected="true"] { background: var(--grad); color: var(--ink); box-shadow: 0 6px 18px rgba(58, 168, 234, .3); }

.stage-body { position: relative; flex: 1; min-height: 380px; display: grid; place-items: center; padding: 24px; overflow: hidden; }
.stage-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 20px 24px; }
.hint { margin: 0; font-size: 12px; color: var(--muted); }
.empty-hint {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 138, 138, .1); border: 1px solid rgba(255, 138, 138, .3); color: #fecaca; font-size: 13px; white-space: nowrap;
}

/* ---------- Wheel ---------- */
.wheel-wrap { position: relative; width: min(100%, 62vh, 560px); aspect-ratio: 1; }
@media (max-width: 1199px) { .wheel-wrap { width: min(100%, 480px); } }
.wheel-glow { position: absolute; inset: -6%; border-radius: 50%; background: radial-gradient(circle, rgba(63, 190, 247, .25), transparent 65%); filter: blur(8px); }
.wheel-wrap canvas { position: relative; width: 100%; height: 100%; display: block; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .45)); }
.wheel-pointer {
  position: absolute; z-index: 2; top: -2%; left: 50%; width: 9%; aspect-ratio: .9; transform: translateX(-50%);
  transform-origin: 50% 20%; background: #fff; clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); transition: transform .08s;
}
.wheel-pointer::after { content: ""; position: absolute; inset: 0; }
.wheel-pointer.flick { transform: translateX(-50%) rotate(-18deg); }
.wheel-hub {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 17%; aspect-ratio: 1; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%; border: 4px solid var(--accent);
  background: radial-gradient(circle at 40% 35%, #16294a, var(--ink)); color: #fff;
  box-shadow: 0 0 0 6px rgba(7, 17, 31, .9), 0 0 30px rgba(63, 190, 247, .55); transition: transform .2s, box-shadow .2s;
}
.wheel-hub svg { width: 42%; height: 42%; }
.wheel-hub:hover { transform: translate(-50%, -50%) scale(1.06); box-shadow: 0 0 0 6px rgba(7, 17, 31, .9), 0 0 44px rgba(63, 190, 247, .8); }
.wheel-hub:disabled { cursor: default; }
.spinning .wheel-hub svg { animation: twinkle .6s linear infinite; }
@keyframes twinkle { to { transform: rotate(360deg); } }

/* ---------- Magic box ---------- */
.magic { position: relative; container-type: inline-size; width: min(100%, 560px); aspect-ratio: 1; display: grid; place-items: center; }
.magic-orbit { position: absolute; inset: 0; }
.orbit-chip {
  position: absolute; left: 50%; top: 50%; max-width: 140px; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(13, 21, 38, .85); border: 1px solid rgba(63, 190, 247, .3); color: var(--text);
  transform: translate(-50%, -50%) translate(var(--x), var(--y));
  animation: float 4s ease-in-out infinite; animation-delay: var(--d);
  transition: opacity .4s, filter .4s;
}
.orbit-chip::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--c); vertical-align: 0; }
@keyframes float { 50% { transform: translate(-50%, -50%) translate(var(--x), calc(var(--y) - 10px)); } }
.magic.shaking .orbit-chip { animation: suck 1s ease-in forwards; }
@keyframes suck { to { transform: translate(-50%, -50%) scale(.2); opacity: 0; } }
.magic.open .orbit-chip { opacity: 0; }

.magic-stack { position: relative; width: 46%; aspect-ratio: 1; display: grid; place-items: end center; }
.box { position: relative; width: 100%; height: 78%; }
.box-body {
  position: absolute; inset: 22% 4% 0; border-radius: 10px 10px 18px 18px;
  background: linear-gradient(160deg, #1fa3e6, #0e3a5c 70%); border: 3px solid var(--ink);
  box-shadow: inset 0 -16px 30px rgba(4, 11, 22, .5), 0 0 50px rgba(63, 190, 247, .35);
  display: grid; place-items: center; overflow: hidden;
}
.box-body::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 14%; transform: translateX(-50%); background: var(--grad); opacity: .9; }
.box-mark { position: relative; font-size: clamp(36px, 7vw, 72px); font-weight: 900; color: #fff; text-shadow: 0 0 20px rgba(111, 212, 255, .9); }
.box-lid {
  position: absolute; z-index: 2; left: 0; right: 0; top: 6%; height: 20%; border-radius: 10px;
  background: linear-gradient(180deg, #3fbef7, #1677b5); border: 3px solid var(--ink);
  transform-origin: 10% 100%; transition: transform .7s cubic-bezier(.3, 1.6, .5, 1);
}
.box-lid::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 14%; transform: translateX(-50%); background: var(--accent-light); }
.box-bow { position: absolute; left: 50%; bottom: 96%; width: 36%; height: 50%; transform: translateX(-50%); }
.box-bow::before, .box-bow::after {
  content: ""; position: absolute; bottom: 0; width: 50%; height: 100%; border: 5px solid var(--accent-light); border-radius: 50% 50% 0 50%;
}
.box-bow::before { left: 0; transform: rotate(-20deg); transform-origin: right bottom; }
.box-bow::after { right: 0; transform: scaleX(-1) rotate(-20deg); transform-origin: left bottom; }
.box-shadow { position: absolute; bottom: -8%; left: 10%; right: 10%; height: 10%; border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .55), transparent 70%); }

.magic:not(.shaking):not(.open) .box { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.magic.shaking .box { animation: shake .12s linear infinite; }
.magic.shaking .box-body { animation: glow .5s ease-in-out infinite alternate; }
@keyframes shake {
  0% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(-4px, 2px) rotate(-3deg); }
  50% { transform: translate(3px, -2px) rotate(2deg); }
  75% { transform: translate(-2px, -3px) rotate(-1deg); }
}
@keyframes glow { to { box-shadow: inset 0 -16px 30px rgba(4, 11, 22, .5), 0 0 90px rgba(111, 212, 255, .8); } }
.magic.open .box-lid { transform: translate(-75%, -60%) rotate(-62deg); }

.magic-card {
  position: absolute; z-index: 1; left: 50%; bottom: 40%; width: 150%; min-height: 34%;
  display: grid; place-items: center; padding: 14px 18px; border-radius: 18px; text-align: center;
  background: linear-gradient(160deg, #fff, #dff4ff); color: var(--ink); border: 3px solid var(--ink);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45), 0 0 60px rgba(111, 212, 255, .5);
  font-size: clamp(18px, 3vw, 30px); font-weight: 900; line-height: 1.15; word-break: break-word;
  transform: translate(-50%, 70%) scale(.3); opacity: 0; transition: transform .7s cubic-bezier(.2, 1.5, .4, 1) .15s, opacity .3s .15s;
}
.magic.shaking .magic-card { opacity: 1; transform: translate(-50%, -112%) scale(.62); background: rgba(13, 21, 38, .9); color: var(--accent-light); border-color: rgba(63, 190, 247, .4); transition: none; }
.magic.open .magic-card { opacity: 1; transform: translate(-50%, -62%) scale(1.12); }

/* ---------- Rock Paper Scissors ---------- */
.tab-emoji { font-size: 15px; line-height: 1; }
.label-short { display: none; }
@media (max-width: 639px) {
  .label-long { display: none; }
  .label-short { display: inline; }
  .segmented button { padding: 8px 12px; }
}
.segmented-sm button { padding: 6px 14px; font-size: 13px; }
.segmented button[aria-pressed="true"] { background: var(--grad); color: var(--ink); box-shadow: 0 6px 18px rgba(58, 168, 234, .3); }

.rps { width: min(100%, 620px); display: flex; flex-direction: column; align-items: center; gap: 22px; }
.rps-arena { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.rps-player { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rps-name { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rps-hand {
  display: grid; place-items: center; width: clamp(110px, 22vw, 180px); aspect-ratio: 1; border-radius: 50%;
  font-size: clamp(54px, 10vw, 92px); line-height: 1; user-select: none;
  background: radial-gradient(circle at 40% 35%, #16294a, var(--ink)); border: 4px solid rgba(63, 190, 247, .5);
  box-shadow: 0 0 0 6px rgba(7, 17, 31, .9), 0 0 36px rgba(63, 190, 247, .3); transition: border-color .3s, box-shadow .3s, opacity .3s;
}
.rps-hand.pump { animation: pump .42s ease-in-out; }
@keyframes pump { 40% { transform: translateY(-22px) rotate(-8deg); } }
.rps-hand.win { border-color: var(--lime); box-shadow: 0 0 0 6px rgba(7, 17, 31, .9), 0 0 50px rgba(148, 242, 185, .6); animation: pop .4s; }
.rps-hand.lose { opacity: .45; border-color: rgba(255, 138, 138, .5); }
.rps-score { min-width: 54px; padding: 4px 14px; border-radius: 999px; text-align: center; font-size: 22px; font-weight: 900; background: rgba(255, 255, 255, .06); font-variant-numeric: tabular-nums; }
.rps-vs { font-size: 20px; font-weight: 900; letter-spacing: .1em; color: var(--accent); text-shadow: 0 0 18px rgba(63, 190, 247, .7); }
.rps-call { margin: 0; min-height: 1.3em; font-size: clamp(22px, 3.4vw, 32px); font-weight: 900; letter-spacing: -.02em; text-align: center; color: #fff; }
.rps-call.win { color: var(--lime); }
.rps-call.lose { color: var(--danger); }
.rps-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rps-pick {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; border: 1px solid rgba(63, 190, 247, .35);
  background: rgba(13, 21, 38, .85); font-size: 15px; font-weight: 800; transition: transform .15s, background .15s, border-color .15s;
}
.rps-pick span { font-size: 22px; line-height: 1; }
.rps-pick:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--accent); background: rgba(63, 190, 247, .14); }
.rps-pick:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 479px) { .rps-pick kbd { display: none; } .rps-pick { padding: 10px 14px; } }

/* ---------- Builder column ---------- */
.builder { display: flex; flex-direction: column; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(4, 11, 22, .35); }
@media (min-width: 1200px) {
  .builder { width: 400px; flex-shrink: 0; border-top: 0; border-left: 1px solid rgba(255, 255, 255, .08); overflow-y: auto; }
}
.builder-block { padding: 22px 24px; border-bottom: 1px solid rgba(255, 255, 255, .06); display: flex; flex-direction: column; gap: 12px; }
.builder-block:last-child { border-bottom: 0; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.block-title { display: flex; align-items: center; gap: 10px; margin: -6px 0 0; font-size: 1.3rem; font-weight: 900; letter-spacing: -.02em; color: #fff; }
.block-copy { margin: -6px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.count-pill { padding: 2px 10px; border-radius: 999px; background: rgba(63, 190, 247, .15); color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0; }
.field-caption { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

.field {
  width: 100%; height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1);
  background: var(--field); font-size: 15px; color: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea.field { height: auto; padding: 12px 16px; resize: vertical; line-height: 1.5; }
.field::placeholder { color: var(--dim); }
.field:hover { border-color: rgba(255, 255, 255, .2); }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(63, 190, 247, .18); }

.add-row { display: flex; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 10px 18px; font-size: 14px; font-weight: 800; text-decoration: none; transition: transform .15s, background .15s, opacity .15s, box-shadow .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: var(--ink); box-shadow: 0 10px 28px rgba(58, 168, 234, .28); }
.btn-ghost { background: rgba(255, 255, 255, .06); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.btn-danger:hover:not(:disabled) { color: var(--danger); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-square { width: 46px; height: 46px; padding: 0; border-radius: 12px; flex-shrink: 0; }
.btn-square svg { width: 20px; height: 20px; }
.btn-block { width: 100%; }
.btn-xl { padding: 16px 44px; font-size: 18px; letter-spacing: .06em; min-width: 220px; }
.btn-xl svg { width: 20px; height: 20px; }
.spinning .btn-xl svg { animation: twinkle .8s linear infinite; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.paste-panel { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* Choice list */
.choice-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.choice-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .035); border: 1px solid var(--line); animation: pop .25s ease-out;
}
.choice-item.winner { border-color: var(--accent); background: rgba(63, 190, 247, .12); }
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
.choice-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(255, 255, 255, .1); }
.choice-text { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; font-weight: 700; padding: 6px 0; text-overflow: ellipsis; }
.choice-text:focus { color: var(--accent-light); }
.icon-btn { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--dim); transition: all .15s; }
.icon-btn:hover { background: rgba(255, 138, 138, .12); color: var(--danger); }
.icon-btn svg { width: 14px; height: 14px; }
.choice-list:empty::before { content: "No choices yet — add one above or pick a quick list."; display: block; padding: 14px; border-radius: 14px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 13px; }

/* Themes */
.theme-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.theme-btn { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-size: 12px; font-weight: 800; color: var(--muted); transition: all .15s; }
.theme-btn:hover { border-color: var(--line-strong); }
.theme-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: rgba(63, 190, 247, .1); }
.theme-swatch { display: flex; height: 18px; border-radius: 6px; overflow: hidden; }
.theme-swatch span { flex: 1; }

/* Slider */
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row output { width: 36px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.range { flex: 1; accent-color: var(--accent-strong); }

/* Toggles */
.toggles { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; cursor: pointer; }
.toggle-row strong { display: block; font-size: 14px; }
.toggle-row small { display: block; font-size: 12px; color: var(--muted); }
.toggle {
  appearance: none; position: relative; width: 44px; height: 24px; border-radius: 999px; flex-shrink: 0; cursor: pointer;
  background: rgba(255, 255, 255, .12); transition: background .2s;
}
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle:checked { background: var(--accent-strong); }
.toggle:checked::after { transform: translateX(20px); }

/* History */
.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.history-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .035); font-size: 14px; }
.history-item:first-child { background: rgba(63, 190, 247, .12); }
.history-rank { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .08); font-size: 11px; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.history-item:first-child .history-rank { background: var(--grad); color: var(--ink); }
.history-main { flex: 1; min-width: 0; }
.history-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-main small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-time { font-size: 12px; color: var(--dim); flex-shrink: 0; }
.empty-box { margin: 0; padding: 14px; border-radius: 14px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 13px; }

.info-card { display: flex; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(10, 23, 40, .6); }
.info-icon { width: 28px; height: 28px; color: var(--accent); }
.info-card h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--accent); }
.info-card p { margin: 4px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* ---------- Modal, toast, confetti ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(2, 6, 14, .75); backdrop-filter: blur(6px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.modal-card {
  position: relative; width: min(100%, 480px); padding: 36px 28px 28px; border-radius: 28px; text-align: center;
  background: linear-gradient(180deg, #0f1f36, #0a1728); border: 1px solid rgba(63, 190, 247, .35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 80px rgba(63, 190, 247, .2); animation: rise .45s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes rise { from { transform: translateY(30px) scale(.9); opacity: 0; } }
.winner-text {
  margin: 12px 0 0; font-size: clamp(32px, 7vw, 52px); line-height: 1.05; font-weight: 900; letter-spacing: -.03em; word-break: break-word;
  background: linear-gradient(135deg, #fff, var(--accent-light) 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.winner-sub { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.modal-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; }
.modal-close:hover { background: rgba(255, 255, 255, .16); }
.modal-close svg { width: 18px; height: 18px; }

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px; background: #0f1f36; border: 1px solid rgba(63, 190, 247, .4);
  font-size: 14px; font-weight: 700; transition: all .25s; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; z-index: 55; width: 100%; height: 100%; pointer-events: none; }

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