/* ============================================================
   INFERNO — cell-shaded design system
   Ink outlines · stepped flat shading · halftone texture ·
   parchment manuscript panels
   ============================================================ */

:root {
  --ink: #16120d;
  --ink-soft: #2b2419;
  --paper: #efe5cd;
  --paper-deep: #e2d4b4;
  --paper-dark: #17150f;
  --gold: #c9a227;
  --gold-deep: #8f6f16;
  --blood: #a63c2a;
  --font-display: "IM Fell English", "Cormorant Garamond", Georgia, serif;
  --font-body: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-label: "IM Fell English SC", "Cormorant Garamond", Georgia, serif;
  --topbar-h: 54px;
  --rail-w: 118px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: auto; }

body {
  font-family: var(--font-body);
  background: #232628;
  color: var(--paper);
  font-size: 19px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--ink); }

/* ---------- loading veil ---------- */
#veil {
  position: fixed; inset: 0; z-index: 200;
  background: #111315;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  transition: opacity .9s ease;
}
#veil.gone { opacity: 0; pointer-events: none; }
#veil .sigil {
  width: 92px; height: 92px; border-radius: 50%;
  border: 3px solid var(--paper);
  outline: 2px solid var(--gold); outline-offset: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 34px; color: var(--gold);
  animation: veilspin 6s linear infinite;
  background:
    radial-gradient(circle at 35% 30%, #2e3134 0 38%, #1d2022 39% 100%);
}
@keyframes veilspin { to { transform: rotate(360deg); } }
#veil p { font-family: var(--font-label); letter-spacing: .18em; font-size: 14px; text-transform: uppercase; color: #9b927c; }
#veil .veil-quote { font-style: italic; color: #c9cdb8; font-size: 17px; max-width: 420px; text-align: center; }

/* ---------- fixed weather canvas ---------- */
#sky {
  position: fixed; inset: 0; z-index: 5;
  pointer-events: none;
}

/* ---------- top bar ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px;
  background: linear-gradient(#0d0b08f2, #0d0b08d8);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 4px 0 #00000040;
}
#topbar .brand {
  font-family: var(--font-label); font-size: 19px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--paper); white-space: nowrap;
  text-shadow: 2px 2px 0 #000;
}
#topbar .brand b { color: var(--gold); font-weight: normal; }
#depth-meter {
  flex: 1; height: 12px; position: relative;
  background: #26221a; border: 2px solid var(--ink); border-radius: 7px;
  overflow: hidden; min-width: 60px;
}
#depth-meter .fill {
  position: absolute; top: 0; bottom: 0; left: 0; width: 0%;
  background: linear-gradient(90deg, #5a5c48, #a8863c 40%, #c25038 70%, #4d7f9e);
  transition: width .2s linear;
}
#depth-meter .pin {
  position: absolute; top: -2px; bottom: -2px; width: 4px; background: var(--paper);
  box-shadow: 0 0 6px #fff8;
}
.tb-btn {
  font-family: var(--font-label); font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--paper); background: #26221a; border: 2px solid var(--ink);
  border-radius: 4px; padding: 7px 12px; cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  transition: transform .12s, box-shadow .12s, background .2s;
  white-space: nowrap;
}
.tb-btn:hover { background: #38311f; transform: translate(-1px,-1px); box-shadow: 4px 4px 0 #000; }
.tb-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 #000; }
.tb-btn.on { background: var(--gold); color: var(--ink); }
@media (max-width: 720px) {
  #topbar { gap: 8px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
  #topbar::-webkit-scrollbar { display: none; }
  #topbar .brand { font-size: 15px; }
  .tb-btn { padding: 6px 8px; font-size: 12px; flex: none; }
  #depth-label { display: none; }
}
@media (max-width: 480px) {
  #topbar .brand { font-size: 13px; letter-spacing: .06em; }
  #depth-meter { min-width: 34px; }
  .tb-btn { padding: 6px 7px; font-size: 11px; }
}
#depth-label { font-family: var(--font-label); font-size: 13px; color: #9b927c; min-width: 130px; text-align: right; }

/* ---------- descent rail (living mini-cone) ---------- */
#rail {
  position: fixed; right: 0; top: var(--topbar-h); bottom: 0; z-index: 80;
  width: var(--rail-w);
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 6px;
  background: linear-gradient(270deg, #0d0b08cc, transparent);
}
#rail svg { height: 100%; width: 100%; }
#rail .rail-band { cursor: pointer; }
#rail .rail-band:hover polygon, #rail .rail-band:hover path { filter: brightness(1.35); }
#rail .rail-label {
  font-family: var(--font-label); font-size: 9.5px; fill: #efe5cd; pointer-events: none;
  letter-spacing: .06em; text-transform: uppercase;
}
#rail .visited-stamp { fill: var(--gold); }
@media (max-width: 900px) { #rail { display: none; } }

/* ---------- the descent ---------- */
#descent { position: relative; z-index: 2; }

.station { position: relative; }

/* sticky scene viewport */
.scene {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
}
.scene svg.scenepic { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene .halftone {
  position: absolute; inset: 0; pointer-events: none; opacity: .16; mix-blend-mode: overlay;
}

/* scrolling text track overlays the sticky scene */
.track { position: relative; margin-top: -100vh; z-index: 3; padding: 12vh 0 30vh; pointer-events: none; }
.track > * { pointer-events: auto; }

/* station header — big roman numerals */
.shead {
  padding: 0 6vw;
  max-width: 900px;
}
.shead .zone {
  font-family: var(--font-label); font-size: 13px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); text-shadow: 2px 2px 0 #000;
}
.shead .numeral {
  font-family: var(--font-display);
  font-size: clamp(90px, 17vw, 210px);
  line-height: .9; color: transparent;
  -webkit-text-stroke: 2.5px var(--paper);
  text-shadow: 5px 5px 0 var(--ink);
  display: block; margin: 8px 0 2px;
}
.shead .numeral.ornament {
  font-size: clamp(44px, 7vw, 84px);
  -webkit-text-stroke: 0;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--ink);
}
.shead h2 {
  font-family: var(--font-display); font-weight: normal;
  font-size: clamp(34px, 5.4vw, 62px);
  color: var(--paper); text-shadow: 3px 3px 0 var(--ink);
  line-height: 1.02;
}
.shead .itname { font-style: italic; font-size: clamp(18px,2.4vw,24px); color: #d8cfa8; display:block; margin-top: 2px; }
.shead .cantos {
  display: inline-block; margin-top: 12px;
  font-family: var(--font-label); font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
  border: 2px solid var(--ink); background: #17150fdd; color: var(--gold);
  padding: 5px 12px; border-radius: 3px; box-shadow: 3px 3px 0 #000;
}

/* content cards */
.card {
  position: relative;
  max-width: 620px;
  margin: 9vh 6vw;
  padding: 26px 30px 22px;
  background:
    linear-gradient(#efe5cdf5, #e8dcc0f2);
  color: var(--ink-soft);
  border: 3px solid var(--ink);
  border-radius: 2px;
  box-shadow: 8px 8px 0 #000000a8, inset 0 0 0 1px var(--paper);
}
.card::after { /* halftone corner */
  content:""; position:absolute; right:10px; bottom:8px; width:74px; height:44px;
  background-image: radial-gradient(#00000055 1.4px, transparent 1.5px);
  background-size: 7px 7px; opacity:.5; pointer-events:none;
  mask-image: linear-gradient(135deg, transparent 20%, #000 90%);
  -webkit-mask-image: linear-gradient(135deg, transparent 20%, #000 90%);
}
.card h3 {
  font-family: var(--font-display); font-weight: normal; font-size: 27px;
  color: var(--ink); margin-bottom: 10px;
  border-bottom: 2px solid var(--ink); padding-bottom: 7px;
}
.card h3 .chip {
  float: right; font-family: var(--font-label); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--paper); background: var(--ink);
  padding: 3px 8px; border-radius: 3px; margin-top: 5px;
}
.card p { font-size: 19.5px; }
.card p + p { margin-top: 10px; }
.card.lede-card { max-width: 660px; font-size: 21px; }
.card.lede-card p { font-size: 21.5px; font-style: italic; color: #3a2f1c; }
.card .contrapasso-flag {
  font-family: var(--font-label); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--blood); display:block; margin-bottom: 6px;
}

/* right-offset alternating cards on desktop */
@media (min-width: 1100px) {
  .card:nth-of-type(even) { margin-left: auto; margin-right: 10vw; }
}

/* quotes — rubricated manuscript lines */
.quote {
  max-width: 560px;
  margin: 10vh 6vw;
  padding: 22px 28px;
  background: #12100bd9;
  border: 3px solid var(--ink);
  border-left: 10px solid var(--gold);
  box-shadow: 8px 8px 0 #000000a8;
  color: var(--paper);
}
.quote .it {
  font-family: var(--font-display); font-size: 24px; font-style: italic;
  color: #f3ead0; line-height: 1.35; white-space: pre-line;
}
.quote .it::first-letter { color: var(--gold); font-size: 1.5em; }
.quote .en { margin-top: 12px; font-size: 18px; color: #c7bd9e; font-style: italic; }
.quote .cite {
  margin-top: 10px; font-family: var(--font-label); font-size: 13px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold);
}
@media (min-width: 1100px) { .quote:nth-of-type(odd) { margin-left: auto; margin-right: 12vw; } }

/* hotspots — ink sigils over the scene */
.hotspot {
  position: absolute; z-index: 4;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: 3px solid var(--paper);
  background: radial-gradient(circle at 35% 30%, #3a3d3f, #14161a 70%);
  box-shadow: 0 0 0 2px var(--ink), 4px 4px 0 #00000090, 0 0 14px #00000088 inset;
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  pointer-events: auto;
}
.hotspot svg { width: 24px; height: 24px; }
.hotspot:hover, .hotspot:focus-visible {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--ink), 5px 5px 0 #000, 0 0 22px var(--gold);
  outline: none;
}
.hotspot .tip {
  position: absolute; bottom: 115%; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-label); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--paper); background: #12100bee; border: 2px solid var(--ink);
  padding: 4px 10px; border-radius: 3px; box-shadow: 3px 3px 0 #000;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.hotspot:hover .tip, .hotspot:focus-visible .tip, .hotspot.tipped .tip { opacity: 1; }
.hotspot .tip em { display:block; font-style: normal; color: var(--gold); font-size: 10.5px; margin-top: 1px; }
.hotspot.pulse::before {
  content:""; position:absolute; inset:-3px; border-radius:50%;
  border: 2px solid var(--gold); animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }

/* canto scrubber strip at station foot */
.scrub {
  margin: 6vh 6vw 0;
  max-width: 720px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-label); font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: #d8cfa8;
}
.scrub .rule { flex:1; height: 3px; background: repeating-linear-gradient(90deg, var(--paper) 0 10px, transparent 10px 20px); opacity:.5; }
.scrub .canto-chip {
  border: 2px solid var(--ink); background:#17150fdd; color: var(--gold);
  padding: 4px 10px; border-radius: 3px; box-shadow: 3px 3px 0 #000;
  white-space: nowrap;
}

/* marginalia ribbon */
.mnote {
  margin: 8vh auto 0; max-width: 520px; text-align: center;
  font-style: italic; color: #b9ae8e; font-size: 17px;
  padding: 14px 20px;
  border-top: 1px solid #b9ae8e55; border-bottom: 1px solid #b9ae8e55;
}

/* continue indicator */
.next-cue {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 12vh auto 0; color: var(--paper); opacity: .85;
  font-family: var(--font-label); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
}
.next-cue .arrow { width: 26px; height: 26px; animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(8px);} }

/* ---------- figure panel (illuminated drawer) ---------- */
#panel-veil {
  position: fixed; inset: 0; z-index: 95; background: #0009;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
#panel-veil.open { opacity: 1; pointer-events: auto; }
#panel {
  position: fixed; z-index: 96; top: var(--topbar-h); right: 0; bottom: 0;
  width: min(480px, 100vw);
  background:
    radial-gradient(circle at 80% -10%, #f6edd6 0, #efe5cd 45%, #e6d8b8 100%);
  color: var(--ink-soft);
  border-left: 4px solid var(--ink);
  box-shadow: -12px 0 0 #00000088;
  transform: translateX(105%);
  transition: transform .38s cubic-bezier(.2,.8,.25,1);
  display: flex; flex-direction: column;
}
#panel.open { transform: translateX(0); }
#panel .illum {
  position: absolute; inset: 10px; pointer-events: none;
  border: 2px solid var(--gold-deep); border-radius: 3px;
  outline: 1px solid #8f6f1644; outline-offset: 4px;
}
#panel .p-head {
  padding: 26px 30px 16px 30px; border-bottom: 3px double var(--ink);
  position: relative;
}
#panel .p-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--paper-deep); color: var(--ink);
  font-size: 16px; cursor: pointer; box-shadow: 2px 2px 0 #00000060;
  font-family: var(--font-body);
}
#panel .p-close:hover { background: var(--gold); }
#panel .p-role {
  font-family: var(--font-label); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--blood);
}
#panel h3 {
  font-family: var(--font-display); font-weight: normal; font-size: 36px; line-height: 1.05;
  color: var(--ink); margin-top: 4px;
}
#panel h3::first-letter { color: var(--blood); font-size: 1.3em; }
#panel .p-epithet { font-style: italic; color: #6d5c39; margin-top: 3px; font-size: 17px; }
#panel .p-canto {
  display: inline-block; margin-top: 10px;
  font-family: var(--font-label); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  border: 2px solid var(--ink); padding: 3px 9px; border-radius: 3px;
  background: var(--ink); color: var(--gold);
}
#panel .p-body { padding: 18px 30px 40px; overflow-y: auto; flex: 1; }
#panel .p-body p { font-size: 18.5px; }
#panel .p-body p + p { margin-top: 12px; }
#panel .p-body p:first-of-type::first-letter {
  font-family: var(--font-display); font-size: 54px; float: left; line-height: .85;
  padding: 4px 8px 0 0; color: var(--blood);
}
#panel .p-quote {
  margin: 18px 0 8px; padding: 14px 16px;
  background: #12100b; border: 2px solid var(--ink); border-left: 8px solid var(--gold);
  color: var(--paper); box-shadow: 4px 4px 0 #00000055;
}
#panel .p-quote .it { font-family: var(--font-display); font-style: italic; font-size: 19px; color:#f3ead0; white-space: pre-line; }
#panel .p-quote .en { font-size: 15.5px; font-style: italic; color: #c7bd9e; margin-top: 6px; }
#panel .p-quote .cite { font-family: var(--font-label); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-top: 6px; }
#panel .p-jump {
  margin-top: 16px; font-family: var(--font-label); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink);
  padding: 8px 12px; border-radius: 3px; cursor: pointer; box-shadow: 3px 3px 0 #00000066;
}
#panel .p-jump:hover { background: var(--gold-deep); color: var(--paper); }
@media (max-width: 720px) {
  #panel { top: auto; height: 76vh; width: 100vw; border-left: none; border-top: 4px solid var(--ink); transform: translateY(105%); }
  #panel.open { transform: translateY(0); }
}

/* ---------- atlas overlay (living map of Hell) ---------- */
#atlas {
  position: fixed; inset: 0; z-index: 97;
  background: radial-gradient(ellipse at 50% 40%, #1c1e20, #0a0b0c 75%);
  display: none; flex-direction: column;
}
#atlas.open { display: flex; }
#atlas .a-head {
  display: flex; align-items: center; gap: 14px; padding: 14px 20px;
  border-bottom: 3px solid var(--ink);
}
#atlas .a-head h3 { font-family: var(--font-display); font-weight: normal; font-size: 28px; color: var(--paper); flex:1; }
#atlas .a-head .hint { font-family: var(--font-label); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #9b927c; }
#atlas .a-stage { flex: 1; perspective: 1100px; overflow: hidden; position: relative; cursor: grab; }
#atlas .a-stage.dragging { cursor: grabbing; }
#atlas .a-map {
  position: absolute; left: 50%; top: 50%;
  transform-style: preserve-3d;
  transition: transform .12s linear;
}
#atlas svg { display: block; filter: drop-shadow(0 20px 30px #000); }
#atlas .a-band { cursor: pointer; }
#atlas .a-band:hover { filter: brightness(1.45); }
#atlas .a-band.current { stroke: var(--gold); stroke-width: 2.5; }
#atlas text { font-family: var(--font-label); letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
#atlas .a-foot {
  padding: 10px 20px; border-top: 3px solid var(--ink);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
#atlas .a-foot .hint { font-family: var(--font-label); font-size: 12px; color: #9b927c; letter-spacing: .1em; }

/* ---------- history overlay ---------- */
#history {
  position: fixed; inset: 0; z-index: 97;
  background: linear-gradient(#12100b, #1a1710);
  display: none; flex-direction: column;
}
#history.open { display: flex; }
#history .h-head {
  display: flex; align-items: center; gap: 14px; padding: 14px 20px;
  border-bottom: 3px solid var(--ink); background: #0d0b08;
}
#history .h-head h3 { font-family: var(--font-display); font-weight: normal; font-size: 28px; color: var(--paper); flex: 1; }
#history .h-tabs { display: flex; gap: 8px; padding: 10px 20px; border-bottom: 2px solid #2c2618; flex-wrap: wrap; background: #12100b; }
#history .h-body { flex: 1; overflow-y: auto; padding: 30px 6vw 80px; }
#history .h-sec { display: none; max-width: 860px; margin: 0 auto; }
#history .h-sec.on { display: block; }
#history .h-sec h4 {
  font-family: var(--font-display); font-weight: normal; font-size: 40px; color: var(--paper);
  border-bottom: 3px double var(--gold); padding-bottom: 8px; margin-bottom: 4px;
}
#history .h-sec .h-sub { font-family: var(--font-label); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 26px; }
#history .h-block { margin-bottom: 26px; }
#history .h-block h5 {
  font-family: var(--font-display); font-weight: normal; font-size: 25px; color: #f3ead0; margin-bottom: 6px;
}
#history .h-block h5::before { content: "¶ "; color: var(--gold); }
#history .h-block p { color: #d8cfa8; font-size: 19px; }

/* timeline */
.timeline { position: relative; margin-top: 10px; padding-left: 34px; }
.timeline::before { content:""; position:absolute; left: 9px; top: 6px; bottom: 6px; width: 3px;
  background: repeating-linear-gradient(#c9a227 0 12px, transparent 12px 20px); }
.tl-item { position: relative; margin-bottom: 22px; max-width: 780px;
  background: #efe5cd; color: var(--ink-soft); border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 #00000070; padding: 14px 18px; border-radius: 2px;
}
.tl-item::before { content:""; position:absolute; left: -32px; top: 20px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--gold); border: 3px solid var(--ink); box-shadow: 2px 2px 0 #000; }
.tl-item .tl-year { font-family: var(--font-display); font-size: 24px; color: var(--blood); }
.tl-item .tl-tag { float: right; font-family: var(--font-label); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  background: var(--ink); color: var(--gold); padding: 3px 8px; border-radius: 3px; }
.tl-item h6 { font-family: var(--font-display); font-weight: normal; font-size: 21px; color: var(--ink); margin: 2px 0 4px; }
.tl-item p { font-size: 17px; }

/* marginalia strip */
#marginalia {
  display: flex; gap: 0; overflow-x: auto; border-top: 3px solid var(--ink);
  background: #0d0b08; padding: 12px 16px;
}
#marginalia .m-item { min-width: 190px; padding: 8px 16px; border-right: 1px solid #2c2618; }
#marginalia .m-item b { font-family: var(--font-display); font-weight: normal; font-size: 26px; color: var(--gold); display: block; }
#marginalia .m-item span { font-size: 13.5px; color: #9b927c; line-height: 1.35; display: block; }

/* ---------- colophon / end ---------- */
#colophon {
  position: relative; z-index: 2;
  padding: 12vh 6vw 16vh; text-align: center;
  background: linear-gradient(transparent, #060d12 30%);
}
#colophon .stars-word {
  font-family: var(--font-display); font-size: clamp(40px, 8vw, 96px);
  color: #cfe6f2; text-shadow: 3px 3px 0 var(--ink);
}
#colophon p { max-width: 620px; margin: 18px auto; color: #9cc4d8; }
#colophon .tb-btn { margin-top: 12px; }

/* ---------- keyboard help ---------- */
#help {
  position: fixed; z-index: 98; left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: #efe5cd; color: var(--ink-soft); border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 #00000090; padding: 24px 30px; max-width: 420px;
  display: none;
}
#help.open { display: block; }
#help h4 { font-family: var(--font-display); font-weight: normal; font-size: 26px; margin-bottom: 10px; }
#help table { width: 100%; border-collapse: collapse; font-size: 16.5px; }
#help td { padding: 4px 6px; border-bottom: 1px solid #00000022; }
#help td.k { font-family: var(--font-label); font-size: 13px; letter-spacing: .1em; white-space: nowrap; color: var(--blood); }

/* ---------- in-scene ink animations ---------- */
.anim-sway   { animation: sway 5.5s ease-in-out infinite alternate; transform-box: fill-box; }
.anim-drift  { animation: drift 7s ease-in-out infinite alternate; }
.anim-flame  { animation: flame 1.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.anim-bob    { animation: bob2 4.5s ease-in-out infinite alternate; }
.anim-wind   { animation: windmove 6s linear infinite; }
.anim-tumble { animation: tumble 5s linear infinite; }
.anim-bubble { animation: bubble 3.6s ease-in-out infinite; }
.anim-fall   { animation: fall 3.2s linear infinite; }
.anim-wing   { animation: wing 6s ease-in-out infinite alternate; }
@keyframes sway   { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
@keyframes drift  { from { transform: translate(0,0); } to { transform: translate(14px,-22px); } }
@keyframes flame  { from { transform: scale(1,1); } to { transform: scale(1.08,.9) translateY(2px); } }
@keyframes bob2   { from { transform: translateY(0); } to { transform: translateY(-12px); } }
@keyframes windmove { from { transform: translateX(-140px); } to { transform: translateX(140px); } }
@keyframes tumble { 0% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(70px,-40px) rotate(180deg); } 100% { transform: translate(0,0) rotate(360deg); } }
@keyframes bubble { 0% { transform: translateY(0) scale(1); opacity: .9; } 70% { opacity: .9; } 100% { transform: translateY(-46px) scale(1.5); opacity: 0; } }
@keyframes fall   { from { transform: translateY(-30px); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(120px); opacity: 0; } }
@keyframes wing   { from { transform: rotate(-7deg) scaleY(1); } to { transform: rotate(7deg) scaleY(.86); } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hotspot.pulse::before, .next-cue .arrow, #veil .sigil { animation: none; }
  .scene .halftone { opacity: .1; }
  * { transition-duration: .01ms !important; }
}
