@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&family=EB+Garamond:ital,wght@0,400;0,600;1,400;1,600&display=swap');

:root {
  --bg:          #111113;
  --bg-2:        #18181C;
  --surface:     #1E1E24;
  --surface-2:   #25252D;
  --border:      #2E2E38;
  --border-2:    #3A3A48;

  --text:        #D8D4CC;
  --text-dim:    #A09898;
  --text-muted:  #6A6470;
  --dim:         #4A4450;

  --red:         #9B1C2E;
  --red-mid:     #B52236;
  --red-light:   #CC2A40;
  --red-glow:    rgba(155, 28, 46, 0.12);

  --gold:        #8A7040;
  --gold-dim:    #6E5830;
  --gold-glow:   rgba(138, 112, 64, 0.10);

  --parchment:   #1E1E24;

  /* Sidebar — dark */
  --sidebar-bg:    #13131A;
  --sidebar-bg2:   #0E0E14;
  --sidebar-border: #2A2A36;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.9;
  min-height: 100vh;
}

/* ── TIMELINE SIDEBAR ───────────────────────────────────── */

#tl-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 190px;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg2) 100%);
  border-right: 1px solid var(--sidebar-border);
  z-index: 200;
}

#tl-scroll {
  height: 100%;
  overflow-y: scroll;
  scrollbar-width: none;
  padding-bottom: 4rem;
}
#tl-scroll::-webkit-scrollbar { display: none; }

#tl-sidebar::before,
#tl-sidebar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3.5rem;
  pointer-events: none;
  z-index: 10;
}
#tl-sidebar::before {
  top: 0;
  background: linear-gradient(to bottom, var(--sidebar-bg) 30%, transparent);
}
#tl-sidebar::after {
  bottom: 0;
  background: linear-gradient(to top, var(--sidebar-bg) 30%, transparent);
}

.tl-header {
  font-family: 'IM Fell English SC', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--red-mid);
  letter-spacing: 0.1em;
  text-align: center;
  padding: 1.2rem 0.8rem 0.9rem;
  line-height: 1.5;
  position: relative;
}

.tl-header::after {
  content: '✦';
  display: block;
  font-size: 0.55rem;
  color: var(--border-2);
  letter-spacing: 0.5em;
  margin-top: 0.5rem;
  opacity: 0.7;
}

.tl-header span {
  color: var(--gold-dim);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  display: block;
  margin-top: 0.15rem;
}

.tl-season {
  font-family: 'IM Fell English SC', serif;
  font-size: 0.68rem;
  color: var(--red-mid);
  letter-spacing: 0.12em;
  text-align: left;
  padding: 0.9rem 0.5rem 0.3rem 0.9rem;
  position: relative;
  z-index: 1;
}
.tl-season:hover { color: var(--red); }
.tl-season + .tl-entry { margin-top: 0; }

.tl-chevron {
  position: absolute;
  right: 0.6rem;
  top: 0.88rem;
  float: none;
  font-style: normal;
  font-size: 0.6rem;
  opacity: 0.5;
  transition: transform 0.2s;
  line-height: 1;
}
.tl-chevron::after { content: '▾'; }
.tl-season--collapsed .tl-chevron { transform: rotate(-90deg); }

.tl-season span {
  color: var(--gold-dim);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  display: block;
  margin-top: 0.1rem;
}
.tl-season::before { display: none; }

.tl-track {
  position: relative;
  padding: 0.5rem 0 1rem 1.1rem;
}

.tl-track::before { display: none; }

.tl-entries-wrap {
  position: relative;
  padding-left: 0.6rem;
  margin-left: 0.9rem;
  border-left: 1px solid var(--border-2);
}

.tl-quicktrack {
  margin-top: 0.6rem;
  padding-top: 0.4rem;
  position: relative;
}
.tl-quicktrack::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: var(--border);
}

.tl-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 0.9rem;
  padding-right: 0.5rem;
}

.tl-entry:hover .tl-dot:not(.tl-dot--active) {
  background: var(--border-2);
  border-color: var(--border-2);
}

.tl-dot {
  display: none;
}

.tl-dot--active {
  background: var(--red-mid);
  border-color: var(--red);
  box-shadow: 0 0 6px var(--red-glow);
  width: 8px;
  height: 8px;
  margin-top: 0.3rem;
}

.tl-content { flex: 1; min-width: 0; }

.tl-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: 0.08rem;
  font-family: 'IM Fell English SC', serif;
}

.tl-event {
  display: block;
  font-size: 0.6rem;
  color: var(--text-dim);
  text-decoration: none;
  line-height: 1.3;
  transition: color 0.2s;
  word-break: break-word;
}

.tl-event:hover { color: var(--red-mid); }

.tl-event--active {
  color: var(--red-mid);
  font-style: italic;
}

/* ── BURGER BUTTON ──────────────────────────────────────── */

.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.55rem 1rem;
  color: var(--text-dim);
  font-size: 1.2rem;
  line-height: 1;
  vertical-align: middle;
}

.burger-btn:hover { color: var(--text); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 199;
}

@media (max-width: 900px) {
  .burger-btn { display: inline-block; margin-left: auto; }
  .site-topbar {
    padding-left: 0 !important;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
  }
  .site-topbar-home {
    padding: 0.55rem 0.65rem;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
  }

  #tl-sidebar {
    display: block;
    position: fixed;
    left: -220px;
    top: 0;
    z-index: 200;
    transition: left 0.25s ease;
  }

  body.sidebar-open #tl-sidebar { left: 0; }
  body.sidebar-open .sidebar-overlay { display: block; }
}

/* ── TOP BAR ────────────────────────────────────────────── */

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-left: 190px;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-topbar-home {
  display: inline-block;
  font-family: 'IM Fell English SC', serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.55rem 1.5rem;
  transition: color 0.18s;
}

.site-topbar-home:hover { color: var(--text); }
.site-topbar-home.active { color: var(--gold); }

/* ── LIGHTBOX ───────────────────────────────────────────── */

#lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.88);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

#lb-overlay.lb-open { display: flex; }

#lb-img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid var(--border-2);
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
  cursor: default;
}

#lb-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

#lb-close:hover { color: var(--text); }

body img:not(.nsc-clan-symbol):not(#lb-img):not(#tl-sidebar img) {
  cursor: zoom-in;
}

/* ── SCROLL OFFSET für sticky Topbar ────────────────────── */

.pc-section, .nsc-region, h2, h3 {
  scroll-margin-top: 3rem;
}

/* ── LAYOUT ─────────────────────────────────────────────── */

.page-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem 7rem;
}

/* ── SESSION HEADER ─────────────────────────────────────── */

.session-header {
  text-align: center;
  padding: 5rem 2rem 3.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.session-label {
  font-family: 'IM Fell English SC', serif;
  font-size: 0.7rem;
  letter-spacing: 0.38em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.session-header h1 {
  font-family: 'IM Fell English SC', serif;
  color: var(--red-mid);
  font-size: 3rem;
  font-weight: normal;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.session-header .subtitle {
  color: var(--text-muted);
  font-style: italic;
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── DIVIDER ─────────────────────────────────────────────── */

.divider {
  text-align: center;
  color: var(--border-2);
  font-size: 0.6rem;
  letter-spacing: 1.4rem;
  margin: 3rem 0;
  user-select: none;
}

.divider-thin {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────── */

h2 {
  font-family: 'IM Fell English SC', serif;
  color: var(--red-mid);
  font-size: 1.38rem;
  font-weight: normal;
  margin: 3rem 0 1.2rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.03em;
  scroll-margin-top: 5rem;
}

h3 {
  font-family: 'IM Fell English SC', serif;
  color: var(--gold);
  font-size: 1.08rem;
  font-weight: normal;
  margin: 2rem 0 0.6rem;
  letter-spacing: 0.07em;
}

p { margin-bottom: 1rem; }

em { color: var(--text-dim); font-style: italic; }

strong { color: var(--red); font-weight: 600; }

code {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--text-dim);
  background: var(--surface-2);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--border);
}

a {
  color: var(--red-mid);
  text-decoration: underline;
  text-decoration-color: var(--border);
  transition: color 0.18s, text-decoration-color 0.18s;
}
a:hover {
  color: var(--red);
  text-decoration-color: var(--red-mid);
}

/* ── STORYTELLER VOICE ───────────────────────────────────── */

.voice {
  font-style: italic;
  color: var(--text-dim);
  background: var(--surface);
  border-left: 3px solid var(--border-2);
  padding: 1rem 1.3rem;
  margin: 2rem 0;
  border-radius: 0 4px 4px 0;
}

.voice p { margin-bottom: 0.55rem; }
.voice p:last-child { margin-bottom: 0; }

/* ── HANDOUT / DOCUMENT ──────────────────────────────────── */

.handout {
  background: var(--parchment);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dim);
  border-radius: 0 4px 4px 0;
  padding: 1.4rem 1.7rem;
  margin: 2rem 0;
  position: relative;
  scroll-margin-top: 5rem;
  font-size: 0.94rem;
}

.handout::before {
  content: attr(data-title);
  position: absolute;
  top: -0.65rem;
  left: 1rem;
  background: var(--parchment);
  padding: 0 0.5rem;
  color: var(--gold);
  font-family: 'IM Fell English SC', serif;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
}

.handout .stamp {
  color: var(--red-mid);
  font-family: 'IM Fell English SC', serif;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  border: 1px solid var(--red-mid);
  display: inline-block;
  padding: 0.1rem 0.5rem;
  margin-bottom: 0.8rem;
  opacity: 0.7;
  transform: rotate(-1.5deg);
}

/* ── NPC BLOCK ───────────────────────────────────────────── */

.npc-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 0 5px 5px 0;
  padding: 0.9rem 1.3rem;
  margin: 1.2rem 0;
  transition: border-left-color 0.2s;
}

.npc-block:hover { border-left-color: var(--red-mid); }

.npc-block .npc-name {
  font-family: 'IM Fell English SC', serif;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.2rem;
  letter-spacing: 0.04em;
}

.npc-block .npc-role {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.npc-link {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
}
.npc-link a {
  color: var(--red-mid);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.npc-link a:hover { color: var(--red); }

/* ── ARTEFACT BLOCK ──────────────────────────────────────── */

.artefact {
  text-align: center;
  padding: 1.8rem 2rem 1.5rem;
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim);
  border-radius: 0 0 5px 5px;
  margin: 2.5rem auto;
  max-width: 380px;
  background: var(--surface);
}

.artefact .symbol  { font-size: 2.2rem; margin-bottom: 0.6rem; }
.artefact .name    { font-family: 'IM Fell English SC', serif; color: var(--gold); font-size: 1.08rem; letter-spacing: 0.1em; }
.artefact .sin     { color: var(--red-mid); font-style: italic; font-size: 0.87rem; margin-top: 0.4rem; }
.artefact .clan    { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.3rem; }

/* ── SESSION NAV ─────────────────────────────────────────── */

.session-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

.session-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: 'IM Fell English SC', serif;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  background: var(--surface);
}

.session-nav a:hover {
  color: var(--red-mid);
  border-color: var(--red-mid);
  background: var(--bg);
}

.session-nav .prev::before { content: '← '; }
.session-nav .next::after  { content: ' →'; }

/* ── CHRONICLE SEASON HEADER ─────────────────────────────── */

.chronicle-season {
  margin: 3rem 0 0;
}

.chronicle-season-header {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}

.chronicle-season-label {
  font-family: 'IM Fell English SC', serif;
  font-size: 1.1rem;
  color: var(--red-mid);
  letter-spacing: 0.06em;
}

.chronicle-season-title {
  font-family: 'IM Fell English SC', serif;
  font-size: 0.82rem;
  color: var(--gold-dim);
  letter-spacing: 0.18em;
}

.chronicle-season-dates {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── INDEX GRID ──────────────────────────────────────────── */

.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  margin: 3rem 0;
}

.session-card {
  background: var(--surface);
  padding: 1.4rem 1.6rem;
  text-decoration: none;
  display: block;
  position: relative;
  transition: background 0.18s;
}

.session-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red);
  opacity: 0;
  transition: opacity 0.18s;
}

.session-card:hover { background: var(--bg-2); }
.session-card:hover::before { opacity: 1; }

.session-card .card-label {
  color: var(--gold-dim);
  font-family: 'IM Fell English SC', serif;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.session-card .card-title {
  color: var(--red-mid);
  font-family: 'IM Fell English SC', serif;
  font-size: 1.08rem;
  line-height: 1.3;
}

.session-card .card-desc {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-style: italic;
  margin-top: 0.35rem;
  line-height: 1.55;
}

/* ── VERSE BLOCK ─────────────────────────────────────────── */

.verse-block {
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 1.5rem 3rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2.5rem 0;
  line-height: 2.1;
}

/* ── IMAGES ──────────────────────────────────────────────── */

.img-block {
  float: right;
  clear: right;
  width: 42%;
  margin: 0.2rem 0 1.2rem 1.8rem;
}

.img-block--hero {
  float: none;
  clear: both;
  width: 100%;
  margin: 0 0 2rem 0;
}

.img-block img,
.img-block--hero img {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: opacity 0.3s;
}

.img-block img:hover,
.img-block--hero img:hover { opacity: 0.88; }

.img-row {
  float: right;
  clear: right;
  width: 52%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.2rem 0 1.2rem 1.8rem;
}

.img-row img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
  height: 140px;
  transition: opacity 0.3s;
}

.img-row img:hover { opacity: 0.88; }

.img-caption {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.35rem 0.2rem 0;
  letter-spacing: 0.02em;
  grid-column: 1 / -1;
  background: var(--bg);
}

.video-block {
  float: right;
  clear: right;
  width: 52%;
  margin: 0.2rem 0 1.2rem 1.8rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.video-block video {
  width: 100%;
  display: block;
}

h2, .divider, .verse-block, .session-nav, hr { clear: both; }

/* ── SCROLLBAR ───────────────────────────────────────────── */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }
