/* ═════════════════════════════════════════════════════════════
   THE SATURDAY DRAW — Hero modernisation
   ─────────────────────────────────────────────────────────────
   Goals from the redesign brief:
     • Better contrast on body type (was 55% opacity, killed reads)
     • Less monochrome — richer navy palette + atmospheric gradients
     • Consolidated "draw card" wrapping race-meta + formula
     • Equal-size buttons, responsive footprint
     • More engaging: animated CTA glow, pulsing kicker, hover lift
═════════════════════════════════════════════════════════════ */

/* ── HERO ──────────────────────────────────────────────────── */
.sd-hero {
  position: relative;
  padding: 64px 0 56px;
  overflow: hidden;
  background:
    /* Top warm gold haze */
    radial-gradient(ellipse 70% 60% at 50% -8%, rgba(212, 175, 55, 0.16) 0%, transparent 50%),
    /* Left-side deep indigo */
    radial-gradient(ellipse 50% 70% at 0% 60%, rgba(60, 30, 140, 0.18) 0%, transparent 55%),
    /* Right-side rust */
    radial-gradient(ellipse 45% 60% at 100% 45%, rgba(190, 55, 30, 0.14) 0%, transparent 55%),
    /* Base layered navy */
    linear-gradient(180deg, #0d1426 0%, #0a0f1d 60%, #06080f 100%);
}

.sd-hero__bg {
  position: absolute; inset: 0;
  /* Subtle film-grain texture so the dark surface doesn't read as
     flat-painted. Pure CSS noise via a layered radial mask. */
  background-image:
    radial-gradient(circle at 25% 35%, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 75% 65%, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px;
  pointer-events: none;
}

.sd-hero__grid {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 119px, rgba(212, 175, 55, 0.018) 120px),
    repeating-linear-gradient(0deg, transparent, transparent 119px, rgba(212, 175, 55, 0.012) 120px);
  pointer-events: none;
}

.sd-hero__inner {
  position: relative; z-index: 1;
  max-width: 820px;
  display: flex; flex-direction: column;
  gap: 22px;
  padding: 0 20px;
}

/* ── KICKER + TITLE + STORY ────────────────────────────────── */
.sd-hero__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.3em;
  text-transform: uppercase; color: #f5e49a;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0.08) 100%);
  border: 1px solid rgba(212, 175, 55, 0.42);
  padding: 7px 16px; border-radius: 999px;
  width: fit-content;
  box-shadow: 0 0 24px -8px rgba(212, 175, 55, 0.4);
}

.sd-kicker-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f5e49a;
  box-shadow: 0 0 8px rgba(245, 228, 154, 0.9);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.sd-hero__title {
  display: flex; flex-direction: column;
  line-height: 1.0; gap: 4px;
  margin: 0;
}

.sd-hero__title-line1 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 700; font-style: italic;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: -0.005em;
}

.sd-hero__title-line2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.4vw, 78px);
  font-weight: 900;
  background: linear-gradient(180deg, #f5e49a 0%, #d4af37 45%, #c8a020 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.025em;
  text-shadow: 0 0 38px rgba(212, 175, 55, 0.22);
  /* Subtle pulse on the headline glow to give the hero life. */
  animation: titleGlow 4s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 32px rgba(212, 175, 55, 0.20); }
  50%      { text-shadow: 0 0 52px rgba(212, 175, 55, 0.40); }
}

.sd-hero__story {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.65;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.84);
  max-width: 640px; margin: 0;
  letter-spacing: 0.005em;
}
.sd-hero__story em {
  color: #f5e49a;
  font-style: italic;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.12) 0%, transparent 100%);
  padding: 0 6px; border-radius: 4px;
}

/* ── RACE SELECTOR (vestigial — replaced by picker chip) ───── */
.sd-race-form { width: 100%; max-width: 620px; display: none; }
.sd-select-wrap, .sd-select { display: none; }

/* ── UNIFIED DRAW CARD ──────────────────────────────────────
   Wraps the race-meta pills AND the formula signals into one
   glassmorphic surface so the user reads them as "the race
   you're drawing from, and the algorithm that picks it".
─────────────────────────────────────────────────────────────*/
.sd-draw-card {
  display: flex; flex-direction: column;
  gap: 18px;
  padding: 22px 26px;
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(212, 175, 55, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.025) 100%);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 14px 48px -20px rgba(0, 0, 0, 0.55),
    0 0 32px -10px rgba(212, 175, 55, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sd-draw-card__meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-items: center;
}

.sd-draw-card__divider {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.28) 50%,
    transparent 100%);
}
.sd-draw-card__divider-label {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  background: #0c1020;
  padding: 0 14px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(245, 228, 154, 0.75);
}

/* ── PILLS — race meta with iconography ─────────────────────── */
.sd-race-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.sd-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.82);
  transition: transform 0.14s, background 0.16s;
}
.sd-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}
.sd-pill--gold,
.sd-pill--runners {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0.08) 100%);
  border-color: rgba(212, 175, 55, 0.42);
  color: #f5e49a;
}
.sd-pill--course {
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.14) 0%, rgba(96, 165, 250, 0.05) 100%);
  border-color: rgba(96, 165, 250, 0.40);
  color: #93c5fd;
}

/* ── SIGNALS — the formula triplet ──────────────────────────── */
.sd-signals {
  display: flex; align-items: stretch; gap: 12px;
  flex-wrap: wrap;
  /* On desktop, signals share the row; on mobile they stack. */
}
.sd-signal {
  flex: 1 1 0;
  min-width: 0;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  padding: 12px 14px;
  transition: transform 0.16s, border-color 0.18s, background 0.16s;
}
.sd-signal:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.10) 0%, rgba(212, 175, 55, 0.03) 100%);
  border-color: rgba(212, 175, 55, 0.32);
}
.sd-signal__icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.18));
}
.sd-signal__body {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.sd-signal__label {
  font-size: 12.5px; font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
}
.sd-signal__desc {
  font-size: 10.5px; font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.01em;
}
.sd-signal-plus {
  display: inline-flex; align-items: center; justify-content: center;
  align-self: center;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 800;
  color: rgba(245, 228, 154, 0.55);
  width: 18px;
}

/* ── ACTION BUTTONS — equal sizing, responsive ──────────────── */
.sd-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
  margin-top: 4px;
}

/* Both buttons share a base — equal min-height, common padding,
   matching weight on the icon row — so the eye sees them as
   peers regardless of background colour. */
.sd-btn-draw,
.sd-btn-ai {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 14px 24px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: transform 0.16s ease, box-shadow 0.2s ease,
              background 0.2s ease, border-color 0.2s ease;
}
.sd-btn-draw:active,
.sd-btn-ai:active { transform: scale(0.98); }

/* Primary — gold gradient with a glow that pulses slowly to draw
   the eye without being annoying. */
.sd-btn-draw {
  flex-direction: column;
  gap: 4px;
  background: linear-gradient(180deg, #f5e49a 0%, #d4af37 45%, #c8a020 100%);
  color: #1a1408;
  border: 1px solid #d4af37;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 8px 28px -8px rgba(212, 175, 55, 0.55),
    0 0 0 0 rgba(212, 175, 55, 0);
  animation: pulseGlow 2.6s ease-in-out infinite;
}
.sd-btn-draw:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22) inset,
    0 12px 36px -8px rgba(212, 175, 55, 0.70);
}
.sd-btn-draw__icon { font-size: 22px; line-height: 1; }
.sd-btn-draw__text {
  font-size: 14px; font-weight: 900;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.sd-btn-draw__sub {
  font-size: 10px; font-weight: 600;
  opacity: 0.65;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Inline restart button (post-draw) keeps the inline-row layout. */
.sd-btn-draw--sm {
  flex-direction: row; font-size: 12px; padding: 10px 20px;
  margin-top: 14px; width: 100%;
  justify-content: center; gap: 8px;
  min-height: 0;
  animation: none;
}

/* Secondary — glassmorphic, full peer presence. */
.sd-btn-ai {
  flex-direction: column;
  gap: 4px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(96, 165, 250, 0.08), transparent 70%),
    rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.sd-btn-ai:hover {
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(96, 165, 250, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.09);
  border-color: rgba(96, 165, 250, 0.45);
  transform: translateY(-2px);
}
.sd-btn-ai__icon {
  font-size: 22px; line-height: 1;
  filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.45));
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.18) inset,
      0 8px 28px -8px rgba(212, 175, 55, 0.55),
      0 0 0 0 rgba(212, 175, 55, 0);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.22) inset,
      0 10px 32px -8px rgba(212, 175, 55, 0.65),
      0 0 28px 4px rgba(212, 175, 55, 0.18);
  }
}

.sd-select-prompt {
  color: rgba(255, 255, 255, 0.62);
  font-style: italic; font-size: 15px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.10);
  border-radius: 12px;
}

/* ── MOBILE — stack buttons full-width, tighten card padding ── */
@media (max-width: 720px) {
  .sd-hero { padding: 36px 0 32px; }
  .sd-hero__inner { padding: 0 16px; gap: 18px; }
  .sd-draw-card { padding: 18px 18px; gap: 16px; }
  .sd-signals { gap: 8px; }
  .sd-signal { padding: 11px 13px; }
  .sd-signal-plus { display: none; }    /* "+" reads weird when stacked */
  .sd-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .sd-btn-draw,
  .sd-btn-ai {
    width: 100%;
    min-height: 60px;
    padding: 14px 18px;
  }
}

/* Very narrow phones — single column for everything inside the card. */
@media (max-width: 480px) {
  .sd-signals { flex-direction: column; }
  .sd-signal { width: 100%; }
  .sd-draw-card__divider-label { font-size: 9px; padding: 0 10px; }
  .sd-hero__story { font-size: 14.5px; line-height: 1.6; }
}

/* ── STAGE ── */
.sd-stage {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nav-h, 60px) - 56px);
  min-height: 520px;
  background: #03040a;
  border-top: 1px solid rgba(212,175,55,0.08);
  overflow: hidden;
}

#randCanvas {
  display: block;
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* Status */
.sd-status {
  position: absolute; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 20; pointer-events: none;
}
.sd-status__inner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(3,4,10,0.88);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 24px; padding: 8px 20px;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.sd-status__icon { font-size: 15px; }
.sd-status__text {
  font-size: 13px; font-weight: 500;
  color: var(--c-text-75); white-space: nowrap;
}

/* ── WINNER OVERLAY ── */
.sd-winner-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3,4,10,0.88);
  backdrop-filter: blur(24px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 100;
}
.sd-winner-overlay.visible { opacity: 1; pointer-events: all; }

.sd-winner-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,175,55,0.28);
  border-radius: 16px; padding: 40px 48px;
  text-align: center; max-width: 480px; width: 90%;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 32px 80px rgba(0,0,0,0.7),
    0 0 80px rgba(212,175,55,0.08);
  animation: sdCardIn 0.55s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes sdCardIn {
  from { opacity: 0; transform: scale(0.86) translateY(24px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.sd-winner-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--c-gold);
  margin-bottom: 22px; opacity: 0.75;
}
.sd-winner-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-gold);
  animation: pulseDot 2s ease-in-out infinite;
}

.sd-winner-silk {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 26px; font-weight: 900;
  color: white; margin: 0 auto 18px;
  border: 3px solid rgba(212,175,55,0.45);
  box-shadow: 0 0 40px rgba(212,175,55,0.35), 0 8px 24px rgba(0,0,0,0.5);
}

.sd-winner-name {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 900; color: var(--c-text-100);
  line-height: 1.0; margin-bottom: 10px;
  text-shadow: 0 0 30px rgba(212,175,55,0.18);
}

.sd-winner-odds {
  font-family: var(--font-display); font-size: 26px; font-weight: 900;
  color: var(--c-gold); margin-bottom: 8px;
  filter: drop-shadow(0 0 12px rgba(212,175,55,0.4));
}

.sd-winner-meta {
  font-size: 12px; color: var(--c-text-35);
  letter-spacing: 0.04em; margin-bottom: 16px;
}

.sd-winner-verdict {
  font-size: 13px; font-style: italic; color: var(--c-text-55);
  line-height: 1.7; margin-bottom: 24px;
  padding: 12px 16px;
  border-left: 3px solid rgba(212,175,55,0.25);
  text-align: left;
  background: rgba(212,175,55,0.03);
  border-radius: 0 4px 4px 0;
}

.sd-winner-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.sd-winner-btn {
  padding: 11px 24px; border-radius: 6px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  cursor: pointer; border: none; font-family: var(--font-body);
  transition: all 0.2s; text-decoration: none;
  display: inline-flex; align-items: center;
}
.sd-winner-btn--primary { background: var(--c-gold); color: #06080f; }
.sd-winner-btn--primary:hover { background: var(--c-gold-lt); transform: translateY(-1px); }
.sd-winner-btn--ghost {
  background: rgba(255,255,255,0.05); color: var(--c-text-55);
  border: 1px solid rgba(255,255,255,0.1);
}
.sd-winner-btn--ghost:hover { background: rgba(255,255,255,0.09); color: var(--c-text-75); }

/* ── AI PANEL ── */
/* ── AI Analysis Panel — centred modal (desktop + mobile) ── */
.sd-ai-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 49;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.sd-ai-backdrop.visible { opacity: 1; pointer-events: all; }

.sd-ai-panel {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  width: min(420px, calc(100vw - 32px));
  max-height: min(80vh, 600px);
  overflow-y: auto;
  background: rgba(5,6,14,0.97);
  border: 1px solid rgba(212,175,55,0.22);
  border-radius: 14px; padding: 24px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.75);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 50;
}
.sd-ai-panel.visible {
  opacity: 1; pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.sd-ai-panel__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sd-ai-panel__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--c-text-55);
}
.sd-ai-panel__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4cdb78; animation: pulseDot 2s ease-in-out infinite;
}
.sd-ai-close {
  background: none; border: none; color: var(--c-text-35);
  cursor: pointer; font-size: 13px; padding: 4px 8px; transition: color 0.2s;
}
.sd-ai-close:hover { color: var(--c-text-75); }

.sd-ai-algo-desc {
  font-size: 12px; line-height: 1.7; color: var(--c-text-35);
  margin-bottom: 14px;
}
.sd-ai-pick-label {
  font-size: 9px; font-weight: 800; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--c-text-35); margin-bottom: 4px;
}
.sd-ai-pick-name {
  font-family: var(--font-display); font-size: 22px; font-weight: 900;
  color: var(--c-gold); margin-bottom: 14px;
}
.sd-ai-reasoning { font-size: 12px; line-height: 1.7; color: var(--c-text-55); margin-bottom: 12px; }

.sd-ai-top5 { display: flex; flex-direction: column; gap: 6px; }
.sd-ai-top5-header {
  font-size: 9px; font-weight: 800; letter-spacing: 0.15em;
  color: var(--c-text-35); text-transform: uppercase; margin-bottom: 4px;
}
.sd-ai-top5-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sd-ai-top5-rank { width: 20px; flex-shrink: 0; color: var(--c-text-35); }
.sd-ai-top5-name { flex: 1; color: var(--c-text-75); }
.sd-ai-top5-odds { color: var(--c-gold); font-weight: 600; }
.sd-ai-top5-score-bar {
  width: 60px; height: 4px; background: rgba(255,255,255,0.08);
  border-radius: 2px; overflow: hidden; flex-shrink: 0;
}
.sd-ai-top5-fill { height: 100%; background: var(--c-gold); border-radius: 2px; transition: width 0.6s ease; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sd-hero { padding: 32px 0 32px; }
  .sd-signals { display: none; }
  .sd-actions { flex-direction: column; }
  .sd-btn-draw, .sd-btn-ai { width: 100%; justify-content: center; }
  .sd-winner-card { padding: 28px 20px; }
  .sd-stage { height: calc(100vh - var(--nav-h, 60px) - 40px); }
}

/* ═════════════════════════════════════════════════════════════
   DRAW MODE — Hero slide-up transition
═════════════════════════════════════════════════════════════ */

/* Hero in draw mode — slides up and hides */
.sd-hero {
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              opacity   0.35s ease,
              height    0.42s cubic-bezier(0.4, 0, 0.2, 1),
              padding   0.42s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top center;
  will-change: transform, opacity;
}

.sd-hero.draw-active {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  height: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

/* Stage in draw mode — expands to fill full viewport below nav */
.sd-stage {
  transition: height 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.sd-stage.draw-active {
  height: calc(100vh - var(--nav-h, 60px) - 48px) !important;
  /* 48px = draw bar height */
}

/* The slim persistent draw bar */
.sd-draw-bar {
  display: none;  /* hidden until draw starts */
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 20px;
  background: rgba(6,8,15,0.95);
  border-bottom: 1px solid rgba(212,175,55,0.18);
  backdrop-filter: blur(12px);
  position: sticky;
  top: var(--nav-h, 60px);
  z-index: 40;
  animation: drawBarSlideIn 0.35s cubic-bezier(0.16,1,0.3,1) both;
}

.sd-draw-bar.visible { display: flex; }

@keyframes drawBarSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sd-draw-bar__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.sd-draw-bar__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-gold); flex-shrink: 0;
  animation: pulseDot 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(212,175,55,0.6);
}

.sd-draw-bar__race {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  color: var(--c-text-100);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 300px;
}

.sd-draw-bar__sep { color: rgba(255,255,255,0.2); font-size: 12px; }

.sd-draw-bar__status {
  font-size: 12px; font-weight: 500;
  color: var(--c-text-55);
  white-space: nowrap;
}

.sd-draw-bar__cancel {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--c-text-35);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 12px; border-radius: 4px;
  cursor: pointer; font-family: var(--font-body);
  transition: all 0.2s; flex-shrink: 0;
}
.sd-draw-bar__cancel:hover {
  background: rgba(192,57,43,0.15);
  border-color: rgba(192,57,43,0.4);
  color: rgba(255,160,160,0.85);
}

@media (max-width: 600px) {
  .sd-draw-bar__race { max-width: 160px; font-size: 12px; }
  .sd-draw-bar__status { display: none; }
}


/* ═══════════════════════════════════════════════════════
   TIMER · BUTTON FIXES · GUEST CTA
═══════════════════════════════════════════════════════ */

/* ── Timer in draw bar ───────────────────────────────── */
.sd-draw-bar__timer {
  display: none; /* shown via JS when draw starts */
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sd-draw-bar__timer-val {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 900;
  color: var(--c-gold); min-width: 28px;
  text-align: right;
}

.sd-draw-bar__timer-track {
  width: 80px; height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px; overflow: hidden;
}

.sd-draw-bar__timer-fill {
  height: 100%; width: 100%;
  background: var(--c-gold);
  border-radius: 2px;
  transition: width 1s linear, background 1s linear;
}

/* Note: previous "button size fixes" overrides were removed —
   the hero modernisation block at the top of this file sets the
   canonical button geometry (equal-height grid pair, full-width
   stacked on mobile). Leaving them in place was shrinking the
   primary CTA on every viewport. */

/* ── Guest CTA block ─────────────────────────────────── */
.sd-winner-guest {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; flex-direction: column;
  gap: 10px;
}

.sd-winner-guest__divider {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--c-text-35);
}

.sd-winner-guest__divider::before,
.sd-winner-guest__divider::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,0.06);
}

.sd-winner-guest__sub {
  font-size: 12px; color: var(--c-text-55);
  line-height: 1.65; text-align: center;
  margin: 0;
}

/* Primary CTA — gold, full width */
.sd-winner-btn--cta {
  background: var(--c-gold);
  color: var(--c-midnight);
  font-size: 13px; font-weight: 900;
  padding: 13px 20px;
  border-radius: 6px;
  text-align: center; justify-content: center;
  text-decoration: none;
  display: flex; align-items: center;
  transition: background 0.2s, transform 0.15s;
}

.sd-winner-btn--cta:hover {
  background: var(--c-gold-lt);
  transform: translateY(-1px);
}

.btn-full { width: 100%; }

/* Sign-in quiet link */
.sd-winner-guest__login {
  font-size: 11px; color: var(--c-text-35);
  text-align: center; text-decoration: none;
  transition: color 0.2s; padding: 2px 0;
  display: block;
}

.sd-winner-guest__login:hover { color: var(--c-gold); }

/* ── Mobile responsive ───────────────────────────────── */
@media (max-width: 768px) {
  /* Timer: shorter track on mobile */
  .sd-draw-bar__timer-track { width: 52px; }
  .sd-draw-bar__timer-val   { font-size: 12px; min-width: 24px; }

  /* Buttons sized by the hero block above (equal-height grid pair,
     full-width stacked). No padding overrides needed here. */

  /* Winner card: tighter guest block */
  .sd-winner-guest { margin-top: 16px; padding-top: 14px; gap: 8px; }
  .sd-winner-btn--cta { font-size: 12px; padding: 12px 16px; }
  .sd-winner-guest__sub { font-size: 11px; }
}

@media (max-width: 480px) {
  /* Timer hidden on very small screens — not enough bar space */
  .sd-draw-bar__timer { display: none !important; }
}

/* ── Race picker — dark-hero override ───────────────────────────
   The shared .rtc-picker chip styles assume a light surface; the
   immersive hero is dark, so we re-skin the chip to match. The
   inner sheet (the dialog dropdown) keeps its own styles since
   it overlays the page on its own surface.
─────────────────────────────────────────────────────────────────*/
.sd-race-picker {
  margin: 28px auto 4px;
  max-width: 720px;
  display: flex; justify-content: center;
}
.sd-rtc-picker {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #fafaf7;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
  width: 100%;
  justify-content: space-between;
  text-align: left;
}
.sd-rtc-picker:hover {
  background: rgba(212, 175, 55, 0.10);
  border-color: #D4AF37;
  transform: translateY(-1px);
}
.sd-rtc-picker:active { transform: scale(0.99); }
.sd-rtc-picker .rtc-picker__current {
  display: inline-flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sd-rtc-picker .rtc-picker__course {
  font-weight: 800;
  color: #f5e49a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12.5px;
  white-space: nowrap;
}
.sd-rtc-picker .rtc-picker__time {
  font-weight: 700;
  color: #fafaf7;
}
.sd-rtc-picker .rtc-picker__dot {
  color: rgba(255, 255, 255, 0.30);
}
.sd-rtc-picker .rtc-picker__chev {
  color: #D4AF37;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .sd-race-picker { margin: 22px 0 2px; max-width: 100%; }
  .sd-rtc-picker {
    padding: 12px 16px;
    font-size: 13px;
    gap: 8px;
  }
  .sd-rtc-picker .rtc-picker__course { font-size: 11.5px; }
}
