:root {
  --bg: #07060a;
  --bg-panel: rgba(8, 7, 14, 0.94);
  --gold: #c9a227;
  --gold-bright: #f0d060;
  --gold-dim: #7a6118;
  --gold-glow: rgba(201, 162, 39, 0.35);
  --crimson: #8b1a2b;
  --ice: #a8d4f0;
  --text: #f4f0e8;
  --text-dim: #b8b0a0;
  --muted: #6a6258;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --era-color: #c9a227;
  --era-glow: rgba(201, 162, 39, 0.35);
  --panel-max: 880px;
  --panel-radius: 20px;
  --topbar-h: 54px;
  --admin-h: 38px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; cursor: none; }
body {
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* === CUSTOM CURSOR === */
#cursor-dot {
  position: fixed;
  top: -4px; left: -4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold-bright);
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  mix-blend-mode: screen;
}
#cursor-ring {
  position: fixed;
  top: -18px; left: -18px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(240, 208, 96, 0.55);
  pointer-events: none;
  z-index: 9998;
  will-change: transform;
  transition: width 0.18s ease, height 0.18s ease, border-color 0.18s, top 0.18s, left 0.18s;
}
#cursor-ring.hover {
  width: 52px; height: 52px;
  top: -26px; left: -26px;
  border-color: var(--gold-bright);
  border-width: 2px;
  background: rgba(240, 208, 96, 0.04);
}

/* === CANVAS === */
#canvas-root {
  position: fixed;
  inset: 0;
  z-index: 0;
}
#canvas-root canvas { display: block; width: 100% !important; height: 100% !important; }

/* === GRAIN OVERLAY === */
#grain-overlay {
  position: fixed;
  inset: -10%;
  width: 120%; height: 120%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px;
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%   { transform: translate(0,0); }
  10%  { transform: translate(-5%,-5%); }
  20%  { transform: translate(-10%,5%); }
  30%  { transform: translate(5%,-10%); }
  40%  { transform: translate(-5%,15%); }
  50%  { transform: translate(-10%,5%); }
  60%  { transform: translate(15%,0); }
  70%  { transform: translate(0,10%); }
  80%  { transform: translate(-15%,0); }
  90%  { transform: translate(10%,5%); }
}

/* === VIGNETTE === */
#vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(0,0,0,0.62) 100%);
}

/* === TOPBAR === */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(7, 6, 10, 0.78);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}
.brand { display: flex; flex-direction: column; }
.brand-main {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.brand-sub {
  font-size: 0.55rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1px;
}
.topnav { display: flex; align-items: center; gap: 1.25rem; }
.topnav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s;
}
.topnav-link:hover { color: var(--gold); }

/* === GAME SHELL === */
#game-shell {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
#game-shell > * { pointer-events: auto; }

/* === ERA HUD === */
.era-hud {
  position: absolute;
  top: calc(var(--topbar-h) + 14px);
  left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}
.era-hud-year {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--era-color);
  text-shadow: 0 0 24px var(--era-glow);
  transition: color 0.8s, text-shadow 0.8s;
}
.era-hud-name {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* === TIMELINE RAIL === */
.timeline-rail {
  position: absolute;
  top: calc(var(--topbar-h) + 1rem);
  right: 1.25rem;
  bottom: calc(var(--admin-h) + 1rem);
  display: flex;
  align-items: center;
  pointer-events: none;
}
#timeline-dots {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}
.timeline-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.5s ease;
}
.timeline-dot.done { background: rgba(201, 162, 39, 0.4); }
.timeline-dot.current {
  width: 9px; height: 9px;
  background: var(--gold-bright);
  box-shadow: 0 0 10px var(--gold-glow);
}
.timeline-dot.future { background: rgba(255,255,255,0.05); }

/* === WASD HINT === */
.wasd-hint {
  position: absolute;
  bottom: calc(var(--admin-h) + 12px);
  left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.28);
  pointer-events: none;
  white-space: nowrap;
}
.wasd-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
}

/* === GAME ROOT (bottom anchor) === */
#game-root {
  position: absolute;
  bottom: var(--admin-h);
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
}

/* === STORY PANEL === */
.story-panel {
  width: 100%;
  max-width: var(--panel-max);
  background: var(--bg-panel);
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  overflow: hidden;
  backdrop-filter: blur(28px) saturate(1.15);
  -webkit-backdrop-filter: blur(28px) saturate(1.15);
  box-shadow:
    0 -1px 0 rgba(255,255,255,0.05),
    0 -32px 90px rgba(0,0,0,0.72),
    0 -4px 40px rgba(0,0,0,0.5);
  position: relative;
  animation: panel-rise 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes panel-rise {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
/* Gradient top border, era-colored */
.story-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--era-color) 28%,
    var(--era-color) 72%,
    transparent 100%);
  opacity: 0.65;
  transition: background 0.8s;
}
/* Corner glow */
.story-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(201,162,39,0.035) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 0%, rgba(139,26,43,0.035) 0%, transparent 55%);
}

.story-panel-inner {
  padding: 1.4rem 1.75rem 1.1rem;
  position: relative;
  z-index: 1;
}

/* === STORY HEADER === */
.story-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}
.chapter-badge {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--era-color);
  border: 1px solid rgba(201,162,39,0.22);
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  transition: color 0.8s, border-color 0.8s;
}
.era-stamp {
  font-size: 0.67rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* === STORY TITLE === */
.story-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.45rem;
  letter-spacing: 0.05em;
}

/* === PERSPECTIVE INDICATOR === */
.perspective-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}
.char-dot {
  width: 17px; height: 17px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
}
.char-dot.leto {
  background: rgba(139,26,43,0.45);
  border: 1px solid var(--crimson);
  color: #ffb4c0;
}
.char-dot.kala {
  background: rgba(40,80,130,0.45);
  border: 1px solid rgba(168,212,240,0.6);
  color: var(--ice);
}

/* === STORY TEXT (typewriter) === */
.story-text {
  font-size: 0.88rem;
  line-height: 1.78;
  color: var(--text-dim);
  margin-bottom: 1.1rem;
  min-height: 2.8rem;
  cursor: default;
}
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  background: var(--era-color);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 0.75s step-end infinite;
  transition: background 0.8s;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* === CHOICE BUTTONS === */
.story-choices { display: flex; flex-direction: column; gap: 0.45rem; }

.choice-btn {
  position: relative;
  text-align: left;
  padding: 0.78rem 2.5rem 0.78rem 3rem;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  background: rgba(255,255,255,0.028);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: none;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
  overflow: hidden;
}
/* Number badge */
.choice-num {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 19px; height: 19px;
  border-radius: 4px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
/* Arrow */
.choice-arrow {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.2);
  font-size: 0.7rem;
  transition: transform 0.18s, color 0.18s;
}
/* Shimmer sweep on hover */
.choice-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.035), transparent);
  transform: translateX(-120%);
  transition: transform 0.45s ease;
}
.choice-btn:hover::before { transform: translateX(120%); }
.choice-btn:hover {
  border-color: rgba(201,162,39,0.4);
  background: rgba(201,162,39,0.055);
  transform: translateX(3px);
}
.choice-btn:hover .choice-num {
  background: rgba(201,162,39,0.18);
  border-color: var(--gold);
  color: var(--gold-bright);
}
.choice-btn:hover .choice-arrow {
  transform: translateY(-50%) translateX(4px);
  color: var(--gold);
}
.choice-btn:active {
  transform: translateX(3px) scale(0.99);
  border-color: var(--crimson);
}

/* === STORY HUD (panel footer) === */
.story-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.042);
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(0,0,0,0.18);
}
.level-pill {
  color: var(--era-color);
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: color 0.8s;
}

/* === CHARACTER SELECT === */
.char-select-screen {
  width: 100%;
  max-width: var(--panel-max);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.char-card {
  position: relative;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  cursor: none;
  background: rgba(8, 7, 14, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  animation: panel-rise 0.45s cubic-bezier(0.16,1,0.3,1);
}
.char-card:hover {
  border-color: rgba(201,162,39,0.45);
  box-shadow: 0 0 48px rgba(201,162,39,0.12), inset 0 0 32px rgba(201,162,39,0.025);
  transform: translateY(-3px);
}
.char-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 64px rgba(201,162,39,0.22);
}
.char-card-art {
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
}
.char-card-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}
.char-card:hover .char-card-art img { transform: scale(1.05); }
.char-card-art-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1a2040, #0a0c18);
  font-size: 5rem;
}
.char-card-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(7,6,14,0.96));
}
.char-card-info {
  padding: 1rem 1.2rem 1.25rem;
}
.char-card-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.07em;
  margin-bottom: 0.3rem;
}
.char-card-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
}
.char-card-tag {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.62rem;
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  background: rgba(201,162,39,0.09);
  border: 1px solid rgba(201,162,39,0.22);
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.char-card[data-player="kala"] .char-card-tag {
  background: rgba(40,80,130,0.18);
  border-color: rgba(168,212,240,0.28);
  color: var(--ice);
}

/* === START SCREEN === */
.start-screen {
  width: 100%;
  max-width: var(--panel-max);
}
.start-card {
  background: var(--bg-panel);
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  padding: 1.8rem 2rem 1.4rem;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 -28px 80px rgba(0,0,0,0.65);
  position: relative;
  overflow: hidden;
  animation: panel-rise 0.6s cubic-bezier(0.16,1,0.3,1);
}
.start-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  opacity: 0.5;
}
.start-label {
  font-size: 0.65rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.start-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-bright), var(--ice));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.55rem;
  letter-spacing: 0.06em;
}
.start-desc {
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.68;
  max-width: 520px;
  margin-bottom: 1.4rem;
}

/* === INTRO OVERLAY === */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(4, 3, 10, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity 0.9s ease;
  padding: 1rem;
}
.intro-overlay.hidden { opacity: 0; pointer-events: none; }
.intro-card { text-align: center; max-width: 440px; }
.intro-logo {
  width: 68px; height: 68px;
  margin: 0 auto 1.4rem;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 44px rgba(201,162,39,0.42);
}
.intro-logo-inner {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  color: #07060a;
  letter-spacing: 0.12em;
}
.intro-studio {
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.intro-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--gold-bright), var(--ice));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}
.intro-subtitle {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 2rem;
}
.intro-legal {
  margin-top: 1rem;
  font-size: 0.62rem;
  color: var(--muted);
  opacity: 0.6;
  line-height: 1.6;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.68rem 1.4rem;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: none;
  text-decoration: none;
  transition: filter 0.18s, transform 0.18s, box-shadow 0.18s;
  letter-spacing: 0.03em;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 55%, var(--gold-dim) 100%);
  color: #07060a;
  font-weight: 700;
  box-shadow: 0 4px 22px rgba(201,162,39,0.28);
}
.btn-gold:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 6px 30px rgba(201,162,39,0.42); }
.btn-gold:active { transform: translateY(0); filter: brightness(0.95); }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
}
.btn-ghost:hover { border-color: rgba(201,162,39,0.38); color: var(--gold); background: rgba(201,162,39,0.06); }
.btn-sm { padding: 0.42rem 0.85rem; font-size: 0.78rem; border-radius: 8px; }
.btn-lg { padding: 0.88rem 2rem; font-size: 0.98rem; }
.btn-block { width: 100%; }
.btn-block + .btn-block { margin-top: 0.45rem; }

/* === PAYWALL MODAL === */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-scrim.show { opacity: 1; pointer-events: auto; }
.modal-card {
  width: min(450px, 100%);
  background: rgba(10, 8, 18, 0.98);
  border: 1px solid rgba(201,162,39,0.22);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 40px 80px rgba(0,0,0,0.7);
  animation: modal-pop 0.32s cubic-bezier(0.16,1,0.3,1);
}
@keyframes modal-pop {
  from { transform: scale(0.88) translateY(18px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}
.modal-icon { font-size: 2.2rem; margin-bottom: 0.7rem; }
.modal-card h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold-bright);
  margin-bottom: 0.45rem;
}
.modal-card p { color: var(--text-dim); font-size: 0.88rem; line-height: 1.62; }
.modal-price {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--gold-bright);
  margin: 0.85rem 0 0.25rem;
  line-height: 1;
}
.modal-price-sub { font-size: 1.4rem; font-weight: 600; color: var(--gold); vertical-align: super; }
.modal-detail { font-size: 0.76rem; color: var(--muted); margin-bottom: 1.2rem; }
.modal-legal {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 1rem;
  text-align: left;
  opacity: 0.65;
}

/* === ADMIN BAR === */
.admin-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--admin-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0 1rem;
  background: rgba(7,6,10,0.94);
  border-top: 1px solid rgba(255,255,255,0.038);
  font-size: 0.72rem;
  color: var(--muted);
}
.admin-toggle { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.admin-toggle input { accent-color: var(--gold); cursor: pointer; }
.timer-display {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.76rem;
}
.admin-stack { font-size: 0.62rem; opacity: 0.45; }

/* === CINEMATIC === */
.cinematic-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s;
}
.cinematic-overlay.show { opacity: 1; pointer-events: auto; }
.cinematic-frame {
  position: relative;
  width: min(92vw, 1040px);
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 0 90px rgba(0,0,0,0.85);
}
.cinematic-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cinematic-frame img.ken-burns { animation: ken-burns-cine 7s ease-in-out forwards; }
@keyframes ken-burns-cine {
  from { transform: scale(1) translate(0,0); }
  to   { transform: scale(1.1) translate(-2%,-1%); }
}
.cinematic-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 130px rgba(0,0,0,0.72);
  pointer-events: none;
}
.cinematic-caption {
  position: absolute;
  bottom: 3rem;
  left: 0; right: 0;
  text-align: center;
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 2px 14px rgba(0,0,0,0.95);
  padding: 0 2rem;
  letter-spacing: 0.025em;
  line-height: 1.5;
}
.cinematic-bars::before,
.cinematic-bars::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 9%;
  background: #000;
  z-index: 2;
}
.cinematic-bars::before { top: 0; }
.cinematic-bars::after { bottom: 0; }
.cinematic-skip {
  position: absolute;
  bottom: 1.5rem; right: 1.5rem;
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.65);
  padding: 0.38rem 0.8rem;
  border-radius: 6px;
  cursor: none;
  z-index: 20;
  font-size: 0.78rem;
  transition: all 0.18s;
  font-family: var(--font-body);
}
.cinematic-skip:hover { border-color: var(--gold); color: var(--gold); }

/* === FADE OVERLAYS === */
.fade-white, .fade-black {
  position: fixed;
  inset: 0;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s ease;
}
.fade-white { background: #fff; }
.fade-black { background: #000; }
.fade-white.active, .fade-black.active { opacity: 1; pointer-events: auto; }

/* === ERA THEMING (body classes) === */
body.era-depression { --era-color: #b09858; --era-glow: rgba(176,152,88,0.35); }
body.era-bank       { --era-color: #a8c8e8; --era-glow: rgba(168,200,232,0.35); }
body.era-holding    { --era-color: #6880a0; --era-glow: rgba(104,128,160,0.35); }
body.era-wwii       { --era-color: #a07848; --era-glow: rgba(160,120,72,0.38); }
body.era-jfk        { --era-color: #7090b8; --era-glow: rgba(112,144,184,0.38); }
body.era-chicago    { --era-color: #6088b0; --era-glow: rgba(96,136,176,0.38); }
body.era-speakeasy  { --era-color: #e85880; --era-glow: rgba(232,88,128,0.38); }
body.era-mansion    { --era-color: #80a8d8; --era-glow: rgba(128,168,216,0.38); }
body.era-future     { --era-color: #40a8ff; --era-glow: rgba(64,168,255,0.4);  }
body.era-finale     { --era-color: var(--gold-bright); --era-glow: rgba(240,208,96,0.4); }

/* === ABOUT PAGE === */
.about-page {
  max-width: 800px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 2rem) 1.5rem calc(var(--admin-h) + 3rem);
  overflow-y: auto;
  height: 100vh;
}
.about-page h1 { font-family: var(--font-display); color: var(--gold-bright); }
.about-panel {
  background: rgba(18,16,26,0.88);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 1.4rem;
  margin: 1.4rem 0;
  backdrop-filter: blur(12px);
}
.release-strip { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.4rem 0; }
.release-card {
  flex: 1;
  min-width: 180px;
  padding: 1rem;
  background: rgba(201,162,39,0.07);
  border: 1px solid rgba(201,162,39,0.22);
  border-radius: 10px;
}
.release-card strong { color: var(--gold-bright); display: block; margin-bottom: 0.25rem; }
.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}
.reward-opt {
  padding: 0.72rem;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.83rem;
  transition: all 0.18s;
}
.reward-opt.selected { border-color: var(--gold); background: rgba(201,162,39,0.09); }

/* === STORY MOMENT OVERLAY === */
#story-moment-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,3,8,0.82);
  backdrop-filter: blur(14px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16,1,0.3,1);
}
#story-moment-overlay.show { opacity: 1; pointer-events: all; }

.sm-card {
  background: var(--bg-panel);
  border: 1px solid rgba(201,162,39,0.22);
  border-radius: var(--panel-radius);
  box-shadow: 0 0 80px rgba(201,162,39,0.12), 0 2px 0 rgba(255,255,255,0.04) inset;
  padding: 2.2rem 2.4rem 2rem;
  max-width: 680px; width: 92vw;
  transform: translateY(18px);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  position: relative;
}
#story-moment-overlay.show .sm-card { transform: translateY(0); }

.sm-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.6rem;
}
.sm-era {
  font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.14em;
  color: var(--era-color); text-transform: uppercase;
}
.sm-label {
  font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); border: 1px solid rgba(255,255,255,0.09);
  padding: 0.18rem 0.55rem; border-radius: 20px;
}
.sm-title {
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 700;
  color: var(--text); margin: 0 0 0.4rem; line-height: 1.2;
}
.sm-desc {
  font-size: 0.82rem; color: var(--text-dim); margin: 0 0 1rem;
}
.sm-prompt-wrap {
  position: relative;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 1rem 1rem 2.8rem;
  margin-bottom: 1.2rem;
}
.sm-prompt {
  font-family: var(--font-body); font-size: 0.78rem; line-height: 1.65;
  color: var(--text-dim); white-space: pre-wrap; margin: 0;
  max-height: 180px; overflow-y: auto;
}
.sm-prompt::-webkit-scrollbar { width: 3px; }
.sm-prompt::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }
.sm-copy-btn {
  position: absolute; bottom: 0.7rem; right: 0.8rem;
  background: transparent; border: 1px solid rgba(201,162,39,0.35);
  color: var(--gold); font-size: 0.72rem; padding: 0.28rem 0.75rem;
  border-radius: 20px; cursor: pointer; letter-spacing: 0.04em;
  transition: all 0.18s;
}
.sm-copy-btn:hover { background: rgba(201,162,39,0.12); border-color: var(--gold); }
.sm-actions {
  display: flex; gap: 0.8rem; margin-bottom: 0.8rem;
}
.sm-actions .btn { flex: 1; text-align: center; }
.sm-note {
  font-size: 0.68rem; color: var(--muted); text-align: center; margin: 0;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .char-select-screen { grid-template-columns: 1fr; }
  .story-panel-inner { padding: 1.1rem 1.2rem 0.9rem; }
  .story-title { font-size: 1rem; }
  .choice-btn { font-size: 0.82rem; padding: 0.7rem 2rem 0.7rem 2.7rem; }
  .timeline-rail { display: none; }
  .era-hud { display: none; }
}
