/* Layout concept: a council chamber. The hemicycle of seats is the stage; every screen
   is built around it, with the mayor's gold seat at the center and the camps on either side. */
:root {
  --bg: #f3f4fa;
  --surface: #ffffff;
  --surface-2: #e9ebf5;
  --ink: #17183b;
  --muted: #5b5e82;
  --line: #d9dcec;
  --accent: #3b3cd0;
  --on-accent: #ffffff;
  --gold: #c08a1e;
  --gold-ink: #85600f;
  --coal: #0d8a6c;
  --coal-soft: #d9f1ea;
  --opp: #c03a46;
  --opp-soft: #f7dfe1;
  --seat-empty: #cfd3e6;
  --seat-text: #ffffff;
  --shadow: 0 1px 2px rgb(23 24 59 / 0.06), 0 8px 24px rgb(23 24 59 / 0.08);

  --f-display: 'Secular One', 'Rubik', 'Arial Hebrew', system-ui, sans-serif;
  --f-body: 'Rubik', 'Arial Hebrew', system-ui, sans-serif;

  --r-card: 18px;
  --r-pill: 999px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f1030;
    --surface: #18193f;
    --surface-2: #212352;
    --ink: #eef0ff;
    --muted: #a3a6cc;
    --line: #2d2f60;
    --accent: #9496ff;
    --on-accent: #0f1030;
    --gold: #e9b44c;
    --gold-ink: #f0c66e;
    --coal: #34c9a0;
    --coal-soft: #123b3e;
    --opp: #f2707a;
    --opp-soft: #3d1c34;
    --seat-empty: #2f3166;
    --seat-text: #0f1030;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f1030;
  --surface: #18193f;
  --surface-2: #212352;
  --ink: #eef0ff;
  --muted: #a3a6cc;
  --line: #2d2f60;
  --accent: #9496ff;
  --on-accent: #0f1030;
  --gold: #e9b44c;
  --gold-ink: #f0c66e;
  --coal: #34c9a0;
  --coal-soft: #123b3e;
  --opp: #f2707a;
  --opp-soft: #3d1c34;
  --seat-empty: #2f3166;
  --seat-text: #0f1030;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--f-body);
}
[hidden] { display: none !important; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
  padding-block: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100vh;
}
main { display: flex; flex-direction: column; gap: 24px; outline: none; }

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  margin-inline: -16px;
  padding-inline: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 40px; height: 24px; fill: var(--muted); }
.brand-mark .brand-mark-mayor { fill: var(--gold); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font: 400 20px/1.1 var(--f-display); }
.brand-text small { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.top-nav { display: flex; gap: 6px; }
.top-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--r-pill);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px;
}
.top-nav a.active { background: var(--surface-2); }
.top-nav .nav-build { background: var(--accent); color: var(--on-accent); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--opp); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.75); } }

/* ---------- Ticker ---------- */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  margin-inline: -16px;
  background: var(--surface);
  font-size: 14px;
  white-space: nowrap;
}
.ticker-track { display: inline-flex; gap: 48px; padding-block: 8px; animation: ticker 60s linear infinite; }
.ticker-track span { display: inline-flex; gap: 8px; align-items: center; }
.ticker-track b { color: var(--gold-ink); font-weight: 700; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(50%); } }

.demo-banner {
  border: 1px dashed var(--gold);
  color: var(--gold-ink);
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
}

/* ---------- Generic pieces ---------- */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.display { font: 400 clamp(34px, 6vw, 60px)/1.05 var(--f-display); letter-spacing: -0.01em; }
.h2 { font: 400 clamp(24px, 3.4vw, 34px)/1.15 var(--f-display); }
.lead { font-size: clamp(16px, 1.9vw, 19px); color: var(--muted); max-width: 60ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--r-pill); border: 0; cursor: pointer;
  font-weight: 700; font-size: 16px;
  background: var(--accent); color: var(--on-accent);
  transition: transform 0.15s ease, filter 0.15s ease;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.gold { background: var(--gold); color: #1d1606; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.arrow { display: inline-block; transform: scaleX(-1); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}

/* Avatars */
.avatar {
  --c: #456c84;
  position: relative;
  flex: none;
  width: var(--s, 44px); height: var(--s, 44px);
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  display: grid; place-items: center;
  font: 700 calc(var(--s, 44px) * 0.36)/1 var(--f-body);
  overflow: hidden;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.avatar.lg { --s: 72px; }
.avatar.sm { --s: 34px; }

/* ---------- Live screen ---------- */
.live-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; padding-top: 12px; }
.live-hero > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.counter { text-align: center; display: flex; flex-direction: column; align-items: center; }
.counter strong { font: 400 clamp(44px, 7vw, 72px)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.counter span { color: var(--muted); font-size: 14px; }
.counter small { color: var(--muted); font-size: 12px; }

.stage {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 12px 16px;
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.chamber { width: 100%; max-width: 620px; height: auto; display: block; overflow: visible; }
.chamber .seat circle.seat-bg { fill: var(--seat-empty); transition: fill 0.45s ease; }
.chamber .seat.c circle.seat-bg { fill: var(--coal); }
.chamber .seat.o circle.seat-bg { fill: var(--opp); }
.chamber .seat.top circle.seat-ring { stroke: var(--gold); }
.chamber .seat circle.seat-ring { fill: none; stroke: transparent; stroke-width: 3; transition: stroke 0.3s; }
.chamber .seat text { fill: var(--seat-text); font: 700 15px var(--f-body); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.chamber .seat:not(.c):not(.o) text { fill: var(--muted); }
.chamber .seat { transform-box: fill-box; transform-origin: center; }
.chamber .seat.pop { animation: seatPop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes seatPop { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }
.chamber .mayor-seat circle.m-bg { fill: var(--gold); }
.chamber .mayor-seat circle.m-empty { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 6 6; }
.chamber .mayor-seat text { fill: #1d1606; font: 700 22px var(--f-body); text-anchor: middle; dominant-baseline: central; }
.chamber .mayor-seat .crown { color: var(--gold); }
.chamber .majority-line { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 5; }
.chamber .majority-label { fill: var(--muted); font: 600 13px var(--f-body); text-anchor: middle; }
.chamber .camp-label { font: 700 14px var(--f-body); text-anchor: middle; }
.chamber .camp-label.c { fill: var(--coal); }
.chamber .camp-label.o { fill: var(--opp); }
.stage-caption { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend .lc { background: var(--coal); }
.legend .lo { background: var(--opp); }
.legend .lm { background: var(--gold); }

.locked { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 12px 8px 4px; max-width: 46ch; }
.locked .meter { width: min(320px, 100%); height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.locked .meter i { display: block; height: 100%; background: var(--gold); border-radius: 99px; transition: width 0.8s ease; }

.cta-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 18px 20px; border-radius: 20px;
  background: var(--ink); color: var(--bg);
}
.cta-bar strong { font: 400 22px/1.2 var(--f-display); display: block; }
.cta-bar span { opacity: 0.75; font-size: 14px; }
.cta-bar .btn { background: var(--gold); color: #1d1606; }

.board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.board h2 { font: 700 17px/1.3 var(--f-body); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.board h2 small { font-weight: 500; color: var(--muted); font-size: 13px; }
.board .panel { display: flex; flex-direction: column; gap: 14px; }
.mayor-card { display: flex; align-items: center; gap: 14px; }
.mayor-card .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--gold); }
.mayor-card strong { font: 400 24px/1.15 var(--f-display); display: block; }
.mayor-card small { color: var(--muted); }
.big-pct { font: 400 40px/1 var(--f-display); color: var(--gold-ink); font-variant-numeric: tabular-nums; }

.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: 26px auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.row .pos { font-weight: 700; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.row .who { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.row .who strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .who small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .val { text-align: left; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.bar { grid-column: 3 / 5; height: 5px; border-radius: 9px; background: var(--surface-2); overflow: hidden; margin-top: -4px; }
.bar i { display: block; height: 100%; border-radius: 9px; transition: width 0.8s ease; }
.coal .bar i { background: var(--coal); }
.opp .bar i { background: var(--opp); }
.race .bar i { background: var(--gold); }
.trend { font-size: 11px; font-weight: 700; }
.trend.up { color: var(--coal); }
.trend.down { color: var(--opp); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.tag.core { background: var(--coal-soft); color: var(--coal); }
.tag.lead { background: var(--opp-soft); color: var(--opp); }
.method { font-size: 14px; color: var(--muted); }
.method summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.method ul { margin: 8px 0 0; padding-inline-start: 20px; }

/* ---------- Builder ---------- */
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.steps li { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.steps li::before { content: ''; height: 4px; border-radius: 4px; background: var(--line); }
.steps li.done::before, .steps li.now::before { background: var(--accent); }
.steps li.now { color: var(--ink); }
.screen-head { display: flex; flex-direction: column; gap: 8px; }

.group-title { font-size: 14px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 18px 12px 14px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1.5px solid var(--line);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.card strong { font-size: 15px; line-height: 1.25; }
.card small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.card .crown-tag { position: absolute; top: 10px; inset-inline-start: 10px; color: var(--gold); opacity: 0; transition: opacity 0.2s; }
.card:hover .crown-tag { opacity: 1; }

.mayor-strip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.mayor-strip .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold); }
.mayor-strip div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mayor-strip small { color: var(--muted); font-size: 12px; }

.tally { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; font-weight: 600; }
.tally .ok { color: var(--coal); }
.tally .need { color: var(--opp); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: var(--surface-2); font-size: 14px; }

.mode-switch { display: inline-flex; padding: 4px; border-radius: 99px; background: var(--surface-2); align-self: center; }
.mode-switch button { border: 0; background: transparent; padding: 8px 16px; border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.mode-switch button[aria-pressed='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Swipe deck */
.deck-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.deck { position: relative; width: min(340px, 100%); height: 330px; }
.deck-card {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; text-align: center;
  border-radius: 26px; background: var(--surface); border: 1.5px solid var(--line);
  box-shadow: var(--shadow);
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s;
}
.deck-card.under { transform: scale(0.94) translateY(14px); opacity: 0.6; pointer-events: none; }
.deck-card.dragging { transition: none; cursor: grabbing; }
.deck-card .avatar { --s: 108px; font-size: 38px; }
.deck-card strong { font: 400 28px/1.15 var(--f-display); }
.deck-card small { color: var(--muted); }
.deck-card .count { position: absolute; top: 14px; inset-inline-end: 18px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stamp {
  position: absolute; top: 22px; padding: 4px 12px; border-radius: 10px;
  font: 400 22px/1.2 var(--f-display); border: 3px solid; opacity: 0; transform: rotate(-8deg);
}
.stamp.c { right: 18px; color: var(--coal); border-color: var(--coal); transform: rotate(8deg); }
.stamp.o { left: 18px; color: var(--opp); border-color: var(--opp); }
.deck-actions { display: flex; gap: 12px; width: min(340px, 100%); }
.deck-actions .btn { flex: 1; }
.btn.coal { background: var(--coal); color: #fff; }
.btn.opp { background: var(--opp); color: #fff; }
.deck-hint { font-size: 13px; color: var(--muted); text-align: center; }
.deck-done { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 20px; }

/* List mode */
.assign-card { cursor: default; padding-bottom: 12px; }
.assign-card:hover { transform: none; }
.assign-card.c { border-color: var(--coal); background: color-mix(in srgb, var(--coal) 7%, var(--surface)); }
.assign-card.o { border-color: var(--opp); background: color-mix(in srgb, var(--opp) 6%, var(--surface)); }
.seg { display: flex; width: 100%; border-radius: 99px; background: var(--surface-2); padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 99px; padding: 6px 4px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button.on-c { background: var(--coal); color: #fff; }
.seg button.on-o { background: var(--opp); color: #fff; }

.sticky-bar {
  position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px 12px 12px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.sticky-bar .msg { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sticky-bar .msg small { color: var(--muted); font-size: 13px; }
.sticky-bar .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Ranking */
.rank-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rank-col { display: flex; flex-direction: column; gap: 10px; }
.rank-col header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rank-col header h2 { font: 400 24px/1.2 var(--f-display); }
.rank-col.c header h2 { color: var(--coal); }
.rank-col.o header h2 { color: var(--opp); }
.rank-col header small { color: var(--muted); font-size: 13px; }
.sortable { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.s-item {
  display: grid; grid-template-columns: 34px 28px auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
.s-item.dragging { z-index: 5; box-shadow: var(--shadow); border-color: var(--accent); transition: none; }
.s-item.settle { transition: transform 0.2s ease; }
.grip { width: 34px; height: 40px; display: grid; place-items: center; cursor: grab; touch-action: none; border-radius: 10px; color: var(--muted); background: transparent; border: 0; }
.grip:active { cursor: grabbing; }
.s-item .pos { font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.s-item .who { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.s-item .who strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-item .who small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-item .moves { display: flex; gap: 2px; }
.s-item .moves button { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--surface-2); cursor: pointer; font-size: 14px; }
.s-item .moves button:disabled { opacity: 0.35; cursor: default; }
.s-item.core { border-color: color-mix(in srgb, var(--coal) 45%, var(--line)); }
.s-item.leader { border-color: color-mix(in srgb, var(--opp) 45%, var(--line)); }
.error { color: var(--opp); font-weight: 600; }
.turnstile { display: flex; justify-content: center; }

/* ---------- Result ---------- */
.result-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 28px; align-items: center; }
.ring { position: relative; width: 150px; height: 150px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.ring .val { fill: none; stroke: var(--gold); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ring div { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring strong { font: 400 32px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.ring small { display: block; font-size: 12px; color: var(--muted); }
.persona { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.persona .display { color: var(--ink); }
.compare { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.compare li { display: flex; gap: 10px; align-items: flex-start; }
.compare li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 9px; background: var(--muted); }
.compare li.same::before { background: var(--coal); }
.compare li.diff::before { background: var(--opp); }
.result-lists { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgb(8 9 30 / 0.7); }
.modal-box { background: var(--surface); border-radius: 22px; padding: 16px; max-width: 420px; width: 100%; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 32px); overflow: auto; }
.modal-box img { border-radius: 14px; display: block; max-height: 60vh; margin: 0 auto; }
.modal-box p { font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- Footer ---------- */
.foot { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.foot-links { display: flex; gap: 16px; }
.foot a { color: var(--muted); }

/* Embed mode (inside an iframe on a partner page) */
.embed .top, .embed .foot, .embed .ticker { display: none; }
.embed .shell { padding-block: 12px; min-height: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .rank-cols, .result-lists { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .live-hero { grid-template-columns: minmax(0, 1fr); }
  .counter { align-items: flex-start; text-align: start; flex-direction: row; gap: 10px; align-items: baseline; }
  .result-top { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .persona { align-items: center; }
  .top-nav .nav-live { display: none; }
  .brand-text small { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chamber .seat text { font-size: 17px; }
  .sticky-bar { padding: 10px; gap: 8px; }
  .sticky-bar .msg small { display: none; }
  .sticky-bar .actions { width: 100%; flex-wrap: nowrap; }
  .sticky-bar .actions .btn { flex: 1; padding: 0 12px; font-size: 15px; }
}

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