:root {
  --bg: #0b0b0d;
  --surface: #141418;
  --surface-2: #1b1b21;
  --border: #2c2b30;
  --paper: #efe8d8;
  --muted: #9b9589;
  --red: #d62828;
  --red-dim: #7f1619;
  --gold: #e0b341;
  --teal: #3f8f8b;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

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

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Film grain & vignette overlays */
.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  background-image: radial-gradient(rgba(239, 232, 216, 0.08) 1px, transparent 0);
  background-size: 3px 3px;
  transition: opacity 0.25s ease;
}

body.grain-on .film-grain {
  opacity: 0.45;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 89;
  background: radial-gradient(circle at center, transparent 58%, rgba(0, 0, 0, 0.72) 100%);
}

/* Top bar */
.cinema-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 11, 13, 0.9);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.cinema-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.cinema-controls {
  display: flex;
  gap: 8px;
}

.ctrl-btn,
.nav-btn,
.filter-btn,
.tl-tab {
  background: var(--surface);
  color: var(--paper);
  border: 1px solid var(--border);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ctrl-btn:hover,
.nav-btn:hover,
.filter-btn:hover,
.tl-tab:hover {
  border-color: var(--gold);
}

.filter-btn.is-selected,
.tl-tab.is-selected {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Stage */
.stage {
  position: fixed;
  top: 52px;
  bottom: 62px;
  left: 0;
  right: 0;
  overflow: hidden;
  outline: none;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 34px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(14px) scale(0.99);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  overflow-y: auto;
}

.slide.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.slide-inner {
  width: 100%;
  max-width: 1080px;
}

/* Typography & Chapter Headers */
.chapter-head {
  margin-bottom: 24px;
  border-left: 4px solid var(--red);
  padding-left: 16px;
}

.chapter-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

.chapter-head h2 {
  font-size: clamp(24px, 3.2vw, 38px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.lead-text {
  font-size: 17px;
  line-height: 1.55;
  color: var(--paper);
  margin-bottom: 22px;
  max-width: 820px;
}

/* Hero Slide */
.hero-layout {
  text-align: left;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(214, 40, 40, 0.12), rgba(20, 20, 24, 0.96) 55%);
  padding: 44px;
  position: relative;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.accent-red {
  color: var(--red);
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.45;
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 28px;
}

.hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.meta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 14px;
}

.meta-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}

.meta-value {
  font-weight: 700;
  font-size: 15px;
  color: var(--paper);
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.primary-btn {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 13px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.primary-btn:hover {
  background: #b71f1f;
}

.hint-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* Cards & Grids */
.two-col-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px;
}

.info-card h3 {
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 10px;
}

.info-card p {
  line-height: 1.55;
  color: #d8d1c3;
  font-size: 15px;
}

/* Timeline */
.timeline-interactive {
  margin-bottom: 22px;
}

.timeline-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tl-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  padding: 18px 22px;
}

.tl-panel h3 {
  font-size: 19px;
  margin-bottom: 6px;
}

.tl-panel p {
  line-height: 1.5;
  color: #d8d1c3;
}

/* Boycott Widget */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.boycott-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.boycott-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
}

.boycott-card[data-type="boycott"] { border-top: 3px solid var(--red); }
.boycott-card[data-type="neutral"] { border-top: 3px solid var(--gold); }
.boycott-card[data-type="full"] { border-top: 3px solid var(--teal); }

.boycott-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.boycott-card h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.boycott-card p {
  font-size: 13.5px;
  line-height: 1.45;
  color: #ccc5b8;
}

/* Cities */
.city-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.city-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
}

.city-card.is-primary {
  border-color: var(--red);
  background: linear-gradient(145deg, rgba(214, 40, 40, 0.12), var(--surface));
}

.city-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.city-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.city-card p {
  font-size: 14.5px;
  line-height: 1.5;
  color: #d3ccbe;
}

/* Split feature */
.split-feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}

.feature-block {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.big-stat {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 10px;
}

.feature-block h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.feature-block p {
  line-height: 1.55;
  color: #d8d1c3;
}

.feature-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 15px 18px;
}

.mini-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.mini-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.mini-card p {
  font-size: 13.5px;
  line-height: 1.45;
  color: #ccc5b8;
}

/* Medals */
.medal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.medal-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.medal-row {
  display: grid;
  grid-template-columns: 130px 1fr 110px;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 14px;
}

.medal-country {
  font-weight: 700;
  font-size: 14px;
}

.medal-bar-wrap {
  height: 18px;
  background: #0e0e11;
  border: 1px solid #25252b;
  overflow: hidden;
}

.medal-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width 0.35s ease;
}

.medal-num {
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: right;
  color: var(--paper);
}

.record-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rec-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px;
  text-align: center;
}

.rec-item strong {
  display: block;
  font-size: 24px;
  color: var(--gold);
}

.rec-item span {
  font-size: 12px;
  color: var(--muted);
}

/* Heroes */
.heroes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.hero-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.hero-figure {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 10px;
}

.hero-card p {
  font-size: 14px;
  line-height: 1.5;
  color: #d3ccbe;
}

/* Lists & Quotes */
.clean-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.45;
  color: #d8d1c3;
}

.clean-list li::before {
  content: "▪ ";
  color: var(--red);
}

.bear-card {
  border-color: var(--gold);
}

.quote-line {
  margin-top: 14px;
  padding-left: 12px;
  border-left: 2px solid var(--gold);
  font-style: italic;
  color: var(--gold) !important;
}

.credits-footer {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* Bottom Filmstrip Footer */
.film-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  padding: 0 24px;
  background: rgba(11, 11, 13, 0.95);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 50;
}

.filmstrip-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot-btn {
  width: 24px;
  height: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dot-btn.is-active {
  background: var(--red);
  border-color: var(--red);
}

.frame-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.1em;
}

/* Overview Modal */
.overview-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 10, 0.96);
  z-index: 100;
  padding: 28px;
  overflow-y: auto;
}

.overview-modal[hidden] {
  display: none;
}

.overview-header {
  max-width: 1120px;
  margin: 0 auto 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.overview-header h2 {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.overview-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ov-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px;
  text-align: left;
  color: var(--paper);
  cursor: pointer;
}

.ov-card:hover,
.ov-card.is-current {
  border-color: var(--red);
}

.ov-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 6px;
}

/* Responsive */
@media (max-width: 860px) {
  .slide {
    padding: 20px;
    align-items: flex-start;
  }
  .hero-layout {
    padding: 24px;
  }
  .hero-meta-grid,
  .two-col-cards,
  .boycott-grid,
  .city-grid,
  .split-feature,
  .heroes-grid,
  .record-strip,
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .medal-row {
    grid-template-columns: 95px 1fr 80px;
  }
  .filmstrip-progress {
    display: none;
  }
  .cinema-bar {
    padding: 0 12px;
  }
  .brand-code {
    display: none;
  }
}
