/* Who's in the Boat? — Minecraft-inspired, our own pixel style (no game assets).
   Tokens match the Figma kit "Who's in the Boat? — UI kit" (collection "Boat"). */
:root {
  --grass: #6fd347; --grass-light: #8fe052; --grass-dark: #4fa32f;
  --dirt: #7c4f26; --dirt-dark: #5e3a1b;
  --gold: #ffd046; --gold-light: #fff1a8; --gold-dark: #c98a12;
  --water: #3d8fe0;
  --stone: #727272; --stone-light: #ababab; --stone-dark: #3f3f3f;
  --piston: #b07cff; --piston-light: #d6b4ff;
  --oak: #c48a4f;
  --night: #0f1525; --panel: #252b37; --panel-light: #3a4253; --panel-dark: #151922;
  --slot: #12151c; --outline: #05070c;
  --text: #f4f6ff; --muted: #9aa3b5; --ink: #3a2a00; --danger: #ff6b6b;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --bevel: inset 4px 4px 0 var(--panel-light), inset -4px -4px 0 var(--panel-dark);
  --inset: inset 3px 3px 0 #05070a, inset -3px -3px 0 #3a4150;
  --spring: cubic-bezier(.2, 1.4, .4, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: linear-gradient(180deg, #0a0f20 0%, #121a33 55%, #1a2343 100%) fixed;
  color: var(--text);
  font: 16px/1.45 Rubik, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); }
h1, h2 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.45rem; font-weight: 800; }
h2 { font-size: 1.1rem; font-weight: 800; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.pixel { font-family: var(--pixel); }

/* ---------- the sky behind everything follows the Minecraft world's clock on stream:
   body[data-phase] = morning | day | evening | night | nether | end, body[data-storm] in a thunderstorm */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sky-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 6s ease; }
.sky-morning { background: linear-gradient(180deg, #3b5ba9 0%, #c9789a 42%, #ffb27a 78%, #ffe2a8 100%); }
.sky-day { background: linear-gradient(180deg, #3f95ea 0%, #6db8f0 50%, #ade0fb 100%); }
.sky-evening { background: linear-gradient(180deg, #23285e 0%, #7a3a86 40%, #e8704a 76%, #ffb25e 100%); }
.sky-night { background: linear-gradient(180deg, #0a0f20 0%, #121a33 55%, #1a2343 100%); }
.sky-nether { background: linear-gradient(180deg, #2a070c 0%, #4e1018 50%, #7a1f1a 100%); }
.sky-end { background: linear-gradient(180deg, #08060f 0%, #140c24 60%, #1f1238 100%); }
body[data-phase="morning"] .sky-morning, body[data-phase="day"] .sky-day, body[data-phase="evening"] .sky-evening,
body[data-phase="night"] .sky-night, body[data-phase="nether"] .sky-nether, body[data-phase="end"] .sky-end { opacity: 1; }

.stars { position: absolute; inset: 0; opacity: 1; transition: opacity 6s ease; }
body[data-phase="day"] .stars, body[data-phase="nether"] .stars { opacity: 0; }
body[data-phase="morning"] .stars, body[data-phase="evening"] .stars { opacity: .25; }
.stars i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); background: #fff; opacity: .55; }
.stars i.twinkle { animation: twinkle var(--d) ease-in-out var(--delay) infinite; }
.stars i.gold { background: var(--gold); }
body[data-phase="end"] .stars i { background: #e7d2ff; }

/* square sun and moon, moved along an arc by app.js (--sx/--sy, --mx/--my as % of the screen) */
.sun, .moon { position: absolute; left: 0; top: 0; width: 64px; height: 64px; opacity: 0; transition: opacity 3s ease, transform .3s linear; }
.sun { transform: translate(var(--sx, 50vw), var(--sy, 30vh)); background: #fff2a8; box-shadow: inset 0 0 0 8px #ffe46b, 0 0 60px 18px rgba(255, 228, 107, .55); }
.moon { transform: translate(var(--mx, 70vw), var(--my, 18vh)); width: 56px; height: 56px; background: #f4efc8; box-shadow: inset 8px 8px 0 #fffbe3, inset -10px -6px 0 #d8d1a4, 0 0 40px rgba(244, 239, 200, .25); }
body[data-phase="morning"] .sun, body[data-phase="evening"] .sun { background: #ffd28a; box-shadow: inset 0 0 0 8px #ffb25e, 0 0 80px 30px rgba(255, 150, 80, .5); }
body.sun-up .sun { opacity: 1; }
body.moon-up .moon { opacity: 1; }

/* pixel clouds drift by in daylight */
.clouds { position: absolute; inset: 0; opacity: 0; transition: opacity 6s ease; }
body[data-phase="day"] .clouds { opacity: .9; }
body[data-phase="morning"] .clouds, body[data-phase="evening"] .clouds { opacity: .5; }
body[data-storm] .clouds { opacity: 1; filter: brightness(.45); }
.clouds i {
  position: absolute; left: -260px; top: var(--y); width: 180px; height: 36px; background: #fff;
  box-shadow: 36px -18px 0 #fff, 90px -12px 0 #fff, 120px 0 0 #f2f6ff;
  animation: cloud-drift var(--d) linear var(--delay) infinite;
}
@keyframes cloud-drift { to { transform: translateX(calc(100vw + 420px)); } }

/* thunderstorm: darker sky and rain */
.rain { position: absolute; inset: -40px 0 0; opacity: 0; transition: opacity 3s ease; background: repeating-linear-gradient(105deg, transparent 0 22px, rgba(150, 190, 255, .35) 22px 24px); background-size: 120px 120px; animation: rain-fall .5s linear infinite; }
body[data-storm] .rain { opacity: 1; }
body[data-storm] .sky-layer { filter: saturate(.4) brightness(.6); }
@keyframes rain-fall { to { background-position: -30px 120px; } }

/* the in-game clock next to "In the boat now" */
.now-side { grid-column: 3; grid-row: 2 / span 2; display: grid; gap: 10px; justify-items: end; }
.clock { display: flex; align-items: center; gap: 8px; padding: 7px 10px 6px; font: 9px var(--pixel); background: var(--slot); box-shadow: var(--inset); color: var(--text); }
.clock-icon { width: 12px; height: 12px; background: #fff2a8; box-shadow: 0 0 8px #ffe46b; }
body[data-phase="night"] .clock-icon, body[data-phase="end"] .clock-icon { background: #f4efc8; box-shadow: inset -4px -4px 0 #d8d1a4; }
body[data-phase="morning"] .clock-icon, body[data-phase="evening"] .clock-icon { background: #ffb25e; box-shadow: 0 0 8px #ff8c2b; }
body[data-phase="nether"] .clock-icon { background: #ff8c2b; box-shadow: 0 0 8px #ef3d3d; }
#worldTime { color: var(--gold); }

/* ---------- top bar: a deepslate block */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background:
    repeating-linear-gradient(90deg, transparent 0 36px, rgba(255, 255, 255, .025) 36px 48px),
    #1e222b;
  border-bottom: 4px solid #0a0c11;
  box-shadow: inset 0 4px 0 #2f3542, 0 8px 18px rgba(0, 0, 0, .35);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font: 14px var(--pixel); text-shadow: 2px 2px 0 #000; }
.brand-logo { width: 40px; height: 40px; flex: none; image-rendering: pixelated; transition: transform .3s var(--spring); }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.08); }
.px-icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; }
.px-tile { border-radius: 0; }
.pill {
  font: 9px var(--pixel); padding: 6px 8px 5px; color: var(--ink); text-shadow: none;
  background: var(--gold); box-shadow: inset 0 -3px 0 var(--gold-dark), inset 0 3px 0 var(--gold-light);
}
.wallet-area { position: relative; display: flex; align-items: center; gap: 10px; }
.balance { font: 10px var(--pixel); color: var(--gold); white-space: nowrap; text-shadow: 2px 2px 0 #000; }

/* channel links: inventory slots */
.socials { display: flex; align-items: center; gap: 6px; }
.social {
  display: grid; place-items: center; width: 44px; height: 44px;
  background: var(--slot); box-shadow: var(--inset);
  transition: transform .15s var(--spring), background .15s;
}
.social:hover { transform: translateY(-3px); background: #1c2230; }
.social:hover .px-icon { animation: hop .5s var(--spring); }
.social:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.social .px-icon { width: 26px; height: 26px; vertical-align: 0; }
@keyframes hop { 40% { transform: translateY(-4px) scale(1.12); } }

/* ---------- buttons: every purpose has its own material */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  border: 4px solid var(--outline); padding: 15px 18px 14px; cursor: pointer;
  font: 11px/1.2 var(--pixel); letter-spacing: .02em; text-transform: uppercase;
  color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, .45);
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(3px); }
.btn:disabled { cursor: not-allowed; filter: saturate(.4) brightness(.78); }
.btn:focus-visible, .option:focus-visible, .step:focus-visible, .name-row:focus-visible, input:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px;
}
/* a light band that sweeps across (vote on hover, gold ingot every few seconds) */
.btn::after {
  content: ""; position: absolute; z-index: -1; top: -10%; bottom: -10%; left: -40%; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg) translateX(-120%); pointer-events: none;
}

/* VOTE — a grass block */
.btn-vote {
  min-width: 200px; padding: 30px 22px 16px;
  font-size: 14px;
  background:
    linear-gradient(var(--grass), var(--grass)) top / 100% 20px no-repeat,
    repeating-linear-gradient(90deg, var(--grass) 0 10px, transparent 10px 18px, var(--grass) 18px 22px, transparent 22px 34px) 0 20px / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 26px, var(--dirt-dark) 26px 32px, transparent 32px 58px) 0 34px / 100% 6px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 12px, var(--dirt-dark) 12px 17px, transparent 17px 44px) 0 46px / 100% 5px no-repeat,
    var(--dirt);
  box-shadow: inset 0 4px 0 var(--grass-light), inset 0 -5px 0 var(--dirt-dark), 0 6px 0 rgba(0, 0, 0, .35);
  text-shadow: 3px 3px 0 #2a1a0a;
}
.btn-vote:hover:not(:disabled)::after { animation: sweep .7s ease-out; }
.btn-vote:active:not(:disabled) { box-shadow: inset 0 4px 0 var(--grass-light), inset 0 2px 0 var(--dirt-dark), 0 2px 0 rgba(0, 0, 0, .35); }
.btn-vote.ready:not(:disabled) { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: inset 0 4px 0 var(--grass-light), inset 0 -5px 0 var(--dirt-dark), 0 6px 0 rgba(0, 0, 0, .35), 0 0 22px rgba(143, 224, 82, .55); } }

/* SUGGEST — a gold ingot */
.btn-gold, .btn-suggest {
  color: var(--ink); text-shadow: 1px 1px 0 rgba(255, 255, 255, .5);
  background: var(--gold);
  box-shadow: inset 5px 5px 0 var(--gold-light), inset -5px -5px 0 var(--gold-dark), 0 6px 0 rgba(0, 0, 0, .35);
}
.btn-suggest:not(:disabled)::after { animation: sweep 4s ease-in-out 1s infinite; }
.btn-suggest:hover:not(:disabled)::after { animation: sweep 1.6s ease-in-out infinite; }
.btn-gold:active:not(:disabled), .btn-suggest:active:not(:disabled) { box-shadow: inset -5px -5px 0 var(--gold-light), inset 5px 5px 0 var(--gold-dark); }

/* BACK IT — stone set in gold */
.btn-back {
  border-color: var(--gold); color: var(--gold);
  background: var(--panel); box-shadow: var(--bevel), 0 6px 0 rgba(0, 0, 0, .35);
}
.btn-back:hover:not(:disabled) { animation: rim 1s ease-in-out infinite; }
.btn-back.unlock { animation: unlock .6s ease-out; }
@keyframes rim { 50% { box-shadow: var(--bevel), 0 6px 0 rgba(0, 0, 0, .35), 0 0 18px rgba(255, 208, 70, .7); } }
@keyframes unlock { 30% { background: var(--gold); color: var(--ink); } }

/* CHIP IN — a piston: oak head on a stone body; the head pushes up on hover */
.btn-chip {
  padding-top: 30px; overflow: visible;
  background: var(--stone);
  box-shadow: inset 0 4px 0 var(--stone-light), inset 0 -5px 0 var(--stone-dark), 0 6px 0 rgba(0, 0, 0, .35);
}
.btn-chip::before {
  content: ""; position: absolute; z-index: 1; left: -4px; right: -4px; top: -4px; height: 20px;
  border: 4px solid var(--outline);
  background: repeating-linear-gradient(90deg, var(--oak) 0 22px, #9c6a3a 22px 25px), var(--oak);
  box-shadow: inset 0 4px 0 #e0b07a;
  transition: transform .18s var(--spring), box-shadow .18s;
}
.btn-chip::after { display: none; }
.btn-chip:hover:not(:disabled)::before { transform: translateY(-7px); box-shadow: inset 0 4px 0 #e0b07a, 0 0 18px rgba(176, 124, 255, .9); }
.btn-chip:active:not(:disabled)::before { transform: translateY(2px); transition-duration: .05s; }
.btn-chip:not(:disabled) { box-shadow: inset 0 4px 0 var(--stone-light), inset 0 -5px 0 var(--stone-dark), 0 6px 0 rgba(0, 0, 0, .35), 0 0 22px rgba(176, 124, 255, .35); }

/* stone — wallet, menus, neutral actions */
.btn-stone, .btn-ghost {
  background: var(--stone);
  box-shadow: inset 4px 4px 0 var(--stone-light), inset -4px -4px 0 var(--stone-dark), 0 5px 0 rgba(0, 0, 0, .35);
}
.btn-stone:hover:not(:disabled), .btn-ghost:hover:not(:disabled) { border-color: #fff; background: #808080; }
.btn-stone:active:not(:disabled), .btn-ghost:active:not(:disabled) { box-shadow: inset -4px -4px 0 var(--stone-light), inset 4px 4px 0 var(--stone-dark); }
.btn-primary { background: var(--grass); box-shadow: inset 0 4px 0 var(--grass-light), inset 0 -5px 0 var(--grass-dark); color: #0b1a05; text-shadow: none; }

@keyframes sweep { from { transform: skewX(-20deg) translateX(-120%); } to { transform: skewX(-20deg) translateX(520%); } }

/* wallet menu: a chest-like panel */
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 250px; padding: 8px; z-index: 6;
  background: var(--panel); border: 4px solid var(--outline); box-shadow: var(--bevel), 0 14px 30px rgba(0, 0, 0, .5);
  animation: pop-in .2s var(--spring);
}
.menu button, .menu a {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px;
  background: none; border: 0; color: var(--text);
  font: 500 15px Rubik, sans-serif; text-align: left; text-decoration: none; cursor: pointer;
}
.menu button:hover, .menu a:hover { background: var(--slot); box-shadow: var(--inset); }
.menu img { width: 24px; height: 24px; image-rendering: pixelated; }
.menu p { margin: 8px 10px; font-size: 14px; }
/* BUY — a gold ingot link next to the wallet */
.btn-buy { display: inline-block; text-decoration: none; white-space: nowrap; }
.btn-buy:hover { animation: rim 1s ease-in-out infinite; }

.menu-head { margin: 10px 10px 4px; font: 9px var(--pixel); color: var(--muted); }
.admin-sub { margin: 18px 0 6px; font: 10px var(--pixel); color: var(--gold); }
.twitch-login { padding: 12px 14px; background: var(--slot); box-shadow: var(--inset); }
.twitch-login b { font: 16px var(--pixel); color: var(--gold); letter-spacing: .1em; margin-left: 6px; }
.menu-head:first-child { margin-top: 4px; }

/* ---------- layout and cards (blocks with bevelled faces) */
.layout {
  max-width: 780px; margin: 0 auto; padding: 28px 16px 36px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px;
}
.card {
  position: relative; padding: 22px;
  background: var(--panel); border: 4px solid var(--outline);
  box-shadow: var(--bevel), 0 8px 0 rgba(0, 0, 0, .35);
  animation: card-in .55s var(--spring) both; animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.9); } }
.overline { font: 10px var(--pixel); color: var(--muted); letter-spacing: .04em; margin-bottom: 10px; }
.eyebrow { font: 10px var(--pixel); color: var(--gold); letter-spacing: .04em; margin-bottom: 8px; }
.slot { background: var(--slot); box-shadow: var(--inset); }

.now { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 16px; }
.now-label { grid-column: 1 / -1; font: 10px var(--pixel); color: var(--muted); margin-bottom: 6px; }
.now-icon { grid-row: 2 / span 2; width: 68px; height: 68px; display: grid; place-items: center; font-size: 38px; }
.now-icon .px-icon { width: 48px; height: 48px; animation: idle 3s ease-in-out infinite; }
@keyframes idle { 50% { transform: translateY(-3px); } }
.now-mob { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.now-place { color: #c9d3e8; font-weight: 500; }
.status { display: flex; align-items: center; gap: 8px; font: 9px var(--pixel); color: var(--muted); }
.dot { width: 10px; height: 10px; background: var(--muted); }
.status.online { color: var(--grass-light); }
.status.online .dot { background: var(--grass-light); box-shadow: 0 0 10px var(--grass-light); animation: blink 1.6s steps(2) infinite; }
.status.offline .dot { background: var(--danger); }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- round */
.round-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.timer-box { flex-shrink: 0; min-width: 130px; padding: 12px 14px 10px; text-align: center; background: var(--slot); box-shadow: var(--inset); }
.timer { font: 22px var(--pixel); color: var(--gold); text-shadow: 2px 2px 0 #000; }
.timer.small { font-size: 14px; }
.timer-note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.timer.closed { color: var(--danger); }
.timer.urgent { color: var(--danger); animation: urgent 1s steps(2) infinite; }
@keyframes urgent { 50% { transform: scale(1.08); text-shadow: 2px 2px 0 #000, 0 0 14px rgba(255, 107, 107, .8); } }

.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.option {
  position: relative; display: block; width: 100%; height: 156px; padding: 0; overflow: hidden;
  border: 4px solid var(--outline); background: #000; color: var(--text); text-align: left; cursor: pointer;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .35);
  transition: transform .2s var(--spring), border-color .2s, box-shadow .2s, filter .2s;
  --speed: 1;
}
.option:hover:not(:disabled) { transform: translateY(-3px); --speed: .55; }
.option:active:not(:disabled) { transform: translateY(2px) scale(.99); }
.option[aria-checked="true"] {
  border-color: var(--gold); --speed: .7;
  box-shadow: 0 0 0 2px var(--gold), 0 0 26px rgba(255, 208, 70, .55), 0 6px 0 rgba(0, 0, 0, .35);
}
.option:disabled { cursor: default; filter: saturate(.55) brightness(.75); }
.option .plate {
  position: absolute; left: 0; right: 0; bottom: 0; height: 48px; z-index: 3;
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 0 12px 8px;
  background: rgba(0, 0, 0, .6);
}
.option .plate .px-icon { width: 24px; height: 24px; }
.option .label { font-weight: 800; font-size: 17px; text-shadow: 2px 2px 0 #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option .count { font: 12px var(--pixel); color: var(--gold); text-shadow: 2px 2px 0 #000; }
.option .count.bump { animation: bump .4s var(--spring); }
@keyframes bump { 40% { transform: scale(1.5); color: #fff; } }
.option .xp { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 6px; background: var(--slot); z-index: 4; }
.option .xp b { display: block; height: 100%; width: 0; background: linear-gradient(var(--grass-light) 0 2px, var(--grass) 2px); transition: width .7s var(--spring); }
.option .check {
  position: absolute; top: 8px; right: 8px; z-index: 4; width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--gold); color: var(--ink); font: 800 18px Rubik, sans-serif;
  box-shadow: inset 0 -3px 0 var(--gold-dark), inset 0 3px 0 var(--gold-light);
  transform: scale(0); transition: transform .25s var(--spring);
}
.option[aria-checked="true"] .check { transform: scale(1); }

/* ---------- vote bar */
.vote-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.step {
  width: 48px; height: 48px; border: 4px solid var(--outline); cursor: pointer; color: #fff;
  font: 16px var(--pixel); text-shadow: 2px 2px 0 #000; background: var(--stone);
  box-shadow: inset 4px 4px 0 var(--stone-light), inset -4px -4px 0 var(--stone-dark);
  transition: transform .08s;
}
.step:hover { border-color: #fff; }
.step:active { transform: translateY(3px); box-shadow: inset -4px -4px 0 var(--stone-light), inset 4px 4px 0 var(--stone-dark); }
.stepper input, .text-input, .code-input {
  height: 48px; border: 0; color: var(--text); background: var(--slot); box-shadow: var(--inset);
  font: 700 16px Rubik, sans-serif; padding: 0 14px;
}
.stepper input { width: 64px; padding: 0; font: 13px var(--pixel); text-align: center; -moz-appearance: textfield; }
.stepper input.pop { animation: bump .35s var(--spring); }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.text-input::placeholder { color: #5d6680; }
.cost { color: #c9d3e8; font-weight: 700; }
.vote-bar .btn-vote { margin-left: auto; }

/* ---------- captain name */
.names-hint { margin: 0 0 14px; font-size: 14px; }
#captainNow { color: var(--gold); text-shadow: 2px 2px 0 var(--ink); }
.name-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.name-list li.empty { padding: 12px 14px; background: var(--slot); box-shadow: var(--inset); color: var(--muted); }
.name-row {
  position: relative; overflow: hidden; width: 100%; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  padding: 12px 16px; border: 0; background: var(--slot); box-shadow: var(--inset);
  color: var(--text); font: 700 16px Rubik, sans-serif;
  transition: transform .15s var(--spring);
}
.name-row:hover:not(:disabled) { transform: translateX(4px); }
.name-row[aria-checked="true"] { box-shadow: var(--inset), 0 0 0 4px var(--gold); }
.name-row:disabled { cursor: default; }
.name-list .fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--gold); transition: width .6s var(--spring); }
.name-list .name-row > span { position: relative; }
.name-list .nm { overflow-wrap: anywhere; }
.name-list .count { font: 12px var(--pixel); color: var(--gold); }
.name-list .back { padding: 6px 10px; font-size: 9px; }
.admin-names li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 12px; background: var(--slot); box-shadow: var(--inset); }
.name-form, .secret-form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; align-items: center; }
.text-input { flex: 1; min-width: 150px; }

/* ---------- secret: the piston pot */
.secret { border-color: #2a1745; box-shadow: var(--bevel), 0 8px 0 rgba(0, 0, 0, .35), 0 0 34px rgba(176, 124, 255, .18); }
.secret.active { animation: secret-on 1s ease-in-out infinite alternate; }
@keyframes secret-on { to { box-shadow: var(--bevel), 0 8px 0 rgba(0, 0, 0, .35), 0 0 46px rgba(176, 124, 255, .7); } }
.secret-head { display: flex; gap: 16px; align-items: center; }
.secret-icon { width: 64px; height: 64px; display: grid; place-items: center; flex: none; background: var(--slot); box-shadow: var(--inset); font-size: 40px; }
.secret-icon .px-icon { width: 44px; height: 44px; }
.secret h2 { font: 13px var(--pixel); color: var(--piston-light); text-shadow: 0 0 12px var(--piston); }
.secret-head p { margin: 8px 0 0; }
.pot { position: relative; display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; padding: 5px; margin-top: 16px; background: var(--slot); box-shadow: var(--inset); }
.pot .seg { height: 22px; background: #1e2230; }
.pot .seg.on { background: linear-gradient(var(--piston-light) 0 5px, var(--piston) 5px); animation: seg-in .35s var(--spring) both; animation-delay: calc(var(--n) * 25ms); }
@keyframes seg-in { from { transform: scaleY(.2); filter: brightness(2); } }
.pot-text { position: absolute; inset: 0; display: grid; place-items: center; font: 10px var(--pixel); text-shadow: 2px 2px 0 #000; pointer-events: none; }
.pot-fill { display: none; }

/* ---------- code word (off by default) and faucet */
.claim.active { border-color: var(--gold); }
.claim-head, .faucet { display: flex; gap: 14px; align-items: center; }
.claim-icon { font-size: 2rem; }
.claim-head p, .faucet p { margin: 6px 0 0; }
.claim-form { display: flex; gap: 12px; margin-top: 14px; }
.code-input { flex: 1; min-width: 0; font: 14px var(--pixel); text-transform: uppercase; }
.faucet { justify-content: space-between; }

/* ---------- history */
.history-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.history-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; background: var(--slot); box-shadow: var(--inset); color: var(--muted); font-size: 14px; }
.history-list b { color: var(--text); }

/* ---------- footer: grass and dirt */
.footer { max-width: 780px; margin: 0 auto; padding: 0 16px 18px; font-size: 13px; text-align: center; color: var(--muted); }
.footer p { margin: 4px 0; overflow-wrap: anywhere; }
.ground {
  height: 92px; margin-top: 10px;
  background:
    linear-gradient(var(--grass), var(--grass)) top / 100% 18px no-repeat,
    repeating-linear-gradient(90deg, var(--grass) 0 20px, var(--grass-dark) 20px 40px, transparent 40px 60px) 0 18px / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 14px, var(--dirt-dark) 14px 22px, transparent 22px 50px) 0 40px / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 30px, #9a6534 30px 36px, transparent 36px 70px) 0 64px / 100% 6px no-repeat,
    var(--dirt);
  box-shadow: inset 0 4px 0 var(--grass-light);
  display: flex; align-items: flex-end; justify-content: center; padding: 0 16px 14px;
}
.disclaimer { font: 8px/1.6 var(--pixel); color: #f2dfa0; text-shadow: 2px 2px 0 #2a1a0a; text-align: center; }

/* ---------- toasts */
.toasts { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 10; display: grid; gap: 8px; width: min(460px, calc(100vw - 32px)); }
.toast {
  padding: 12px 14px; background: var(--panel); border: 4px solid var(--outline); box-shadow: var(--bevel), 0 10px 30px rgba(0, 0, 0, .5);
  animation: toast-in .35s var(--spring);
}
.toast.success { border-color: var(--grass-dark); }
.toast.error { border-color: #8f1d24; }
.toast a { margin-left: 6px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.95); } }

/* ---------- particle bursts after an action (made by app.js) */
.burst-dot { position: fixed; z-index: 50; width: 7px; height: 7px; pointer-events: none; background: var(--c); box-shadow: 0 0 6px var(--c); animation: burst-out .9s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes burst-out { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }

@media (max-width: 600px) {
  .brand #title { display: none; }
  .topbar { flex-wrap: wrap; }
  .socials { order: 3; width: 100%; justify-content: center; }
  .round-head { flex-direction: column; }
  .timer-box { align-self: stretch; }
  .options { grid-template-columns: minmax(0, 1fr); }
  .option { height: 128px; }
  .vote-bar .btn-vote { width: 100%; margin-left: 0; }
  .now { grid-template-columns: auto 1fr; }
  .now-side { grid-column: 1 / -1; grid-row: auto; justify-items: start; grid-auto-flow: column; justify-content: start; }
  .now-mob { font-size: 1.5rem; }
  .sun, .moon { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fx, .overlay { display: none; }
}
