/* ============================================================
   The Life and Deaths of Aldric Vane — ink & parchment
   ============================================================ */

:root {
  --ink: #14100c;
  --ink-2: #1d1712;
  --ink-3: #262019;
  --parchment: #e8dcc0;
  --parchment-dim: #b9ab8c;
  --parchment-faint: #8a7d63;
  --gold: #c9a35c;
  --gold-dim: #8f7440;
  --blood: #9e2b25;
  --blood-bright: #c94f3d;
  --green: #7d9c6a;
  --line: #3a3126;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  min-height: 100%;
}

/* --- atmosphere layers --- */
#grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
}
#vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(ellipse at 50% 38%, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.25), transparent 12%, transparent 88%, rgba(0,0,0,0.35));
}
body.return-mood #vignette {
  background:
    radial-gradient(ellipse at 50% 38%, transparent 25%, rgba(64, 8, 6, 0.55) 100%),
    linear-gradient(180deg, rgba(30,0,0,0.4), transparent 15%, transparent 85%, rgba(30,0,0,0.45));
}

/* --- layout --- */
#app {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 300px minmax(0, 720px);
  justify-content: center;
  gap: 48px;
  padding: 48px 28px 96px;
  min-height: 100vh;
}
@media (max-width: 1020px) {
  #app { grid-template-columns: minmax(0, 720px); gap: 24px; padding-top: 24px; }
  #sidebar { position: static !important; max-height: none !important; }
}

/* ============================================================
   Sidebar — the character sheet
   ============================================================ */
#sidebar {
  position: sticky;
  top: 40px;
  align-self: start;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  background: linear-gradient(170deg, var(--ink-2), var(--ink-3));
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 22px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(232, 220, 192, 0.06);
}
#sidebar .sheet-name {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-align: center;
  margin: 0 0 2px;
}
#sidebar .sheet-sub {
  text-align: center;
  font-style: italic;
  color: var(--parchment-faint);
  font-size: 15px;
  margin-bottom: 14px;
}
.sheet-section { margin-top: 16px; }
.sheet-section h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--gold-dim);
  margin: 0 0 8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
}
.statline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2.5px 0;
  font-size: 16px;
}
.statline .label { color: var(--parchment-dim); }
.statline.bumped .label { color: var(--parchment); }
.pips { display: flex; gap: 3px; }
.pip {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--gold-dim);
}
.pip.on { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 5px rgba(201, 163, 92, 0.5); }

.relbar {
  position: relative;
  width: 108px; height: 8px;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.relbar .zero {
  position: absolute; top: 0; bottom: 0;
  left: calc(100% * 5 / 15);
  width: 1px; background: var(--parchment-faint); opacity: 0.6;
}
.relbar .fill {
  position: absolute; top: 0; bottom: 0;
  background: var(--gold);
  transition: all 0.6s ease;
}
.relbar .fill.neg { background: var(--blood-bright); }
.statline .relnum { font-size: 13px; width: 26px; text-align: right; color: var(--parchment-faint); }

/* willpower flames */
.wp-row { display: flex; gap: 4px; flex-wrap: wrap; }
.wp {
  width: 12px; height: 12px;
  transform: rotate(45deg);
  border: 1px solid var(--gold-dim);
  background: transparent;
}
.wp.on {
  background: linear-gradient(135deg, #e3b968, #9e5b25);
  border-color: var(--gold);
  box-shadow: 0 0 6px rgba(227, 185, 104, 0.55);
}

/* threads (deaths) */
.threads { display: flex; gap: 14px; justify-content: center; padding: 4px 0 2px; }
.thread { width: 26px; height: 34px; }
.thread svg { width: 100%; height: 100%; }
.thread .strand { stroke: var(--gold); stroke-width: 2; fill: none; }
.thread.cut .strand { stroke: var(--blood-bright); }
.threads-hint {
  text-align: center;
  font-style: italic;
  font-size: 13.5px;
  color: var(--parchment-faint);
  margin-top: 4px;
}

.sheet-buttons { margin-top: 18px; display: flex; gap: 8px; }
.sheet-buttons button {
  flex: 1;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 7px 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.sheet-buttons button:hover { color: var(--gold); border-color: var(--gold-dim); }

/* ============================================================
   Main column
   ============================================================ */
#main { min-width: 0; }

.kicker {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-align: center;
  margin-bottom: 10px;
}
.scene-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 36px);
  text-align: center;
  color: var(--parchment);
  margin: 0 0 6px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.ornament { display: flex; justify-content: center; margin: 14px 0 26px; opacity: 0.9; }
.ornament svg { width: 220px; height: 22px; }
.ornament .st { stroke: var(--gold-dim); fill: none; stroke-width: 1.2; }
.ornament .knot { fill: var(--gold); }

.echo {
  border-left: 2px solid var(--gold-dim);
  background: rgba(201, 163, 92, 0.06);
  color: var(--parchment-dim);
  font-style: italic;
  padding: 10px 16px;
  margin: 0 0 24px;
  font-size: 17px;
  border-radius: 0 3px 3px 0;
  animation: fadeSlide 0.7s ease both;
}

.prose { animation: fadeSlide 0.7s ease both; }
.prose p { margin: 0 0 1.1em; }
.prose.dropcap > p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 3.4em;
  line-height: 0.8;
  float: left;
  padding: 6px 10px 0 0;
  color: var(--gold);
}

/* --- choices --- */
#choices { margin-top: 34px; display: flex; flex-direction: column; gap: 12px; }
.choices-rule {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--parchment-faint);
  text-align: center;
  margin-bottom: 6px;
}
.choice {
  position: relative;
  text-align: left;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
  color: var(--parchment);
  background: linear-gradient(170deg, rgba(38, 32, 25, 0.85), rgba(29, 23, 18, 0.9));
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  animation: fadeSlide 0.7s ease both;
}
.choice:nth-child(2) { animation-delay: 0.05s; }
.choice:nth-child(3) { animation-delay: 0.1s; }
.choice:nth-child(4) { animation-delay: 0.15s; }
.choice:nth-child(5) { animation-delay: 0.2s; }
.choice:hover:not(.locked) {
  border-color: var(--gold-dim);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}
.choice:hover:not(.locked) .choice-text { color: #f4ead2; }
.choice.danger { border-left: 3px solid var(--blood); }
.choice .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.badge {
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--parchment-faint);
}
.badge.cost { color: var(--gold); border-color: var(--gold-dim); }
.badge.mortal { color: var(--blood-bright); border-color: var(--blood); }
.badge.req { color: var(--blood-bright); border-color: var(--blood); }
.choice.locked {
  cursor: not-allowed;
  opacity: 0.55;
  background: rgba(20, 16, 12, 0.7);
}
.choice.locked .choice-text { color: var(--parchment-faint); }

/* --- consequence preview (hover) --- */
.choice .preview {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
  margin-top: 0;
}
.choice:hover .preview,
.choice:focus-visible .preview {
  max-height: 340px;
  opacity: 1;
  margin-top: 12px;
}
.preview {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.pv-rule {
  font-family: var(--display);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--parchment-faint);
  margin-bottom: 7px;
}
.pv-note {
  font-style: italic;
  color: var(--parchment-dim);
  font-size: 15.5px;
  line-height: 1.45;
  margin-bottom: 8px;
}
.pv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.pv-chip {
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  padding: 2.5px 8px;
  border-radius: 3px;
  border: 1px solid var(--line);
}
.pv-chip.up { color: #a9c48f; border-color: rgba(125, 156, 106, 0.5); }
.pv-chip.down { color: #d98a76; border-color: rgba(158, 43, 37, 0.55); }
.pv-marks {
  font-size: 14.5px;
  color: var(--parchment-faint);
  font-style: italic;
}
.pv-marks em { color: var(--gold); font-style: italic; }
.pv-danger {
  margin-top: 7px;
  font-size: 14.5px;
  font-style: italic;
}
.pv-danger.held { color: #a9c48f; }
.pv-danger.spent { color: var(--blood-bright); }
.pv-danger.final { color: var(--blood-bright); font-weight: 700; }

/* --- speaker pages --- */
.speech-block {
  text-align: center;
  padding: 12px 0 4px;
  animation: fadeSlide 0.7s ease both;
}
.speech-portrait {
  width: 110px;
  height: 110px;
  margin: 0 auto 12px;
}
.speech-portrait svg { width: 100%; height: 100%; }
.speech-name {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.speech-name::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--gold-dim);
  margin: 12px auto 18px;
}
.speech-text {
  font-size: 21px;
  line-height: 1.6;
  color: var(--parchment);
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
}
.prose .speech-block + p,
.prose p + .speech-block { margin-top: 1.4em; }

/* --- aftermath page --- */
.prose.aftermath { animation: fadeSlide 0.7s ease both; }
.prose.aftermath > p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 3.4em;
  line-height: 0.8;
  float: left;
  padding: 6px 10px 0 0;
  color: var(--gold);
}

/* --- pager --- */
.pager {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.pager-dots { display: flex; gap: 7px; justify-content: center; }
.pager-dots.center { margin-bottom: 14px; }
.pdot {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  display: inline-block;
}
.pdot.on { background: var(--gold); border-color: var(--gold); }
.btn-continue {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold-dim);
  border-radius: 3px;
  padding: 11px 34px;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-continue:hover { background: rgba(201, 163, 92, 0.1); box-shadow: 0 0 20px rgba(201, 163, 92, 0.12); }

/* --- cast strip --- */
.cast-strip {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 4px 0 2px;
  flex-wrap: wrap;
}
.cast-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px;
}
.cast-portrait { width: 52px; height: 52px; display: block; transition: transform 0.2s; }
.cast-portrait svg { width: 100%; height: 100%; }
.cast-chip:hover .cast-portrait { transform: translateY(-2px) scale(1.05); }
.cast-name {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--parchment-faint);
}
.cast-chip:hover .cast-name { color: var(--gold); }

/* --- People panel --- */
.people-panel {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  width: min(720px, 92vw);
}
@media (max-width: 640px) { .people-panel { grid-template-columns: 1fr; } }
.people-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--line);
  padding-right: 18px;
  max-height: 60vh;
  overflow-y: auto;
}
@media (max-width: 640px) {
  .people-list { flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
}
.person-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 5px 8px;
  cursor: pointer;
  text-align: left;
}
.person-chip:hover { border-color: var(--line); }
.person-chip.active { border-color: var(--gold-dim); background: rgba(201, 163, 92, 0.06); }
.person-portrait { width: 38px; height: 38px; flex: none; }
.person-portrait svg { width: 100%; height: 100%; }
.person-chip-name {
  font-family: var(--display);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--parchment-dim);
}
.person-chip.active .person-chip-name { color: var(--gold); }
.people-detail { text-align: center; padding: 6px 4px; }
.people-portrait-big { width: 104px; height: 104px; margin: 0 auto 10px; }
.people-portrait-big svg { width: 100%; height: 100%; }
.people-name {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--parchment);
}
.people-role {
  font-style: italic;
  color: var(--parchment-faint);
  font-size: 14.5px;
  margin: 3px 0 12px;
}
.people-bar { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 14px; }
.people-stance {
  text-align: left;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--parchment-dim);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* --- ending screen --- */
.ending-head {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--blood-bright);
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.chronicle {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.chronicle h3 {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-align: center;
  margin-bottom: 16px;
}
.chronicle ol {
  margin: 0; padding-left: 22px;
  color: var(--parchment-dim);
  font-size: 16.5px;
}
.chronicle li { margin-bottom: 4px; }
.endings-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 560px) { .endings-grid { grid-template-columns: 1fr 1fr; } }
.ending-slot {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 6px;
  text-align: center;
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment-faint);
}
.ending-slot.found { color: var(--gold); border-color: var(--gold-dim); }
.big-actions { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-grand {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold-dim);
  border-radius: 3px;
  padding: 13px 30px;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-grand:hover { background: rgba(201, 163, 92, 0.1); box-shadow: 0 0 24px rgba(201, 163, 92, 0.15); }
.btn-grand.dim { color: var(--parchment-faint); border-color: var(--line); }

/* --- title screen --- */
.title-wrap { text-align: center; padding-top: 8vh; }
.title-kicker {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.game-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 60px);
  margin: 0;
  color: var(--parchment);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}
.game-title .red { color: var(--blood-bright); }
.title-sub {
  font-style: italic;
  color: var(--parchment-dim);
  font-size: 20px;
  margin: 18px auto 0;
  max-width: 560px;
}
.title-creed {
  margin: 34px auto 0;
  max-width: 520px;
  color: var(--parchment-faint);
  font-size: 17px;
  font-style: italic;
  line-height: 1.7;
}

/* --- bookshelf (title screen) --- */
.bookshelf {
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 420px));
  gap: 22px;
  justify-content: center;
  padding: 0 16px;
}
@media (max-width: 760px) { .bookshelf { grid-template-columns: minmax(0, 420px); } }
.bookcard {
  text-align: left;
  background: linear-gradient(170deg, var(--ink-2), var(--ink-3));
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px 26px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(232, 220, 192, 0.06);
  transition: border-color 0.25s, transform 0.2s;
}
.bookcard:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.bookcard-kicker {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--blood-bright);
  margin-bottom: 8px;
}
.bookcard-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  color: var(--parchment);
  margin-bottom: 10px;
}
.bookcard-tag {
  font-style: italic;
  color: var(--parchment-dim);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 14px;
}
.bookcard-meta {
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dim);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-bottom: 14px;
}
.bookcard-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bookcard-actions .btn-grand { padding: 10px 20px; font-size: 12px; }

/* --- grip bar --- */
.gripbar {
  position: relative;
  height: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}
.gripbar .fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, #6e3a1f, var(--blood-bright));
  transition: width 0.6s ease;
  box-shadow: 0 0 8px rgba(201, 79, 61, 0.4);
}

/* --- wheel emblem --- */
.wheel-emblem { display: flex; justify-content: center; margin: 30px 0 6px; }
.wheel-emblem svg { width: 130px; height: 130px; animation: slowspin 90s linear infinite; }
@keyframes slowspin { to { transform: rotate(360deg); } }
.wheel-emblem .rim { stroke: var(--gold-dim); fill: none; stroke-width: 2; }
.wheel-emblem .spoke { stroke: var(--gold-dim); stroke-width: 1.6; }
.wheel-emblem .hub { fill: var(--gold); }
.wheel-emblem .crack { stroke: var(--blood-bright); stroke-width: 1.6; fill: none; }

/* --- toasts (consequence echoes) --- */
#toasts {
  position: fixed;
  top: 22px; right: 22px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.1em;
  background: rgba(20, 16, 12, 0.92);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 14px;
  animation: toastIn 0.35s ease both, toastOut 0.6s ease 2.6s both;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.toast.up { color: #a9c48f; border-left: 3px solid var(--green); }
.toast.down { color: #d98a76; border-left: 3px solid var(--blood); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* --- chapter interstitial --- */
#interstitial {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #201a13 0%, #0d0a07 75%);
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.8s ease;
}
#interstitial.hidden { display: none; }
#interstitial.fading { opacity: 0; }
#interstitial .inter-kicker {
  font-family: var(--display);
  letter-spacing: 0.5em;
  font-size: 13px;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 18px;
  animation: fadeSlide 1.2s ease both;
}
#interstitial .inter-title {
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  color: var(--parchment);
  text-align: center;
  padding: 0 20px;
  animation: fadeSlide 1.2s ease 0.25s both;
}
#interstitial .inter-hint {
  position: absolute;
  bottom: 40px;
  font-style: italic;
  color: var(--parchment-faint);
  font-size: 15px;
  animation: fadeSlide 1.2s ease 1s both;
}

/* --- death flash --- */
#deathflash {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at center, rgba(120, 10, 5, 0.0) 30%, rgba(90, 5, 2, 0.85) 100%);
}
#deathflash.go { animation: deathPulse 1.6s ease both; }
@keyframes deathPulse {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

/* --- chronicle overlay --- */
#overlay {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(10, 8, 6, 0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
}
#overlay .panel {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  max-width: 640px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 30px 34px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

::selection { background: rgba(201, 163, 92, 0.3); }
