@font-face {
  font-family: "Departure Mono";
  src: url("../fonts/DepartureMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ═══════════════════════════════════════════════════════════════
   TOKENS
   The base palette is a dark phosphor violet. --tint is rewritten
   per chapter from a colour extracted out of that release's own
   cover art (see tools/process_art.py), so the chrome stays put
   and the artwork drives the accent.
   ═══════════════════════════════════════════════════════════════ */
:root {
  --bg:        #08070f;
  --bg-deep:   #04030a;
  --glow:      #1a1636;
  --panel:     #16132b;
  --panel-hi:  #221d3f;
  --edge:      #554d86;
  --edge-hi:   #8a80c8;
  --ink:       #e9e5ff;
  --ink-dim:   #8f88bd;
  --ink-faint: #5d5788;
  --tint:      #7de3ff;
  --gold:      #ffd479;
  --hp:        #6ee38a;
  --mp:        #7db8ff;
  --danger:    #ff6b83;

  --unit: 4px;
  --win-pad: clamp(12px, 2.2vw, 20px);
  --fs: clamp(13px, 0.55vw + 11.5px, 16px);
  --dur: 140ms;
}

/* MONO PHOSPHOR: everything collapses to one channel.
   --tint needs !important because renderChapter writes the release's own
   accent as an inline style on :root, and a one-colour screen means one
   colour — the whole point of the switch. */
:root[data-mono="on"] {
  --bg: #030a06; --bg-deep: #010603; --glow: #0a2415;
  --panel: #04140b; --panel-hi: #0a2415; --edge: #2f7a4d; --edge-hi: #57c184;
  --ink: #b8ffd0; --ink-dim: #56a877; --ink-faint: #2f6b48;
  --tint: #6bff9f !important; --gold: #a8ff8a; --hp: #6bff9f; --mp: #6bff9f;
}
:root[data-mono="on"] img { filter: grayscale(1) sepia(1) hue-rotate(75deg) saturate(2.2) brightness(0.95); }

* { box-sizing: border-box; }

html { background: var(--bg-deep); }

body {
  margin: 0;
  min-height: 100svh;
  font: var(--fs)/1.55 "Departure Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 50% -10%, var(--glow) 0%, transparent 60%),
    var(--bg);
  -webkit-font-smoothing: none;
  font-smooth: never;
  text-rendering: optimizeSpeed;
  overflow-x: hidden;
}

/* height:auto is load-bearing: the width/height attributes on <img> map to
   presentational hints that otherwise beat aspect-ratio and stretch every
   cover into a 512px-tall column. */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tint); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--panel); color: var(--ink); padding: 8px 14px; border: 2px solid var(--edge-hi);
}
.skip:focus { left: 8px; }

/* ═══════════════════════════════════════════════════════════════
   CRT OVERLAY
   ═══════════════════════════════════════════════════════════════ */
.crt { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

.crt__lines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.30) 0 1px,
    transparent 1px 3px
  );
  opacity: 0.75;
  mix-blend-mode: multiply;
}
:root[data-scanlines="off"] .crt__lines { display: none; }

.crt__glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(130% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(90deg, rgba(255, 0, 90, 0.035), transparent 20% 80%, rgba(0, 190, 255, 0.035));
  animation: flicker 5.5s steps(1) infinite;
}
:root[data-crt="off"] .crt { display: none; }

@keyframes flicker {
  0%, 96%, 100% { opacity: 1; }
  97%           { opacity: 0.88; }
  98%           { opacity: 1; }
  99%           { opacity: 0.93; }
}

/* ═══════════════════════════════════════════════════════════════
   WINDOWS — the FF-style bordered box, in pure CSS
   ═══════════════════════════════════════════════════════════════ */
.win {
  position: relative;
  padding: var(--win-pad);
  background: linear-gradient(180deg, var(--panel-hi) 0%, var(--panel) 55%, var(--bg-deep) 100%);
  border: 2px solid var(--edge-hi);
  box-shadow:
    inset 0 0 0 2px var(--bg-deep),
    inset 0 0 34px rgba(0, 0, 0, 0.6),
    0 0 0 2px var(--bg-deep),
    0 6px 0 rgba(0, 0, 0, 0.45);
}
/* corner rivets */
.win::before, .win::after {
  content: ""; position: absolute; width: 5px; height: 5px;
  background: var(--edge-hi); pointer-events: none;
}
.win::before { top: 4px; left: 4px;  box-shadow: calc(100% + 4px) 0 0 var(--edge-hi); }
.win::after  { bottom: 4px; left: 4px; box-shadow: calc(100% + 4px) 0 0 var(--edge-hi); }

.win__title {
  margin: -4px 0 12px;
  font-size: 0.85em; letter-spacing: 0.22em; color: var(--tint);
  text-transform: uppercase;
  border-bottom: 1px solid var(--edge);
  padding-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   OPTIONS — the cursor is a real ▶ that only the focused row shows
   ═══════════════════════════════════════════════════════════════ */
.opt {
  position: relative;
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px 7px 30px;
  font: inherit; color: var(--ink); text-align: left;
  background: none; border: 0; cursor: pointer;
  transition: background var(--dur), color var(--dur), transform var(--dur);
}
.opt::before {
  content: "▶";
  position: absolute; left: 8px; color: var(--tint);
  opacity: 0; transform: translateX(-4px);
  transition: opacity var(--dur), transform var(--dur);
}
.opt:hover, .opt:focus-visible, .opt.is-cursor {
  background: linear-gradient(90deg, color-mix(in srgb, var(--tint) 22%, transparent), transparent 92%);
  color: #fff; outline: none;
}
.opt:hover::before, .opt:focus-visible::before, .opt.is-cursor::before {
  opacity: 1; transform: translateX(0);
  animation: bob 0.7s ease-in-out infinite alternate;
}
@keyframes bob { to { transform: translateX(3px); } }

.opt--back { width: auto; margin-top: 16px; color: var(--ink-dim); }
.opt--danger { color: var(--danger); margin-top: 10px; }

.opt--toggle { justify-content: space-between; }
.toggle {
  min-width: 5.5ch; text-align: right; color: var(--ink-faint); letter-spacing: 0.1em;
}
.toggle::after { content: "OFF"; }
.opt--toggle[aria-pressed="true"] .toggle { color: var(--hp); }
.opt--toggle[aria-pressed="true"] .toggle::after { content: "ON"; }

.hint { color: var(--ink-faint); font-size: 0.82em; letter-spacing: 0.06em; }
kbd {
  font: inherit; border: 1px solid var(--edge); padding: 0 4px;
  border-radius: 2px; color: var(--ink-dim);
}

/* ═══════════════════════════════════════════════════════════════
   SCREENS
   ═══════════════════════════════════════════════════════════════ */
#app {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 48px) clamp(12px, 3vw, 28px) 140px;
}
.screen[hidden] { display: none; }
.screen { animation: screen-in 200ms ease-out; }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } }

.screen__head { margin-bottom: 18px; }
.screen__head h2 {
  margin: 0; font-size: clamp(20px, 3.5vw, 30px); letter-spacing: 0.3em; color: var(--tint);
  text-shadow: 0 2px 0 var(--bg-deep), 0 0 18px color-mix(in srgb, var(--tint) 45%, transparent);
}
.screen__sub { margin: 6px 0 0; color: var(--ink-dim); font-size: 0.88em; }

/* ── TITLE ─────────────────────────────────────────────────── */
.screen--title {
  min-height: calc(100svh - 200px);
  display: grid; place-items: center; text-align: center;
}
.boot {
  font-size: 0.9em; color: var(--hp); text-align: left;
  white-space: pre-wrap; min-height: 12em; width: min(560px, 100%);
}
.boot .err { color: var(--danger); }
.boot .ok  { color: var(--hp); }
.boot .dim { color: var(--ink-faint); }

.logo {
  margin: 0 auto; font-size: clamp(7px, 2.1vw, 13px); line-height: 1.05;
  color: var(--ink);
  text-shadow:
    0 0 12px color-mix(in srgb, var(--tint) 70%, transparent),
    0 3px 0 var(--bg-deep);
  animation: logo-in 600ms ease-out;
}
@keyframes logo-in { from { opacity: 0; letter-spacing: 0.4em; filter: blur(6px); } }

.title__sub { color: var(--tint); letter-spacing: 0.14em; margin: 14px 0 26px; }

.savefile { width: min(520px, 100%); margin: 0 auto 22px; }
.savefile .win { text-align: left; }
.savefile__row { display: flex; justify-content: space-between; gap: 12px; }
.savefile__row + .savefile__row { margin-top: 4px; }
.savefile__row dt { color: var(--ink-dim); }
.savefile__row dd { margin: 0; color: var(--gold); }
.savefile__head {
  display: flex; align-items: baseline; gap: 12px;
  border-bottom: 1px solid var(--edge); padding-bottom: 8px; margin-bottom: 10px;
}
.savefile__head b { color: var(--tint); letter-spacing: 0.2em; }

.title__actions { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.title__actions .opt { width: auto; }

/* ── MAIN MENU ─────────────────────────────────────────────── */
.screen--menu { min-height: calc(100svh - 230px); display: grid; align-content: center; }

.menu-grid {
  display: grid; gap: 14px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: "status menu" "dialogue dialogue";
}
.win--status   { grid-area: status; }
.win--menu     { grid-area: menu; padding: 10px; }
.win--dialogue { grid-area: dialogue; min-height: 5.4em; }

.status { display: flex; gap: 16px; }
.portrait {
  width: 96px; height: 96px; flex: none;
  image-rendering: pixelated;
  border: 2px solid var(--edge); box-shadow: 0 0 0 2px var(--bg-deep);
}
.status__body { min-width: 0; flex: 1; }
.status__name { margin: 0; font-size: 1.15em; letter-spacing: 0.2em; }
.lv { color: var(--gold); font-size: 0.8em; letter-spacing: 0.08em; margin-left: 8px; }
.lv b { color: #fff; }
.status__chapter { margin: 2px 0 12px; color: var(--tint); font-size: 0.85em; }

.gauge { display: grid; grid-template-columns: 3ch 1fr auto; gap: 8px; align-items: center; margin-bottom: 5px; }
.gauge__label { color: var(--ink-dim); font-size: 0.8em; }
.gauge__bar {
  height: 9px; background: var(--bg-deep);
  border: 1px solid var(--edge); position: relative; overflow: hidden;
}
.gauge__bar i {
  display: block; height: 100%;
  background: repeating-linear-gradient(90deg, currentColor 0 3px, rgba(0,0,0,0.35) 3px 4px);
  transition: width 400ms ease-out;
}
.gauge[data-gauge="hp"] .gauge__bar i { color: var(--hp); }
.gauge[data-gauge="mp"] .gauge__bar i { color: var(--mp); }
.gauge__num { font-size: 0.78em; color: var(--ink-dim); }

.status__meta {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px;
  margin: 12px 0 0; font-size: 0.8em;
}
.status__meta dt { color: var(--ink-faint); }
.status__meta dd { margin: 0; color: var(--gold); }

.dialogue { margin: 0; min-height: 3em; }
.dialogue::after {
  content: "▮"; color: var(--tint); animation: blink 1s steps(1) infinite;
}
.dialogue.is-done::after { content: ""; }
.dialogue__more {
  position: absolute; right: 14px; bottom: 8px; color: var(--tint);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── CHRONICLE ─────────────────────────────────────────────── */
.chapters { list-style: none; margin: 0; padding: 0; }
.chapters .opt {
  display: grid; gap: 2px 14px; align-items: baseline;
  grid-template-columns: 3.5ch minmax(0, 1fr) auto;
}
.chap__n    { color: var(--ink-faint); font-size: 0.85em; }
.chap__name { color: var(--ink); overflow-wrap: anywhere; }
.chap__meta { color: var(--ink-faint); font-size: 0.78em; white-space: nowrap; }
.chap__sub  { grid-column: 2 / -1; color: var(--tint); font-size: 0.82em; }
.chap__arc {
  grid-column: 1 / -1; margin: 18px 0 4px; padding-left: 4px;
  color: var(--ink-faint); font-size: 0.72em; letter-spacing: 0.34em;
  border-bottom: 1px dashed var(--edge); padding-bottom: 4px;
}
.chapters li:first-child .chap__arc { margin-top: 0; }

/* ── CHAPTER DETAIL ────────────────────────────────────────── */
.chapter { display: grid; gap: 14px; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); align-items: start; }
.chapter__art { position: relative; }
.chapter__art img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border: 2px solid var(--edge-hi); box-shadow: 0 0 0 2px var(--bg-deep), 0 0 40px color-mix(in srgb, var(--tint) 30%, transparent);
}
.chapter__head h2 {
  margin: 0 0 2px; font-size: clamp(17px, 2.6vw, 24px); letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}
.chapter__ch { color: var(--tint); font-size: 0.8em; letter-spacing: 0.24em; margin: 0 0 6px; }
.chapter__sub { color: var(--gold); margin: 0 0 12px; font-style: italic; }
.chapter__facts {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 14px;
  margin: 0 0 14px; font-size: 0.82em;
}
.chapter__facts dt { color: var(--ink-faint); }
.chapter__facts dd { margin: 0; color: var(--ink-dim); }

.tracks { list-style: none; margin: 0; padding: 0; }
.tracks .opt { display: grid; grid-template-columns: 3ch minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.trk__n    { color: var(--ink-faint); font-size: 0.82em; }
.trk__name { overflow-wrap: anywhere; }
.trk__mp   { color: var(--mp); font-size: 0.78em; white-space: nowrap; }
.trk__tag  {
  font-size: 0.66em; letter-spacing: 0.12em; color: var(--gold);
  border: 1px solid currentColor; padding: 0 4px; white-space: nowrap;
}
.opt.is-playing { color: #fff; }
.opt.is-playing .trk__name::after { content: " ♪"; color: var(--tint); }

.chapter__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-block; padding: 5px 11px; font-size: 0.8em; letter-spacing: 0.08em;
  color: var(--ink-dim); text-decoration: none;
  border: 1px solid var(--edge); background: var(--bg-deep);
}
.chip:hover, .chip:focus-visible { color: #fff; border-color: var(--tint); outline: none; }

/* ── DROPS ─────────────────────────────────────────────────── */
.drops { list-style: none; margin: 0; padding: 0; }
.drops .opt {
  display: grid; gap: 2px 12px; align-items: baseline;
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.drop__name { color: var(--ink); overflow-wrap: anywhere; }
.drop__dur  { color: var(--mp); font-size: 0.78em; white-space: nowrap; }
.drop__fmt {
  font-size: 0.64em; letter-spacing: 0.12em; color: var(--tint);
  border: 1px solid currentColor; padding: 0 4px; white-space: nowrap; text-transform: uppercase;
}
.drop__meta { grid-column: 1 / -1; color: var(--ink-faint); font-size: 0.76em; }
.drop__note { grid-column: 1 / -1; color: var(--gold); font-size: 0.82em; overflow-wrap: anywhere; }

.drop__extras { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding-left: 30px; }

.drops-empty { color: var(--ink-dim); }
.drops-empty code {
  color: var(--tint); background: var(--bg-deep);
  border: 1px solid var(--edge); padding: 1px 5px;
}
.drops-empty pre {
  margin: 12px 0 0; padding: 10px 12px; overflow-x: auto;
  color: var(--hp); background: var(--bg-deep); border: 1px solid var(--edge);
}

.badge {
  min-width: 1.6em; margin-left: auto; padding: 0 5px;
  font-size: 0.7em; text-align: center; color: var(--bg-deep);
  background: var(--gold);
}
.badge[hidden] { display: none; }

/* ── BESTIARY ──────────────────────────────────────────────── */
.bestiary { display: grid; gap: 14px; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); align-items: start; }
.beast-list { list-style: none; margin: 0; padding: 0; }
.beast-list .opt { justify-content: space-between; }
.beast-list .opt.is-locked { color: var(--ink-faint); }
.beast__no { font-size: 0.75em; color: var(--ink-faint); }
.win--beast { min-height: 260px; }
.beast__glyph {
  font-size: clamp(28px, 7vw, 52px); line-height: 1; color: var(--tint);
  text-shadow: 0 0 24px color-mix(in srgb, var(--tint) 60%, transparent);
  margin: 0 0 8px;
}
.beast__name { margin: 0; letter-spacing: 0.2em; font-size: 1.1em; }
.beast__class { color: var(--gold); font-size: 0.78em; letter-spacing: 0.18em; margin: 2px 0 14px; }
.beast__text { color: var(--ink-dim); margin: 0 0 14px; }
.beast__seen { font-size: 0.8em; color: var(--ink-faint); margin: 0 0 6px; letter-spacing: 0.14em; }

/* ── ITEMS ─────────────────────────────────────────────────── */
.inventory {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
}
.inventory .opt {
  flex-direction: column; align-items: stretch; gap: 6px; padding: 8px;
  border: 1px solid var(--edge); background: var(--bg-deep);
}
.inventory .opt::before { display: none; }
.inventory .opt.is-cursor, .inventory .opt:hover, .inventory .opt:focus-visible {
  border-color: var(--tint); background: var(--panel-hi);
}
.inventory img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  image-rendering: pixelated;
}
.item__name { font-size: 0.72em; color: var(--ink-dim); overflow-wrap: anywhere; line-height: 1.3; }

/* ── TAVERN ────────────────────────────────────────────────── */
.inn { color: var(--gold); font-size: clamp(9px, 1.9vw, 13px); line-height: 1.25; margin: 0 0 18px; }
.guestbook { min-height: 120px; }
.guestbook .giscus { max-width: 100%; }

/* ── CONFIG ────────────────────────────────────────────────── */
/* 380px, not 280: at the 1014px content width a 280px track fits three
   columns, which leaves a dead third column and squeezes the link labels. */
.config { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.win--wide { grid-column: 1 / -1; }
.links { list-style: none; margin: 0; padding: 0; }
.links li { display: grid; grid-template-columns: 11ch 1fr; gap: 10px; padding: 5px 0; align-items: baseline; }
.links dt, .links .slot { color: var(--ink-faint); font-size: 0.78em; letter-spacing: 0.12em; }
.links a { text-decoration: none; overflow-wrap: anywhere; }
.links a::before { content: "◈ "; color: var(--edge-hi); }
.prose { color: var(--ink-dim); margin: 0; }
.prose code { color: var(--tint); }
.config iframe { border: 2px solid var(--edge); background: var(--bg-deep); display: block; }

/* ═══════════════════════════════════════════════════════════════
   PLAYER — the battle status bar
   ═══════════════════════════════════════════════════════════════ */
.player {
  position: fixed; z-index: 80;
  left: 50%; transform: translateX(-50%);
  bottom: 24px; width: min(1000px, calc(100vw - 24px)); /* clears .preview-note */
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, var(--panel-hi), var(--bg-deep));
  border: 2px solid var(--edge-hi);
  box-shadow: inset 0 0 0 2px var(--bg-deep), 0 0 0 2px var(--bg-deep), 0 8px 26px rgba(0, 0, 0, 0.7);
  animation: player-in 220ms ease-out;
}
@keyframes player-in { from { transform: translate(-50%, 20px); opacity: 0; } }
.player[hidden] { display: none; }

.player__btn {
  flex: none; min-width: 34px; height: 30px; padding: 0 8px;
  font: inherit; font-size: 0.85em; color: var(--ink);
  background: var(--panel); border: 1px solid var(--edge); cursor: pointer;
  transition: color var(--dur), border-color var(--dur), background var(--dur);
}
.player__btn:hover, .player__btn:focus-visible { color: #fff; border-color: var(--tint); background: var(--panel-hi); outline: none; }
.player__btn--play { color: var(--tint); min-width: 40px; }
.player__btn--haste[aria-pressed="true"] { color: var(--bg-deep); background: var(--gold); border-color: var(--gold); }

.player__body { flex: 1; min-width: 0; }
.player__title {
  margin: 0 0 3px; font-size: 0.85em; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.player__title b { color: var(--tint); font-weight: 400; }
.player__seek { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.player__time { font-size: 0.72em; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.player__bar { height: 8px; background: var(--bg-deep); border: 1px solid var(--edge); overflow: hidden; }
.player__bar i {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, var(--tint) 0 3px, rgba(0,0,0,0.4) 3px 4px);
}
.player__viz { flex: none; width: 160px; height: 36px; image-rendering: pixelated; }

.preview-note {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 79; margin: 0;
  text-align: center; font-size: 0.68em; color: var(--ink-faint);
  padding: 2px 0 3px; background: var(--bg-deep);
}
.preview-note[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════════════
   NOSCRIPT
   ═══════════════════════════════════════════════════════════════ */
.noscript { max-width: 40ch; margin: 12vh auto; padding: 20px; border: 2px solid var(--edge-hi); }
.noscript h2 { letter-spacing: 0.3em; color: var(--tint); margin-top: 0; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .menu-grid { grid-template-columns: 1fr; grid-template-areas: "status" "menu" "dialogue"; }
  .chapter, .bestiary { grid-template-columns: 1fr; }
  .chapter__art { max-width: 220px; }
  .player__viz { display: none; }
  .chapters .opt { grid-template-columns: 3.5ch minmax(0, 1fr); }
  .chap__meta { grid-column: 2; }
  .tracks .opt { grid-template-columns: 3ch minmax(0, 1fr) auto; }
  .trk__tag { grid-column: 2 / -1; justify-self: start; }
}

@media (max-width: 420px) {
  #app { padding-bottom: 160px; }
  .status { flex-direction: column; }
  .portrait { width: 72px; height: 72px; }
  .links li { grid-template-columns: 1fr; gap: 0; }
  .player { gap: 5px; padding: 6px; }
  .player__btn { min-width: 30px; padding: 0 5px; }
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION — kill the flicker, the bob, the typewriter cursor
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .crt__glow { animation: none; }
  .dialogue::after, .dialogue__more { animation: none; opacity: 1; }
}

@media (prefers-contrast: more) {
  :root { --ink-dim: #cfc9f5; --ink-faint: #a49dd4; --edge: #8a80c8; }
}
