/* Unicorn or Ruin — "Acropolis Executive Tarot & Neo-Noir Obsidian" Design System */
:root {
  --bg: #050811;
  --bg-grad: radial-gradient(circle at 50% 0%, #101c38 0%, #050811 72%);
  --card: #0c1324;
  --card-elev: #131f3a;
  --border-gold: rgba(212, 175, 55, 0.48);
  --border-subtle: rgba(148, 163, 184, 0.18);
  --gold: #d4af37;
  --gold-bright: #f5d061;
  --emerald: #10b981;
  --crimson: #ef4444;
  --sky: #38bdf8;
  --amethyst: #a855f7;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Cinzel", "Georgia", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

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

html, body {
  min-height: 100vh;
  background: var(--bg);
  background-image: var(--bg-grad);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.unicorn-fx-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 250;
}

body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

.icon-pill {
  padding: 6px 9px !important;
}

.howto-pill.strict-on {
  background: rgba(239, 68, 68, 0.22);
  border-color: var(--crimson);
  color: #fca5a5;
}

.deal-tape-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 10px;
  background: rgba(5, 8, 17, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  overflow: hidden;
}

.deal-tape-live {
  color: var(--emerald);
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.deal-tape-viewport {
  flex: 1;
  overflow: hidden;
}

.deal-tape-track {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  color: var(--text-muted);
  animation: dealTapeScroll 36s linear infinite;
}

.deal-tape-bar:hover .deal-tape-track,
body.reduced-motion .deal-tape-track {
  animation-play-state: paused;
}

.deal-tape-track strong {
  color: var(--gold-bright);
}

@keyframes dealTapeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-42%); }
}

.founder-vault-strip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.vault-chest-pill {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(19, 31, 58, 0.7);
  border: 1px solid var(--border-subtle);
  font-size: 10.5px;
  color: var(--text-muted);
  opacity: 0.6;
}

.vault-chest-pill.unlocked {
  opacity: 1;
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-bright);
  font-weight: 700;
}

/* Top Header & Navigation */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(12, 19, 36, 0.94);
  border-bottom: 1px solid var(--border-gold);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 40;
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-gold);
}

.brand-eyebrow {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 700;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--text);
}

.gold-amp {
  color: var(--gold);
}

.mode-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.mode-tab {
  background: rgba(19, 31, 58, 0.65);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mode-tab:hover {
  color: var(--text);
  border-color: var(--border-gold);
}

.mode-tab.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.24), rgba(19, 31, 58, 0.95));
  color: var(--gold-bright);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.pill-badge {
  background: rgba(212, 175, 55, 0.22);
  color: var(--gold-bright);
  padding: 1px 5px;
  border-radius: 99px;
  font-size: 10px;
  font-family: var(--font-mono);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.howto-pill {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.1));
  color: var(--gold-bright);
  border: 1px solid var(--gold);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.howto-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

/* NYT × Duolingo Persistent Quick Guide Banner */
.QuickGuideBanner {
  background: linear-gradient(90deg, rgba(19, 31, 58, 0.92), rgba(12, 19, 36, 0.92));
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 5px 10px;
  margin-bottom: 6px;
}

.guide-steps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.guide-step-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #e2e8f0;
  line-height: 1.25;
  flex: 1;
  min-width: 210px;
}

.step-num-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  color: #050811;
  font-weight: 900;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.deck-selector-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.selector-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.btn-coach-pill {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #050811;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.pillar-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.pillar-safe-midline {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.45);
  z-index: 2;
}

.pillar-bounds-label {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: var(--font-mono);
}

.plain-english-box {
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(16, 185, 129, 0.38);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.42;
  color: #d1fae5;
  margin-bottom: 12px;
}

.choice-impacts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.impact-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
}

.impact-chip.pos {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
}

.impact-chip.neg {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
}

.impact-chip.ruin-warn {
  color: #ffffff;
  background: var(--crimson);
  font-weight: 900;
}

.choice-preview-box {
  cursor: pointer;
}

.choice-preview-box.coach-recommended,
.btn-swipe.coach-recommended {
  border-color: var(--emerald) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.48) !important;
}

.howto-modal-card {
  max-width: 680px;
}

.howto-visual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 680px) {
  .howto-visual-grid {
    grid-template-columns: 1fr;
  }
}

.howto-rule-box {
  background: var(--card-elev);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  font-size: 12.5px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.howto-icon-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.05em;
}

.howto-bar-demo {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: rgba(5, 8, 17, 0.65);
  padding: 5px 8px;
  border-radius: 6px;
}

.oracle-pill {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45);
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.oracle-pill.active {
  background: rgba(16, 185, 129, 0.24);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.account-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--card-elev);
  color: var(--text);
  border: 1px solid var(--border-gold);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.cohort-chip {
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold-bright);
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 10.5px;
}

/* Main Stage & Views */
.main-stage {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 12px 24px;
}

.game-view {
  display: none;
}

.game-view.active {
  display: block;
}

/* Career Deck Selector Bar */
.deck-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.deck-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.deck-pill {
  background: var(--card);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.deck-pill.active {
  background: var(--card-elev);
  color: var(--gold-bright);
  border-color: var(--gold);
}

.seed-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.seed-chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-gold);
  padding: 3px 8px;
  border-radius: 6px;
}

/* 4 Top Reigns Status Pillars */
.pillars-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 720px;
  margin: 0 auto 6px;
}

.pillar-card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 4px 8px 6px;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pillar-card.danger-zone {
  border-color: var(--crimson);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.38);
  animation: pulseCrimson 1.2s infinite alternate;
}

@keyframes pulseCrimson {
  from { box-shadow: 0 0 6px rgba(239, 68, 68, 0.25); }
  to { box-shadow: 0 0 18px rgba(239, 68, 68, 0.65); }
}

.pillar-preview-dot {
  min-height: 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
}

.pillar-preview-dot.pos {
  color: var(--emerald);
}

.pillar-preview-dot.neg {
  color: var(--crimson);
}

.pillar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pillar-val {
  font-family: var(--font-mono);
  font-size: 11px;
}

.pillar-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.pillar-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease;
}

.fill-capital { background: var(--emerald); }
.fill-velocity { background: var(--sky); }
.fill-trust { background: var(--gold); }
.fill-sanity { background: var(--amethyst); }

.pillar-card.danger-zone .pillar-bar-fill {
  background: var(--crimson) !important;
}

/* Telemetry Strip */
.telemetry-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto 6px;
  padding: 5px 10px;
  background: rgba(19, 31, 58, 0.72);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  flex-wrap: wrap;
}

.tele-item {
  display: flex;
  flex-direction: column;
}

.tele-label {
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.tele-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.emerald-text { color: var(--emerald); }
.gold-text { color: var(--gold-bright); }
.crimson-text { color: var(--crimson); }
.mono-text { font-family: var(--font-mono); }

/* Center Spring-Physics Swipe Card */
.card-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 0 8px;
}

.dilemma-card {
  width: 100%;
  max-width: 440px;
  min-height: 290px;
  background: linear-gradient(165deg, #131f3a 0%, #0c1324 65%, #090e1c 100%);
  border: 2px solid var(--border-gold);
  border-radius: 18px;
  padding: 12px 14px 10px;
  position: relative;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), inset 0 0 20px rgba(212, 175, 55, 0.08);
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  transition: transform 0.22s cubic-bezier(0.2, 0.85, 0.3, 1.1), border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dilemma-card.dragging {
  cursor: grabbing;
  transition: none;
}

.decision-stamp {
  position: absolute;
  top: 46px;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 5;
}

.stamp-left {
  left: 14px;
  color: var(--sky);
  border: 2px solid var(--sky);
  background: rgba(12, 19, 36, 0.9);
  transform: rotate(-8deg);
}

.stamp-right {
  right: 14px;
  color: var(--gold-bright);
  border: 2px solid var(--gold-bright);
  background: rgba(12, 19, 36, 0.9);
  transform: rotate(8deg);
}

.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.magazine-pill {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.14);
  padding: 3px 8px;
  border-radius: 99px;
}

.citation-pill {
  font-size: 10.5px;
  color: var(--sky);
  text-decoration: none;
  font-weight: 600;
}

.citation-pill:hover {
  text-decoration: underline;
}

.deity-speaker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.deity-portrait-frame {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 2px solid var(--gold);
  background: radial-gradient(circle, #1e293b, #090d16);
  overflow: hidden;
  flex-shrink: 0;
}

.deity-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.speaker-role {
  font-size: 10px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 1px;
}

.card-headline {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.2;
  color: var(--text);
}

.card-prompt {
  font-size: 12.5px;
  line-height: 1.38;
  color: #e2e8f0;
  background: rgba(5, 8, 17, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
}

.plain-english-box {
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(16, 185, 129, 0.38);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1.3;
  color: #d1fae5;
  margin-bottom: 6px;
}

.card-choices-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.choice-preview-box {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.choice-preview-box.active-tilt {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.14);
}

.choice-dir {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.choice-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.outcome-banner {
  max-width: 560px;
  margin: 6px auto;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  background: rgba(12, 19, 36, 0.75);
  border: 1px solid var(--border-subtle);
  padding: 5px 10px;
  border-radius: 8px;
}

.swipe-buttons-row {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 440px;
}

.btn-swipe {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

/* Short-Height Laptop (1280x720) & Mobile (390x844) Above-the-Fold Ergonomics */
@media (max-height: 760px) {
  .QuickGuideBanner {
    display: none;
  }
  .deal-tape-bar {
    padding: 2px 8px;
    font-size: 10px;
  }
  .main-stage {
    padding: 4px 10px 12px;
  }
  .dilemma-card {
    min-height: 250px;
    padding: 9px 12px;
  }
}

@media (max-width: 680px) {
  .QuickGuideBanner,
  .deal-tape-bar,
  .selector-label,
  .seed-chip,
  #btn-copy-seed,
  #btn-open-codex,
  #btn-open-howto,
  #btn-audio-mute,
  #btn-reduced-motion,
  #btn-strict-toggle,
  .pillar-bounds-label {
    display: none !important;
  }
  .top-nav {
    padding: 4px 8px !important;
    gap: 4px !important;
  }
  .brand-logo {
    width: 22px;
    height: 22px;
  }
  .brand-eyebrow {
    font-size: 7.5px;
  }
  .brand-title {
    font-size: 13px;
  }
  .mode-tabs,
  .deck-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    gap: 4px;
    scrollbar-width: none;
  }
  .mode-tab,
  .deck-pill {
    padding: 3px 7px;
    font-size: 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .deck-selector-bar {
    margin-bottom: 4px;
    gap: 4px;
  }
  .pillars-hud {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px;
    margin-bottom: 4px;
  }
  .pillar-card {
    padding: 3px 5px;
  }
  .pillar-preview-dot {
    min-height: 11px;
    font-size: 10px;
  }
  .pillar-header {
    font-size: 9.5px;
    margin-bottom: 2px;
  }
  .pillar-val {
    font-size: 9.5px;
  }
  .telemetry-strip {
    padding: 3px 7px;
    gap: 4px 8px;
    margin-bottom: 4px;
  }
  .tele-label {
    font-size: 7.5px;
  }
  .tele-value {
    font-size: 10.5px;
  }
  #btn-quick-asset-drawer {
    padding: 3px 7px;
    font-size: 10px;
  }
  .dilemma-card {
    min-height: 215px;
    padding: 8px 10px;
  }
  .deity-portrait-frame {
    width: 36px;
    height: 36px;
  }
  .card-headline {
    font-size: 13.5px;
  }
  .card-prompt {
    font-size: 11.5px;
    padding: 6px 8px;
    margin-bottom: 4px;
  }
  .plain-english-box {
    font-size: 10px;
    padding: 4px 6px;
    margin-bottom: 4px;
  }
  .choice-preview-box {
    padding: 4px 6px;
  }
  .choice-title {
    font-size: 10px;
  }
}

.btn-swipe:active {
  transform: scale(0.97);
}

.btn-swipe-left {
  background: rgba(56, 189, 248, 0.14);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.btn-swipe-right {
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold-bright);
  border: 1px solid var(--gold);
}

/* Endgame Tombstone & Venture Dossier Panel */
.endgame-panel {
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

.endgame-card {
  background: var(--card);
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 22px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

.endgame-stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 6px;
  border: 2px solid var(--crimson);
  color: var(--crimson);
  margin-bottom: 10px;
}

.endgame-stamp.ipo-stamp {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

.endgame-title {
  font-family: var(--font-serif);
  font-size: 24px;
  margin-bottom: 8px;
}

.endgame-summary {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 16px;
}

.endgame-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.endgame-stat {
  background: var(--card-elev);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.stat-val {
  font-size: 15px;
  font-weight: 800;
  margin-top: 3px;
}

.dossier-preview-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border-gold);
  margin-bottom: 16px;
  background: #050811;
}

.dossier-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.endgame-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Asset Drawer & Weekly Challenges */
.section-header-card {
  background: var(--card);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.eyebrow-gold {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 4px;
}

.muted-sub {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 680px;
  margin-top: 4px;
}

.asset-wallet-box {
  background: var(--card-elev);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 240px;
}

.wallet-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 3px 0;
}

.asset-grid, .challenges-grid, .ruin-museum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.asset-item-card, .challenge-card, .ruin-card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.asset-item-card.owned, .challenge-card.completed, .ruin-card.unlocked {
  border-color: var(--gold);
  background: linear-gradient(160deg, #131f3a 0%, #0c1324 100%);
}

/* Amphitheater Live QR Party Mode */
.party-mode-header {
  background: var(--card);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.party-role-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.join-code-inline {
  display: flex;
  gap: 6px;
}

.party-split-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .party-split-layout, .community-grid {
    grid-template-columns: 1fr;
  }
}

.party-host-panel, .party-controller-panel, .genome-card, .leaderboard-card {
  background: var(--card);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 18px;
}

.projector-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.room-code-giant {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 900;
  color: var(--gold-bright);
  letter-spacing: 0.12em;
}

.room-url-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--sky);
}

.qr-box {
  width: 96px;
  height: 96px;
  background: #ffffff;
  padding: 6px;
  border-radius: 10px;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.herd-counter-box {
  display: flex;
  gap: 12px;
}

.herd-stat {
  background: var(--card-elev);
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}

.host-controls-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.party-stage-box {
  background: var(--card-elev);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.party-round-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-bright);
  margin-bottom: 6px;
}

.party-card-headline {
  font-family: var(--font-serif);
  font-size: 19px;
  margin-bottom: 6px;
}

.party-card-prompt {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 12px;
}

.party-split-bars {
  margin-top: 10px;
}

.split-side {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 4px 0;
}

.split-bar-track {
  height: 12px;
  background: rgba(212, 175, 55, 0.25);
  border-radius: 99px;
  overflow: hidden;
}

.split-fill-left {
  height: 100%;
  background: var(--sky);
  transition: width 0.3s ease;
}

.party-podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.podium-slot {
  background: var(--card-elev);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
}

.controller-profile-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.mini-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.mini-pillar {
  background: var(--card-elev);
  border: 1px solid var(--border-subtle);
  padding: 7px;
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
}

.student-status-banner {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  margin-bottom: 12px;
}

.controller-vote-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-vote-giant {
  padding: 18px 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.btn-vote-left {
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
  border: 2px solid var(--sky);
}

.btn-vote-right {
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold-bright);
  border: 2px solid var(--gold);
}

.vote-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

/* Community, Genome & Passport */
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 16px;
}

.archetype-banner {
  background: var(--card-elev);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0 14px;
  display: flex;
  flex-direction: column;
}

.archetype-label {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.archetype-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--gold-bright);
}

.genome-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.genome-row-lbl {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.passport-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.passport-item {
  background: var(--card-elev);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11.5px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.passport-item.active {
  border-color: rgba(16, 185, 129, 0.45);
}

.lb-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.lb-filter-pills {
  display: flex;
  gap: 6px;
}

.lb-tab {
  background: var(--card-elev);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.lb-tab.active {
  color: var(--gold-bright);
  border-color: var(--gold);
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.lb-table th, .lb-table td {
  padding: 9px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lb-table th {
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* Shared Buttons, Inputs & Modal */
.btn-gold-primary {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #050811;
  border: none;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.btn-gold-outline, .btn-gold-outline-sm {
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold-bright);
  border: 1px solid var(--gold);
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-emerald {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid var(--emerald);
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-ghost, .btn-ghost-sm, .btn-ghost-link {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border-subtle);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.input-std, .select-std, .input-code {
  background: #070c18;
  color: var(--text);
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  min-width: 0;
  max-width: 100%;
}

.party-host-panel, .party-controller-panel, .genome-card, .leaderboard-card, .party-split-layout > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 680px) {
  .top-nav {
    padding: 8px 10px;
    gap: 8px;
  }
  .header-actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }
  .founder-vault-strip {
    display: none;
  }
  .pillars-hud,
  .mini-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .controller-profile-row,
  .party-podium-grid,
  .controller-vote-buttons {
    grid-template-columns: 1fr;
  }
  .herd-counter-box {
    flex-wrap: wrap;
    width: 100%;
  }
  .asset-wallet-box {
    min-width: 0;
    width: 100%;
  }
}

.input-code {
  width: 125px;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

/* Auth Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-card {
  background: var(--card);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 20px;
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.btn-close-modal {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.auth-section {
  background: var(--card-elev);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.field-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.identity-form-row, .otp-row, .pair-row, .sso-buttons-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pair-code-pill {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--gold-bright);
  padding: 5px 10px;
  background: rgba(212, 175, 55, 0.15);
  border-radius: 8px;
}

.auth-status-msg {
  font-size: 12px;
  color: #a7f3d0;
  text-align: center;
}

/* Exact Gambit Sign-In / Sign-Up Sheet Styles */
.gambit-auth-sheet {
  max-width: 480px;
  background: #0b1120;
  border: 2px solid var(--border-gold);
}

.gambit-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.gambit-back-btn {
  background: rgba(30, 41, 59, 0.75);
  color: #e2e8f0;
  border: 1px solid var(--border-subtle);
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.gambit-brand-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
}

.gambit-mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #060a14;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 12px;
}

.gambit-mode-tab {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gambit-mode-tab.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.28), rgba(30, 41, 59, 0.95));
  color: var(--gold-bright);
  border: 1px solid var(--gold);
}

.gambit-auth-card {
  background: #111a2e;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
}

.gambit-sanctuary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.gambit-mascot-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 2px solid var(--gold);
  object-fit: cover;
}

.gambit-title {
  font-family: var(--font-serif);
  font-size: 17px;
  color: #ffffff;
}

.gambit-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.gambit-oauth-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gambit-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: #182338;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.gambit-oauth-btn:hover {
  border-color: var(--gold);
  background: #1e2c46;
}

.gambit-oauth-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.google-bg {
  background: #ffffff;
}

.apple-bg {
  background: #000000;
}

.gambit-or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.gambit-or-divider::before,
.gambit-or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.gambit-signup-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.gambit-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #070c18;
  color: #ffffff;
  font-size: 13.5px;
  margin-bottom: 8px;
}

.gambit-code-input {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-align: center;
}

.gambit-gold-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #f5d061, #d4af37);
  color: #050811;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.gambit-guest-link {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
  cursor: pointer;
}

.gambit-secondary-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.gambit-passport-card {
  background: #111a2e;
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
}

.gambit-passport-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.gambit-verified-pill {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid var(--emerald);
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 800;
}

.gambit-provider-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.gambit-passport-handle {
  font-size: 18px;
  color: var(--gold-bright);
}

.gambit-passport-email {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.gambit-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.gambit-stat-box {
  background: #070c18;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.gambit-action-row {
  display: flex;
  gap: 8px;
}
