/* Sci-fi / Space preset — worn space-noir
   For: GURPS Space, Traveller-style hard SF, space-noir, station crawls
   Rajdhani import is deliberate: the approved look uses it, and no
   system stack reproduces a condensed technical face cross-platform. */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&display=swap');

:root {
  --bg: #0d0b0a;
  --bg-card: #171310;
  --bg-header: #070605;
  --bg-hero: #070605;
  --text: #e6ddd2;
  --text-muted: #8a8175;
  /* The header and hero stay dark in both schemes, so their text keeps the
     dark palette's ink even when light mode darkens --text (#259). */
  --text-on-header: #e6ddd2;
  --text-muted-on-header: #8a8175;
  --accent: #f0a23a;
  --accent-on-header: #f0a23a;
  --accent-dim: rgba(240, 162, 58, 0.12);
  --border: #2e2620;
  --danger: #ef4444;
  --warning: #eab308;
  --success: #3fd0d8;
  --font-heading: "Rajdhani", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --font-reading: var(--font-heading);
  --font-body: system-ui, -apple-system, sans-serif;
}

@media screen and (prefers-color-scheme: light) {
  :root:not(:where([data-theme="dark"])) {
    --bg: #f5efe4;
    --bg-card: #fffaf0;
    --bg-header: #14100c;
    --bg-hero: #14100c;
    --text: #241c14;
    --text-muted: #6b5f4e;
    --accent: #965d0e;
    /* the header and hero stay dark in the light palette: the bright accent reads there */
    --accent-on-header: #f0a23a;
    --accent-dim: rgba(176, 109, 16, 0.08);
    --border: #d8cbb4;
    --success: #0e7c85;
    /* the Story page's Memorable Moments: deeper kind colours for the light card */
    --moment-dramatic: #b42318; --moment-intriguing: #0b5cad; --moment-funny: #7a4f00; --moment-epic: #6b3fb5; --moment-tragic: #475569;
  }
}
@media screen {
  :root:where([data-theme="light"]) {
    --bg: #f5efe4;
    --bg-card: #fffaf0;
    --bg-header: #14100c;
    --bg-hero: #14100c;
    --text: #241c14;
    --text-muted: #6b5f4e;
    --accent: #965d0e;
    /* the header and hero stay dark in the light palette: the bright accent reads there */
    --accent-on-header: #f0a23a;
    --accent-dim: rgba(176, 109, 16, 0.08);
    --border: #d8cbb4;
    --success: #0e7c85;
    /* the Story page's Memorable Moments: deeper kind colours for the light card */
    --moment-dramatic: #b42318; --moment-intriguing: #0b5cad; --moment-funny: #7a4f00; --moment-epic: #6b3fb5; --moment-tragic: #475569;
  }
}
@media print {
  :root {
    --bg: #f5efe4;
    --bg-card: #fffaf0;
    --bg-header: #14100c;
    --bg-hero: #14100c;
    --text: #241c14;
    --text-muted: #6b5f4e;
    --accent: #965d0e;
    /* the header and hero stay dark in the light palette: the bright accent reads there */
    --accent-on-header: #f0a23a;
    --accent-dim: rgba(176, 109, 16, 0.08);
    --border: #d8cbb4;
    --success: #0e7c85;
    /* the Story page's Memorable Moments: deeper kind colours for the light card */
    --moment-dramatic: #b42318; --moment-intriguing: #0b5cad; --moment-funny: #7a4f00; --moment-epic: #6b3fb5; --moment-tragic: #475569;
  }
}

/* chapter pages: start */
/* A ship's log readout: bracketed panels, zero-padded numbers, a live marker, dashed leaders. */
.story-contents-chapter {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: var(--space-1500) var(--space-1500) var(--space-1250);
}
.story-contents-chapter::before, .story-contents-chapter::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
}
.story-contents-chapter::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.story-contents-chapter::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.story-contents-chapter h3, .story-chapter > .page-title { text-transform: uppercase; letter-spacing: 0.06em; }
.story-contents-chapter[data-chapter-status="active"] h3 a { color: var(--text); }
p.story-chapter-label, p.story-chapter-dates {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
}
.story-contents-sessions li { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 500; }
.story-contents-sessions .n { font-family: var(--font-mono); font-size: var(--font-size-875); color: var(--accent); }
.story-contents-sessions .n[data-digits="1"]::before { content: "0"; }
.story-contents-sessions li::after { border-bottom-style: dashed; }
p.story-chapter-now { font-family: var(--font-heading); font-weight: 700; letter-spacing: 0.14em; }
p.story-chapter-now::before { content: "● live: "; }
.story-contents-end { font-family: var(--font-mono); font-style: normal; font-size: var(--font-size-875); letter-spacing: 0.1em; }
.story-contents-end[data-ending="continues"]::before { content: "// log continues ▍"; }
.story-contents-end[data-ending="ended"]::before { content: "// end of log"; }
p.story-chapter-overview, .story-contents .story-chapter-teaser p { font-family: var(--font-body); }
/* chapter pages: end */
