/* ==========================================================================
   Annual Speech Live Vote Stage — Aspect-Agnostic (4:1 / 32:9 / 16:9) Visual System
   Uses container-query height units (cqh) inside container-type: size so typography,
   spacing, and 3D overlays stay 100% proportional across 7680x1920 LED walls & 16:9 Macs.
   ========================================================================== */

:root {
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --font-display: "SF Pro Display", "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Dynamic Stage Aspect Ratio (4.0 for 7680x1920 LED wall, auto-updates on slide load) */
  --stage-aspect: 4;

  /* Default Editorial Warm Light Tokens */
  --bg-outer: #05080f;
  --stage-bg: radial-gradient(ellipse 88% 72% at 50% 18%, #fffdf9 0%, #f7f1e7 58%, #eee5d6 100%);
  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #8a8279;
  --horizon-color: rgba(28, 25, 23, 0.14);
  --grid-line: rgba(28, 25, 23, 0.032);
  --badge-bg: rgba(255, 255, 255, 0.72);
  --badge-border: rgba(28, 25, 23, 0.08);
  --badge-shadow: 0 1cqh 3cqh rgba(28, 25, 23, 0.08);
  --pill-bg: rgba(28, 25, 23, 0.06);
  --shadow-ground: rgba(28, 22, 16, 0.2);
  --number-color: #181614;
  --number-leader: #b87e1a;
  --number-shadow: 0 0.2cqh 0.8cqh rgba(255, 255, 255, 0.55);
  --kicker-bg: rgba(28, 25, 23, 0.048);

  --c0-main: #eb7d44;
  --c0-light: #f9b07c;
  --c0-dark: #c95b26;
  --c0-glow: rgba(235, 125, 68, 0.36);

  --c1-main: #2fa399;
  --c1-light: #6fd3c8;
  --c1-dark: #1d7c74;
  --c1-glow: rgba(47, 163, 153, 0.34);

  --c2-main: #436ec2;
  --c2-light: #7da4ec;
  --c2-dark: #2c4e96;
  --c2-glow: rgba(67, 110, 194, 0.34);

  --c3-main: #d69c34;
  --c3-light: #f2cb73;
  --c3-dark: #ac7719;
  --c3-glow: rgba(214, 156, 52, 0.42);

  /* Dynamic layout variables (driven live from config) */
  --chart-bottom: 24%;
  --chart-max-height: 45%;
  --bar-width: 4.1%;
  --fade-duration: 650ms;
  --digit-scale: 1;
}

/* Bespoke PPT Stage Theme (matched to 7680x1920 Morning Water Sanctuary Keynote artwork) */
body.theme-ppt-stage {
  --stage-bg: #14365c;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.86);
  --text-muted: rgba(230, 242, 255, 0.68);
  --horizon-color: transparent;
  --grid-line: transparent;
  --badge-bg: rgba(10, 32, 62, 0.44);
  --badge-border: rgba(255, 255, 255, 0.24);
  --badge-shadow: 0 0.8cqh 2.8cqh rgba(5, 18, 40, 0.38);
  --pill-bg: rgba(8, 28, 56, 0.42);
  --number-color: #ffffff;
  --number-leader: #ffe299;
  --number-shadow: 0 0.45cqh 1.8cqh rgba(6, 22, 48, 0.62), 0 0.12cqh 0.4cqh rgba(6, 22, 48, 0.55);
  --kicker-bg: rgba(10, 32, 62, 0.42);
}

/* Theme 2: Stage Navy Gold */
body.theme-stage-navy {
  --stage-bg: radial-gradient(ellipse 90% 70% at 50% 10%, #162444 0%, #0d172e 55%, #070d1b 100%);
  --text-primary: #f8f5ef;
  --text-secondary: rgba(248, 245, 239, 0.72);
  --text-muted: rgba(248, 245, 239, 0.46);
  --horizon-color: rgba(255, 248, 232, 0.18);
  --grid-line: rgba(255, 255, 255, 0.035);
  --badge-bg: rgba(255, 255, 255, 0.08);
  --badge-border: rgba(255, 255, 255, 0.16);
  --badge-shadow: 0 1cqh 3cqh rgba(0, 0, 0, 0.38);
  --pill-bg: rgba(255, 255, 255, 0.1);
  --shadow-ground: rgba(0, 0, 0, 0.52);
  --number-color: #ffffff;
  --number-leader: #f7d581;
  --number-shadow: 0 0.3cqh 1.4cqh rgba(0, 0, 0, 0.48);
  --kicker-bg: rgba(255, 255, 255, 0.08);
}

/* Theme 3: Transparent Overlay */
body.theme-transparent-overlay {
  --stage-bg: transparent;
  --horizon-color: transparent;
  --grid-line: transparent;
  --number-color: #ffffff;
  --number-leader: #ffe299;
  --number-shadow: 0 0.45cqh 1.8cqh rgba(6, 22, 48, 0.62);
  --pill-bg: rgba(8, 28, 56, 0.42);
  --badge-bg: rgba(10, 32, 62, 0.44);
  --badge-border: rgba(255, 255, 255, 0.24);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-outer);
  font-family: var(--font-sans);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

body.cursor-hidden,
body.cursor-hidden * {
  cursor: none !important;
}

.viewport-frame {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-outer);
}

/* Locked Dynamic-Aspect Stage Canvas (7680x1920 4:1 or 16:9, exact zero-crop pixel alignment) */
.stage-canvas {
  position: relative;
  width: min(100vw, calc(100vh * var(--stage-aspect)));
  height: min(100vh, calc(100vw / var(--stage-aspect)));
  container-type: size;
  overflow: hidden;
  background: var(--stage-bg);
  opacity: 1;
  transition: opacity 160ms ease;
}

/* Prevent wrong-poll first-paint flash before initial server snapshot arrives */
.stage-canvas.is-booting {
  opacity: 0;
}

/* ==========================================================================
   Slides & Smooth Cross-Fade Transition
   ========================================================================== */
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--fade-duration) cubic-bezier(0.37, 0, 0.63, 1);
  will-change: opacity;
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.slide.slide-2 {
  z-index: 3;
}

.stage-backdrop {
  position: absolute;
  inset: 0;
  background: var(--stage-bg);
  pointer-events: none;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(8cqh);
  pointer-events: none;
}

.ambient-glow-1 {
  width: 70cqh;
  height: 48cqh;
  top: -18cqh;
  left: 30%;
  background: radial-gradient(circle, rgba(242, 187, 102, 0.16), transparent 72%);
}

.ambient-glow-2 {
  width: 60cqh;
  height: 40cqh;
  bottom: -14cqh;
  right: 10%;
  background: radial-gradient(circle, rgba(67, 110, 194, 0.08), transparent 70%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 9cqh 9cqh;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 40%, transparent 100%);
}

/* Native 1:1 Keynote PNG slide background */
.custom-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 1;
  pointer-events: none;
}

/* Seamless pixel-matched cobalt gradient cover over Poll 2's draft schematic placeholder bars
   Covers ONLY x: 55.6%..85.0%, y: 26.2%..68.0% — zero overlap on "现场投票结果" or "个人智能体"/"电商平台"! */
.billboard-clean-mask {
  position: absolute;
  left: 55.2%;
  width: 30.2%;
  top: 25.4%;
  height: 43.0%;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(16, 30, 86, 0) 0%, rgba(10, 18, 52, 0.16) 100%),
    linear-gradient(180deg, #3c64d8 0%, #3354ba 28%, #263d90 62%, #1d2b6f 100%);
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 9%, #000 91%, transparent 100%);
  mask-composite: intersect;
}

/* Smooth fade when switching between Poll 1 and Poll 2 */
.stage-canvas.is-poll-switching .slide-1 {
  opacity: 0.15;
  transition: opacity 180ms ease;
}

/* Transparent Three.js 3D Stage Overlay */
.stage-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  display: block;
}

.stage-canvas[data-bar-style="three-themed"] .bar-pillar,
.stage-canvas[data-bar-style="three-themed"] .bar-stack,
.stage-canvas[data-bar-style="three-themed"] .bar-pedestal,
.stage-canvas[data-bar-style="three-themed"] .bar-ground-shadow,
.stage-canvas[data-bar-style="three-pillar"] .bar-pillar,
.stage-canvas[data-bar-style="three-pillar"] .bar-stack,
.stage-canvas[data-bar-style="three-pillar"] .bar-pedestal,
.stage-canvas[data-bar-style="three-pillar"] .bar-ground-shadow {
  display: none !important;
}

.stage-canvas[data-bar-style="pillar-3d"] .stage-3d-canvas {
  opacity: 0;
}

/* ==========================================================================
   Optional Editorial Top Header (hidden automatically when Keynote slide has its own title)
   ========================================================================== */
.stage-header {
  position: absolute;
  top: 5.5cqh;
  left: 4%;
  right: 4%;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3cqh;
  transition: opacity 280ms ease;
}

.stage-header.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.live-kicker {
  display: inline-flex;
  align-items: center;
  gap: 1.1cqh;
  padding: 0.65cqh 1.7cqh;
  border-radius: 999px;
  background: var(--kicker-bg);
  color: var(--text-secondary);
  font-size: 1.85cqh;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 1.8cqh;
}

.live-dot {
  width: 0.9cqh;
  height: 0.9cqh;
  border-radius: 50%;
  background: #22a878;
  animation: liveBreath 2.6s ease-in-out infinite;
}

@keyframes liveBreath {
  0%, 100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 168, 120, 0.42);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 0.7cqh rgba(34, 168, 120, 0);
  }
}

.stage-title {
  font-size: 5.6cqh;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.header-right {
  flex-shrink: 0;
  min-width: 24cqh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 1.6cqh 2.8cqh;
  border-radius: 1.9cqh;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  box-shadow: var(--badge-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 260ms ease;
}

.header-right.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.total-label {
  font-size: 1.65cqh;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.35cqh;
}

.total-value-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6cqh;
}

.total-odometer {
  font-family: var(--font-display);
  font-size: 3.8cqh;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.total-unit {
  font-size: 1.75cqh;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ==========================================================================
   Chart Stage & 4 Independent-Depth Life-Era Columns
   ========================================================================== */
.chart-stage {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.stage-horizon-line {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: var(--chart-bottom);
  height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, var(--horizon-color) 10%, var(--horizon-color) 90%, transparent 100%);
}

.columns-layer {
  position: absolute;
  inset: 0;
}

.vote-col {
  position: absolute;
  inset: 0;
  pointer-events: none;
  --col-x: 50%;
  --col-y: var(--chart-bottom);
  --bar-main: var(--c0-main);
  --bar-light: var(--c0-light);
  --bar-dark: var(--c0-dark);
  --bar-glow: var(--c0-glow);
  --pulse: 0;
}

.vote-col[data-index="0"] { --bar-main: var(--c0-main); --bar-light: var(--c0-light); --bar-dark: var(--c0-dark); --bar-glow: var(--c0-glow); }
.vote-col[data-index="1"] { --bar-main: var(--c1-main); --bar-light: var(--c1-light); --bar-dark: var(--c1-dark); --bar-glow: var(--c1-glow); }
.vote-col[data-index="2"] { --bar-main: var(--c2-main); --bar-light: var(--c2-light); --bar-dark: var(--c2-dark); --bar-glow: var(--c2-glow); }
.vote-col[data-index="3"] { --bar-main: var(--c3-main); --bar-light: var(--c3-light); --bar-dark: var(--c3-dark); --bar-glow: var(--c3-glow); }

.bar-track {
  position: absolute;
  left: var(--col-x);
  bottom: var(--col-y);
  width: var(--bar-width);
  height: var(--chart-max-height);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.bar-ground-shadow {
  position: absolute;
  bottom: -1.1cqh;
  left: 50%;
  width: 122%;
  height: 2.3cqh;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--shadow-ground) 0%, transparent 72%);
  opacity: 0.35;
}

.vote-col.has-votes .bar-ground-shadow {
  opacity: 0.85;
}

.leader-halo {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 190%;
  height: 22cqh;
  transform: translate(-50%, 18%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 232, 165, 0.38) 0%, transparent 70%);
  opacity: 0;
  filter: blur(2.4cqh);
  transition: opacity 480ms ease;
  pointer-events: none;
}

.vote-col.is-leader .leader-halo {
  opacity: 0.78;
}

.stage-canvas.no-leader-glow .leader-halo {
  opacity: 0 !important;
}

/* Floating top readout (for numberPosition === 'above' or 'both') */
.bar-top-readout {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-2.4cqh);
  display: flex;
  flex-direction: column;
  align-items: center;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 240ms ease;
  z-index: 8;
}

.stage-canvas[data-number-pos="above"] .vote-col.has-votes .bar-top-readout,
.stage-canvas[data-number-pos="both"] .vote-col.has-votes .bar-top-readout {
  opacity: 1;
}

.top-odometer-wrap {
  display: none;
  font-family: var(--font-display);
  font-size: calc(5.2cqh * var(--digit-scale));
  font-weight: 700;
  color: var(--number-color);
  text-shadow: var(--number-shadow);
}

.stage-canvas[data-number-pos="above"] .top-odometer-wrap {
  display: block;
}

.top-percent-chip {
  display: none;
  padding: 0.45cqh 1.45cqh;
  border-radius: 999px;
  font-size: 2.0cqh;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  box-shadow: var(--badge-shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.stage-canvas[data-number-pos="both"] .vote-col.has-votes .top-percent-chip {
  display: inline-block;
}

/* Lightweight CSS fallback 2D Pillar */
.bar-pillar {
  position: relative;
  width: 100%;
  height: 0%;
  border-radius: 1.5cqh 1.5cqh 0.4cqh 0.4cqh;
  background: linear-gradient(180deg, var(--bar-light) 0%, var(--bar-main) 24%, var(--bar-dark) 100%);
  box-shadow: inset 0 0.25cqh 0 rgba(255, 255, 255, 0.6), 0 1.6cqh 3.8cqh -0.8cqh var(--bar-glow);
  overflow: hidden;
  will-change: height;
}
.bar-pillar-cap,
.bar-pillar-pulse,
.bar-pillar-side,
.bar-stack {
  display: none;
}
.bar-pedestal {
  position: absolute;
  bottom: 0;
  left: -4%;
  right: -4%;
  height: 0.6cqh;
  border-radius: 999px;
  background: var(--bar-main);
  opacity: 0.5;
}

/* ==========================================================================
   Below-Bar Number & Optional Era Label Panel (anchored directly beneath each tower)
   ========================================================================== */
.col-footer {
  position: absolute;
  left: var(--col-x);
  top: calc(100% - var(--col-y) + 4.4cqh);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 360ms ease;
}

/* Keep the Keynote slide 100% pristine while counts are 0 */
body.theme-ppt-stage .vote-col:not(.has-votes) .col-footer {
  opacity: 0;
}

.below-number-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.25cqh;
}

.stage-canvas[data-number-pos="above"] .below-number-block {
  display: none;
}

.main-odometer-wrap {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  font-family: var(--font-display);
  font-size: calc(6.7cqh * var(--digit-scale));
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--number-color);
  text-shadow:
    0 0.5cqh 2.2cqh rgba(5, 20, 46, 0.72),
    0 0.14cqh 0.5cqh rgba(5, 20, 46, 0.65);
  transition: color 300ms ease, filter 300ms ease;
}

.vote-col.is-leader .main-odometer-wrap {
  color: #ffe394;
  text-shadow:
    0 0 2.6cqh rgba(255, 214, 112, 0.35),
    0 0.5cqh 2.2cqh rgba(8, 22, 46, 0.78),
    0 0.14cqh 0.5cqh rgba(8, 22, 46, 0.72);
}

.era-meta-row {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.9cqh;
}

/* Cinema-subtitle style ethereal percentage readout (no clunky dark web pill box) */
.era-percent {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 0;
  font-size: 2.35cqh;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: rgba(236, 245, 255, 0.88);
  background: transparent;
  border: 0;
  text-shadow:
    0 0.25cqh 1.1cqh rgba(4, 18, 42, 0.78),
    0 0.08cqh 0.35cqh rgba(4, 18, 42, 0.7);
}

body.theme-ppt-stage .vote-col.is-leader .era-percent {
  color: rgba(255, 232, 168, 0.96);
}

.stage-canvas.no-era-labels .era-label-row,
.stage-canvas.no-era-labels .era-sublabel {
  display: none;
}

.stage-canvas.no-percent .era-percent,
.stage-canvas[data-number-pos="both"] .era-percent {
  display: none;
}

/* ==========================================================================
   Poll 2 Variant ('billboard-duel') — Bespoke Cobalt Billboard Readout Styling
   Inline tabular odometer + share sits cleanly in the dark-sapphire band
   directly beneath "个人智能体" & "电商平台" (y: 78.6%..86.4%) with ZERO overlap!
   ========================================================================== */
.stage-canvas[data-stage-variant="billboard-duel"] .vote-col[data-index="0"] {
  --bar-main: #8ecfff;
  --bar-light: #e2f5ff;
  --bar-dark: #4c9be0;
  --bar-glow: rgba(112, 212, 255, 0.42);
}

.stage-canvas[data-stage-variant="billboard-duel"] .vote-col[data-index="1"] {
  --bar-main: #e8c26c;
  --bar-light: #fff0be;
  --bar-dark: #b9852c;
  --bar-glow: rgba(246, 204, 108, 0.44);
}

.stage-canvas[data-stage-variant="billboard-duel"] .col-footer {
  top: var(--footer-top, 79.4%);
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.4cqh;
}

.stage-canvas[data-stage-variant="billboard-duel"] .below-number-block {
  margin-bottom: 0;
}

.stage-canvas[data-stage-variant="billboard-duel"] .main-odometer-wrap {
  font-size: calc(5.0cqh * var(--digit-scale));
  color: #f4f9ff;
  text-shadow:
    0 0.3cqh 1.6cqh rgba(4, 12, 38, 0.8),
    0 0.08cqh 0.35cqh rgba(4, 12, 38, 0.72);
}

.stage-canvas[data-stage-variant="billboard-duel"] .vote-col[data-index="0"].is-leader .main-odometer-wrap {
  color: #d6f5ff;
  text-shadow:
    0 0 2.4cqh rgba(108, 224, 255, 0.52),
    0 0.35cqh 1.8cqh rgba(4, 14, 42, 0.82);
}

.stage-canvas[data-stage-variant="billboard-duel"] .vote-col[data-index="1"].is-leader .main-odometer-wrap {
  color: #ffe7a3;
  text-shadow:
    0 0 2.4cqh rgba(255, 214, 112, 0.5),
    0 0.35cqh 1.8cqh rgba(8, 16, 44, 0.82);
}

.stage-canvas[data-stage-variant="billboard-duel"] .era-percent {
  font-size: 2.55cqh;
  font-weight: 550;
  transform: translateY(0.35cqh);
  color: rgba(214, 232, 255, 0.88);
}

.stage-canvas[data-stage-variant="billboard-duel"] .vote-col[data-index="0"].is-leader .era-percent {
  color: rgba(176, 240, 255, 0.96);
}

.stage-canvas[data-stage-variant="billboard-duel"] .vote-col[data-index="1"].is-leader .era-percent {
  color: rgba(255, 234, 172, 0.96);
}

.stage-canvas[data-stage-variant="billboard-duel"] .top-odometer-wrap {
  font-size: calc(4.6cqh * var(--digit-scale));
}

.stage-canvas[data-stage-variant="billboard-duel"] .leader-halo {
  height: 18cqh;
  background: radial-gradient(circle, var(--bar-glow) 0%, transparent 72%);
}

/* ==========================================================================
   Precision 11-Slot Tabular Odometer Styles (Feathered aperture)
   ========================================================================== */
.odometer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  line-height: 1.24;
}

.odo-digit-cell {
  position: relative;
  display: inline-block;
  width: 0.63em;
  height: 1.24em;
  overflow: hidden;
  vertical-align: top;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 85%, transparent 100%);
}

.odo-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  transition-property: transform;
  will-change: transform;
}

.odo-char {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.24em;
  line-height: 1.24em;
}

.odo-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.28em;
  height: 1.24em;
  line-height: 1.24em;
  transform: translateY(0.06em);
  opacity: 0.72;
  font-weight: 500;
}

/* ==========================================================================
   Slide 2: Clean Static Handoff Placeholder
   ========================================================================== */
.slide2-default {
  position: absolute;
  inset: 0;
  background: var(--stage-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8cqh;
}

.slide2-content {
  position: relative;
  z-index: 2;
  max-width: 110cqh;
  text-align: center;
}

.slide2-eyebrow {
  font-size: 1.8cqh;
  letter-spacing: 0.28em;
  font-weight: 600;
  color: var(--c3-main);
  margin-bottom: 3cqh;
}

.slide2-quote {
  font-size: 5.2cqh;
  font-weight: 700;
  line-height: 1.48;
  color: var(--text-primary);
}

.slide2-quote span {
  display: inline-block;
  margin-top: 1.2cqh;
  font-weight: 400;
  font-size: 3.8cqh;
  color: var(--text-secondary);
}

.slide2-divider {
  width: 10cqh;
  height: 0.35cqh;
  margin: 4.5cqh auto 3cqh;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--c3-main), transparent);
}

.slide2-placeholder-note {
  font-size: 1.8cqh;
  color: var(--text-muted);
}

/* ==========================================================================
   Debug HUD (Hidden by default, toggle via 'D' key)
   ========================================================================== */
.debug-hud {
  position: absolute;
  left: 2.5cqh;
  bottom: 2.2cqh;
  z-index: 50;
  padding: 1.2cqh 2cqh;
  border-radius: 1.3cqh;
  background: rgba(12, 18, 30, 0.85);
  color: #e6ecf5;
  font-size: 1.6cqh;
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}

.hud-row {
  display: flex;
  align-items: center;
  gap: 1.8cqh;
  flex-wrap: wrap;
}

.hud-keys {
  margin-top: 0.7cqh;
  font-size: 1.45cqh;
  color: rgba(230, 236, 245, 0.75);
}

.hud-keys kbd {
  display: inline-block;
  padding: 0.15cqh 0.6cqh;
  border-radius: 0.4cqh;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.hud-keys a {
  color: #7dd3fc;
  text-decoration: none;
}

.hud-pill {
  padding: 0.25cqh 0.9cqh;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  font-weight: 600;
}

.hud-pill.is-reconnecting {
  background: rgba(245, 158, 11, 0.24);
  color: #fcd34d;
}
