/* === CITIZEN KANE theme — black-and-white newsprint, deep-focus chiaroscuro === */

/* Title screen background image — the lit-window Xanadu shot */
#title-screen {
  background-image: url('assets/title.png');
  background-size: cover;
  background-position: center;
  position: relative;
}
#title-screen::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.78) 70%, rgba(0,0,0,0.92) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.30) 30%, rgba(0,0,0,0.55) 75%, rgba(0,0,0,0.95) 100%);
}
#title-screen > * { position: relative; z-index: 1; }
/* The background image itself is already greyscale — no extra filter needed */


/* Base typography: Playfair / Bodoni for serifed newspaper feel; IBM for typewriter copy */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=IBM+Plex+Mono:wght@400;700&family=Noto+Serif+SC:wght@400;700;900&display=swap');

body {
  font-family: 'Noto Serif SC', 'Playfair Display', serif;
  background: #0a0a0a;
}

/* All bg/CG images forced through pure grayscale + extra contrast — Toland deep-focus look */
#bg-layer { filter: grayscale(100%) contrast(1.15) brightness(0.96); }
.cg-img, #cg-viewer img, .route-portrait, .speaker-portrait, .sprite img {
  filter: grayscale(100%) contrast(1.10);
}

/* Faint 35mm grain overlay — runs everywhere */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.24'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.45;
}

/* === Title screen — News on the March / RKO ARt Deco === */

/* Big slab serif title, white on black */
.title-line1, .title-line2 {
  color: #f4f1e8 !important;
  font-family: 'Playfair Display', serif !important;
  font-weight: 900 !important;
  letter-spacing: 14px !important;
  text-shadow:
    0 0 1px #f4f1e8,
    2px 4px 0 rgba(255,255,255,0.04),
    0 0 28px rgba(245,241,232,0.08) !important;
}
.title-line1 { font-size: 5.4rem !important; }
.title-line2 { font-size: 6.6rem !important; }

/* 孤 watermark removed per user — was ugly. */
.kanji-bg { display: none !important; }
.title-art .title-main { position: relative; z-index: 2; }

/* Subtitle: "公 民 凯 恩" in classical serif */
.title-sub {
  color: #f4f1e8 !important;
  font-family: 'Noto Serif SC', serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.6em !important;
  text-shadow: 0 0 18px rgba(0,0,0,0.8), 0 2px 4px rgba(0,0,0,0.9) !important;
  margin-top: 8px !important;
}

/* Tag line — newsreel chyron */
.title-tag {
  color: #b9b29c !important;
  font-family: 'IBM Plex Mono', monospace !important;
  letter-spacing: 4px !important;
  border-top: 1px solid rgba(245,241,232,0.18);
  border-bottom: 1px solid rgba(245,241,232,0.18);
  padding: 4px 0 !important;
}
/* Move title-foot to top-right corner so it doesn't fight the menu — there are 7 buttons now */
.title-foot {
  color: #8a8474 !important;
  font-family: 'IBM Plex Mono', monospace !important;
  letter-spacing: 6px !important;
  font-size: 10px !important;
  bottom: auto !important;
  top: 24px !important;
  right: 80px !important;
  left: auto !important;
  position: absolute !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  z-index: 5;
}
/* Compact menu so 7 buttons fit vertically without colliding */
.title-menu {
  gap: 8px !important;
  margin-top: 18px !important;
}
.menu-btn {
  padding: 8px 44px !important;
  font-size: 13px !important;
}

/* Quote — italic Bodoni */
.title-quote {
  color: #e9e4d3 !important;
  font-family: 'Playfair Display', serif !important;
  font-style: italic !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  font-size: 1.45rem !important;
  text-shadow: 0 0 20px rgba(0,0,0,0.6) !important;
}

.title-starring-label {
  color: #b9b29c !important;
  font-family: 'IBM Plex Mono', monospace !important;
  letter-spacing: 0.55em !important;
  font-size: 0.78rem !important;
}

/* === Buttons — heavy black-bordered newspaper boxes === */
.menu-btn, .choice-btn, #dialogue-controls button, .lang-toggle {
  background: rgba(8,8,8,0.85) !important;
  color: #f4f1e8 !important;
  border: 1px solid #f4f1e8 !important;
  border-radius: 0 !important;
  font-family: 'IBM Plex Mono', monospace !important;
  letter-spacing: 0.3em !important;
  text-transform: uppercase;
  text-shadow: none !important;
  transition: background 0.12s ease, color 0.12s ease;
}
.menu-btn:hover, .choice-btn:hover, #dialogue-controls button:hover, .lang-toggle:hover {
  background: #f4f1e8 !important;
  color: #0a0a0a !important;
  box-shadow: 0 0 0 1px #f4f1e8, 6px 6px 0 #1a1a1a !important;
}

/* === Route screen — newsprint front-page layout === */
.route-tag, .route-heading, .route-end-tag {
  font-family: 'Playfair Display', serif !important;
  color: #f4f1e8 !important;
  letter-spacing: 0.3em !important;
}
.route-heading {
  font-weight: 900 !important;
  font-size: 1.85rem !important;
  border-top: 4px double #f4f1e8;
  border-bottom: 4px double #f4f1e8;
  padding: 18px 0 !important;
  margin: 24px auto !important;
  display: inline-block;
}
.route-intro {
  font-family: 'Noto Serif SC', serif !important;
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
  color: #d2cdb8 !important;
  column-count: 2;
  column-gap: 36px;
  text-indent: 1.6em;
  text-align: justify;
}

/* Route cards — front-page columns, hard borders */
.route-card {
  background: linear-gradient(180deg, rgba(20,20,20,0.92), rgba(8,8,8,0.98)) !important;
  border: 2px solid #f4f1e8 !important;
  border-radius: 0 !important;
  box-shadow: 6px 6px 0 #1a1a1a !important;
  filter: grayscale(100%) contrast(1.05);
}
.route-card:hover {
  box-shadow: 10px 10px 0 #2a2a2a, 0 0 0 4px #f4f1e8 !important;
  transform: translate(-4px, -4px);
}
.route-card.locked {
  border-style: dashed !important;
  background: repeating-linear-gradient(
    45deg, rgba(20,20,20,0.92), rgba(20,20,20,0.92) 6px,
           rgba(8,8,8,0.98)    6px, rgba(8,8,8,0.98)    12px
  ) !important;
}
.route-card .route-num {
  font-family: 'Playfair Display', serif !important;
  font-weight: 900 !important;
  color: #f4f1e8 !important;
}
.route-card .route-title {
  font-family: 'Playfair Display', serif !important;
  font-weight: 900 !important;
  color: #f4f1e8 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
}
.route-card .route-subtitle {
  font-family: 'Noto Serif SC', serif !important;
  color: #b9b29c !important;
  font-style: italic;
}
.route-card .cleared-stamp {
  border: 3px double #d2cdb8 !important;
  color: #d2cdb8 !important;
  font-family: 'Playfair Display', serif !important;
  letter-spacing: 0.4em !important;
  transform: rotate(-8deg);
}

/* === Dialogue box — typewriter feel === */
#dialogue-box {
  border-top: 1px solid rgba(245,241,232,0.28) !important;
  background: linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,0,0,0.92)) !important;
}
#speaker-name {
  font-family: 'Playfair Display', serif !important;
  color: #f4f1e8 !important;
  font-weight: 900 !important;
  letter-spacing: 0.45em !important;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(245,241,232,0.4);
  padding-bottom: 4px !important;
}
#dialogue-text {
  font-family: 'Noto Serif SC', serif !important;
  color: #f4f1e8 !important;
  letter-spacing: 0.04em !important;
}
#dialogue-text-sub {
  font-family: 'IBM Plex Mono', monospace !important;
  color: #b9b29c !important;
  font-style: italic;
  opacity: 0.85;
  letter-spacing: 0.04em !important;
}

/* === Choice overlay — heavy stacked headlines === */
#choice-overlay {
  background: rgba(0,0,0,0.78) !important;
  backdrop-filter: blur(2px) grayscale(100%);
}
#choice-prompt {
  font-family: 'Playfair Display', serif !important;
  color: #f4f1e8 !important;
  letter-spacing: 0.5em !important;
  font-weight: 700;
  font-style: italic;
}

/* === Route end card === */
#route-end-card {
  background: rgba(8,8,8,0.96) !important;
  border: 4px double #f4f1e8 !important;
  border-radius: 0 !important;
}
#route-end-tag {
  font-family: 'Playfair Display', serif !important;
  letter-spacing: 0.5em !important;
  font-weight: 900;
}

/* === Backlog / overlays === */
.overlay { background: rgba(0,0,0,0.92) !important; }
.overlay h2, .overlay h3 {
  font-family: 'Playfair Display', serif !important;
  color: #f4f1e8 !important;
  letter-spacing: 0.3em !important;
}

/* === AUTO-INJECTED bg/cg CSS RULES (do not edit by hand) === */
#bg-layer.bg-cabin { --bg-img: url('assets/bg/bg-cabin.png'); --bg-tint: linear-gradient(180deg,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.5) 100%); }
#bg-layer.bg-campaign { --bg-img: url('assets/bg/bg-campaign.png'); --bg-tint: linear-gradient(180deg,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.5) 100%); }
#bg-layer.bg-furnace { --bg-img: url('assets/bg/bg-furnace.png'); --bg-tint: linear-gradient(180deg,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.5) 100%); }
#bg-layer.bg-inquirer { --bg-img: url('assets/bg/bg-inquirer.png'); --bg-tint: linear-gradient(180deg,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.5) 100%); }
#bg-layer.bg-opera { --bg-img: url('assets/bg/bg-opera.png'); --bg-tint: linear-gradient(180deg,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.5) 100%); }
#bg-layer.bg-thatcher { --bg-img: url('assets/bg/bg-thatcher.png'); --bg-tint: linear-gradient(180deg,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.5) 100%); }
#bg-layer.bg-xanadu { --bg-img: url('assets/bg/bg-xanadu.png'); --bg-tint: linear-gradient(180deg,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.5) 100%); }
#bg-layer { background: var(--bg-tint, none), var(--bg-img, none) center/cover no-repeat; }
/* === END AUTO-INJECTED === */
