:root {
  --paper: #171b22;
  --paper-deep: #0f1319;
  --ink: #eceff4;
  --ink-soft: #b9c1cc;
  --accent: #d31734;
  --accent-deep: #9d1127;
  --line: rgba(236, 239, 244, 0.26);
  --line-soft: rgba(236, 239, 244, 0.12);
  --surface-1: rgba(18, 23, 30, 0.9);
  --surface-2: rgba(26, 32, 40, 0.92);
  --surface-3: rgba(34, 40, 50, 0.94);
  --surface-tint: rgba(211, 23, 52, 0.2);
  --surface-tint-strong: rgba(211, 23, 52, 0.34);
  --ok: #3ccf81;
  --warn: #f0c14b;
  --err: #ff6f7f;
  --hero-poster: none;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 30px;
  --space-8: 40px;

  --section-gap: 18px;
  --panel-gap: 12px;
  --inset-x: 14px;
  --inset-y: 14px;
  --hairline-opacity: 0.28;

  --content-max-mobile: 430px;
  --content-max-tablet: 920px;
  --faceoff-max-height-vh: 140;

  --masthead-min: 2.8rem;
  --masthead-max: 6.8rem;
  --body-min: 0.95rem;
  --body-max: 1.08rem;
  --vote-card-min-height: 148px;
  --chart-row-height: 96px;
  --leaderboard-bar-max-height: 220px;
  --section-padding: 14px;
  --cards-per-row-mobile: 2;
  --cards-per-row-tablet: 2;

  --topbar-height: 76px;
  --footer-height: 56px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper-deep);
}

body {
  color: var(--ink);
  font-family: "Bebas Neue", "Oswald", "Arial Narrow", sans-serif;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, var(--paper), var(--paper-deep));
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  display: block;
  background:
    radial-gradient(circle at 12% 9%, rgba(211, 23, 52, 0.22), transparent 34%),
    radial-gradient(circle at 87% 15%, rgba(90, 101, 118, 0.25), transparent 36%);
}

body::after {
  z-index: -1;
  display: block;
  opacity: 0.24;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

.bg-rotator {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  display: none;
}

.bg-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) blur(5px);
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.55s ease;
}

.bg-frame.active {
  opacity: 0.18;
}

.app-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--paper), var(--paper-deep));
}

.phone-viewport {
  width: 100%;
  min-height: 100svh;
  display: grid;
  grid-template-rows:
    calc(var(--topbar-height) + env(safe-area-inset-top))
    minmax(0, 1fr)
    calc(var(--footer-height) + env(safe-area-inset-bottom));
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, rgba(14, 18, 24, 0.98), rgba(10, 14, 19, 0.99));
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  height: var(--topbar-height);
  padding: calc(env(safe-area-inset-top) + var(--space-2)) var(--inset-x) var(--space-2);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 20, 26, 0.97), rgba(23, 28, 35, 0.94));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
  z-index: 4;
}

.topbar-bars {
  display: grid;
  align-content: center;
  gap: 6px;
  justify-items: center;
}

.topbar-bars span {
  display: block;
  height: 26px;
  width: clamp(64px, 22vw, 132px);
  border: 1px solid rgba(236, 239, 244, 0.2);
  background: linear-gradient(90deg, #2a313b, #3a4350);
}

.topbar-bars span:last-child {
  width: clamp(58px, 18vw, 108px);
  transform: translateX(10px);
}

.wordmark {
  margin: 0;
  line-height: 0.88;
  letter-spacing: 0.04em;
  font-size: clamp(2.1rem, 9.2vw, 4.1rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.badge {
  border: 1px solid var(--line);
  background: var(--surface-3);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.big {
  font-size: 0.87rem;
}

.slide-track {
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
}

.slide-track::-webkit-scrollbar {
  display: none;
}

.slide {
  min-width: 100%;
  min-height: 0;
  height: 100%;
  padding: var(--section-padding) var(--section-padding);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-align: start;
  scroll-padding-top: var(--space-3);
  touch-action: pan-y;
}

.slide::-webkit-scrollbar {
  width: 6px;
}

.slide::-webkit-scrollbar-thumb {
  background: rgba(236, 239, 244, 0.22);
}

.scene-content {
  width: min(100%, var(--content-max-mobile));
  margin: 0 auto;
  display: grid;
  gap: var(--section-gap);
  align-content: start;
  padding-bottom: var(--space-6);
}

.scene-header,
.scene-body,
.scene-footer,
.section-stack {
  display: grid;
  gap: var(--panel-gap);
}

.hero-scene .scene-content {
  gap: var(--space-4);
}

.hero-ticket {
  width: fit-content;
  padding: 4px 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

.runway-masthead {
  margin: 0;
  line-height: 0.84;
  letter-spacing: 0.03em;
  font-size: clamp(var(--masthead-min), 20vw, var(--masthead-max));
  text-wrap: balance;
}

.hero-underbar {
  height: 12px;
  width: min(62vw, 260px);
  background: var(--accent);
}

.hero {
  position: relative;
  min-height: 0;
  aspect-ratio: 9 / 16;
  border: 2px solid rgba(236, 239, 244, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.38),
    0 18px 36px rgba(0, 0, 0, 0.35);
  background: #0f141b;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #070a0f;
  filter: grayscale(1) contrast(1.05);
}

.mono-hero .hero img {
  filter: grayscale(1) contrast(1.16) brightness(0.92);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.14)),
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.2), transparent 22%);
  pointer-events: none;
}

.hero-action {
  display: grid;
}

.hero-cta {
  display: inline-flex;
  margin-top: var(--space-1);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1rem;
}

.meta-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--surface-tint);
}

.meta-strip span {
  padding: 8px 6px;
  text-align: center;
  border-right: 1px solid var(--line);
  font-size: 0.82rem;
}

.meta-strip span:last-child {
  border-right: 0;
}

h2,
h3 {
  margin: 0;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.03em;
}

h4 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

h3 {
  font-size: clamp(1.68rem, 6.7vw, 2.7rem);
}

.section-title {
  font-size: clamp(1.4rem, 5.4vw, 2.1rem);
}

.muted {
  margin: 0;
  color: var(--ink-soft);
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: clamp(var(--body-min), 2.2vw, var(--body-max));
  letter-spacing: 0.01em;
  line-height: 1.42;
  text-wrap: pretty;
}

.faceoff-title {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: var(--space-3);
}

.faceoff-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.scene-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: rgba(14, 18, 24, 0.95);
}

[data-sticky-scene-tabs="false"] .scene-tabs {
  position: static;
}

[data-enable-scene-tabs="false"] .scene-tabs {
  display: none;
}

.scene-tab {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  border-right: 1px solid var(--line-soft);
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.84rem;
  text-decoration: none;
  background: rgba(236, 239, 244, 0.05);
}

.scene-tab:last-child {
  border-right: 0;
}

.scene-tab.active {
  color: var(--ink);
  background: var(--surface-tint-strong);
}

.faceoff-combined .scene-content {
  min-height: 100%;
}

[data-flow-mode="mobile-command"] .faceoff-combined .scene-content {
  width: min(100%, var(--content-max-mobile));
}

.vote-live-shell {
  display: grid;
  gap: var(--section-gap);
  align-content: start;
}

[data-faceoff-layout="single-column"] .faceoff-combined .vote-live-shell {
  grid-template-columns: 1fr;
}

.command-stack {
  padding-bottom: var(--space-7);
}

#command-vote,
#command-board {
  scroll-margin-top: 62px;
}

.command-intro {
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: var(--space-3);
}

.command-block {
  border: 1px solid var(--line);
  background: var(--surface-1);
  padding: var(--space-3);
  min-height: auto;
}

.auth-block,
.vote-block {
  gap: var(--space-3);
}

.command-heading {
  display: grid;
  gap: var(--space-2);
}

.vote-live-board {
  display: grid;
  gap: var(--panel-gap);
}

.faceoff-combined .leader {
  font-size: clamp(1rem, 4.2vw, 1.26rem);
  margin-bottom: var(--space-2);
}

[data-compact-leader-row="false"] .faceoff-combined .leader {
  font-size: clamp(1.18rem, 4.8vw, 1.55rem);
}

.faceoff-combined .bars {
  height: clamp(148px, 23vh, var(--leaderboard-bar-max-height));
}

.section-title.compact {
  font-size: clamp(1.25rem, 5vw, 1.62rem);
  line-height: 0.94;
}

input,
button,
select {
  width: 100%;
  font-family: "Inter", sans-serif;
}

input,
select {
  border: 1px solid var(--line);
  background: var(--surface-3);
  color: var(--ink);
  border-radius: 0;
  padding: 13px 12px;
  font-size: 16px;
  line-height: 1.2;
}

input::placeholder,
select::placeholder {
  color: rgba(236, 239, 244, 0.62);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px rgba(34, 40, 50, 0.98) inset;
  box-shadow: 0 0 0 1000px rgba(34, 40, 50, 0.98) inset;
  transition: background-color 9999s ease-out 0s;
  caret-color: var(--ink);
}

button {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 13px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.06rem;
  font-family: "Bebas Neue", "Oswald", sans-serif;
  cursor: pointer;
}

button.secondary {
  background: rgba(236, 239, 244, 0.12);
  color: var(--ink);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
.progress-dot:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

.status {
  margin: 0;
  font-size: 0.94rem;
  min-height: 1.1em;
}

.status[data-type="success"] { color: var(--ok); }
.status[data-type="warn"] { color: var(--warn); }
.status[data-type="error"] { color: var(--err); }

.crew-grid {
  display: grid;
  grid-template-columns: repeat(var(--cards-per-row-mobile), minmax(0, 1fr));
  gap: var(--space-3);
}

.crew-card {
  position: relative;
  min-height: var(--vote-card-min-height);
  border: 1px solid var(--line);
  overflow: hidden;
  text-align: left;
  display: flex;
  align-items: end;
  padding: 12px;
}

.crew-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.07);
}

.crew-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.73));
}

.crew-card-content {
  position: relative;
  z-index: 1;
  color: #f3f3f3;
}

.crew-card h3 {
  margin: 0;
  font-size: clamp(1.55rem, 6vw, 2.15rem);
}

.crew-card p {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.vote-badge {
  display: inline-block;
  margin-top: var(--space-2);
  border: 1px solid rgba(236, 239, 244, 0.46);
  background: rgba(12, 16, 22, 0.58);
  padding: 3px 8px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.vote-badge.picked {
  background: var(--surface-tint-strong);
}

.vote-badge.locked {
  opacity: 0.85;
}

.crew-card.selected {
  box-shadow: inset 0 0 0 2px rgba(211, 23, 52, 0.94);
}

#vote-confirmation {
  border: 1px solid var(--line);
  background: var(--surface-tint);
  padding: var(--space-3);
}

.ticker-line {
  border-top: 1px solid rgba(236, 239, 244, var(--hairline-opacity));
  border-bottom: 1px solid rgba(236, 239, 244, var(--hairline-opacity));
  background: var(--surface-tint);
  padding: 7px 9px;
  font-size: 0.87rem;
  letter-spacing: 0.12em;
}

.hype-meter,
.runway-board,
.trend-board,
.diag,
.scene-item {
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.hype-meter,
.runway-board,
.trend-board {
  padding: var(--space-3);
}

.hype-track {
  width: 100%;
  height: 12px;
  background: rgba(236, 239, 244, 0.14);
}

.hype-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7f0b21, var(--accent));
  transition: width 0.25s linear;
}

.hype-meta {
  margin-top: var(--space-2);
  display: flex;
  justify-content: space-between;
  font-family: "Inter", sans-serif;
  font-size: 0.86rem;
}

.leader {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1;
}

.leader span {
  min-width: 0;
}

.live-shell .leader,
.admin-shell .leader {
  font-size: clamp(1.25rem, 4.8vw, 1.8rem);
}

.bars {
  height: clamp(190px, 34vh, var(--leaderboard-bar-max-height));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: var(--space-3);
}

.bar-wrap {
  position: relative;
  min-height: 108px;
  padding: var(--space-2);
  border: 1px solid var(--line);
  background: var(--surface-3);
  display: grid;
  align-content: end;
  gap: var(--space-2);
}

.bar-wrap.leader-wrap {
  border-color: rgba(211, 23, 52, 0.72);
  background: var(--surface-tint);
}

.bar-wrap .crown {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
}

.bar-wrap.leader-wrap .crown {
  opacity: 1;
}

.bar {
  width: 100%;
  min-height: 10%;
  background: linear-gradient(180deg, #5d6777, #2a323f);
  transition: height 0.22s linear;
}

.bar-wrap:nth-child(1) .bar {
  background: linear-gradient(180deg, #f06b82, #a00f2a);
}

.bar-wrap:nth-child(2) .bar {
  background: linear-gradient(180deg, #ff8fa0, #b51735);
}

.bar-wrap:nth-child(3) .bar {
  background: linear-gradient(180deg, #f2f4f7, #7f8a9b);
}

.bar-wrap:nth-child(4) .bar {
  background: linear-gradient(180deg, #bac2cf, #5b6575);
}

.bar-meta {
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.2;
}

.bar-delta {
  display: block;
  margin-top: 2px;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
}

.trend-row {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-bottom: 1px solid var(--line-soft);
  min-height: var(--chart-row-height);
  align-content: center;
}

.trend-row:last-child {
  border-bottom: 0;
}

.trend-row.leader-row {
  background: var(--surface-tint);
}

.trend-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  line-height: 1;
}

.trend-label span {
  font-family: "Inter", sans-serif;
  font-size: 0.86rem;
}

.sparkline {
  height: 34px;
}

.sparkline svg {
  width: 100%;
  height: 100%;
  display: block;
}

.spark-grid {
  stroke: rgba(236, 239, 244, 0.22);
  stroke-width: 1;
}

.spark-line {
  fill: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.spark-line.leader {
  filter: drop-shadow(0 0 0.8px rgba(211, 23, 52, 0.95));
}

.compact-trend-board {
  padding: 0;
  overflow: hidden;
}

.trend-heading {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: rgba(236, 239, 244, 0.04);
}

.compact-trend-board .trend-row {
  min-height: 72px;
  padding: 10px 12px;
}

.compact-trend-board .trend-label {
  font-size: clamp(1rem, 4.4vw, 1.35rem);
}

.compact-trend-board .sparkline {
  height: 26px;
}

.gallery-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 78%);
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

.gallery-card {
  min-height: 160px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.gallery-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(211, 23, 52, 0.25) 0 24%, transparent 24% 100%);
  pointer-events: none;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

.gallery-fallback {
  background: repeating-linear-gradient(45deg, rgba(211, 23, 52, 0.35), rgba(211, 23, 52, 0.35) 10px, rgba(236, 239, 244, 0.16) 10px, rgba(236, 239, 244, 0.16) 20px);
}

.progress-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  height: 100%;
  padding: 0 var(--inset-x) var(--space-2);
  border-top: 1px solid rgba(236, 239, 244, var(--hairline-opacity));
  background: linear-gradient(180deg, rgba(14, 18, 24, 0.3), rgba(14, 18, 24, 0.82));
}

.progress-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(236, 239, 244, 0.32);
  padding: 0;
  cursor: pointer;
}

.progress-dot.active {
  width: 20px;
  background: var(--accent-deep);
}

.round-ribbon {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 7;
  padding: 7px 10px;
  border: 1px solid rgba(236, 239, 244, 0.42);
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-size: 0.76rem;
  letter-spacing: 0.09em;
}

.lead-toast {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%) translateY(130%);
  z-index: 10;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  transition: transform 0.18s linear;
}

.lead-toast.show {
  transform: translateX(-50%) translateY(0);
}

.pulse-hit {
  animation: pulse-hit 0.45s steps(4, end);
}

@keyframes pulse-hit {
  0% { filter: contrast(1); }
  40% { filter: contrast(1.25); }
  100% { filter: contrast(1); }
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.confetti {
  --drift: 0px;
  position: absolute;
  top: -20px;
  width: 6px;
  height: 14px;
  border: 1px solid rgba(236, 239, 244, 0.2);
  background: linear-gradient(180deg, #f8f7f2, var(--accent));
  animation: paper-fall 1.1s linear forwards;
}

@keyframes paper-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  7% { opacity: 1; }
  100% { transform: translate(var(--drift), 112vh) rotate(500deg); opacity: 0; }
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.scene-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3);
}

.scene-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.diagnostics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.diag {
  padding: var(--space-3);
}

.diag-label {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.diag-value {
  display: block;
  margin-top: var(--space-1);
  font-size: 1rem;
}

.admin-shell .scene-content {
  background: rgba(10, 14, 19, 0.28);
}

.admin-shell .scene-header,
.admin-shell .scene-body {
  border: 1px solid rgba(236, 239, 244, 0.18);
  background: linear-gradient(180deg, rgba(18, 23, 30, 0.96), rgba(13, 18, 24, 0.98));
  padding: var(--space-3);
}

.admin-shell #admin-auth-panel,
.admin-shell .diagnostics,
.admin-shell .scene-grid {
  min-width: 0;
}

.admin-shell input,
.admin-shell select {
  background: rgba(34, 40, 50, 0.98);
  color: var(--ink);
  border-color: rgba(236, 239, 244, 0.26);
}

.admin-shell button.secondary {
  background: rgba(236, 239, 244, 0.08);
  color: var(--ink);
  border-color: rgba(236, 239, 244, 0.22);
}

.admin-shell .muted,
.admin-shell .diag-label {
  color: #c5ced9;
}

.admin-shell .diag-value,
.admin-shell .scene-item span,
.admin-shell .leader strong,
.admin-shell .leader {
  color: #f3f6fb;
}

.spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(108deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 64%);
  transform: translateX(-120%);
}

.spotlight.sweep {
  animation: spotlight-sweep 0.9s linear;
}

@keyframes spotlight-sweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(130%); }
}

.live-stage {
  position: relative;
}

.live-stage.cinematic {
  animation: cinematic-beat 0.8s steps(3, end);
}

@keyframes cinematic-beat {
  0% { filter: contrast(1); }
  50% { filter: contrast(1.12); }
  100% { filter: contrast(1); }
}

.stinger {
  position: fixed;
  inset: 0;
  z-index: 14;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-size: clamp(2rem, 10vw, 6rem);
  letter-spacing: 0.12em;
  color: #fff;
  background: radial-gradient(circle, rgba(211, 23, 52, 0.55), rgba(0, 0, 0, 0.78));
  opacity: 0;
  transition: opacity 0.14s linear;
}

.stinger.show {
  opacity: 1;
}

.hidden {
  display: none !important;
}

@media (min-width: 700px) {
  .scene-content {
    width: min(100%, var(--content-max-tablet));
  }

  .crew-grid {
    grid-template-columns: repeat(var(--cards-per-row-tablet), minmax(0, 1fr));
  }

  .gallery-rail {
    grid-auto-columns: minmax(220px, 34%);
  }

  .faceoff-combined .bars {
    height: clamp(156px, 22vh, 210px);
  }

  .faceoff-combined .trend-row {
    padding: var(--space-2) var(--space-3);
  }

  .faceoff-combined .trend-label {
    font-size: clamp(1.08rem, 2.2vw, 1.35rem);
  }

  .faceoff-combined .sparkline {
    height: 26px;
  }

  .compact-trend-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-trend-board .trend-row {
    border-bottom: 0;
    border-right: 1px solid var(--line-soft);
    border-top: 1px solid var(--line-soft);
  }

  .compact-trend-board .trend-row:nth-of-type(even) {
    border-right: 0;
  }

  .compact-trend-board .trend-row:nth-of-type(-n + 2) {
    border-top: 0;
  }
}

@media (min-width: 980px) {
  .app-shell {
    padding: 20px;
  }

  .phone-viewport {
    width: min(430px, 100%);
    min-height: min(900px, calc(100svh - 40px));
    border: 1px solid rgba(236, 239, 244, 0.2);
    box-shadow:
      0 30px 60px rgba(0, 0, 0, 0.48),
      0 0 0 8px rgba(9, 12, 17, 0.38);
    background: linear-gradient(180deg, rgba(14, 18, 24, 0.92), rgba(10, 14, 19, 0.94));
    border-radius: 34px;
    overflow: hidden;
  }

  .phone-viewport::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 124px;
    height: 28px;
    border: 1px solid rgba(236, 239, 244, 0.2);
    background: rgba(8, 11, 16, 0.92);
    z-index: 8;
  }

  .topbar {
    padding-top: 18px;
  }

  body.no-phone-frame .phone-viewport {
    width: min(1120px, 100%);
    min-height: calc(100svh - 40px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  body.no-phone-frame .phone-viewport::before {
    display: none;
  }

  body.no-phone-frame .scene-content {
    width: min(100%, 980px);
  }
}

@media (min-width: 1200px) {
  body.no-phone-frame[data-allow-mid-width-split="true"] .faceoff-combined .vote-live-shell {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

@media (max-width: 420px) {
  :root {
    --topbar-height: 70px;
    --footer-height: 52px;
  }

  .topbar {
    grid-template-columns: auto auto;
  }

  .topbar-bars {
    display: none;
  }

  .faceoff-title,
  .leader {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .scene-grid,
  .diagnostics {
    grid-template-columns: 1fr;
  }

  .bars {
    height: clamp(180px, 32vh, 250px);
    gap: var(--space-2);
  }

  .faceoff-combined .bars {
    height: clamp(132px, 19vh, 170px);
  }

  .faceoff-combined .trend-row {
    padding: 8px;
  }

  .faceoff-combined .trend-label {
    font-size: clamp(1rem, 6vw, 1.2rem);
  }

  .faceoff-combined .sparkline {
    height: 22px;
  }

  .faceoff-combined .crew-card {
    min-height: 114px;
  }

  .faceoff-combined .leader {
    font-size: clamp(1.08rem, 4.6vw, 1.28rem);
  }

  .runway-masthead {
    font-size: clamp(3.3rem, 19vw, 6.4rem);
  }

  .hero {
    aspect-ratio: 9 / 16;
  }
}

body[data-view="vote-onepage"] {
  overflow: hidden;
  --pane-gap: 10px;
  --vote-pane-ratio: 52;
  --board-pane-ratio: 48;
  --vote-card-min-height-compact: 112px;
  --board-bars-height-compact: 132px;
  --trend-row-min-height-compact: 62px;
  --compact-title-scale: 0.8;
  --compact-body-scale: 0.86;
}

body[data-view="vote-onepage"] .app-shell {
  min-height: 100svh;
}

body[data-view="vote-onepage"] .phone-viewport {
  min-height: 100svh;
  grid-template-rows:
    calc(var(--topbar-height) + env(safe-area-inset-top))
    minmax(0, 1fr);
}

body[data-view="vote-onepage"] .topbar {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

body[data-view="vote-onepage"] .onepage-grid {
  min-height: 0;
  height: var(--onepage-main-height, 100%);
  display: grid;
  grid-template-areas:
    "board"
    "vote";
  grid-template-rows:
    minmax(0, calc(var(--board-pane-ratio) * 1%))
    minmax(0, calc(var(--vote-pane-ratio) * 1%));
  gap: var(--pane-gap);
  padding: var(--section-padding);
}

body[data-view="vote-onepage"] .board-pane {
  grid-area: board;
}

body[data-view="vote-onepage"] .vote-pane {
  grid-area: vote;
}

body[data-view="vote-onepage"] .pane {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  border: 1px solid var(--line);
  background: var(--surface-1);
}

body[data-view="vote-onepage"] .pane,
body[data-view="vote-onepage"] .pane * {
  min-width: 0;
}

body[data-view="vote-onepage"] .pane .section-title {
  line-height: 0.92;
  font-size: clamp(1.45rem, 4.8vw, 2.2rem);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-view="vote-onepage"] .pane .command-heading .muted {
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-view="vote-onepage"] .pane::-webkit-scrollbar {
  width: 6px;
}

body[data-view="vote-onepage"] .pane::-webkit-scrollbar-thumb {
  background: rgba(236, 239, 244, 0.18);
}

body[data-view="vote-onepage"] .vote-pane {
  --vote-card-min-height: var(--vote-card-min-height-compact);
}

body[data-view="vote-onepage"] .vote-pane .crew-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

body[data-view="vote-onepage"] .vote-pane .crew-card h3 {
  font-size: clamp(1.12rem, 4vw, 1.62rem);
  line-height: 0.95;
}

body[data-view="vote-onepage"] .vote-pane .crew-card p {
  font-size: 0.72rem;
  line-height: 1.08;
}

body[data-view="vote-onepage"] .vote-pane #vote-confirmation h3 {
  font-size: clamp(1.45rem, 5.2vw, 2rem);
}

body[data-view="vote-onepage"] .vote-pane .vote-badge {
  min-height: 26px;
  line-height: 1;
  display: inline-grid;
  align-items: center;
}

body[data-view="vote-onepage"] .vote-pane #vote-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--space-2);
}

body[data-view="vote-onepage"] .board-pane .leader {
  font-size: clamp(1.02rem, 3.8vw, 1.28rem);
}

body[data-view="vote-onepage"] .leader-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-bottom: 10px;
}

body[data-view="vote-onepage"] .leader-compact .leader-primary,
body[data-view="vote-onepage"] .leader-compact .leader-total {
  overflow-wrap: anywhere;
}

body[data-view="vote-onepage"] .leader-compact .leader-total {
  text-align: right;
  justify-self: end;
}

body[data-view="vote-onepage"] .compact-bars {
  height: clamp(108px, 16vh, var(--board-bars-height-compact));
  gap: var(--space-2);
}

body[data-view="vote-onepage"] .compact-bars .bar-wrap {
  min-height: 76px;
  padding: 6px;
}

body[data-view="vote-onepage"] .compact-bars .bar-meta {
  font-size: 0.72rem;
  line-height: 1.1;
}

body[data-view="vote-onepage"] .compact-trend-board .trend-row {
  min-height: var(--trend-row-min-height-compact);
}

body[data-view="vote-onepage"] .compact-trend-board .trend-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  font-size: clamp(0.9rem, 3.4vw, 1.08rem);
  line-height: 1;
}

body[data-view="vote-onepage"] .compact-trend-board .trend-label span {
  font-size: 0.74rem;
  text-align: right;
  white-space: nowrap;
}

body[data-view="vote-onepage"] .compact-trend-board .sparkline {
  height: 18px;
}

body[data-view="vote-onepage"] .runway-board,
body[data-view="vote-onepage"] .trend-board,
body[data-view="vote-onepage"] .hype-meter {
  overflow: hidden;
}

@media (min-width: 521px) and (max-width: 1024px) {
  body[data-view="vote-onepage"] {
    --pane-gap: 12px;
    --vote-card-min-height-compact: 118px;
    --board-bars-height-compact: 140px;
    --trend-row-min-height-compact: 66px;
  }
}

@media (min-width: 1025px) {
  body[data-view="vote-onepage"] {
    --pane-gap: 14px;
    --vote-card-min-height-compact: 124px;
    --board-bars-height-compact: 150px;
    --trend-row-min-height-compact: 70px;
  }

  body[data-view="vote-onepage"] .vote-pane .crew-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body[data-view="vote-onepage"] .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  body[data-view="vote-onepage"] .topbar-bars {
    display: none;
  }

  body[data-view="vote-onepage"] .leader-compact {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  body[data-view="vote-onepage"] .leader-compact .leader-total {
    text-align: left;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Simplified attendee / page: 4 buttons + square live line chart */
body[data-view="vote-onepage"] {
  --simple-gap: 12px;
  --simple-panel-pad: 12px;
  --button-height: 68px;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--paper), var(--paper-deep));
}

body[data-view="vote-onepage"] .app-shell {
  display: block;
  min-height: 100svh;
}

body[data-view="vote-onepage"] .topbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

body[data-view="vote-onepage"] .topbar-bars {
  display: none;
}

body[data-view="vote-onepage"] .phone-viewport {
  min-height: 100svh;
  height: auto;
  grid-template-rows:
    calc(var(--topbar-height) + env(safe-area-inset-top))
    auto;
}

body[data-view="vote-onepage"] .onepage-grid.simple-onepage {
  min-height: auto;
  height: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--simple-gap);
  padding: var(--simple-gap);
  padding-bottom: calc(132px + env(safe-area-inset-bottom));
  overflow: visible;
}

body[data-view="vote-onepage"] .simple-panel {
  border: 1px solid var(--line);
  background: var(--surface-1);
  padding: var(--simple-panel-pad);
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: visible;
  align-content: start;
}

body[data-view="vote-onepage"] #simple-vote-panel .section-title {
  margin: 0;
  line-height: 0.9;
  font-size: clamp(1.7rem, 7vw, 2.7rem);
}

body[data-view="vote-onepage"] #simple-vote-panel .muted {
  margin: 0;
  font-size: clamp(0.88rem, 3.2vw, 1.05rem);
  line-height: 1.15;
}

body[data-view="vote-onepage"] #simple-vote-panel .muted.minor {
  font-size: clamp(0.78rem, 3vw, 0.95rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #d9dee7;
}

body[data-view="vote-onepage"] #simple-vote-panel .status {
  margin: 0;
  min-height: 1.2em;
}

body[data-view="vote-onepage"] .simple-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-view="vote-onepage"] .simple-vote-btn {
  height: var(--button-height);
  border: 1px solid rgba(236, 239, 244, 0.3);
  background: linear-gradient(160deg, rgba(26, 33, 42, 0.96), rgba(19, 24, 32, 0.98));
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

body[data-view="vote-onepage"] .simple-vote-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

body[data-view="vote-onepage"] .simple-vote-btn .crew-name {
  display: none;
}

body[data-view="vote-onepage"] .vote-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(236, 239, 244, 0.3);
  background: rgba(18, 23, 30, 0.85);
  color: var(--ink-soft);
  font-size: 0.88rem;
  padding: 6px 8px;
  line-height: 1;
  white-space: nowrap;
}

body[data-view="vote-onepage"] .simple-vote-btn.is-picked {
  border-color: rgba(211, 23, 52, 0.9);
  background: linear-gradient(180deg, rgba(211, 23, 52, 0.38), rgba(107, 14, 30, 0.62));
}

body[data-view="vote-onepage"] .simple-vote-btn.is-locked {
  border-color: rgba(236, 239, 244, 0.2);
  background: linear-gradient(180deg, rgba(26, 33, 42, 0.88), rgba(17, 22, 29, 0.92));
}

body[data-view="vote-onepage"] .vote-chip.is-picked {
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(180deg, #d31734, #9d1127);
  color: #fff;
}

body[data-view="vote-onepage"] .vote-chip.is-locked {
  border-color: rgba(236, 239, 244, 0.22);
  color: #c2c9d4;
}

body[data-view="vote-onepage"] .simple-confirm {
  border: 1px solid rgba(211, 23, 52, 0.5);
  background: rgba(211, 23, 52, 0.18);
  padding: 10px 12px;
  font-size: clamp(1rem, 4vw, 1.28rem);
  line-height: 1;
}

body[data-view="vote-onepage"] .round-result-card {
  border: 1px solid rgba(236, 239, 244, 0.22);
  background: linear-gradient(180deg, rgba(28, 35, 44, 0.96), rgba(18, 24, 31, 0.98));
  display: grid;
  gap: 8px;
}

body[data-view="vote-onepage"] #round-result-title {
  padding: 0 10px;
  font-size: clamp(1.05rem, 4.2vw, 1.4rem);
  line-height: 1;
}

body[data-view="vote-onepage"] #round-result-copy {
  padding: 0 10px;
  font-size: clamp(0.82rem, 3vw, 0.96rem);
}

body[data-view="vote-onepage"] .round-result-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px 10px;
  min-height: 44px;
  border: 1px solid rgba(236, 239, 244, 0.28);
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.96rem;
}

.live-shell .topbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-shell .topbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-shell .topbar-bars {
  display: none;
}

.admin-shell .badge {
  max-width: min(62vw, 280px);
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-view="vote-onepage"] .simple-board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

body[data-view="vote-onepage"] #winner-badge,
body[data-view="vote-onepage"] #vote-total {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1rem, 3.4vw, 1.28rem);
  letter-spacing: 0.04em;
}

body[data-view="vote-onepage"] #vote-total {
  text-align: right;
}

body[data-view="vote-onepage"] .crew-totals-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-view="vote-onepage"] .crew-total-item {
  border: 1px solid rgba(236, 239, 244, 0.18);
  background: rgba(20, 25, 32, 0.82);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

body[data-view="vote-onepage"] .crew-total-item span {
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body[data-view="vote-onepage"] .crew-total-item strong {
  color: #f3f6fb;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
}

body[data-view="vote-onepage"] .round-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 1100px) {
  body[data-view="vote-onepage"] {
    --button-height: 74px;
    --simple-gap: 14px;
    --simple-panel-pad: 14px;
  }

  body[data-view="vote-onepage"] .simple-buttons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body[data-view="vote-onepage"] {
    --button-height: 60px;
    --simple-gap: 10px;
    --simple-panel-pad: 10px;
  }

  body[data-view="vote-onepage"] .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body[data-view="vote-onepage"] .topbar-bars {
    display: none;
  }

  body[data-view="vote-onepage"] .wordmark,
  .live-shell .wordmark,
  .admin-shell .wordmark {
    font-size: clamp(1.9rem, 11vw, 3.4rem);
  }

  .slide {
    padding: 10px;
  }

  body[data-view="vote-onepage"] .simple-board-head {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  body[data-view="vote-onepage"] #vote-total {
    text-align: left;
  }

  body[data-view="vote-onepage"] #simple-vote-panel .section-title {
    font-size: clamp(1.45rem, 7vw, 2.15rem);
  }

  body[data-view="vote-onepage"] .simple-vote-btn {
    padding: 0 8px;
  }

  body[data-view="vote-onepage"] .vote-chip {
    font-size: 0.74rem;
    padding: 5px 6px;
  }

  body[data-view="vote-onepage"] .crew-totals-list {
    gap: 6px;
  }

  body[data-view="vote-onepage"] .crew-total-item {
    padding: 7px 8px;
  }

  body[data-view="vote-onepage"] .crew-total-item span,
  body[data-view="vote-onepage"] .crew-total-item strong {
    font-size: 0.74rem;
  }

  body[data-view="vote-onepage"] .round-meta-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body[data-view="vote-onepage"] .round-meta-chip {
    white-space: normal;
  }

  .live-shell .leader,
  .admin-shell .leader {
    grid-template-columns: 1fr;
    gap: 6px;
    font-size: clamp(1.05rem, 5.6vw, 1.4rem);
  }

  .live-shell .bars,
  .admin-shell .bars {
    height: clamp(156px, 28vh, 210px);
    gap: 8px;
  }

  .live-shell .bar-wrap,
  .admin-shell .bar-wrap {
    min-height: 88px;
    padding: 8px 6px;
  }

  .live-shell .bar-meta,
  .admin-shell .bar-meta {
    font-size: 0.72rem;
  }

  .money-hud {
    gap: 6px;
  }

  .money-hud span {
    font-size: 0.74rem;
    white-space: normal;
    line-height: 1.15;
  }

  .admin-shell .badge {
    max-width: min(68vw, 240px);
    font-size: 0.78rem;
    padding: 8px;
  }
}

body[data-view="vote-onepage"] .round-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body[data-view="vote-onepage"] .round-meta-chip {
  border: 1px solid rgba(236, 239, 244, 0.24);
  background: rgba(20, 25, 32, 0.92);
  padding: 8px 9px;
  font-size: 0.72rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-view="vote-onepage"] .round-meta-chip strong {
  color: #f4f7fb;
}

body[data-view="vote-onepage"] .target-progress {
  border: 1px solid rgba(236, 239, 244, 0.2);
  background: rgba(20, 25, 32, 0.82);
  padding: 8px 10px;
  font-size: 0.82rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.money-hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.money-hud span {
  border: 1px solid rgba(236, 239, 244, 0.2);
  background: rgba(20, 25, 32, 0.86);
  padding: 8px 10px;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-winner-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: hidden;
  background: #06080d;
}

.live-winner-overlay[hidden] {
  display: none !important;
}

.live-winner-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none;
}

.live-winner-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.35) 42%, rgba(0, 0, 0, 0.84) 100%),
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.12), transparent 28%);
  pointer-events: none;
}

.live-winner-copy {
  position: absolute;
  left: clamp(14px, 4vw, 38px);
  right: clamp(14px, 4vw, 38px);
  bottom: clamp(20px, 6vh, 52px);
  z-index: 1;
  display: grid;
  gap: 10px;
}

.live-winner-copy h3 {
  margin: 0;
  font-size: clamp(2rem, 10vw, 7rem);
  line-height: 0.82;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.live-winner-copy p {
  margin: 0;
  font-size: clamp(1.2rem, 4.4vw, 2.2rem);
  color: #f3f7ff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.live-winner-overlay.no-photo {
  background: radial-gradient(circle at 22% 16%, rgba(211, 23, 52, 0.4), rgba(9, 12, 18, 0.97));
}

.live-winner-overlay.no-photo img {
  opacity: 0;
}

body.round-ended #lead-toast {
  opacity: 0;
}

@media (max-width: 760px) {
  .money-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
}
