/* 马吉 CV 投票 — palette and type follow the character design deck:
   deep violet ground, cream ink, muted gold; each character brings its own accent. */
:root {
  --ground: #211a31;
  --ground-2: #2c2440;
  --ground-3: #382e52;
  --ink: #f5f0e8;
  --ink-2: rgba(245, 240, 232, .72);
  --ink-3: rgba(245, 240, 232, .48);
  --line: rgba(245, 240, 232, .12);
  --line-2: rgba(245, 240, 232, .22);
  --gold: #c4a96b;
  --gold-2: #e2cb93;
  --seal: #c8463c;
  --ok: #7fc8a9;
  --accent: var(--gold);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; overflow-x: hidden;
  background:
    radial-gradient(1200px 700px at 85% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(900px 600px at -10% 110%, rgba(84, 120, 170, .14), transparent 70%),
    linear-gradient(180deg, var(--ground) 0%, #1b1528 100%);
  background-attachment: fixed;
  transition: background .8s var(--ease);
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }
img { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 11px 22px; font-weight: 600; letter-spacing: .04em; transition: transform .2s var(--ease), background .2s, box-shadow .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2a2135; box-shadow: 0 6px 24px rgba(196, 169, 107, .28); }
.btn-gold:hover { box-shadow: 0 8px 32px rgba(196, 169, 107, .42); }
.btn-gold:disabled { opacity: .35; box-shadow: none; cursor: default; transform: none; }
.btn-ghost { background: rgba(245, 240, 232, .06); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: rgba(245, 240, 232, .12); }
.btn-text { background: none; border: 0; color: var(--ink-2); padding: 6px 4px; }
.btn-text:hover { color: var(--ink); }
.field { width: 100%; background: rgba(245, 240, 232, .06); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 12px 20px; color: var(--ink); font: inherit; font-size: 16px; transition: border-color .2s, background .2s; }
.field::placeholder { color: var(--ink-3); }
.field:focus { outline: none; border-color: var(--gold); background: rgba(245, 240, 232, .1); }

/* ---------- gate (nickname entry) ---------- */
.gate { position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; overflow: hidden; }
.gate-copy { position: relative; z-index: 2; align-self: center; justify-self: center; text-align: center; padding: 48px 20px 0; max-width: 560px; width: 100%; }
.gate-kicker { color: var(--gold); letter-spacing: .32em; font-size: 12px; margin: 0 0 18px; }
.gate h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(64px, 11vw, 132px); letter-spacing: .28em; line-height: 1; margin: 0 0 0 .28em; }
.gate h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(18px, 2.2vw, 24px); letter-spacing: .5em; margin: 18px 0 30px .5em; color: var(--ink-2); }
.gate-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.gate-form .field-code { grid-column: 1 / -1; letter-spacing: .3em; text-transform: uppercase; }
.gate-hint { margin: 14px 0 0; color: var(--ink-3); font-size: 13px; min-height: 1.6em; }
.gate-hint.err { color: #f0a199; }
.gate-switch { margin-top: 6px; }
.lineup { position: relative; z-index: 1; width: 100%; overflow: hidden; height: min(46vh, 27vw, 460px); display: flex; justify-content: center; align-items: flex-end; gap: 0; pointer-events: none; }
.lineup img { height: 100%; width: auto; margin: 0 -2.4%; opacity: 0; transform: translateY(40px); animation: rise .9s var(--ease-out) forwards; }
.lineup img.wide { height: 66%; }
@keyframes rise { to { opacity: 1; transform: none; } }
.gate::after { content: ""; position: absolute; inset: auto 0 0 0; height: 22%; background: linear-gradient(180deg, transparent, #1b1528 85%); z-index: 1; pointer-events: none; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); background: rgba(33, 26, 49, .72); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1320px; margin: 0 auto; padding: 12px clamp(16px, 3vw, 32px); display: flex; align-items: center; gap: 18px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: .3em; white-space: nowrap; color: var(--ink); }
.brand small { font-family: var(--sans); font-weight: 400; letter-spacing: .08em; font-size: 12px; color: var(--ink-3); margin-left: 6px; }
.tabs { display: flex; gap: 4px; background: rgba(245, 240, 232, .05); border-radius: 999px; padding: 4px; }
.tabs a { white-space: nowrap; padding: 6px 16px; border-radius: 999px; color: var(--ink-2); font-size: 14px; text-decoration: none; transition: background .2s, color .2s; }
.tabs a[aria-current="page"] { background: rgba(245, 240, 232, .12); color: var(--ink); }
.spacer { flex: 1; }
.me { position: relative; }
.me-btn { white-space: nowrap; display: flex; align-items: center; gap: 8px; background: rgba(245, 240, 232, .06); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 5px; }
.me-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #2a2135; font-weight: 700; font-size: 13px; }
.me-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: var(--ground-2); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 14px; box-shadow: 0 18px 48px rgba(0, 0, 0, .4); transform-origin: top right; animation: pop .18s var(--ease-out); }
.me-menu p { margin: 0 0 10px; font-size: 13px; color: var(--ink-2); }
.code { font-family: var(--serif); font-size: 26px; letter-spacing: .32em; color: var(--gold-2); margin: 4px 0 10px; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }

/* ---------- lobby ---------- */
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px) 80px; }
.lobby-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 40px 0 28px; }
.lobby-head h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(30px, 3.6vw, 44px); letter-spacing: .12em; margin: 0; line-height: 1.2; }
.lobby-head p { margin: 8px 0 0; color: var(--ink-2); max-width: 46ch; }
.progress { min-width: min(100%, 360px); }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.progress-label b { font-family: var(--serif); font-size: 22px; color: var(--ink); font-weight: 700; }
.segs { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.seg { height: 8px; border-radius: 4px; background: rgba(245, 240, 232, .1); position: relative; overflow: hidden; }
.seg::after { content: ""; position: absolute; inset: 0; background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-out); }
.seg.on::after { transform: scaleX(1); }

.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card { --c: var(--gold); position: relative; aspect-ratio: 3 / 4.4; border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--ink);
  background:
    radial-gradient(120% 70% at 50% 18%, color-mix(in srgb, var(--c) 34%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, var(--ground-2)), var(--ground-2) 70%);
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
  isolation: isolate; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; }
.card:hover { text-decoration: none; transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: 0 18px 50px -12px color-mix(in srgb, var(--c) 55%, transparent); }
.card .art { position: absolute; inset: 6% 0 0; width: 100%; height: 132%; object-fit: cover; object-position: 50% 0; z-index: -1;
  transition: transform .6s var(--ease); filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); }
.card:hover .art { transform: translateY(-8px) scale(1.035); }
.card .shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(25, 19, 38, .82) 78%, rgba(25, 19, 38, .96)); z-index: 0; }
.card .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px 18px; z-index: 1; }
.card .no { font-family: var(--serif); color: var(--c); font-size: 13px; letter-spacing: .2em; }
.card .nm { font-family: var(--serif); font-weight: 900; font-size: 26px; letter-spacing: .18em; line-height: 1.15; margin: 2px 0 4px; }
.card .vt { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .state { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; align-items: center; gap: 6px; font-size: 12px;
  background: rgba(25, 19, 38, .6); backdrop-filter: blur(8px); padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); }
.card .state.todo { padding: 4px 10px; color: var(--ink-2); }
.card .state img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.card .seal-mini { position: absolute; top: 12px; left: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--seal); color: var(--seal);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 900; font-size: 13px; transform: rotate(-12deg); background: rgba(255, 240, 230, .08); }
.card.feature { grid-column: span 2; aspect-ratio: auto; }
.card.feature .art { inset: 0 -4% 0 auto; width: 58%; height: 150%; object-position: 50% 0; }
.card.feature .shade { background: linear-gradient(90deg, rgba(25, 19, 38, .9) 0%, rgba(25, 19, 38, .55) 46%, transparent 70%); }
.card.feature .meta { top: 0; right: 42%; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; }
.card.feature .nm { font-size: 44px; letter-spacing: .3em; }
.card.feature .vt { -webkit-line-clamp: 4; font-size: 13.5px; }
.card.feature .role { font-size: 12px; color: var(--gold); letter-spacing: .2em; margin-bottom: 6px; }
.stagger > * { opacity: 0; transform: translateY(18px); animation: rise .7s var(--ease-out) forwards; }

/* ---------- character page ---------- */
.char { --c: var(--gold); display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; gap: clamp(20px, 3vw, 44px); padding-top: 24px; }
.char-side { position: sticky; top: 76px; align-self: start; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14px; margin-bottom: 12px; }
.back:hover { color: var(--ink); text-decoration: none; }
.stage { position: relative; height: min(64vh, 640px); border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 38%, color-mix(in srgb, var(--c) 45%, transparent), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, var(--ground-2)), var(--ground) 92%);
  border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.stage .art { position: absolute; left: 50%; bottom: 0; height: 95%; width: auto; max-width: none; transform: translateX(-50%);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .45)); animation: artIn .9s var(--ease-out) both; }
.stage .art.wide { height: auto; width: 128%; bottom: -6%; }
@keyframes artIn { from { opacity: 0; transform: translateX(-50%) translateY(30px) scale(.98); } }
.stage .vno { position: absolute; top: 18px; left: 22px; font-family: var(--serif); font-size: 64px; font-weight: 900; line-height: 1; color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--c) 70%, transparent); }
.title-block { margin-top: 18px; }
.title-block .role { color: var(--c); font-size: 13px; letter-spacing: .2em; }
.title-block h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(40px, 4.6vw, 60px); letter-spacing: .26em; margin: 4px 0 0; line-height: 1.1; }
.title-block .romaji { font-family: var(--serif); letter-spacing: .4em; color: var(--ink-3); font-size: 13px; margin-top: 6px; }
.title-block .who { margin-top: 10px; color: var(--ink-2); }

.panel { background: rgba(44, 36, 64, .55); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 2vw, 26px); }
.panel + .panel { margin-top: 16px; }
.panel h3 { font-family: var(--serif); font-size: 15px; font-weight: 700; letter-spacing: .14em; margin: 0 0 10px; color: var(--ink); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.fact .k { font-size: 12px; color: var(--ink-3); letter-spacing: .1em; }
.fact .v { margin-top: 2px; }
.voice-want { grid-column: 1 / -1; background: color-mix(in srgb, var(--c) 12%, transparent); border-radius: var(--r-md); padding: 12px 16px; }
.voice-want .v { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: rgba(245, 240, 232, .07); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
a.chip:hover { color: var(--ink); border-color: var(--line-2); text-decoration: none; }

/* candidates */
.cand-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cand-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 900; letter-spacing: .1em; margin: 0 auto 0 0; }
.cand-head .field { width: 200px; padding: 8px 16px; font-size: 14px; }
.select { background: rgba(245, 240, 232, .06); border: 1px solid var(--line-2); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; }
.select option { background: var(--ground-2); }
.cands { display: grid; gap: 10px; }
.cand { --sel: 0; position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 4px 14px; align-items: center; padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(245, 240, 232, .035); border: 1px solid var(--line); cursor: pointer; transition: background .2s, border-color .2s, transform .2s var(--ease); }
.cand:hover { background: rgba(245, 240, 232, .07); }
.cand[aria-checked="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); box-shadow: 0 0 0 1px var(--c) inset; }
.cand .av { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; grid-row: span 2; border: 2px solid transparent; transition: border-color .2s; }
.cand[aria-checked="true"] .av { border-color: var(--c); }
.cand .line1 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cand .nm { font-weight: 700; font-size: 16px; }
.cand .ok { color: var(--ok); font-size: 12px; }
.cand .line2 { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 0; }
.cand .pick { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; transition: border-color .2s, background .2s; }
.cand[aria-checked="true"] .pick { border-color: var(--c); background: var(--c); }
.cand[aria-checked="true"] .pick::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ground); }
.tag { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px; white-space: nowrap; }
.tag.r18 { background: rgba(232, 96, 140, .16); color: #f3a6c0; }
.tag.all { background: rgba(127, 200, 169, .14); color: #9fdcc0; }
.tag.unk { background: rgba(245, 240, 232, .08); color: var(--ink-3); }
.fee { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.fee b { color: var(--ink); font-weight: 600; }

.play { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: rgba(245, 240, 232, .05); border-radius: 999px;
  padding: 3px 12px 3px 3px; font-size: 12.5px; color: var(--ink-2); max-width: 100%; min-width: 0; transition: border-color .2s, background .2s; }
.play:hover { border-color: var(--c); color: var(--ink); }
.play .knob { --p: 0; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--ground);
  background: conic-gradient(var(--c) calc(var(--p) * 1turn), rgba(245, 240, 232, .55) 0); }
.play .knob svg { width: 12px; height: 12px; }
.play .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play.on { border-color: var(--c); color: var(--ink); }
.more { grid-column: 2 / -1; overflow: hidden; }
.more-in { padding-top: 10px; display: grid; gap: 12px; }
.more h4 { margin: 0 0 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: .1em; }
.samples { display: flex; flex-wrap: wrap; gap: 6px; }
.games { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.games li { display: flex; gap: 8px; align-items: baseline; }
.games li span.t { min-width: 0; }
.games .b { color: var(--ink-3); font-size: 12px; }
.expand { font-size: 12.5px; color: var(--ink-3); background: none; border: 0; padding: 2px 0; }
.expand:hover { color: var(--ink); }
.empty { color: var(--ink-3); text-align: center; padding: 30px 0; }

.votebar { position: sticky; bottom: 16px; z-index: 20; margin-top: 16px; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 999px;
  background: rgba(44, 36, 64, .92); backdrop-filter: blur(12px); border: 1px solid var(--line-2); box-shadow: 0 18px 48px rgba(0, 0, 0, .45); }
.votebar .who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--ink-2); font-size: 14px; }
.votebar .who img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.votebar .who b { color: var(--ink); }
.votebar .hint { font-size: 12px; color: var(--ink-3); }

/* results */
.res-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.res-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 900; letter-spacing: .1em; margin: 0; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(127, 200, 169, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(127, 200, 169, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 200, 169, 0); } }
.mine { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--c) 12%, transparent); margin-bottom: 16px; }
.mine img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c); }
.mine .k { font-size: 12px; color: var(--ink-3); }
.mine .v { font-weight: 700; font-size: 16px; }
.bars { display: grid; gap: 8px; }
.bar { position: relative; display: grid; grid-template-columns: 22px 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: var(--r-md);
  background: rgba(245, 240, 232, .035); border: 1px solid var(--line); overflow: hidden; isolation: isolate; text-align: left; width: 100%; }
.bar .fill { position: absolute; inset: 0 auto 0 0; width: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 42%, transparent), color-mix(in srgb, var(--c) 18%, transparent));
  transition: width 1.1s var(--ease-out); }
.bar.me { border-color: var(--gold); }
.bar .rank { font-family: var(--serif); color: var(--ink-3); font-weight: 700; text-align: center; }
.bar .rank.top { color: var(--gold-2); }
.bar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.bar .nm { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .mine-tag { font-size: 11px; color: var(--gold-2); border: 1px solid var(--gold); border-radius: 999px; padding: 0 7px; margin-left: 6px; font-weight: 500; }
.bar .num { text-align: right; font-variant-numeric: tabular-nums; }
.bar .num b { font-family: var(--serif); font-size: 20px; }
.bar .num small { display: block; font-size: 11.5px; color: var(--ink-3); }
/* each result row can be played and expanded for side-by-side comparison */
.bar { cursor: pointer; align-items: start; }
.bar > img, .bar > .rank, .bar > .num { align-self: center; }
.bar .main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bar .listen { display: flex; min-width: 0; }
.bar .listen .play { max-width: 100%; }
.bar.open { border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.bar-more { grid-column: 3 / -1; justify-self: start; background: none; border: 0; padding: 0; font-size: 12.5px; color: var(--ink-3); }
.bar-more:hover { color: var(--ink); }
.bar .details { grid-column: 3 / -1; display: grid; gap: 10px; padding-bottom: 2px; }
.voters { font-size: 12.5px; color: var(--ink-2); }

/* the stamp: the single orchestrated moment after a vote */
.stamp { position: absolute; left: 72%; top: 70%; z-index: 5; width: 168px; height: 168px; margin: -84px 0 0 -84px; border-radius: 50%;
  border: 5px double var(--seal); color: var(--seal); display: grid; place-items: center; text-align: center; font-family: var(--serif);
  background: radial-gradient(circle, rgba(255, 238, 226, .92), rgba(255, 228, 214, .86)); box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  transform: rotate(-14deg); animation: stamp .75s cubic-bezier(.3, 1.6, .5, 1) both; pointer-events: none; }
.stamp b { display: block; font-size: 44px; font-weight: 900; letter-spacing: .14em; line-height: 1; margin-left: .14em; }
.stamp span { display: block; font-size: 13px; letter-spacing: .1em; margin-top: 8px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-30deg) scale(2.4); } 60% { opacity: 1; transform: rotate(-12deg) scale(.94); } 100% { transform: rotate(-14deg) scale(1); } }
.stage.shake { animation: shake .4s .42s; }
@keyframes shake { 20% { transform: translate(-3px, 2px); } 40% { transform: translate(3px, -2px); } 60% { transform: translate(-2px, 1px); } 80% { transform: translate(1px, 0); } }

/* overview */
.ov { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ov-item { --c: var(--gold); display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: rgba(44, 36, 64, .55);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .25s, transform .25s var(--ease); }
.ov-item:hover { text-decoration: none; border-color: color-mix(in srgb, var(--c) 55%, transparent); transform: translateY(-2px); }
.ov-face { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--c) 30%, var(--ground-2)); }
.ov-face img { width: 100%; height: 300%; object-fit: cover; object-position: 50% 0; }
.ov-item.wide-art .ov-face img { height: 160%; }
.ov-name { font-family: var(--serif); font-weight: 900; font-size: 18px; letter-spacing: .14em; }
.ov-sub { font-size: 12.5px; color: var(--ink-3); }
.ov-lead { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
.ov-lead img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.ov-stack { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 10px; background: rgba(245, 240, 232, .08); }
.ov-stack i { display: block; height: 100%; transition: width 1s var(--ease-out); }
.ov-lock { margin-top: 8px; font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }

/* dialogs & toasts */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(15, 11, 22, .62); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.dialog { width: min(440px, 100%); background: var(--ground-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: pop .25s var(--ease-out); }
.dialog h3 { font-family: var(--serif); font-size: 20px; letter-spacing: .08em; margin: 0 0 10px; }
.dialog p { color: var(--ink-2); margin: 0 0 18px; }
.dialog .row { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-who { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; padding: 12px; border-radius: var(--r-md); background: rgba(245, 240, 232, .05); }
.confirm-who img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--ground); padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: pop .25s var(--ease-out); }
.toast.err { background: #f0a199; }

.loading { min-height: 60vh; display: grid; place-items: center; color: var(--ink-3); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 980px) {
  .char { grid-template-columns: 1fr; }
  .char-side { position: static; }
  .stage { height: 56vh; }
}
@media (max-width: 860px) { .grid { grid-template-columns: repeat(3, 1fr); } .card.feature .nm { font-size: 34px; } }
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card .nm { font-size: 21px; }
  .card.feature { aspect-ratio: 3 / 2.4; }
  .card.feature .meta { right: 38%; padding: 16px; }
  .brand small, .me-name { display: none; }
  .me-btn { padding: 4px; }
  .tabs a { padding: 6px 12px; }
  .card.feature .vt { -webkit-line-clamp: 3; }
  .lobby-head { padding-top: 26px; }
  .topbar-in { gap: 10px; }
  .cand { grid-template-columns: 44px 1fr auto; }
  .cand .av { width: 44px; height: 44px; }
  .cand-head .field { width: 100%; order: 3; }
  .facts { grid-template-columns: 1fr; }
  .gate-form { grid-template-columns: 1fr; }
  .lineup img { margin: 0 -4.5%; }
  .bar { grid-template-columns: 18px 34px 1fr auto; gap: 8px; }
  .bar img { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ---------- team password lock ---------- */
.lock { grid-template-rows: 1fr; }
.lock .gate-copy { padding-bottom: 12vh; }
.lock-seal { width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 50%; border: 4px double var(--seal); color: var(--seal);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 900; font-size: 34px;
  background: radial-gradient(circle, rgba(255, 238, 226, .92), rgba(255, 228, 214, .82)); transform: rotate(-10deg);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35); animation: stamp .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.lock-seal.open { animation: unseal .42s var(--ease) forwards; }
@keyframes unseal { to { opacity: 0; transform: rotate(8deg) scale(1.35); } }
.gate-form.nope { animation: nope .38s; }
@keyframes nope { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* candidates from the 35-person casting list */
.tag.list { background: rgba(196, 169, 107, .16); color: var(--gold-2); font-weight: 500; }
a.play { text-decoration: none; }
a.play:hover { text-decoration: none; }
.pdf-note { font-size: 13px; color: var(--ink-2); line-height: 1.6; max-width: 62ch; }

/* results rows carry the same badges and works list as the ballot */
.bar .nm-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.bar .nm-line .nm { flex: 0 1 auto; }
.bar .ok { color: var(--ok); font-size: 12px; }
.bar .listen { flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bar .details h4 { margin: 0 0 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: .1em; }
.bar .details .games { font-size: 13px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.shortlist-note { flex-basis: 100%; order: 10; margin: 0; font-size: 13px; color: var(--ink-3); }

/* switch between voting rounds */
.rounds { display: flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); }
.rounds a { padding: 4px 12px; border-radius: 999px; font-size: 13px; color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.rounds a:hover { color: var(--ink); text-decoration: none; }
.rounds a[aria-current="page"] { background: var(--gold); color: #2a2135; font-weight: 600; }
@media (max-width: 640px) { .rounds a { padding: 4px 9px; font-size: 12px; } }
