:root{
  --bg:#0d0d14;
  --panel:#16161f;
  --panel-2:#1e1e2b;
  --ink:#cfc7b8;
  --ink-dim:#8a8374;
  --gold:#e8c860;
  --gold-dim:#9c8636;
  --border:#3a3222;
  --hp:#b5303a;
  --hp-dark:#4a1116;
  --mp:#3a6ea5;
  --mp-dark:#122840;
  --sp:#c9922f;
  --sp-dark:#3d2c0e;
  --xp:#7d5fa8;
  --xp-dark:#2a1d3d;
  --accent-t1:#7fae6a; /* crypt sickly green */
  --danger:#c94d3a;
  --shadow:0 6px 24px rgba(0,0,0,.55);

  /* ---- React "RX" surface material (iron plate + gold leaf) ----
     These MUST live on :root, not on .rx-title-screen where they started. The rx-edge,
     rx-rivet and rx-cap rules are used by js/ui_rx_shared.jsx from ANY React surface
     (title plaque, hero sidebar). Custom properties inherit down the DOM, so scoped to the
     title screen these lookups fail elsewhere, the declaration goes invalid at computed-value
     time, and stroke falls back to its initial value of none — gold edges vanish silently
     with no console error. */
  --iron-hi:#171412;        /* lit top of the plate    */
  --iron-lo:#0b0a09;        /* shadowed bottom         */
  --leaf:#c9a94e;           /* gold leaf, body value   */
  --leaf-hi:#f7e6b0;        /* lit edge                */
  --leaf-dk:#2e2209;        /* shadowed edge           */
  --ember:#ffb25c;          /* candle warmth — the scene's only warm accent */

  /* ---- THE GUIDE: the first fights' tips, and nothing else (owner, 2026-11-04) ----
     Its own cold wisp-light, so the walkthrough reads as a layer over the game that will go away,
     not as interface that is always there; gold is the interface's. Greener and paler than Mana's
     periwinkle (--mp, the spell costs' #8fb0d8) so the two never read as one thing. On :root
     because the rail's Drink button, outside the fight overlay, is lit with it too. */
  --guide:#9fe3f2;          /* the guide's names, rules, rings */
  --guide-ink:#e2f3f6;      /* its line of text                */
  --guide-cap:#bfe4ec;      /* the captions under the buttons  */
  --guide-glow:140,220,245; /* r,g,b for its light             */
}
*{box-sizing:border-box}
/* No zoom on a touch screen (js/phone.js, NO ZOOM): a pinch or a quick double tap magnified the page
   and cut screens off at the edges. Panning still scrolls whatever scrolls. Not on a desk. */
@media (pointer: coarse){ html{ touch-action:pan-x pan-y } }
/* The UA's [hidden] rule is only `display:none` at the lowest priority, so ANY author rule that
   sets display beats it and the element stays on screen. That is exactly how the Holy Chalice
   badge came to be permanently visible: .chalice-badge sets display:flex, so toggling `hidden`
   on it did nothing at all. Enforced globally so hiding something can never silently fail. */
[hidden]{display:none !important}
html,body{margin:0;padding:0;height:100%}
/* NO TEXT INFLATION. iPhone Safari enlarges a page's text when the phone turns sideways unless the
   page opts out, which is how the game is always played: on an iPhone 16 Pro the title plaque ran
   off the bottom and the class select's text crowded its niche (owner, 2026-10-29), while the same
   874x402 in Chrome fitted. Every size here is set on purpose. */
html{ -webkit-text-size-adjust:100%; text-size-adjust:100% }
body{
  background:
    radial-gradient(1200px 600px at 50% -10%, #1a1622 0%, var(--bg) 60%),
    var(--bg);
  color:var(--ink);
  font-family:'EB Garamond', Georgia, serif;
  font-size:17px;
  -webkit-font-smoothing:antialiased;
  min-height:100%;
}
h1,h2,h3,.cinzel{font-family:'Cinzel', serif; letter-spacing:.04em}
#app{max-width:1120px; margin:0 auto; padding:24px 20px 60px}

/* ---------- shared ---------- */
.screen.anim{animation:fade .35s ease}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.panel{
  background:linear-gradient(180deg, var(--panel-2), var(--panel));
  border:1px solid var(--border);
  border-radius:10px;
  box-shadow:var(--shadow);
  padding:18px 20px;
}
.frame{
  border:1px solid var(--gold-dim);
  border-radius:12px;
  padding:18px 20px;
  background:linear-gradient(180deg,#1b1b26,#141420);
  box-shadow:inset 0 0 0 1px rgba(232,200,96,.10), var(--shadow);
}
.muted{color:var(--ink-dim)}
.gold{color:var(--gold)}
.center{text-align:center}
.row{display:flex; gap:14px; flex-wrap:wrap}
.spacer{flex:1}
hr.rule{border:none;border-top:1px solid var(--border);margin:16px 0}

button{
  font-family:'Cinzel',serif;
  font-size:14px;
  color:var(--ink);
  background:linear-gradient(180deg,#26262f,#191922);
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px 16px;
  transition:transform .08s ease, border-color .15s, box-shadow .15s, background .15s;
}
button:hover{border-color:var(--gold-dim); box-shadow:0 0 0 1px rgba(232,200,96,.25) inset}
button:active{transform:translateY(1px)}
button:disabled{opacity:.4; filter:grayscale(.5)}
/* ---- ONE CURSOR, EVERYWHERE: THE BONE HAND ---------------------------------------------------
   The game showed the system arrow, a hand over buttons, a crosshair over foes you could target,
   a question mark on tooltips and a no-entry sign on spent actions: five cursors, none of them the
   game's. There is one now, Death's own skeletal hand raised to point, the fingertip is the click
   (hotspot 10, 2), and
   every one of those old per-element cursors was removed rather than overridden, so nothing
   downstream can quietly bring one back. What is clickable says so with its own hover state,
   which every control here already has.

   image-set picks pixels made for the display: 32 at 100%, 48 at 150%, 64 at 200%. The plain url
   comes first as the fallback for a browser without image-set in `cursor`. Art and renderer:
   assets/ui/cursor_hand.svg (48 and 64), tools/cursor_hand_1x.txt (32, placed pixel by pixel),
   tools/gen_cursor.js. It replaced a scythe after play: a blade pointing sideways never felt like
   a pointer in the hand. */
html, body, *, *::before, *::after{
  cursor:url("../assets/ui/cursor_32.png?v=2bf0ccd1") 10 2, auto;
  cursor:-webkit-image-set(url("../assets/ui/cursor_32.png?v=2bf0ccd1") 1x, url("../assets/ui/cursor_48.png?v=ddf84d7d") 1.5x, url("../assets/ui/cursor_64.png?v=8973996a") 2x) 10 2, auto;
  cursor:image-set(url("../assets/ui/cursor_32.png?v=2bf0ccd1") 1x, url("../assets/ui/cursor_48.png?v=ddf84d7d") 1.5x, url("../assets/ui/cursor_64.png?v=8973996a") 2x) 10 2, auto;
}
button.primary{
  background:linear-gradient(180deg,#4a3d18,#33290f);
  border-color:var(--gold-dim); color:var(--gold);
}
button.primary:hover{box-shadow:0 0 12px rgba(232,200,96,.3)}
button.danger{border-color:#5a2420;color:#e8a598}

/* ---------- title ---------- */
.title-wrap{text-align:center; padding:40px 0 10px}
.title-wrap h1{font-size:44px; color:var(--gold); margin:0; text-shadow:0 2px 24px rgba(232,200,96,.25)}
.title-wrap .sub{color:var(--ink-dim); font-style:italic; margin-top:6px; letter-spacing:.06em}
.chalice-mark{font-size:54px; line-height:1; filter:drop-shadow(0 0 14px rgba(232,200,96,.35))}
.meta-line{margin-top:18px;color:var(--ink-dim)}

/* ---------- title screen: full-bleed key art + left plaque ---------- */
/* Responsive key art: serve the smallest image that still covers the viewport.
   Tiers step on min-width; the 2dppx rules bump one tier up for retina/HiDPI panels.
   background-color carries the first paint, so no flash and no LQIP needed. */
.menu-backdrop{
  position:fixed; inset:0; z-index:0; pointer-events:none; background-color:#07070e;
  background-size:cover; background-position:center center; background-repeat:no-repeat;
  /* base tier — 1280x720 */
  background-image:url("../assets/menu/key-art-small.jpg?v=74c8837e");
  background-image:image-set(url("../assets/menu/key-art-small.webp?v=ee3ec316") type("image/webp"),
                             url("../assets/menu/key-art-small.jpg?v=74c8837e")  type("image/jpeg"));
}
/* 1920x1080 tier */
@media (min-width:1100px), (min-width:560px) and (min-resolution:2dppx){
  .menu-backdrop{
    background-image:url("../assets/menu/key-art-1080.jpg?v=ff34b7c2");
    background-image:image-set(url("../assets/menu/key-art-1080.webp?v=136244ec") type("image/webp"),
                               url("../assets/menu/key-art-1080.jpg?v=ff34b7c2")  type("image/jpeg"));
  }
}
/* 2560x1440 tier */
@media (min-width:1700px), (min-width:900px) and (min-resolution:2dppx){
  .menu-backdrop{
    background-image:url("../assets/menu/key-art.jpg?v=c61ce289");
    background-image:image-set(url("../assets/menu/key-art.webp?v=10fdb36f") type("image/webp"),
                               url("../assets/menu/key-art.jpg?v=c61ce289")  type("image/jpeg"));
  }
}
/* Scrim: damp the candle/headstone hotspots under the plaque WITHOUT flattening the left third to
   a void — the plaque needs architecture behind it to visibly occlude, or it reads as floating.
   Warm-neutral (12,10,9), not violet, so it agrees with the art's darks. */
.menu-backdrop::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(to right,
    rgba(12,10,9,.74) 0%, rgba(12,10,9,.66) 24%,
    rgba(12,10,9,.34) 40%, rgba(12,10,9,0) 56%);
}
.menu-backdrop::after{   /* corner vignette */
  content:""; position:absolute; inset:0;
  background:radial-gradient(125% 95% at 58% 45%, rgba(0,0,0,0) 38%, rgba(0,0,0,.6) 100%);
}
/* break out of #app's 960px column so the plaque sits over the art's dark third */
.title-screen{
  position:relative; z-index:1;
  margin-left:calc(-50vw + 50%); margin-right:calc(-50vw + 50%);
  min-height:calc(100vh - 48px); display:flex; align-items:center; padding:0 5vw;
}
.title-plaque{
  width:min(430px, 46vw); min-width:300px; text-align:center;
  padding:30px 28px 24px; border-radius:12px;
  background:linear-gradient(180deg, rgba(20,18,26,.90), rgba(10,9,14,.95));
  border:1px solid var(--gold-dim);
  box-shadow:0 24px 70px rgba(0,0,0,.65), inset 0 0 46px rgba(0,0,0,.55);
}
.title-plaque h1{font-size:clamp(28px,3.4vw,42px); line-height:1.1; margin:8px 0 0}
.menu-actions{display:flex; flex-direction:column; gap:10px; margin-top:24px}
.menu-actions button{width:100%; padding:12px 14px; font-size:15px; letter-spacing:.06em}
@media (max-width:720px){
  .title-plaque{width:100%; min-width:0}
  /* Keep the key art readable on phones — the old .72→.93 ramp blacked the whole frame out,
     which turned the menu into a modal on a void instead of art with a plaque on it. */
  .menu-backdrop::before{background:linear-gradient(to bottom, rgba(12,10,9,.42) 0%, rgba(12,10,9,.78) 62%)}
}

/* ---------- React title screen (js/ui_title.jsx) ---------- */
/* CONCEPT: an iron grave-marker plate bolted over crypt stone, lit from the lower-right by the
   chalice and candles in the key art. Fills are NEUTRAL-WARM (#131110 family), never violet —
   a violet-biased slab reads as a separate layer floating over the art's warm-grey darks. */

/* Full-bleed: cancel #app's 24px/20px/60px padding so the art fills the viewport exactly.
   Any leftover height forces a scrollbar, which then also triggers horizontal overflow via 100vw. */
.rx-title-screen{
  position:relative; z-index:1;
  margin:-24px calc(-50vw + 50%) -60px;
  min-height:100vh; display:flex; align-items:center;
  /* Left padding must clear the caps' 17.5% overhang or the flanking blades clip off-screen. */
  padding:0 5vw 0 max(78px, 7vw);
  /* Width also drives HEIGHT (the caps are aspect-ratio boxes), so a vh term is required or a
     short viewport pushes the plaque past 100vh — which forces a vertical scrollbar and then a
     horizontal one via the 100vw full-bleed. */
  --plaque-w:clamp(300px, min(31vw, 52vh), 420px);
  --ovh:17.5%;              /* cap overhang, as a share of body width (70/400) */
  /* The iron/leaf/ember material tokens moved to :root so every React surface can use the
     shared rx-* primitives. Only genuinely title-specific geometry stays local here. */
}

.rx-plaque{
  position:relative; z-index:1;
  width:var(--plaque-w);
  display:flex; flex-direction:column; align-items:stretch;
  /* Cast shadow throws down-LEFT: the scene's key light is the cold shaft at centre-right. */
  filter:drop-shadow(-14px 22px 26px rgba(0,0,0,.78)) drop-shadow(-3px 5px 7px rgba(0,0,0,.7));
  animation:rxPlaqueIn .8s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes rxPlaqueIn{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:none}}
/* The sweep passes quickly then rests — a continuously travelling highlight reads as a web
   shimmer effect; one pass every ~8s reads as light moving across metal. */
@keyframes rxSweep{
  0%{background-position:180% 0, 0 0}
  16%{background-position:-80% 0, 0 0}
  100%{background-position:-80% 0, 0 0}
}
/* Motion is decoration here — none of it carries meaning, so all of it goes. */
@media (prefers-reduced-motion: reduce){
  .rx-plaque,.rx-menu-item{animation:none !important}
  .rx-ember,.rx-ember-slow,.rx-cap-ember,.rx-cap-ember-slow{animation:none !important; opacity:.8}
  .rx-title-l1,.rx-title-l2,.rx-title-l3{animation:none !important; background-position:-80% 0, 0 0}
}

/* --- shaped caps --- */
.rx-cap{
  display:block; position:relative; z-index:2;
  width:calc(100% + 2 * var(--ovh)); margin-left:calc(-1 * var(--ovh));
  overflow:visible; pointer-events:none;
}
.rx-crown{ aspect-ratio:540 / 118; margin-bottom:-1px }
.rx-base { aspect-ratio:540 / 82; margin-top:-1px; z-index:3 }

/* Caps are flat fills, the body is a gradient — each cap must match the body's colour AT THE SEAM
   or a tonal band shows across the join. The body therefore gets NO top-lightening inset: any
   light lip there raises the body's top stop above the crown's flat fill and reopens the seam. */
/* Each cap's plate is a GRADIENT that continues the body's ramp rather than a flat fill — see the
   gradient defs in ui_title.jsx. The flat values remain as the fallback if a ref ever breaks. */
.rx-plate{ fill:var(--iron-hi) }
.rx-crown .rx-plate{ fill:url(#rxPlateCrown) }
.rx-base  .rx-plate{ fill:url(#rxPlateBase) }

/* --- gold leaf: three passes give the edge a light direction --- */
/* vector-effect keeps these in PIXELS, not scaled user units. Without it the cap strokes shrink
   and grow with --plaque-w (≈1.4px at the 300px minimum, ≈2px at 420) while the body rails stay a
   fixed 4px band — so the gold visibly changed thickness at both shoulders, and by a different
   amount at every viewport size. Widths here mirror the rail: 4px total, 2px leaf core. */
.rx-edge,.rx-edge-dk,.rx-edge-hi{ vector-effect:non-scaling-stroke }
.rx-edge   { fill:none; stroke:var(--leaf);    stroke-width:2;   stroke-linecap:round; stroke-linejoin:round }
.rx-edge-dk{ fill:none; stroke:var(--leaf-dk); stroke-width:4;   stroke-linecap:round; stroke-linejoin:round }
.rx-edge-hi{ fill:none; stroke:var(--leaf-hi); stroke-width:1;   stroke-linecap:round; stroke-linejoin:round; opacity:.5 }
.rx-orn-fill{ fill:#1c1813; stroke:var(--leaf); stroke-width:1.6; stroke-linejoin:round }

/* --- scythes: filled, tapered blades with a honed edge (not scrollwork).
       Warmed into the gold family so they belong to the plaque instead of reading as pasted-on
       clipart in a foreign grey-tan. --- */
.rx-scythe-haft { fill:none; stroke:#6b5738; stroke-width:7; stroke-linecap:round }
.rx-scythe-blade{ fill:#241d13; stroke:#8a7346; stroke-width:1.6; stroke-linejoin:round }
.rx-scythe-hone { fill:none; stroke:#f0e3bd; stroke-width:1.8; stroke-linecap:round; opacity:.8 }

/* --- bolts --- */
.rx-rivet-bd{ fill:#241e17; stroke:#5c4e3b; stroke-width:1.2 }
.rx-rivet-sh{ fill:rgba(0,0,0,.8) }
.rx-rivet-hi{ fill:rgba(255,238,206,.38) }

/* --- body --- */
.rx-body{
  position:relative; z-index:1;
  /* No top radial: it brightened the body's first ~50px, which put a bump immediately below the
     crown seam and made the flat cap above look darker than it measured. The ramp alone now
     carries top-to-bottom, and the caps extend it. */
  background:linear-gradient(180deg, var(--iron-hi) 0%, #100e0c 48%, var(--iron-lo) 100%);
  /* NO dark bevel along the bottom. It predates the candle work and now contradicts it — the
     candles sit at the plaque's FOOT, so darkening the last 22px both fights the light direction
     and paints a hard dark stripe immediately above the base seam, which reads as a gap. */
  box-shadow:
    /* candle-side rim light: the right edge faces the art's warm light and must read.
       Flicker for this rim is carried by the .rx-ember/.rx-ember-slow layers below, not here. */
    inset -22px 0 22px -20px rgba(255,196,116,.42);
}
/* Side rails as pseudo-elements, NOT border-left/right: a border can only be one flat colour, and
   a uniform hairline running the full height next to three-pass cap edges reads as an internal
   inconsistency. These carry dark/body/highlight bands, and the bands are ORDERED PER SIDE so the
   right rail is lit on its outer face (toward the candles) and the left rail on its inner face.
   (Drawing these in SVG instead was tried and reverted — see CLAUDE.md.) */
.rx-body::before,.rx-body::after{
  content:""; position:absolute; top:0; bottom:0; width:4px; z-index:2;
}
.rx-body::before{
  left:-2px;
  background:linear-gradient(90deg,
    var(--leaf-dk) 0 1px, var(--leaf) 1px 3px, rgba(247,230,176,.28) 3px 4px);
}
.rx-body::after{
  right:-2px;
  background:linear-gradient(90deg,
    rgba(255,226,170,.62) 0 1px, var(--leaf) 1px 3px, var(--leaf-dk) 3px 4px);
}
/* Pitting. Low frequency so it reads as cast iron rather than TV static; soft-light keeps it
   from washing the darks the way overlay does. */
.rx-grain{
  position:absolute; inset:0; pointer-events:none; opacity:.17; mix-blend-mode:soft-light;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.36' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* --- surface wear: coarse mottling + faint tool scratches, over the fine pitting in .rx-grain.
       One noise frequency reads as film grain; two at different scales read as corroded metal. --- */
.rx-wear{
  position:absolute; inset:0; z-index:1; pointer-events:none;
  opacity:.42; mix-blend-mode:overlay;
  background-image:
    repeating-linear-gradient(97deg, rgba(255,244,222,.05) 0 1px, transparent 1px 9px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='m' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.028' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23m)'/%3E%3C/svg%3E");
  background-size:auto, 300px 300px;
}

/* --- candle light. Two layers, co-prime periods, so the combined signal never visibly loops.
       Only `opacity` animates (compositor-friendly); the gradients themselves are static. --- */
.rx-ember,.rx-ember-slow{ position:absolute; inset:0; z-index:1; pointer-events:none }
/* Cap counterparts. These MUST share the body layers' keyframes and duration so all three pieces
   flicker in phase — out of phase, the light pulses differently either side of the seam and the
   join becomes more obvious than it was when unlit. */
/* Cap surface, matching the body's .rx-grain (.17 soft-light) and .rx-wear (.42 overlay). */
/* Opacity AND blend mode must match the body layers exactly. overlay darkens a near-black plate
   while soft-light lightens it, so a mismatched mode alone re-opens the seam as a tonal step. */
.rx-cap-grain{ opacity:.17; mix-blend-mode:soft-light }
.rx-cap-wear { opacity:.42; mix-blend-mode:overlay }
.rx-cap-ember     { animation:rxFlickerA 4.7s ease-in-out infinite }
.rx-cap-ember-slow{ animation:rxFlickerB 7.3s ease-in-out infinite }
.rx-ember{
  background:linear-gradient(270deg, rgba(255,186,104,.34) 0%, rgba(255,186,104,.10) 16%, transparent 42%);
  animation:rxFlickerA 4.7s ease-in-out infinite;
}
.rx-ember-slow{
  /* low and to the right — the candles in the key art sit at the foot of the plaque */
  background:radial-gradient(72% 46% at 104% 88%, rgba(255,170,80,.32), transparent 68%);
  animation:rxFlickerB 7.3s ease-in-out infinite;
}
/* Irregular stops on purpose: evenly spaced keyframes read as a pulse, not a flame. */
@keyframes rxFlickerA{
  0%{opacity:.86}  7%{opacity:1}    11%{opacity:.70} 16%{opacity:.95}
  22%{opacity:.58} 26%{opacity:.90} 34%{opacity:1}   41%{opacity:.77}
  47%{opacity:.97} 53%{opacity:.64} 58%{opacity:.92} 66%{opacity:1}
  71%{opacity:.79} 78%{opacity:.99} 84%{opacity:.68} 90%{opacity:.94} 100%{opacity:.86}
}
@keyframes rxFlickerB{
  0%{opacity:.52}  13%{opacity:.74} 29%{opacity:.42} 44%{opacity:.70}
  58%{opacity:.36} 73%{opacity:.66} 88%{opacity:.50} 100%{opacity:.52}
}

.rx-inner{ position:relative; z-index:3; padding:14px 26px 10px; text-align:center }

/* --- title lockup --- */
.rx-title{
  font-family:'Cinzel',serif; font-weight:700; margin:0;
  display:flex; flex-direction:column; line-height:.9;
  text-transform:uppercase;
}
.rx-title span{ display:block }
/* Tracking is tuned per line so all three OPTICALLY JUSTIFY to one measure. Centred lines of
   three different widths read as a lopsided wedge; matched widths read as a carved lockup.
   margin-left cancels letter-spacing's trailing space so the block stays centred.
   Glyphs get a dark top lip and a light bottom lip — engraved, not gradient-filled text. */
.rx-title-l1,.rx-title-l2{
  /* Two stacked backgrounds clipped to the glyphs: a travelling specular band over the static
     leaf ramp. Only background-position animates, so the gradient itself is never recomputed. */
  background:
    linear-gradient(100deg, transparent 0 40%, rgba(255,252,236,.55) 47%, transparent 55% 100%),
    linear-gradient(172deg,#fff6da 0%, var(--leaf) 38%, #8f6f22 76%, #f0dda0 100%);
  background-size:260% 100%, 100% 100%;
  animation:rxSweep 8.5s ease-in-out infinite;
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
  filter:drop-shadow(0 -1px 0 rgba(0,0,0,.85)) drop-shadow(0 1.5px 0 rgba(255,240,205,.20))
         drop-shadow(0 3px 4px rgba(0,0,0,.8));
}
/* Sizes scale together so the optical justification above is preserved. */
.rx-title-l1{ font-size:clamp(50px,5.62vw,77px); letter-spacing:.045em; margin-left:.045em }
.rx-title-l2{ font-size:clamp(28px,3.11vw,42px); letter-spacing:.414em; margin-left:.414em }
/* LAST is bleached BONE, not UI white, and carved rather than glowing — a soft bloom made the
   punchline read blurrier and therefore less important than the crisp gold above it. */
.rx-title-l3{
  font-size:clamp(55px,6.14vw,85px); letter-spacing:.235em; margin-left:.235em;
  /* Bone catches less light than leaf, so the sweep is weaker and lags the gold slightly. */
  background:
    linear-gradient(100deg, transparent 0 40%, rgba(255,255,255,.34) 47%, transparent 55% 100%),
    linear-gradient(172deg,#f6efdd 0%,#ded4bc 44%,#9a9080 100%);
  background-size:260% 100%, 100% 100%;
  animation:rxSweep 8.5s ease-in-out .5s infinite;
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
  filter:drop-shadow(0 -1px 0 rgba(0,0,0,.9)) drop-shadow(0 2px 0 rgba(255,252,240,.18))
         drop-shadow(0 4px 5px rgba(0,0,0,.85));
}

/* --- forged strap bolted across the plate (replaces the old hairline rule) --- */
.rx-strap{
  /* z-index must beat the rails (.rx-body::before/after, z-index 2) or the gold rail draws OVER
     the strap and a band "bolted across the plate" appears to pass behind the plate's own edge.
     .rx-inner is the stacking context, so it is raised to 3 to let this sit above them. */
  position:relative; height:14px; margin:12px -40px 12px; z-index:4;
  /* End caps: the horizontal stops darken the last 6px at each end into a visible end FACE, so
     the bar has thickness instead of terminating in a flat guillotine cut over the artwork. */
  background:
    linear-gradient(90deg, #050403 0 3px, #16120d 3px 7px, transparent 7px calc(100% - 7px),
                    #16120d calc(100% - 7px) calc(100% - 3px), #050403 calc(100% - 3px) 100%),
    linear-gradient(180deg,#1c1710 0%,#110e09 54%,#070504 100%);
  border-top:1px solid rgba(247,230,176,.10);
  border-bottom:1px solid rgba(0,0,0,.95);
  border-radius:2px;
  /* contact shadow onto the rails and the art behind the overhang */
  box-shadow:0 4px 8px rgba(0,0,0,.75), 0 1px 0 rgba(0,0,0,.9),
             inset -16px 0 16px -14px rgba(255,196,116,.22);
}
.rx-strap::before,.rx-strap::after{
  content:""; position:absolute; top:50%; margin-top:-3px; width:6px; height:6px;
  border-radius:50%; background:#241e17; border:1px solid #5c4e3b;
  box-shadow:inset 1px 1px 0 rgba(255,238,206,.32);
}
.rx-strap::before{ left:16px }
.rx-strap::after { right:16px }

/* --- menu: bare typography with a caret that points, not boxes --- */
/* Top margin carries the title/menu separation that the strap used to provide before it moved. */
.rx-menu{display:flex; flex-direction:column; gap:1px; margin:26px -14px 0}
/* Labels are centred in the panel with NO allowance for the caret — the caret is absolutely
   positioned inside the label (see .rx-caret) so it adds no width and cannot shift the centring. */
.rx-menu-item{
  position:relative; width:100%; display:flex; align-items:center; justify-content:center;
  font-family:'Cinzel',serif; font-size:16.5px; letter-spacing:.15em; text-transform:uppercase;
  color:var(--ink-dim);
  padding:11px 16px; text-align:center;
  background:none; border:0; border-radius:0;
  transition:color .18s, letter-spacing .24s;
  animation:rxItemIn .6s ease both;
}
@keyframes rxItemIn{from{opacity:0;transform:translateX(-12px)}to{opacity:1;transform:none}}
/* A WASH, not a highlight bar. A rect with a hard right/top/bottom terminus is a listbox
   selection — and at thumbnail it out-shouted the wordmark, inverting the hierarchy. This is a
   radial falloff anchored to the left edge with no hard boundary on any side, in the scene's
   candle-orange (olive appears nowhere in the key art). The TYPE carries the selection. */
.rx-menu-item::before{
  /* inset is negative vertically: at inset:0 the box clips the radial's 128% vertical extent flat,
     which leaves a faint rectangular read — the very thing the wash exists to avoid. */
  content:""; position:absolute; inset:-10px 0; opacity:0; transition:opacity .24s; pointer-events:none;
  background:radial-gradient(92% 128% at 0% 50%, rgba(255,178,92,.16), rgba(255,178,92,.05) 38%, transparent 64%);
}
/* Anchored to the LABEL's left edge (right:100%), not the row's, so it tracks each label's own
   width while staying out of flow. letter-spacing puts a trailing space on the label, hence the
   asymmetric margin — without it the caret sits visibly further from short labels. */
.rx-caret{
  position:absolute; right:100%; top:50%; margin:-7.5px 9px 0 0;
  width:15px; height:15px;
  opacity:0; transform:translateX(-7px);
  transition:opacity .2s ease, transform .2s ease;
  filter:drop-shadow(0 0 5px rgba(255,178,92,.5));
}
.rx-caret-blade{ fill:var(--leaf) }
.rx-caret-hone { fill:none; stroke:#fff4d4; stroke-width:1.1; stroke-linecap:round; opacity:.9 }
/* letter-spacing appends a trailing space after the final glyph, so the label BOX is wider than
   the visible text and centring the box leaves the glyphs ~half a space left of centre. A
   margin-left of one full space biases the flex-centred margin box back by exactly that half. */
.rx-item-label{ position:relative; display:inline-block; margin-left:.15em }
.rx-menu-item.active,.rx-menu-item:hover{ color:#fff3d6; letter-spacing:.175em }
.rx-menu-item.active::before,.rx-menu-item:hover::before{ opacity:1 }
.rx-menu-item.active .rx-caret,.rx-menu-item:hover .rx-caret{ opacity:1; transform:translateX(0) }
.rx-menu-item.rx-primary{ color:var(--leaf); background:none; border:0 }
.rx-menu-item.rx-primary.active,.rx-menu-item.rx-primary:hover{ color:#fff3d6 }
.rx-menu-item:focus-visible{ outline:1px solid var(--leaf); outline-offset:-3px }

.rx-meta{
  display:flex; align-items:center; justify-content:center; gap:7px; flex-wrap:wrap;
  font-family:'EB Garamond',Georgia,serif;
  font-size:14px; color:var(--ink-dim); letter-spacing:.13em; text-transform:uppercase;
  padding-top:2px;   /* the strap above is the divider now — a second hairline rule doubled it */
}
.rx-meta span{ white-space:nowrap }
.rx-meta b{font-weight:600; color:var(--ink)}
.rx-meta em{color:var(--leaf); font-style:normal; opacity:.55}

@media (max-width:720px){
  /* Centred on phones, and narrow enough that the caps' overhang still clears the padding. */
  .rx-title-screen{--plaque-w:min(300px, 70vw); padding:0 max(46px, 10vw); justify-content:center}
  .rx-inner{padding:0 20px 8px}
  .rx-strap{margin:14px -34px 12px}
  .rx-menu-item{font-size:15px}
  /* Must not wrap — an orphaned "0 ESCAPES" on its own line reads as a broken layout. */
  .rx-meta{font-size:10.5px; gap:5px; letter-spacing:.06em; flex-wrap:nowrap}
}

/* ---------- class cards ---------- */
.card-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px}
.class-card{ position:relative}
.class-card.locked{opacity:.45;}
.class-card.unlockable{border-color:var(--gold-dim); box-shadow:0 0 18px rgba(232,200,96,.22) inset, var(--shadow)}
.class-card .glyph{font-size:34px}
.lock-tag{position:absolute; top:10px; right:12px; font-size:11px; color:var(--ink-dim); font-family:'Cinzel'}

/* ---------- Purgatory upgrade cards ---------- */
/* position:relative BECAUSE .lock-tag IS ABSOLUTE. Without a positioned ancestor the tag's
   containing block is the page, so every perk card's class label ("Knight · Rogue", "Occultist")
   piled up in the top-right CORNER OF THE SCREEN, five spans deep, instead of sitting on its own
   card. .class-card two rules up has carried this exact line since it was written; these two
   cards use the same tag and were simply never given it. */
.up-card{position:relative; text-align:center}
.up-card.locked{opacity:.55}
.up-card.maxed{border-color:var(--gold-dim); box-shadow:0 0 16px rgba(232,200,96,.18) inset, var(--shadow)}
.up-pips{display:flex; align-items:center; justify-content:center; gap:6px}
.up-pip{width:11px; height:11px; border-radius:50%; border:1px solid var(--gold-dim); background:transparent}
.up-pip.on{background:var(--gold); box-shadow:0 0 8px rgba(232,200,96,.6)}
/* An Ascension rank that exists but is not yet earned: drawn, so the ceiling is visible from the
   start, but dimmed and hollow so it never reads as something you merely cannot afford. */
.up-pip.asc{border-style:dashed; border-color:rgba(232,200,96,.32)}

/* ---------- Trophies & titles ---------- */
.trophy-shelf{display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px; min-height:34px;
  border-bottom:2px solid var(--gold-dim); padding-bottom:8px}
.trophy{font-size:22px; filter:drop-shadow(0 2px 4px rgba(232,200,96,.35))}
.title-epithet{color:var(--gold); font-style:italic; font-family:'Cinzel'}

/* ---------- HUD / vials ---------- */
.hud{display:flex; align-items:center; gap:18px; margin-bottom:16px; flex-wrap:wrap}
.hud .name{font-family:'Cinzel'; font-size:18px; color:var(--gold)}
.vials{display:flex; gap:14px; flex:1; flex-wrap:wrap}
.vial{min-width:150px; flex:1}
.vial .lab{display:flex; justify-content:space-between; font-size:12px; color:var(--ink-dim); font-family:'Cinzel'; margin-bottom:3px}
.bar{height:16px; border-radius:9px; background:#0a0a10; border:1px solid var(--border); overflow:hidden; position:relative}
.bar > span{display:block; height:100%; border-radius:9px; transition:width .35s ease}
.bar.hp > span{background:linear-gradient(180deg,#e0505a,var(--hp))}
.bar.mp > span{background:linear-gradient(180deg,#5a92d6,var(--mp))}
.bar.sp > span{background:linear-gradient(180deg,#e6bb55,var(--sp))}
.bar.xp > span{background:linear-gradient(180deg,#a884d6,var(--xp))}
.pips{display:flex; gap:14px; font-family:'Cinzel'; font-size:14px}
.pip .k{color:var(--ink-dim); font-size:11px; display:block}
.pip .v{color:var(--ink); font-size:16px}

/* ---------- equipment slots ---------- */
.gear-slots{display:flex; gap:8px}
.gear-slot{position:relative; display:flex; align-items:center; gap:6px; padding:5px 9px;
  border:1px solid var(--border); border-radius:8px; background:rgba(0,0,0,.22); font-size:13px; outline:none;}
.gear-slot.filled{border-color:var(--gold-dim)}
.gear-slot.empty{opacity:.72}
.gear-slot:hover, .gear-slot:focus{border-color:var(--gold)}
.gs-icon{font-size:15px; filter:grayscale(.15)}
.gs-label{max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.gs-tip{display:none; position:absolute; top:calc(100% + 8px); left:50%; transform:translateX(-50%);
  min-width:160px; max-width:230px; padding:9px 11px; background:#0d0d14; border:1px solid var(--gold-dim);
  border-radius:8px; box-shadow:var(--shadow); z-index:30; text-align:left; white-space:normal}
.gear-slot:hover .gs-tip, .gear-slot:focus .gs-tip{display:block}
.gs-tip-name{font-family:'Cinzel'; font-size:14px; margin-bottom:3px}
.gs-tip-mods{font-size:12px; line-height:1.4}
.chalice-count{color:var(--gold)}

/* ---------- combat ---------- */
.battlefield{display:grid; grid-template-columns:1fr; gap:14px}
.enemy-line{display:flex; gap:12px; flex-wrap:wrap; justify-content:center; min-height:150px; align-items:flex-end}
.enemy{
  width:150px; text-align:center; position:relative;
  border:1px solid var(--border); border-radius:10px; padding:10px 8px 8px;
  background:linear-gradient(180deg,#1a1622,#12121a);
  transition:transform .12s, box-shadow .12s, opacity .3s;
}
.enemy.selectable:hover{transform:translateY(-3px); box-shadow:0 0 0 2px var(--danger), 0 8px 18px rgba(0,0,0,.5)}
.enemy.dead{opacity:.25; filter:grayscale(1) blur(.4px)}
.enemy .portrait{font-size:40px; line-height:1; margin:4px 0 6px; filter:drop-shadow(0 3px 4px rgba(0,0,0,.6))}
.enemy .en-name{font-family:'Cinzel'; font-size:13px; color:var(--ink)}
.enemy .hpbar{height:8px; margin-top:6px}
.enemy .en-hp{text-align:center; font-size:11px; color:var(--ink-dim); font-family:'Cinzel'; margin-top:3px}
.intent{
  position:absolute; top:-12px; left:50%; transform:translateX(-50%);
  background:#241d0e; border:1px solid var(--gold-dim); color:var(--gold);
  border-radius:20px; padding:2px 9px; font-size:11px; font-family:'Cinzel'; white-space:nowrap;
  box-shadow:0 2px 8px rgba(0,0,0,.6);
}
/* ---- the fight, in the room (Phase 1) ----
   The foes are drawn on the canvas now, so these cards carry only what you READ: name, intent,
   health, statuses. They are transitional — Phase 3 moves them onto the canvas — but they have
   to be legible in the meantime, because a fight you cannot read is not a playable commit.
   `intent` goes static here: absolutely-positioned above a card is a pill hanging off the top
   of a strip that now sits directly under the room. */
.battle-readouts{display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-top:10px}
.enemy.compact{width:190px; padding:8px; min-height:0}
.enemy.compact .intent{
  position:static; transform:none; display:inline-block; margin:5px 0 2px;
  max-width:100%; overflow:hidden; text-overflow:ellipsis;
}
/* spent, not gone: a foe that has already acted must not read as still winding up */
.enemy.compact .intent.spent{
  opacity:.42; text-decoration:line-through; border-color:var(--border); color:var(--ink-dim); background:#181820;
}
.enemy.compact.dead{opacity:.4; filter:grayscale(1)}
.hero-chips{margin-top:8px}
/* the room takes the hit while the hero has no DOM sprite to shake — see applyFx.
   The .shake class and its keyframes are already global; nothing extra is needed here. */

.status-chips{display:flex; gap:4px; justify-content:center; flex-wrap:wrap; margin-top:5px; min-height:16px}
.chip{font-size:10px; padding:1px 6px; border-radius:10px; border:1px solid var(--border); color:var(--ink-dim)}
.chip.bad{border-color:#5a2420; color:#e8a598}
.chip.good{border-color:var(--gold-dim); color:var(--gold)}

.hero-side{display:flex; gap:14px; align-items:center; justify-content:center; padding:6px 0}
.hero-portrait{font-size:46px; filter:drop-shadow(0 3px 6px rgba(0,0,0,.6))}

/* animated pixel sprites (CSS steps over a horizontal 4-frame sheet) */
.spr{image-rendering:pixelated; image-rendering:crisp-edges; background-repeat:no-repeat; animation-name:sprplay; animation-iteration-count:infinite; will-change:background-position}
.enemy-spr{display:block; margin:10px auto 6px; filter:drop-shadow(0 3px 4px rgba(0,0,0,.55))}
.hero-spr{display:block; filter:drop-shadow(0 3px 6px rgba(0,0,0,.6))}
@keyframes sprplay{from{background-position-x:0} to{background-position-x:var(--shift)}}

.action-bar{display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-top:10px}
.action-menu{display:flex; gap:10px; flex-wrap:wrap; justify-content:center}
.sub-menu{margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; justify-content:center}
.prompt{text-align:center; font-family:'Cinzel'; color:var(--gold); min-height:22px; margin:6px 0}

.log{
  margin-top:14px; max-height:150px; overflow:auto; font-size:14px;
  background:#0a0a10; border:1px solid var(--border); border-radius:8px; padding:10px 12px;
}
.log p{margin:2px 0; color:var(--ink-dim)}
.log p.hit{color:#e8a598}
.log p.you{color:var(--ink)}
.log p.good{color:var(--accent-t1)}
.log p.big{color:var(--gold)}

/* ---------- reward / chest / pool ---------- */
.reward-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; margin-top:8px}
/* position:relative for .lock-tag.boon-rank — see .up-card for what its absence looks like. */
.opt-card{position:relative; min-height:110px; display:flex; flex-direction:column; gap:6px}
.opt-card:hover{border-color:var(--gold-dim)}
.opt-card .oc-title{font-family:'Cinzel'; color:var(--gold); font-size:15px}
/* THREE TIERS, THREE READS. Lesser is the plate's own edge — it should look like the ordinary
   thing, because it is. Greater keeps the violet the old "rare" had. Cardinal takes the gold of
   the game's own accent plus a lit rim, so the card that can define a run does not have to be
   read to be recognised. */
.boon-card.is-greater{border-color:#8a5fb0; box-shadow:0 0 14px rgba(160,110,220,.22) inset}
.boon-card.is-greater:hover{border-color:#c79be6}
.boon-card.is-greater .boon-rank{color:#c79be6}
.boon-card.is-greater .oc-title{color:#c79be6}
.boon-card.is-cardinal{border-color:#b8564f;
  box-shadow:0 0 18px rgba(232,200,96,.30) inset, 0 0 22px rgba(232,200,96,.18)}
.boon-card.is-cardinal:hover{border-color:#ffb3ad}
.boon-card.is-cardinal .boon-rank{color:#ff9e96; letter-spacing:.18em}
.boon-card.is-cardinal .oc-title{color:#ffb3ad}
.opt-card.refill .oc-title{color:var(--ink)}
.refill-row{display:flex; gap:10px; margin-top:12px; flex-wrap:wrap}
.refill-row button{flex:1; min-width:140px}

/* ---------- map ---------- */
.map-wrap{background:#0a0a10; border:1px solid var(--border); border-radius:10px; padding:10px; overflow:auto}
.doors{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin-top:16px}
.door{ text-align:left; padding:14px 16px}
.door .df{font-style:italic; color:var(--ink); font-family:'EB Garamond'; font-size:16px}
.door .dt{font-size:12px; color:var(--ink-dim); font-family:'Cinzel'; margin-top:6px}
.door.exit{border-color:var(--mp)}
.door.sealed{opacity:.55}

/* Sidebar + game window sit side by side and need more room than #app's centered 1120px
   column allows (300px sidebar + gap + the canvas's own 1080px cap can exceed it) — same
   viewport-edge breakout already used by .title-screen/.rx-title-screen. Hint text and the
   door list below stay in the normal constrained column; only this row breaks out. */
/* Tier name lives ABOVE the row, not inside .game-window-col — inside the column it pushed the
   canvas down while the sidebar still started at the row's top edge, so the two panes began on
   different lines. Out here both columns share one top edge. */
.explore-tier{margin:2px 0 6px; font-family:'Cinzel',serif}
.explore-row{
  margin-left:calc(-50vw + 50%); margin-right:calc(-50vw + 50%);
  display:flex; justify-content:center; align-items:stretch; gap:20px;
  padding:0 20px; flex-wrap:wrap;
}
/* Bare mount point — C.SidebarUI renders its own iron-plate panels inside it, so this carries
   no box styling of its own. The `:has(.hud)` rule below only kicks in for the vanilla fallback
   (if Babel/React failed to load), so that degraded state still looks deliberate. */
/* THE RAIL SITS ABOVE THE DUNGEON WINDOW, and has to say so here rather than leave it to the
   tooltips. Every rail tip is `position:absolute; left:100%` — it deliberately overhangs the
   canvas — and while it carries z-index 40, that number is spent inside .rxs-panel-inner, which
   is `position:relative; z-index:5` and therefore its own stacking context. Against .dx-overlay's
   z-index 6 the panel loses at 5, so the overlay's vignette painted straight over the half of
   every tooltip that crossed the canvas edge: the gold border read (117,99,48) over the sidebar
   and (90,76,39) two hundred pixels later, with a visible vertical seam exactly where the canvas
   begins. Raising the tooltip's own z-index cannot fix that — it is already the top of a context
   that ranks too low. The rail as a whole is chrome and belongs above the room. */
.sidebar-mount{flex:0 0 300px; width:300px; position:relative; z-index:12}
.sidebar-mount:has(.hud){
  background:linear-gradient(180deg, var(--panel-2), var(--panel));
  border:1px solid var(--border); border-radius:10px; padding:14px;
}
.sidebar-mount .hud{margin-bottom:0}
.game-window-col{flex:1 1 544px; min-width:300px; max-width:1080px}

/* No margin-top: it offset the canvas 6px below the sidebar's top edge. The tier label above
   the row carries that spacing now, so both panes share one top line. */
.explore-wrap{display:flex; justify-content:center; position:relative}
/* The top-left corner belongs to the directive (THE DIRECTIVE, below), which replaced the round
   Chalice badge that sat here: the lit chalice in its lockup says you hold it. */

/* ══════════════════════════ HERO SIDEBAR (js/ui_sidebar.jsx) ══
   Straight-edged iron rail in the same material as the title plaque — .rx-grain/.rx-wear for
   the surface, C.RX.Rivet for the bolts, the :root --iron/--leaf tokens for colour. Deliberately
   NOT the plaque's shaped silhouette: this is on screen for the whole run and must not compete
   with the dungeon art beside it. */
/* One type scale drives the whole rail, so the tight-viewport breakpoints below only have to
   restate a handful of variables instead of every rule.
   WHY breakpoints at all: the canvas is width-driven (aspect-ratio 544/416), so on a narrow
   window it gets SHORT while the rail's content height stays constant — at 1150px wide the
   rail's natural height (~793px) overruns a 604px canvas. Compressing the scale keeps the two
   panes ending on the same line instead of the rail hanging past the dungeon view. */
.rxs-rail{
  display:flex; flex-direction:column; gap:8px; height:100%;
  --f-eyebrow:12px;   --f-barlab:12px;    --f-barval:14.5px;
  --f-statk:13px;     --f-statv:17.5px;   --f-gold:18.5px;
  --f-slottype:10.5px;--f-slotname:15px;
  --f-flaskname:15px; --f-flaskcount:12.5px; --f-drink:12.5px;
  --f-tipname:15.5px; --f-tipdetail:14.5px;
  /* Vertical padding is deliberately tight relative to the type size: it buys back the ~13px
     that pushed the rail past the canvas at a common 1750px-wide desktop, so the largest type
     scale still ends flush with the dungeon view instead of dropping to the smaller step. */
  --rxs-pad:10px 15px; --rxs-icon:33px; --rxs-iconfs:17px; --rxs-rowgap:9px;
}
/* Single compact tier rather than a gentle mid-step: the canvas loses height fast as the window
   narrows (826px tall at 1500px wide, 719px at 1300px), so a half-measure still left the rail
   hanging ~70px past it. Below the threshold, go straight to the compact scale. */
@media (max-width:1420px){
  .rxs-rail{
    gap:7px;
    --f-eyebrow:10px;   --f-barlab:10px;    --f-barval:12.5px;
    --f-statk:11px;     --f-statv:14.5px;   --f-gold:15.5px;
    --f-slottype:9px;   --f-slotname:12.5px;
    --f-flaskname:12.5px; --f-flaskcount:11px; --f-drink:11px;
    --f-tipname:14px;   --f-tipdetail:13.5px;
    --rxs-pad:8px 12px; --rxs-icon:27px; --rxs-iconfs:14px; --rxs-rowgap:7px;
  }
  /* The portrait alcove is the single biggest fixed block in the rail — trimming it here is
     what actually buys the remaining headroom on a short canvas. */
  .rxs-alcove{width:52px; height:62px}
  .rxs-class{font-size:20px}
  .rxs-level{font-size:11px; padding:2px 9px; margin-top:5px}
}
/* min-height:0 so a grown panel can't be forced past the rail and overflow the dungeon view. */
.rxs-panel.grow{flex:1 1 auto; min-height:0}

.rxs-panel{
  position:relative; border-radius:5px;
  background:linear-gradient(180deg, var(--iron-hi) 0%, #100e0c 55%, var(--iron-lo) 100%);
  /* Candle-side rim light on the right edge — the dungeon view sits to the right, so the rail
     is lit from that side. Matches .rx-body's inset rim so both surfaces agree on light dir. */
  box-shadow:inset -18px 0 20px -18px rgba(255,196,116,.30), 0 3px 12px rgba(0,0,0,.5);
  /* NOT overflow:hidden — tooltips escape this box. Texture layers get the radius instead. */
}
.rxs-panel > .rx-grain,.rxs-panel > .rx-wear{border-radius:5px}
/* Gold side rails, three-band like the plaque's: dark / leaf / highlight, ordered per side so
   the right rail is lit on its outer (candle-facing) face and the left on its inner face. */
.rxs-panel::before,.rxs-panel::after{
  content:""; position:absolute; top:3px; bottom:3px; width:3px; z-index:3; pointer-events:none;
}
.rxs-panel::before{left:0;
  background:linear-gradient(90deg, var(--leaf-dk) 0 1px, var(--leaf) 1px 2px, rgba(247,230,176,.22) 2px 3px)}
.rxs-panel::after{right:0;
  background:linear-gradient(90deg, rgba(255,226,170,.5) 0 1px, var(--leaf) 1px 2px, var(--leaf-dk) 2px 3px)}
.rxs-bolt{position:absolute; width:12px; height:12px; z-index:4; pointer-events:none}
.rxs-bolt.tl{top:3px; left:3px} .rxs-bolt.tr{top:3px; right:3px}
.rxs-bolt.bl{bottom:3px; left:3px} .rxs-bolt.br{bottom:3px; right:3px}
.rxs-panel-inner{position:relative; z-index:2; padding:var(--rxs-pad)}

.rxs-eyebrow{
  font-family:'Cinzel',serif; font-size:var(--f-eyebrow); letter-spacing:.18em; text-transform:uppercase;
  color:var(--ink-dim); margin-bottom:8px;
}

/* ---- identity ---- */
.rxs-id-row{display:flex; align-items:center; gap:12px}
.rxs-alcove{
  position:relative; flex:0 0 auto; width:62px; height:76px; border-radius:4px; overflow:hidden;
  background:
    radial-gradient(58% 52% at 50% 62%, rgba(255,178,92,.17), transparent 72%),
    linear-gradient(180deg,#06060a,#0c0b10 55%,#050508);
  box-shadow:inset 0 3px 9px rgba(0,0,0,.75), inset 0 -2px 6px rgba(0,0,0,.55);
}
/* Sprite anchored to the alcove FLOOR. Hero frames bake transparent headroom above the
   character, so centring centres the padding and the figure floats. 400% width shows frame 0
   of the 4-frame sheet; the surplus height is clipped off the top by overflow:hidden. */
.rxs-portrait{
  position:absolute; inset:0;
  background-repeat:no-repeat; background-size:400% auto; background-position:left bottom;
  image-rendering:pixelated;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.65));
}
.rxs-alcove i{position:absolute; width:10px; height:10px; z-index:2}
.rxs-alcove i::before,.rxs-alcove i::after{content:''; position:absolute; background:var(--leaf); opacity:.75}
.rxs-alcove i::before{width:7px; height:1px; top:0; left:0}
.rxs-alcove i::after{width:1px; height:7px; top:0; left:0}
.rxs-alcove i.tl{top:4px;left:4px} .rxs-alcove i.tr{top:4px;right:4px; transform:scaleX(-1)}
.rxs-alcove i.bl{bottom:4px;left:4px; transform:scaleY(-1)} .rxs-alcove i.br{bottom:4px;right:4px; transform:scale(-1)}
.rxs-id-text{min-width:0; flex:1}
.rxs-class{
  font-family:'Cinzel',serif; font-size:23px; line-height:1.12; letter-spacing:.015em;
  background:linear-gradient(180deg,#f6e6ad,var(--leaf) 55%,#8f7526);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
/* The worn Title. 15px at full strength (was 12px at .72, owner's note 2026-09-30: too small to
   read): thin gold italic loses more to a fade than upright type does, so the strength did as much
   as the size. Still well under the 23px class name, italic and a different face, so it reads as
   the name's subtitle. "the Hollow Saint", the longest, fits the rail at 1280 without an ellipsis,
   and the panel's height is set by the portrait, so nothing below it moved. */
.rxs-epithet{
  font-family:'EB Garamond',Georgia,serif; font-style:italic; font-size:15px; color:var(--leaf);
  letter-spacing:.01em; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.rxs-level{
  display:inline-block; margin-top:7px; padding:3px 11px; border-radius:10px;
  font-family:'Cinzel',serif; font-size:12px; letter-spacing:.08em;
  color:var(--ink); border:1px solid rgba(201,169,78,.45); background:rgba(0,0,0,.28);
}

/* ---- resource bars ---- */
.rxs-bar-row + .rxs-bar-row{margin-top:var(--rxs-rowgap)}
.rxs-bar-lab{display:flex; justify-content:space-between; align-items:baseline; margin-bottom:3px}
.rxs-bar-lab span:first-child{
  font-family:'Cinzel',serif; font-size:var(--f-barlab); letter-spacing:.16em; text-transform:uppercase; color:var(--ink-dim);
}
.rxs-bar-val{font-size:var(--f-barval); color:var(--ink); font-variant-numeric:tabular-nums}
.rxs-bar-val em{font-style:normal; color:var(--ink-dim); margin:0 1px}
.rxs-bar-track{
  height:8px; border-radius:4px; background:#07070b; overflow:hidden;
  position:relative;   /* the trail is absolutely positioned inside this */
  box-shadow:inset 0 1px 3px rgba(0,0,0,.9), 0 1px 0 rgba(255,238,206,.05);
}
.rxs-bar-fill{height:100%; border-radius:4px; position:relative; transition:width .35s ease}
/* The trail: same width value, but it LAGS. The fill snaps to the new value and this follows a
   beat later, so the gap between them IS the hit — the size of the loss, shown rather than
   inferred from two numbers. Delay first, then a slower ease, and it sits under the fill. */
.rxs-bar-trail{
  position:absolute; left:0; top:0; height:100%; border-radius:4px; z-index:0;
  transition:width .5s cubic-bezier(.3,0,.2,1) .14s;
}
.rxs-bar-trail.hp{background:rgba(224,138,138,.42)}
.rxs-bar-trail.mp{background:rgba(120,170,230,.38)}
.rxs-bar-trail.sp{background:rgba(224,196,120,.38)}
.rxs-bar-fill{z-index:1}
/* Top-half sheen: a flat fill reads as a progress bar, a lit one reads as liquid in a vial. */
.rxs-bar-fill::after{content:''; position:absolute; inset:0 0 46% 0; background:rgba(255,255,255,.16); border-radius:4px 4px 0 0}
.rxs-bar-fill.hp{background:linear-gradient(90deg,#6d181f,var(--hp))}
.rxs-bar-fill.mp{background:linear-gradient(90deg,#17324f,var(--mp))}
.rxs-bar-fill.sp{background:linear-gradient(90deg,#6b4d16,var(--sp))}
.rxs-bar-fill.xp{background:linear-gradient(90deg,#412d5e,var(--xp))}
/* the Experience bar's level-up (js/ui_sidebar.jsx XpBar): each fill a little slower than an
   ordinary change so it reads as the bar filling, a snap (no transition) to empty it, and a surge
   of light while it holds at full. Brightness, not a glow: the track clips its overflow, so a
   box-shadow round a FULL bar is cut away entirely. */
.rxs-bar-fill.xp.is-levelling{transition:width .45s cubic-bezier(.4,0,.2,1), filter .12s ease}
.rxs-bar-fill.xp.is-snap{transition:none}
.rxs-bar-row.is-full .rxs-bar-fill.xp{filter:brightness(1.55) saturate(1.2)}

/* ---- attributes ---- */
.rxs-stat-pair{display:flex; gap:12px}
.rxs-stat-pair + .rxs-stat-pair{margin-top:7px}
.rxs-stat{
  position:relative; flex:1; min-width:0;
  display:flex; justify-content:space-between; align-items:baseline;
}
.rxs-stat-k{font-family:'Cinzel',serif; font-size:var(--f-statk); letter-spacing:.12em; color:var(--ink-dim)}
.rxs-stat-v{font-size:var(--f-statv); color:var(--ink); font-variant-numeric:tabular-nums}
.rxs-gold-row{
  position:relative; margin-top:9px; padding-top:8px;
  border-top:1px solid rgba(201,169,78,.16);
  display:flex; justify-content:space-between; align-items:baseline;
}
.rxs-gold-v{font-family:'Cinzel',serif; font-size:var(--f-gold); color:var(--leaf); font-variant-numeric:tabular-nums}

/* ---- equipment ---- */
.rxs-slot{
  position:relative; display:flex; align-items:center; gap:9px;
  padding:5px 6px; border-radius:4px; outline:none;
}
.rxs-slot + .rxs-slot{margin-top:1px}
.rxs-slot:hover,.rxs-slot:focus-visible{background:rgba(201,169,78,.07)}
.rxs-slot-icon{
  flex:0 0 var(--rxs-icon); width:var(--rxs-icon); height:var(--rxs-icon); border-radius:4px; font-size:var(--rxs-iconfs);
  display:flex; align-items:center; justify-content:center;
  background:#07070b; border:1px solid rgba(201,169,78,.18);
  box-shadow:inset 0 1px 3px rgba(0,0,0,.8);
}
.rxs-slot.filled .rxs-slot-icon{border-color:rgba(201,169,78,.5); box-shadow:inset 0 1px 3px rgba(0,0,0,.8), 0 0 7px rgba(201,169,78,.14)}
.rxs-slot.empty .rxs-slot-icon{opacity:.34}
.rxs-slot-text{min-width:0; flex:1; display:flex; flex-direction:column}
.rxs-slot-type{font-family:'Cinzel',serif; font-size:var(--f-slottype); letter-spacing:.14em; text-transform:uppercase; color:var(--ink-dim)}
.rxs-slot-name{font-size:var(--f-slotname); color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.rxs-slot.empty .rxs-slot-name{color:var(--ink-dim); font-style:italic}
/* The rung, carried into the rail. Common deliberately keeps --ink: an ordinary find should look
   like the default, not like a fourth colour, or every slot becomes a coloured label and none of
   them mean anything. The tooltip states the rung in words for the three that aren't. */
/* The same ladder on the no-React fallback card. Same colours, same rule: the word carries it. */
.rx-rung{font-family:'Cinzel',serif; letter-spacing:.2em; text-transform:uppercase; font-size:12px; margin-bottom:2px}
.rx-rung.is-common{color:#a8a091} .rx-rung.is-uncommon{color:#6fae86}
.rx-rung.is-rare{color:#c79be6}  .rx-rung.is-epic{color:#e8c860}
.rx-rung-name.is-common{color:#ded6c6} .rx-rung-name.is-uncommon{color:#bfe8cd}
.rx-rung-name.is-rare{color:#dcc0f2}   .rx-rung-name.is-epic{color:#f4e2a6}
.rx-rung-sig{color:#e8c860; font-family:'EB Garamond',Georgia,serif; font-style:italic; margin-top:4px}

.rxs-rung{font-style:normal}
/* Bone grey — the ladder's own Common colour, and close enough to the eyebrow beside it that the
   word states the rung without competing with the three that are worth spotting. */
.rxs-rung.is-common{color:#a8a091}
.rxs-rung.is-uncommon{color:#9fd4b3}
.rxs-rung.is-rare{color:#d3b2ee}
.rxs-rung.is-epic{color:#f0d98c}
.rxs-slot-name.is-uncommon,.rq-gname.is-uncommon{color:#9fd4b3}
.rxs-slot-name.is-rare,.rq-gname.is-rare{color:#d3b2ee}
.rxs-slot-name.is-epic,.rq-gname.is-epic{color:#f0d98c; text-shadow:0 0 10px rgba(232,200,96,.35)}

/* ---- consumables ---- */
.rxs-flask{position:relative; display:flex; align-items:center; gap:9px; padding:4px 6px; border-radius:4px}
.rxs-flask + .rxs-flask{margin-top:1px}
.rxs-flask:hover{background:rgba(201,169,78,.06)}
.rxs-flask-icon{
  flex:0 0 var(--rxs-icon); width:var(--rxs-icon); height:var(--rxs-icon); border-radius:4px; font-size:var(--rxs-iconfs);
  display:flex; align-items:center; justify-content:center;
  background:#07070b; border:1px solid var(--border);
  box-shadow:inset 0 1px 3px rgba(0,0,0,.8);
}
.rxs-flask-icon.hp{border-color:rgba(181,48,58,.6)}
.rxs-flask-icon.mp{border-color:rgba(58,110,165,.6)}
.rxs-flask-icon.sp{border-color:rgba(201,146,47,.6)}
.rxs-flask.none .rxs-flask-icon{opacity:.34; border-color:var(--border)}
.rxs-vial{width:78%; height:78%; display:block}
.rxs-flask-text{min-width:0; flex:1; display:flex; flex-direction:column}
.rxs-flask-name{font-size:var(--f-flaskname); color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.rxs-flask.none .rxs-flask-name{color:var(--ink-dim)}
.rxs-flask-count{font-size:var(--f-flaskcount); color:var(--ink-dim); font-variant-numeric:tabular-nums}
.rxs-drink{
  flex:0 0 auto; font-family:'Cinzel',serif; font-size:var(--f-drink); letter-spacing:.08em;
  color:var(--leaf); background:linear-gradient(180deg,#332913,#211a0b);
  border:1px solid rgba(201,169,78,.45); border-radius:4px; padding:6px 12px;
  transition:box-shadow .15s, transform .08s, border-color .15s;
}
.rxs-drink:hover:not(:disabled){box-shadow:0 0 10px rgba(232,200,96,.28); border-color:var(--leaf)}
.rxs-drink:active:not(:disabled){transform:translateY(1px)}
.rxs-drink:disabled{opacity:.3;}
.rxs-drink:focus-visible{outline:1px solid var(--leaf); outline-offset:2px}

/* ---- shared tooltip ---- */
.rxs-tip{
  display:none; position:absolute; left:calc(100% + 12px); top:50%; transform:translateY(-50%);
  min-width:182px; max-width:248px; padding:9px 11px; z-index:40; text-align:left;
  background:linear-gradient(180deg,#14110e,#0a0908);
  border:1px solid rgba(201,169,78,.55); border-radius:5px;
  box-shadow:0 6px 22px rgba(0,0,0,.75);
}
/* ON HOVER ONLY WHERE THERE IS HOVER. iPad Safari leaves a tapped row "hovered" until the next tap
   somewhere else, so pressing a draught's Drink button opened (and kept up) its tip. A finger
   opens tips by tapping the row instead (data-tip below); a mouse or trackpad still hovers. */
@media (hover: hover){
  .rxs-stat:hover .rxs-tip,.rxs-gold-row:hover .rxs-tip,
  .rxs-slot:hover .rxs-tip,.rxs-flask:hover .rxs-tip{display:block}
}
.rxs-slot:focus-visible .rxs-tip{display:block}
/* a finger's tap opens it instead (ui_sidebar.jsx TIP_ROWS); the phone's own rule still hides it */
.rxs-rail [data-tip="open"] .rxs-tip{display:block}
/* ---- boon payoff: the rail confirms the pick ----
   The row the boon changed flares and floats its delta. This is the ONLY confirmation the
   player gets that a boon landed, so it has to be unmissable without becoming a popup. */
/* The delta floats OUT OF FLOW, in the empty gap to the left of the number.

   In flow it was `display:inline-block` inside the value span, and every one of these rows is
   `justify-content:space-between` — so the span's right edge stayed pinned and the NUMBER got
   pushed left by the width of the chip. Fading the chip to opacity:0 does not give that space
   back, because an invisible box is still a box, so the stat sat visibly out of line with its
   neighbour until the sidebar next re-mounted without `gained` — which is to say until you left
   the room. Absolute positioning means the number never moves at all, before, during or after. */
.rxs-stat-v,.rxs-bar-val,.rxs-gold-v{position:relative}
.rxs-gain{
  position:absolute; right:100%; top:0; margin-right:6px; white-space:nowrap; pointer-events:none;
  transform-origin:right center;   /* it grows out of the number it belongs to, not away from it */
  font-family:'Cinzel',serif; font-weight:700;
  font-size:.92em; color:#ffe9a8; text-shadow:0 0 10px rgba(232,200,96,.9), 0 1px 0 #000;
  /* 1150ms, not longer: the phase advances 1250ms after the boon lands, and anything still
     running at that point is cut off mid-frame when the sidebar re-mounts without `gained`. */
  animation:rxsGainFloat 1150ms cubic-bezier(.2,.8,.3,1) forwards;
}
@keyframes rxsGainFloat{
  0%{opacity:0; transform:translateY(7px) scale(.7)}
  16%{opacity:1; transform:translateY(0) scale(1.14)}
  30%{transform:translateY(0) scale(1)}
  74%{opacity:1}
  100%{opacity:0; transform:translateY(-9px)}
}
.rxs-bar-row.is-gained,.rxs-stat.is-gained,.rxs-gold-row.is-gained{animation:rxsGainFlare 1100ms ease-out forwards}
@keyframes rxsGainFlare{
  0%{background:rgba(232,200,96,0)}
  12%{background:rgba(232,200,96,.20)}
  100%{background:rgba(232,200,96,0)}
}
.rxs-bar-row.is-gained .rxs-bar-fill{box-shadow:0 0 14px rgba(255,232,170,.85)}

.rxs-tip-name{font-family:'Cinzel',serif; font-size:var(--f-tipname); color:var(--leaf); margin-bottom:3px}
.rxs-tip-name.muted{color:var(--ink-dim)}
.rxs-tip-detail{font-size:var(--f-tipdetail); color:var(--ink-dim); line-height:1.45}

/* ══════════════════════════ DIEGETIC IN-ENGINE UI (js/ui_diegetic.jsx) ══
   Overlays that sit INSIDE the game window so the dungeon never leaves the screen.
   Rule: light on darkness, never a box on a picture. Nothing here has a rectangular fill;
   contrast comes from radial auras and glow. */
/* container-type makes the ROOM the sizing reference, so `cqw` below scales this UI with the
   dungeon window rather than the viewport — the sidebar takes a variable slice of the screen,
   so vw would size the banner against space it can't use. */
/* pointer-events:none is load-bearing. This layer spans the whole canvas at z-index 6, so with
   hit-testing on it swallowed every click meant for the room underneath — the cutscene's
   Continue and the minimap's click-to-enlarge both stopped working, silently, because the
   element is invisible. Interactive children opt back in individually below.
   :empty hides it entirely when nothing is mounted, so its vignette is not quietly dimming the
   room during ordinary exploration either. Both matter because the shell now keeps this div
   present at all times so the room can survive a phase change. */
.dx-overlay{position:absolute; inset:0; z-index:6; overflow:hidden; border-radius:10px; container-type:inline-size; pointer-events:none;
  transition:opacity .4s ease}
/* A boss's phase turn takes the whole room, the fight's chrome included (see bossPhase in ui.js). */
.dx-overlay.dx-phaseturn{opacity:.06}
.dx-overlay:empty{display:none}
/* The room is only just dimmed — the whole point is that you can still see it. A vignette
   pulls the eye inward without flattening the torchlight. */
.dx-overlay::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(120% 90% at 50% 55%, rgba(4,4,9,.12) 0%, rgba(4,4,9,.52) 100%);
}
.dx-layer{position:absolute; inset:0}

/* ---- etched light: type over a radial aura, never a panel ---- */
.dx-etch{position:relative; display:inline-block; padding:5px 12px; pointer-events:none; white-space:nowrap}
.dx-etch-aura{
  content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  /* Decorative, and never a hit target. It is 150% of the label's width, which on a long boon
     name reaches past the neighbouring wisp — leaving it hit-testable meant a click aimed at
     one flame could be captured by the boon next to it. */
  pointer-events:none;
  width:150%; height:210%; border-radius:50%; z-index:-1;
  background:radial-gradient(ellipse at center, rgba(3,3,7,.86) 0%, rgba(3,3,7,.62) 45%, rgba(3,3,7,0) 72%);
}
.dx-etch-title{
  display:block; font-family:'Cinzel',serif; letter-spacing:.05em; line-height:1.15;
  text-shadow:0 1px 0 #000, 0 0 10px rgba(0,0,0,.9);
}
.dx-etch-body{
  display:block; font-family:'EB Garamond',Georgia,serif; color:#e6dfcf; margin-top:2px;
  line-height:1.35; white-space:normal; max-width:230px;
  /* EVEN LINES, NO ORPHANS. Without this the Chalice plate broke as two full lines and a third
     holding the single word "out." — the browser fills greedily and does not care what is left
     over. `balance` asks it to even the lines instead, which is the whole reason a hard <br> is
     not used here: these plates are drawn at several viewport sizes and a fixed break is only
     ever right at one of them. Ignored harmlessly where unsupported. */
  text-wrap:balance;
  text-shadow:0 1px 0 #000, 0 0 8px rgba(0,0,0,.95);
}
.dx-al-center{text-align:center} .dx-al-left{text-align:left}
/* The body is a narrower block than a long title (max-width 260px under "The Holy Chalice"), and
   text-align only centers its LINES inside that block; the block itself sat at the title's left
   edge, so the two lines hung left of the title's center. Reported from play. */
.dx-al-center .dx-etch-body{margin-left:auto; margin-right:auto}
/* Sized up from the first pass: it wasn't fighting the background, it was just small.
   The aura carries the contrast, so the type can afford to be generous. */
.dx-etch-sm .dx-etch-title{font-size:17px}
.dx-etch-sm .dx-etch-body{font-size:15px}
.dx-etch-md .dx-etch-title{font-size:21px}
.dx-etch-md .dx-etch-body{font-size:16px}
.dx-etch-lg .dx-etch-title{font-size:34px; letter-spacing:.09em}
.dx-etch-lg .dx-etch-body{font-size:16px}
.dx-etch-body{max-width:260px}
/* `chalice` is the run's one prize, and it was set at `lg`, the size of "34 Gold": a fixed 34px
   title and 16px line that shrank to a caption the moment the room grew (owner, 2026-10-07: too
   small, read it and feel it). Fluid on the room's width like the boon showpiece, and a step above
   it, because this is the turn of the whole Escape. The line gets a width of its own so it still
   balances over two lines at the larger size. */
.dx-etch-chalice .dx-etch-title{font-size:clamp(40px,5.4cqw,66px); letter-spacing:.09em; line-height:1.1}
.dx-etch-chalice .dx-etch-body{font-size:clamp(18px,2.15cqw,25px); line-height:1.35; margin-top:8px;
  width:min(460px,44cqw); max-width:none}
.dx-etch-chalice > .dx-etch-aura{width:170%; height:240%}
/* `boon` is the showpiece scale: this IS the decision on the screen, so it outranks every
   other string in the room. Fluid on the room's width so it never crowds at small sizes. */
/* The title takes the same declared width as the body, and is allowed to WRAP — .dx-etch sets
   white-space:nowrap for short labels elsewhere, but a boon name is not short. The motes sit at
   0.30 of the room apart (BAND 0.60 over three), which is 276px at the default size, and five
   shipping names measure wider than that on their own: Backstab: Between the Ribs at 364,
   Frost Nova: Deep Winter at 331, Guard Break: Shatter at 293, Exsanguinate: Drain at 281,
   Fan of Knives: Whirl at 277. Each of those was reaching into its neighbour's column and
   printing over it. Capped at 272 the columns cannot touch, whatever the room is scaled to. */
.dx-etch-boon .dx-etch-title{
  font-size:clamp(19px,2.5cqw,28px); letter-spacing:.06em;
  white-space:normal; width:min(272px,24cqw);
}
/* WIDTH, not max-width. .dx-etch is an inline-block inside a label that is absolutely positioned
   with no width of its own, so the box shrinks to fit — and because .dx-etch sets white-space
   :nowrap, the TITLE's full width is the box's minimum. A max-width alone never claims a floor,
   so each description was wrapping to whatever its own NAME happened to leave it: BLOODFORGED
   (~250px) got two lines, DRILLED FOOTWORK (~310px) got one, and GRIT — four letters — collapsed
   to ~75px and stacked six lines of one word each. The name and the description are unrelated
   strings; the body has to state its own width so all three columns wrap identically. */
.dx-etch-boon .dx-etch-body{font-size:clamp(15px,1.85cqw,21px); margin-top:4px; width:min(272px,24cqw)}
.dx-tone-gold .dx-etch-title{color:#f4e2a6; text-shadow:0 1px 0 #000, 0 0 14px rgba(232,200,96,.5)}
.dx-tone-violet .dx-etch-title{color:#dcc0f2; text-shadow:0 1px 0 #000, 0 0 14px rgba(180,120,230,.55)}
/* The two lower gear rungs. Both are LIGHT TINTS of their rung colour, the same relationship
   #f4e2a6 has to gold and #dcc0f2 has to violet — the saturated hue names the rung in the little
   word above, the tint keeps the name itself legible against a dark room. A saturated #6fae86
   set at title size would read as a UI state, not as a thing you found. */
/* CARDINAL WEARS SCARLET, which is both the etymology and the fix. It used to share GOLD with
   Lesser — the rarest tier and the commonest one rendered identically, so the one card in a hand
   that can define a run looked like the filler beside it. Pitched ROSE rather than orange-red on
   purpose: --hp is #b5303a and the elite marker is #c9563f, and a rank colour must not be
   mistaken for a danger colour. Lighter and pinker than both. */
.dx-tone-cardinal .dx-etch-title{color:#ffb3ad; text-shadow:0 1px 0 #000, 0 0 16px rgba(232,115,107,.6)}
.dx-tone-bone .dx-etch-title{color:#ded6c6; text-shadow:0 1px 0 #000, 0 0 14px rgba(168,160,145,.45)}
.dx-tone-verdigris .dx-etch-title{color:#bfe8cd; text-shadow:0 1px 0 #000, 0 0 14px rgba(111,174,134,.5)}

.dx-heading{position:absolute; left:50%; top:7%; transform:translateX(-50%); text-align:center}

/* ---- LEVEL UP banner ----
   The identity of this moment. Gold leaf struck on the room, flanked by rules that draw
   outward, with a light sweeping the letterforms. Spoils of the Room will share the motes but
   NOT this: it gets bone-and-ash, so the two never read as the same screen. */
.dx-lvl{
  position:absolute; left:50%; top:6%; transform:translateX(-50%);
  width:96%;
  text-align:center; pointer-events:none; white-space:nowrap;
  animation:dxLvlIn 620ms cubic-bezier(.16,1,.3,1) both;
}
.dx-lvl-row{display:flex; align-items:center; justify-content:center; gap:clamp(14px,2.4cqw,34px)}
/* The banner used to be cut off mid-frame by the phase change. It now bows out on commit,
   so the screen resolves instead of snapping. */
.dx-lvl.is-done{animation:dxLvlOut 520ms ease-in forwards}
@keyframes dxLvlOut{to{opacity:0; transform:translateX(-50%) translateY(-14px)}}
.dx-lvl::before{  /* radial well so the gold never sits directly on torchlit brick */
  content:""; position:absolute; left:50%; top:52%; transform:translate(-50%,-50%);
  width:82%; height:260%; border-radius:50%; z-index:-1;
  background:radial-gradient(ellipse at center, rgba(3,3,7,.88) 0%, rgba(3,3,7,.55) 48%, rgba(3,3,7,0) 74%);
}
/* overflow:hidden here is what confines the sweep to the letterforms — which means the glow
   CANNOT live on .dx-lvl-text or it would be clipped too. It lives on this wrapper instead:
   a filter on the parent is applied to the already-clipped result and paints outside the box. */
.dx-lvl-word{
  position:relative; display:inline-block; overflow:hidden; padding:0 2px; line-height:1.12;
  filter:drop-shadow(0 2px 0 rgba(0,0,0,.85)) drop-shadow(0 0 18px rgba(232,200,96,.42));
}
/* Two background layers, both clipped to the glyphs: a travelling band of light over the
   standing gold gradient. Doing the sweep as a background layer rather than an overlaid
   element means the letterforms mask it for free — no blend mode fighting the room behind. */
.dx-lvl-text{
  display:inline-block;
  font-family:'Cinzel',serif; font-weight:700; letter-spacing:.13em;
  font-size:clamp(38px,7.2cqw,82px);
  background-image:
    linear-gradient(105deg, transparent 42%, rgba(255,252,235,.92) 50%, transparent 58%),
    linear-gradient(180deg,#fff6da 0%,#f2d98a 34%,#c9a94e 62%,#8a6a22 100%);
  background-size:300% 100%, 100% 100%;
  background-repeat:no-repeat;
  background-position:-30% 0, 0 0;
  -webkit-background-clip:text; background-clip:text; color:transparent;
  animation:dxLvlSweep 4s ease-in-out 900ms infinite;
}
/* rules that draw outward from behind the word as it lands */
/* Flex items, so they sit at the word's optical centre whatever size the type resolves to.
   2px tall rather than 1px: against a 82px word a hairline read as a rendering artifact. */
.dx-lvl-rule{
  flex:0 0 min(170px,13cqw); height:2px;
  background:linear-gradient(90deg, rgba(201,169,78,0), rgba(201,169,78,.9));
  animation:dxLvlRule 700ms cubic-bezier(.16,1,.3,1) both 120ms;
}
.dx-lvl-rule.left{transform-origin:right center}
.dx-lvl-rule.right{transform-origin:left center;
  background:linear-gradient(270deg, rgba(201,169,78,0), rgba(201,169,78,.9))}
/* Scaled up alongside LEVEL UP so it isn't dwarfed — it carries the instruction. */
.dx-lvl-sub{
  margin-top:clamp(2px,.6cqw,8px);
  font-family:'EB Garamond',Georgia,serif; font-style:italic; letter-spacing:.02em;
  font-size:clamp(17px,2.9cqw,34px); color:#ece4d2;
  text-shadow:0 2px 0 #000, 0 0 12px rgba(0,0,0,.95);
}
@keyframes dxLvlIn{
  0%{opacity:0; transform:translateX(-50%) scale(.82); filter:brightness(2.4)}
  60%{opacity:1}
  100%{opacity:1; transform:translateX(-50%) scale(1); filter:brightness(1)}
}
@keyframes dxLvlRule{ from{transform:scaleX(0)} to{transform:scaleX(1)} }
/* Short travel, long rest — a highlight that never stops is jewellery-store, not gold leaf. */
@keyframes dxLvlSweep{
  0%{background-position:-30% 0, 0 0}
  20%{background-position:130% 0, 0 0}
  100%{background-position:130% 0, 0 0}
}
@media (prefers-reduced-motion:reduce){
  .dx-lvl{animation:none}
  .dx-lvl-rule{animation:none}
  .dx-lvl-text{animation:none; background-position:-30% 0, 0 0}
}

/* ---- the burst the boon rises out of ---- */
.dx-burst{
  position:absolute; width:12px; height:12px; margin:-6px 0 0 -6px; pointer-events:none;
  border-radius:50%; background:radial-gradient(circle, rgba(255,236,170,.95) 0%, rgba(232,200,96,.45) 35%, rgba(232,200,96,0) 70%);
  animation:dxBurst 1100ms ease-out forwards;
}
@keyframes dxBurst{
  0%{transform:scale(1); opacity:0}
  18%{opacity:1}
  100%{transform:scale(34); opacity:0}
}

/* ══════════ SPOILS OF THE ROOM ══════════
   The counterpart to the LEVEL UP banner, and deliberately its opposite. Levelling is gold leaf
   struck on iron — the game telling you that you grew. This is picking over a room you just
   fought through, so: bone-pale type with no metal in it, a single rule scoring UNDER the words
   instead of rules opening outward, and nothing sweeping across the letterforms. You should
   know which screen you are on before you have read a word of it. */
.dx-sp{
  position:absolute; left:50%; top:5%; transform:translateX(-50%);
  width:96%; text-align:center; pointer-events:none; white-space:nowrap;
  animation:dxSpIn 700ms cubic-bezier(.16,1,.3,1) both;
}
.dx-sp::before{
  content:""; position:absolute; left:50%; top:52%; transform:translate(-50%,-50%);
  width:82%; height:250%; border-radius:50%; z-index:-1;
  background:radial-gradient(ellipse at center, rgba(4,4,8,.86) 0%, rgba(4,4,8,.5) 48%, rgba(4,4,8,0) 74%);
}
.dx-sp-word{
  font-family:'Cinzel',serif; font-weight:500; letter-spacing:.14em;
  font-size:clamp(30px,5.2cqw,58px);
  color:#d8d2c2;
  text-shadow:0 2px 0 #000, 0 0 22px rgba(0,0,0,.9), 0 0 34px rgba(150,160,150,.16);
}
/* scored under the words — ash settling, not light opening out */
.dx-sp-rule{
  display:block; height:1px; width:min(420px,42cqw); margin:6px auto 0;
  background:linear-gradient(90deg, rgba(180,176,160,0), rgba(180,176,160,.6), rgba(180,176,160,0));
  transform-origin:center; animation:dxSpRule 760ms cubic-bezier(.16,1,.3,1) both 140ms;
}
.dx-sp-sub{
  margin-top:4px; font-family:'EB Garamond',Georgia,serif; font-style:italic;
  font-size:clamp(16px,2.4cqw,28px); color:#a8a292;
  text-shadow:0 2px 0 #000, 0 0 12px rgba(0,0,0,.95);
}
@keyframes dxSpIn{
  0%{opacity:0; transform:translateX(-50%) translateY(-10px)}
  100%{opacity:1; transform:translateX(-50%) translateY(0)}
}
@keyframes dxSpRule{from{transform:scaleX(0)} to{transform:scaleX(1)}}
.dx-sp.is-done{animation:dxSpOut 480ms ease-in forwards}
@keyframes dxSpOut{to{opacity:0; transform:translateX(-50%) translateY(-12px)}}

/* Refill verbs carry their resource's colour, matching the sidebar bars, so "which bar does
   this fill" is answered before the label is read. The Ferryman's toll stays gold. */
.dx-act.tone-hp .dx-act-label{color:#f0b6b0}
.dx-act.tone-hp.is-focused .dx-act-label{color:#ffd9d4; text-shadow:0 1px 0 #000, 0 0 16px rgba(224,120,110,.7)}
.dx-act.tone-mp .dx-act-label{color:#a8c8ee}
.dx-act.tone-mp.is-focused .dx-act-label{color:#d6e8ff; text-shadow:0 1px 0 #000, 0 0 16px rgba(110,160,230,.7)}
.dx-act.tone-sp .dx-act-label{color:#efd79a}
.dx-act.tone-sp.is-focused .dx-act-label{color:#fff0c4; text-shadow:0 1px 0 #000, 0 0 16px rgba(232,200,96,.7)}
/* Pool and Ferryman tones. Cyan for the water, matching the basin the canvas already draws;
   gold for the wares; ash for walking away. */
.dx-act.tone-pool .dx-act-label{color:#9fe6ff}
.dx-act.tone-pool.is-focused .dx-act-label{color:#dff6ff; text-shadow:0 1px 0 #000, 0 0 18px rgba(120,220,255,.7)}
.dx-act.tone-pool .dx-act-rule{background:linear-gradient(90deg, rgba(120,200,230,0), rgba(159,230,255,.95), rgba(120,200,230,0))}
.dx-act.tone-coin .dx-act-label{color:#e7d9ae}
.dx-act.tone-leave .dx-act-label{color:#a8a292}
.dx-act.tone-leave.is-focused .dx-act-label{color:#ded8c8; text-shadow:0 1px 0 #000, 0 0 14px rgba(180,176,160,.55)}

/* light standing off the water while the choice is up */
.dx-pool-glow{
  position:absolute; transform:translate(-50%,-50%); pointer-events:none; z-index:2;
  width:190px; height:190px; border-radius:50%;
  background:radial-gradient(circle, rgba(180,240,255,.42) 0%, rgba(90,190,230,.16) 40%, rgba(90,190,230,0) 70%);
  animation:dxPoolPulse 3.2s ease-in-out infinite;
}
@keyframes dxPoolPulse{
  0%,100%{opacity:.7; transform:translate(-50%,-50%) scale(1)}
  50%{opacity:1; transform:translate(-50%,-50%) scale(1.12)}
}
.dx-pool-glow.is-done{animation:dxPoolDrain 900ms ease-in forwards}
@keyframes dxPoolDrain{to{opacity:0; transform:translate(-50%,-50%) scale(.3)}}

/* Spent or unaffordable: still readable, plainly not takeable. */
.dx-act.is-spent .dx-act-label{color:#6f6a5f; text-shadow:0 1px 0 #000}
.dx-act.is-spent .dx-act-note,.dx-act.is-spent .dx-act-sub{color:#5d594f}
.dx-act.is-spent .dx-act-rule{display:none}

/* ══════════ CHEST ══════════
   The lid opens on the canvas and the contents rise out of it. Everything below is anchored to
   the CHEST, not the screen centre, so the loot comes out of the object you opened. */

/* what came out: an icon riding its own light, lifting clear of the lid */
/* Delayed behind the lid: explore.js keeps the chest shut for ~90ms and flashes for ~550ms, so
   the contents must not already be climbing out while it is still closed. The text and the
   verbs are staggered behind this in turn, so the beat reads lid -> loot -> name -> choice. */
.dx-loot{
  position:absolute; transform:translate(-50%,-50%); pointer-events:none; z-index:3;
  animation:dxLootRise 900ms cubic-bezier(.16,1,.3,1) both 180ms;
}
.dx-loot-glow{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:152px; height:152px; border-radius:50%;
  background:radial-gradient(circle, rgba(255,228,150,.5) 0%, rgba(232,200,96,.18) 40%, rgba(232,200,96,0) 70%);
  animation:dxLootPulse 2.6s ease-in-out infinite;
}
/* Hand-authored pixel art (tools/gen_loot_sprites.py), not emoji. Emoji render as the OS's own
   artwork — full-colour and rounded on Windows — so the focal object of the screen was being
   drawn in a completely different art style from the dungeon behind it. */
/* 3x, not 2x. The source cells are 24px, so the display size has to be an INTEGER multiple —
   at a fractional scale nearest-neighbour gives some source pixels two screen pixels and
   others three, and hand-placed pixel art visibly wobbles. 72px is the next step up. */
.dx-loot-icon{
  position:relative; display:block; width:72px; height:72px;
  background-image:url("../assets/loot.png?v=ff725442");
  background-repeat:no-repeat;
  background-size:288px 360px;                 /* 4 glint frames x 5 kinds, drawn at 3x */
  image-rendering:pixelated;
  animation:dxLootGlint 2.8s steps(4) infinite;
  filter:drop-shadow(0 3px 6px rgba(0,0,0,.85)) drop-shadow(0 0 16px rgba(232,200,96,.5));
}
@keyframes dxLootGlint{from{background-position-x:0} to{background-position-x:-288px}}
.dx-loot-icon.k-weapon{background-position-y:0}
.dx-loot-icon.k-armor{background-position-y:-72px}
.dx-loot-icon.k-necklace{background-position-y:-144px}
.dx-loot-icon.k-ring{background-position-y:-216px}
.dx-loot-icon.k-coins{background-position-y:-288px}
/* rises out of the chest, hangs, then drives into the hero on commit */
/* -62px, not -46: the icon is 72px tall now, so half of it is 36 — at the old rise its bottom
   edge sat below the top of the chest sprite it is supposed to be floating above. */
@keyframes dxLootRise{
  0%{opacity:0; transform:translate(-50%,-50%) translateY(30px) scale(.4)}
  60%{opacity:1}
  100%{opacity:1; transform:translate(-50%,-50%) translateY(-62px) scale(1)}
}
@keyframes dxLootPulse{0%,100%{opacity:.75; transform:translate(-50%,-50%) scale(1)} 50%{opacity:1; transform:translate(-50%,-50%) scale(1.09)}}
/* Taken: drives into the hero. The risen translateY is repeated in BOTH keyframes because this
   animation replaces dxLootRise, whose `both` fill was the only thing holding the item up —
   without it the loot drops 46px back onto the lid the instant the flight starts. */
.dx-loot.is-taken{animation:dxLootTake 520ms cubic-bezier(.55,0,.85,.35) forwards}
@keyframes dxLootTake{
  0%{left:var(--dx-lx,50%); top:var(--dx-ly,50%); opacity:1;
     transform:translate(-50%,-50%) translateY(-62px)}
  /* translateY back to 0 at the end, so the item converges on the hero instead of stopping
     46px above his head — holding the risen offset through the whole flight left it landing
     on nothing. Lifting out of the chest and then driving DOWN into him is the right arc. */
  100%{left:var(--dx-hx,50%); top:var(--dx-hy,55%); opacity:0; filter:brightness(2.4);
     transform:translate(-50%,-50%) translateY(0)}
}
/* Sold: the item does NOT come to you. It used to play the take animation regardless of which
   verb you chose, so selling a sword showed the sword flying into the hero — the picture
   contradicting what actually happened. It disperses into light instead: brightening while it
   desaturates and shrinks reads as converted-to-gold rather than pocketed. */
.dx-loot.is-sold{animation:dxLootSold 520ms ease-in forwards}
@keyframes dxLootSold{
  0%{opacity:1; transform:translate(-50%,-50%) translateY(-62px) scale(1); filter:none}
  100%{opacity:0; transform:translate(-50%,-50%) translateY(-82px) scale(.68);
       filter:brightness(1.8) saturate(.2)}
}

/* The words. `above` hangs the block upward off its anchor so it clears the risen icon; the
   hero is always directly under the chest he just opened, so below is not available. */
.dx-spoil{position:absolute; pointer-events:none; z-index:3; text-align:center; max-width:74%}
.dx-spoil.above{
  transform:translate(-50%,-100%);
  animation:dxSpoilInUp 620ms cubic-bezier(.16,1,.3,1) both 480ms;
}
.dx-spoil.centred{
  transform:translate(-50%,-50%);
  animation:dxSpoilInMid 620ms cubic-bezier(.16,1,.3,1) both 400ms;
}
@keyframes dxSpoilInUp{from{opacity:0; transform:translate(-50%,-100%) translateY(12px)} to{opacity:1; transform:translate(-50%,-100%) translateY(0)}}
@keyframes dxSpoilInMid{from{opacity:0; transform:translate(-50%,-50%) scale(.94)} to{opacity:1; transform:translate(-50%,-50%) scale(1)}}
.dx-spoil.above.is-taken{animation:dxSpoilOutUp 380ms ease-in forwards}
.dx-spoil.centred.is-taken{animation:dxSpoilOutMid 380ms ease-in forwards}
@keyframes dxSpoilOutUp{to{opacity:0; transform:translate(-50%,-100%) translateY(-10px)}}
@keyframes dxSpoilOutMid{to{opacity:0; transform:translate(-50%,-50%) scale(1.04)}}

/* The found item's OWN stats, directly under its name. Plain and gold: a statement of what the
   piece is, not a verdict on it — so it deliberately does not borrow the green/red of a
   comparison. What it replaces is stated under Equip; the two lines are the trade. */
.dx-mods{
  font-family:'Cinzel',serif; font-size:clamp(13px,1.6cqw,18px); color:#d8cfae; white-space:nowrap;
  letter-spacing:.04em; margin-top:5px; text-shadow:0 1px 0 #000, 0 0 10px rgba(0,0,0,.9);
}
/* Kept for C.DiegeticUI.kit.statDeltas, which is still a kit primitive. The chest screen no
   longer renders deltas: pre-subtracted numbers under an item's name read as that item's stats,
   which is how a +14 ATK maul came to look like an Elite find worth −5 ATK. */
.dx-deltas{display:flex; flex-wrap:wrap; gap:6px 14px; justify-content:center; margin-top:6px}
.dx-delta{
  font-family:'Cinzel',serif; font-size:clamp(15px,1.9cqw,21px); white-space:nowrap;
  text-shadow:0 1px 0 #000, 0 0 10px rgba(0,0,0,.9);
}
.dx-delta em{font-style:normal; font-size:.72em; letter-spacing:.08em; opacity:.78}
.dx-delta.up{color:#9fe08a; text-shadow:0 1px 0 #000, 0 0 12px rgba(120,220,120,.45)}
.dx-delta.down{color:#e08a8a; text-shadow:0 1px 0 #000, 0 0 12px rgba(220,120,120,.4)}
.dx-delta.flat{color:#b9b2a2}
.dx-elite{
  font-family:'Cinzel',serif; font-size:clamp(12px,1.4cqw,16px); letter-spacing:.16em;
  color:#dcc0f2; text-shadow:0 1px 0 #000, 0 0 12px rgba(180,120,230,.6);
  margin-bottom:2px;
}
.dx-loot.elite .dx-loot-glow{
  background:radial-gradient(circle, rgba(226,190,255,.5) 0%, rgba(168,110,226,.2) 40%, rgba(168,110,226,0) 70%);
}
.dx-loot.elite .dx-loot-icon{filter:drop-shadow(0 3px 6px rgba(0,0,0,.85)) drop-shadow(0 0 18px rgba(200,150,240,.65))}
.dx-vs{
  margin-top:5px; font-family:'EB Garamond',Georgia,serif; font-style:italic;
  font-size:clamp(13px,1.5cqw,17px); color:#c8c0ae; text-shadow:0 1px 0 #000, 0 0 8px rgba(0,0,0,.95);
}
.dx-vs b{color:#e6dcc4; font-weight:400; font-style:normal}

/* ══════════════ COMBAT: the command deck, in the room (Phase 2) ══════════════
   Sized in cqw against .dx-overlay, so the deck scales with the ROOM rather than the viewport —
   the sidebar takes a variable slice of the screen and vw would size this against space it
   cannot use. The Phase -1 greybox measured the whole deck at 97 canvas px fully open with nine
   skills, against 105-130px of clear floor beneath the rank, so these numbers have headroom. */
.dxc{position:absolute; inset:0; pointer-events:none; --cu:0.183824cqw}  /* --cu = one 544-wide canvas pixel */
.dxc button{pointer-events:auto}

/* ---- readouts on the canvas (Phase 3) ----
   Over each foe: what it intends, how hurt it is, what is stuck to it. NOT its intent's NAME —
   that line is 130 canvas px wide against a slot pitch of 52-86, so three foes' worth of named
   intent is wider than the room (§3a). The name lives on the inspect line above the deck. */
.dxc-cluster{
  position:absolute; transform:translate(-50%,-100%); z-index:2;
  display:flex; flex-direction:column; align-items:center; gap:calc(2 * var(--cu));
}
/* A foe speaking with no room to lift his bubble above these readouts: they step back while he
   talks (explore.js drawSaying), so the line is never struck through. */
.dxc-cluster.speaking{ opacity:.12; transition:opacity .15s ease-out; }
/* Measured, not chosen. Against the brightest pixel behind a readout the bare contrast is
   1.3-1.5:1 and the kit's usual 0.55 aura reaches only 3.0-3.4:1; 0.70 reaches 5.4-11.1:1 and
   clears 4.5:1 in every room including both boss rooms. Radial and local, so it darkens the
   stone behind six glyphs rather than putting a panel on the picture. */
.dxc-cluster::before{
  content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:165%; height:180%; z-index:-1; pointer-events:none;
  background:radial-gradient(58% 58% at 50% 50%, rgba(4,4,9,.70) 0%, rgba(4,4,9,.44) 56%, rgba(4,4,9,0) 100%);
}
.dxc-intent{display:flex; align-items:center; gap:calc(3 * var(--cu)); line-height:1}
/* A WORD, not a glyph. The row is gated to the ~28% of turns that carry a decision, so at most
   one foe in three or four shows one at a time — which is the room §3a said a name would never
   have. Small and letter-spaced: it must read at a glance without becoming a label on a picture. */
/* Bigger and heavier than it was. Measured, the old size was ~11.8px of hairline letter-spaced
   type at 9:1 contrast — technically legible and still hard to READ, because it sat directly
   above a saturated red health bar that takes the eye first, in the darkest part of the room.
   Contrast was never the problem; weight and size were. It also carries its own dark plate now,
   so it does not depend on the cluster aura reaching past the bar's width. */
.dxc-i{
  font-size:calc(9.5 * var(--cu)); letter-spacing:calc(.5 * var(--cu)); font-weight:600;
  text-transform:uppercase; white-space:nowrap; color:#e8c860;
  padding:calc(1 * var(--cu)) calc(3 * var(--cu));
  background:rgba(6,5,11,.72); border-radius:calc(2 * var(--cu));
  text-shadow:0 1px 0 #000, 0 0 8px rgba(232,200,96,.55);
}
/* Why you care, in colour. Gold is deliberately absent: it reads as the ordinary intent colour
   everywhere else in the kit, and nothing ordinary reaches this row any more. */
.dxc-i.n-support{color:#7fd48a; text-shadow:0 1px 0 #000, 0 0 9px rgba(127,212,138,.6)}
.dxc-i.n-brace{color:#8fb6d9; text-shadow:0 1px 0 #000, 0 0 9px rgba(143,182,217,.55)}
/* #e06a6a measured at 0.27 relative luminance against the brace blue's 0.44 — barely 60% as
   bright, which is why HEAVY BLOW receded into the room while DEFENDING read cleanly. Danger is
   the one that must never be missed, so it is now the brightest of the three at 0.48. */
.dxc-i.n-danger{color:#ff9e8a; text-shadow:0 1px 0 #000, 0 0 12px rgba(255,120,96,.75)}
/* Not rolled yet. Dim and wordless so it reads as neither a telegraph nor the ordinary attack
   that now shows nothing at all — those three states must stay tellable apart. */
.dxc-i.waiting{
  font-size:calc(11 * var(--cu)); color:#8a8374; letter-spacing:calc(1 * var(--cu));
  text-transform:none; text-shadow:0 1px 0 #000;
}
.dxc-hp{
  position:relative; width:calc(52 * var(--cu)); height:calc(4 * var(--cu));
  background:#1b1720; box-shadow:0 0 0 1px rgba(0,0,0,.8);
}
.dxc-hp i,.dxc-hp b{position:absolute; left:0; top:0; bottom:0; display:block}
/* the trail: the fill drops instantly, this chases it down so you see the SIZE of the hit */
.dxc-hp b{background:rgba(224,138,138,.42); transition:width .42s cubic-bezier(.3,0,.2,1)}
.dxc-hp i{background:linear-gradient(180deg,#e08a8a,#a5484a); z-index:1}
.dxc-cluster.focused .dxc-hp{box-shadow:0 0 0 1px rgba(224,138,138,.9)}
/* whoever is taking their turn right now, while the round plays back */
.dxc-cluster.acting::before{
  background:radial-gradient(58% 58% at 50% 50%, rgba(60,20,20,.80) 0%, rgba(20,6,9,.52) 56%, rgba(4,4,9,0) 100%);
}
.dxc-cluster.acting .dxc-i{color:#ffd98a; text-shadow:0 1px 0 #000, 0 0 14px rgba(255,190,120,.9)}

.dxc-chips{display:flex; gap:calc(4 * var(--cu)); flex-wrap:wrap; justify-content:center}
/* DRAWN ICONS, NOT GLYPHS. These were 7px Unicode characters whose meaning lived in a `title=`
   tooltip: too small to identify, and unreachable entirely without a pointer. 20 units is about
   the size of a foe's health bar height x4 — big enough to name at a glance in a dark room,
   small enough to stack four deep beside a 32px sprite without becoming the subject. */
/* pointer-events back ON for the chip alone. .dx-overlay sets pointer-events:none across the
   whole canvas — load-bearing, or the layer would eat every click meant for the room — which
   also meant these could never be hovered and the tooltip never appeared. Re-enabled here
   and nowhere else, so only the 20-unit chip is clickable and the rest of the layer stays
   transparent to the mouse. */
/* TALLER THAN IT IS WIDE, because it carries a picture AND two numbers. At 20x20 the badges sat
   over the bottom of the glyph and ate part of every icon; the extra 8 units give them a strip of
   their own. The WIDTH stays 20 so the row of chips is no wider than it was. */
.dxc-chip{
  pointer-events:auto;
  position:relative; width:calc(22 * var(--cu)); height:calc(26 * var(--cu));
  display:block; border-radius:calc(3 * var(--cu));
  background:rgba(10,9,16,.78); box-shadow:0 0 0 1px rgba(0,0,0,.75);
  outline:none;
}
/* THE ICON ELEMENT MUST STAY SQUARE: it is a canvas the 16px tile is copied onto (StatusIcon in
   ui_diegetic.jsx, which says why it is no longer a CSS background), so a box that is not square
   would stretch every status glyph. Pinned to the top and given an explicit 16x16. */
.dxc-chip-i{
  position:absolute; top:calc(1.5 * var(--cu)); left:calc(3 * var(--cu));
  display:block; width:calc(16 * var(--cu)); height:calc(16 * var(--cu));
  image-rendering:pixelated;             /* belt and braces: the canvas is painted at device size */
}
/* the turn counter, tucked into the corner so it never covers the icon it belongs to */
/* TURNS BOTTOM-LEFT, DAMAGE BOTTOM-RIGHT. They share the base style and differ only in which
   corner they hang off, so the two numbers can never drift apart in size or weight. A point
   smaller than the old single badge (6 units against 7) and pushed to opposite corners, which
   buys a clear gap across the middle of a 20-unit chip: two numbers touching in the dark read as
   one four-digit number. */
/* THE TWO NUMBERS ARE NOT EQUALS. The duration is context; the damage is the decision, so the
   damage runs larger. They sit in ONE flex row rather than as two absolutely positioned badges,
   and that is not cosmetic: separate badges sharing a line-height and a bottom edge align their
   LINE BOXES, while a baseline sits at a fixed fraction of the box — so the bigger number rode two
   pixels lower than the smaller one. Measured with Range rects, not guessed. align-items:baseline
   is the only thing that actually puts digits of different sizes on one line.

   They also lost their individual dark pills. Two rounded plates inside a rounded plate was most
   of the whitespace the chip had grown; the chip is already a dark plate, so the numbers can sit
   straight on it. That bought back four units of height and two of width. */
.dxc-chip-nums{
  position:absolute; left:calc(2 * var(--cu)); right:calc(2 * var(--cu));
  bottom:calc(1 * var(--cu));
  display:flex; align-items:baseline; justify-content:space-between;
  font-family:'Cinzel',serif; line-height:1;
  text-shadow:0 1px 0 #000, 0 0 calc(3 * var(--cu)) rgba(0,0,0,.95);
}
.dxc-chip-t{ color:#cec4ae; font-size:calc(6 * var(--cu)) }
/* The cost is in the game's damage red, so it reads as harm at a glance and never as a duration. */
.dxc-chip-d{ color:#f0b0b0; font-weight:700; font-size:calc(8 * var(--cu)) }
.dxc-chip.bad{box-shadow:0 0 0 1px rgba(120,44,40,.95)}
.dxc-chip.good{box-shadow:0 0 0 1px rgba(140,114,48,.95)}
/* THE BOUND SIGIL'S SEAL (Death's fight only): a gold ring holding the numeral of the phase it
   answers, in the icon's square so it sits in the column like any status. It pulses with the flare. */
.dxc-chip.sigil{box-shadow:0 0 0 1px rgba(232,200,96,.9), 0 0 calc(5 * var(--cu)) rgba(232,200,96,.28)}
/* CENTERED in the chip. A status icon is pinned to the top because its counters live in the space
   below it; the seal has no counters, so pinned at 3 it sat high with 7 units of empty chip under
   it (reported from play). (26 - 16) / 2 = 5 on both axes' worth of air: 5 top, 5 bottom. */
.dxc-seal{
  position:absolute; top:calc(5 * var(--cu)); left:calc(3 * var(--cu));
  width:calc(16 * var(--cu)); height:calc(16 * var(--cu)); box-sizing:border-box;
  border-radius:50%; border:1px solid #e8c860;
  box-shadow:inset 0 0 0 calc(1.5 * var(--cu)) rgba(10,9,16,.92), inset 0 0 0 calc(2.3 * var(--cu)) rgba(232,200,96,.5);
  display:flex; align-items:center; justify-content:center;
  font:normal 700 calc(6.5 * var(--cu))/1 'Cinzel',serif; letter-spacing:.02em; color:#e8c860;
  text-shadow:0 1px 0 #000;
}
.dxc-chip.sigil.flaring{animation:sealFlare 1.6s ease-out}
@keyframes sealFlare{
  0%{box-shadow:0 0 0 1px #fff3c4, 0 0 calc(16 * var(--cu)) rgba(255,226,140,.95); transform:scale(1.18)}
  35%{transform:scale(1)}
  100%{box-shadow:0 0 0 1px rgba(232,200,96,.9), 0 0 calc(5 * var(--cu)) rgba(232,200,96,.28)}
}
@media (prefers-reduced-motion: reduce){ .dxc-chip.sigil.flaring{animation:none} }

/* The tip, built to match the sidebar's equipment tooltips — same shape (name + detail), so the
   two read as the same kind of object. Shown on hover AND on keyboard focus, because the chip is
   focusable; a tooltip that only answers to a mouse is the problem this replaced. */
.dxc-tip{
  display:none; position:absolute; left:50%; bottom:calc(100% + 5 * var(--cu));
  transform:translateX(-50%); z-index:12; width:max-content; max-width:calc(150 * var(--cu));
  padding:calc(5 * var(--cu)) calc(7 * var(--cu));
  background:rgba(8,7,13,.97); border:1px solid rgba(201,169,78,.30);
  border-radius:calc(3 * var(--cu)); text-align:left; pointer-events:none;
  box-shadow:0 6px 18px rgba(0,0,0,.75);
}
.dxc-chip:hover .dxc-tip,.dxc-chip:focus-visible .dxc-tip{display:block}
.dxc-tip-name{
  display:block; font-family:'Cinzel',serif; font-size:calc(9 * var(--cu));
  color:#e8c860; margin-bottom:calc(2 * var(--cu));
}
.dxc-tip-detail{
  display:block; font-family:'EB Garamond',serif; font-size:calc(9 * var(--cu));
  line-height:1.35; color:#cfc7b4;
}
/* Stacked to the hero's LEFT, level with his chest. His headroom belongs to the damage floats,
   and these chips are DOM over a canvas — they win every overlap, so they must not be in the way. */
/* ---- THE CLASS RESOURCE STRIP ----
   Named .dxc-res, not .dxc-pips: `.dxc-pip` already means a turn-order plate in this stylesheet
   and two unrelated things must not share a name one character apart.

   ON A PLATE, like every other mark in this HUD. The first version drew naked shapes straight
   onto the artwork and leaned on the cluster's radial scrim - but that scrim's 0.70 core is at
   the cluster CENTRE, and the strip sits 62-64% out where alpha is ~0.36-0.40, i.e. WEAKER than
   the 0.55 this codebase already rejected as insufficient. Measured on stone the empty pip came
   out at 1.01-2.9:1 and vanished entirely over lit floor. On this plate the empty rim is 6.76:1
   and the lit pip 11.20:1, in every room, deterministically. .dxc-chip, .dxc-i and .dxc-pip all
   carry their own well for exactly this reason. */
.dxc-res{
  /* BELOW THE HERO, above the line that explains the highlighted verb — the eye travels
     hero -> resource -> verb row, in the order the decision is actually made.

     STATIC, as the deck's first row. It was `top:74%`, which held only while the deck stayed
     short: a third row of abilities pushed the grid up through the pips and dropped the hint line
     across them. A fixed percentage cannot clear a box that is one line tall in one mode and
     seven in another, so it does not try — in the deck's flow it is always exactly one gap above
     whatever is showing, for any ability count. Same fix, and the same reason, as .dxc-inspect. */
  position:static; transform:none;
  display:flex; flex-direction:column; align-items:center; gap:calc(2 * var(--cu));
  margin-bottom:clamp(4px,.7cqw,10px);
  padding:calc(2.5 * var(--cu)) calc(5 * var(--cu)) calc(3 * var(--cu));
  background:rgba(10,9,16,.78);
  border-radius:calc(3 * var(--cu));
  box-shadow:0 0 0 1px rgba(0,0,0,.75);
  pointer-events:none; z-index:3;
}
.dxc-res-k{
  font-family:'Cinzel',serif; font-size:calc(8 * var(--cu)); letter-spacing:.2em;
  line-height:1; color:#a8946a;
}
.dxc-res.is-resolve .dxc-res-k{ color:#d8bd72 }
.dxc-res.is-ember .dxc-res-k{ color:#e0a070 }
/* ONE EVEN RUN. The 3+3 grouping existed so six marks could be subitised; a label above them
   answers the same question better, and the gap read as two separate meters. */
.dxc-res-row{ display:flex; gap:calc(2.5 * var(--cu)) }
/* A REAL OBJECT, --cu-scaled. The old empty pip was a literal 1px border at .42 alpha in a
   stylesheet where everything else scales, and its interior was 1.01:1 - it had no body, only a
   hairline. #a8946a measures 6.76 / 5.52 / 4.11:1 against scrimmed stone / dark floor / lit
   stone, so it clears the floor even if the plate is ever removed. */
.dxc-res i{
  display:block; width:calc(7 * var(--cu)); height:calc(7 * var(--cu));
  border:calc(1 * var(--cu)) solid #a8946a; background:#0a0910; box-sizing:border-box;
  transition:background 160ms ease-out, border-color 160ms ease-out, box-shadow 160ms ease-out;
}
/* THREE AND THREE. Six identical marks in a row is above the subitizing limit and can only be
   estimated - and the Knight gains +1 PER ENEMY THAT ACTS, so against a 3-4 foe rank the value
   moves by 3-4 a round and has to be read exactly to price a card. Two groups of three are
   counted instantly. Costs 4cu of width. */
/* (the 3+3 gap is gone - see .dxc-res-row) */

/* THE TOKENS WERE INVERTED. --ember (#ffb25c) is documented as "candle warmth - the scene's only
   warm accent", and it was being spent on the Knight's BANKED IRON while the Occultist's actual
   embers used #ff7a3c, which is not a token at all. Gold for iron, ember for fire. Colour is now
   a redundant second channel; shape still carries the distinction on its own. */
.dxc-res.is-resolve i{ border-radius:50% }
.dxc-res.is-resolve i.on{ background:#e8c860; border-color:#f0dca0;
  box-shadow:0 0 calc(3 * var(--cu)) rgba(232,200,96,.55) }
/* THE DIAMONDS OVERLAPPED, and it was arithmetic: rotate() is applied AFTER layout, so a 7cu box
   on a 9.5cu pitch presents 7 x root2 = 9.90cu of visual width and every pair collided by 0.40cu.
   Six of them fused into one serrated ribbon - the exact bar this readout exists not to be.
   Shrinking the box to 5cu gives 7.07cu of visual diameter and 2.43cu of real clearance. */
.dxc-res.is-ember{ gap:calc(4.5 * var(--cu)) }
.dxc-res.is-ember i{ width:calc(5 * var(--cu)); height:calc(5 * var(--cu));
  transform:rotate(45deg); border-radius:calc(.5 * var(--cu)) }
.dxc-res.is-ember i.on{ background:var(--ember); border-color:#ffd9a8;
  box-shadow:0 0 calc(4 * var(--cu)) rgba(255,178,92,.75) }

/* ---- WHAT THE PLATE MEANS (ResPips; owner, 2026-11-04) ----
   Players did not understand Resolve, even with the fight tips. A small "?" stud at the plate's
   right end, in the label's own muted gold so it does not compete with the pips, opens one line
   on what it is and what spends it. The panel is the chips' tooltip exactly (.dxc-tip: the same
   ground, hairline, shadow, Cinzel name and Garamond line) with two changes made for a phone: a
   12px floor (the chips' 9cu is 7px on an iPhone) and a wider measure so it does not stack into a
   column. Hover opens it only where hover is real: iPad Safari keeps :hover on whatever was last
   tapped, so a tap-opened panel would never close there. */
.dxc-res{ position:relative; pointer-events:auto }
@media (hover:hover){ .dxc-res{ cursor:help } }
.dxc-res-q,.dxc-res-q:hover,.dxc-res-q:focus,.dxc-res-q:active{
  position:absolute; left:100%; top:50%; transform:translate(calc(5 * var(--cu)), -50%);
  width:calc(11 * var(--cu)); height:calc(11 * var(--cu)); min-width:16px; min-height:16px; padding:0;
  display:flex; align-items:center; justify-content:center; border-radius:50%;
  font-family:'Cinzel',serif; font-weight:700; font-size:max(10px, calc(7.5 * var(--cu))); line-height:1;
  color:#a8946a; background:rgba(10,9,16,.85); border:1px solid rgba(168,148,106,.75);
  box-shadow:0 0 0 1px rgba(0,0,0,.75); outline:none; cursor:pointer;
}
/* a finger-sized target around a stud sized for the eye */
.dxc-res-q::after{ content:""; position:absolute; inset:-9px; border-radius:50% }
.dxc-res.is-open .dxc-res-q, .dxc-res-q:focus-visible{ color:#f0e3bc; border-color:#e8c860 }
@media (hover:hover){ .dxc-res:hover .dxc-res-q{ color:#f0e3bc; border-color:#e8c860 } }
.dxc-res-help{
  display:none; position:absolute; left:50%; bottom:calc(100% + 6 * var(--cu)); transform:translateX(-50%);
  z-index:12; width:max-content; max-width:max(calc(150 * var(--cu)), 230px);
  padding:calc(5 * var(--cu)) calc(7 * var(--cu));
  background:rgba(8,7,13,.97); border:1px solid rgba(201,169,78,.30);
  border-radius:calc(3 * var(--cu)); text-align:left; pointer-events:none;
  box-shadow:0 6px 18px rgba(0,0,0,.75);
}
.dxc-res.is-open .dxc-res-help{ display:block }
@media (hover:hover){ .dxc-res:hover .dxc-res-help{ display:block } }
.dxc-res-help .dxc-tip-name, .dxc-res-help .dxc-tip-detail{ font-size:max(12px, calc(9 * var(--cu))) }

/* ---- WOUNDS ----
   Drawn on the FOE, because that is where the fact is true.

   A SPATTERED CUT, NOT A BAR (owner's pick, 2026-09-30, from three drawn in a live fight): a ragged
   brush-stroke of blood with spray thrown off the swing, so a Wound reads as a strike rather than
   a tally stripe. Every Wound is drawn alike; the fifth no longer crosses the four, since the cap
   is 4 without a boon.

   KEPT NEAR-SOLID. The first tally used a meter-style gradient to #8f1f22 whose lower half measured
   2.27:1 scrimmed and 1.38:1 over lit stone. This one only falls from #f76b60 to #dc4540, both
   near the #ef5a52 that measured 5.95:1 / 3.62:1.

   THE KEYLINE AND GLOW SIT ON THE ROW, not on each mark. One drop-shadow pass for the row, and it
   leaves each mark's own filter free for the slash-in's flash. The black keyline is also what
   separates it from the Bleed chip drawn directly beneath (wound red on bleed red measured 1.19:1).

   SLASH-IN. A mark appears the moment its beat plays (the tally draws from the playback snapshot),
   so the animation lands with the blow: it wipes in top to bottom, the way the stroke runs, white-
   hot, then cools. Only NEW marks animate; WoundTally staggers a batch (Bloodletting's doubling)
   so it reads as several cuts rather than one. */
.dxc-wounds{ display:flex; gap:calc(.8 * var(--cu)); justify-content:center;
  margin-top:calc(2 * var(--cu)); min-height:calc(12 * var(--cu));
  filter:drop-shadow(0 0 calc(.5 * var(--cu)) rgba(0,0,0,.95)) drop-shadow(0 0 calc(2.5 * var(--cu)) rgba(239,90,82,.35)) }
.dxc-wounds i{
  display:block; width:calc(6 * var(--cu)); height:calc(12 * var(--cu));
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f76b60'/%3E%3Cstop offset='1' stop-color='%23dc4540'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M10.8.6L11.7 2.2 10.4 4.5 11 5.9 9.2 9.1 8.5 12.7 7 13.7 5.8 17.3 4.3 18.7 3.3 22.4 1.7 23.5 1.9 20.3 1 19.1 2.8 15.3 3.3 12.2 4.9 10.8 5.9 7.4 7.8 5.5 8.7 2.5Z' fill='url%28%23g%29'/%3E%3Ccircle cx='10.9' cy='9.8' r='.95' fill='%23ef5a52'/%3E%3Ccircle cx='.9' cy='15.2' r='.75' fill='%23e2463f'/%3E%3Ccircle cx='8.6' cy='16.4' r='.55' fill='%23ef5a52'/%3E%3Ccircle cx='11.4' cy='12.4' r='.4' fill='%23ef5a52'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.dxc-wounds i.is-new{ animation:woundSlash 340ms cubic-bezier(.2,.9,.3,1) both }
@keyframes woundSlash{
  0%  { clip-path:inset(0 0 100% 0); filter:brightness(2.6) saturate(.4); transform:translate(calc(1.2 * var(--cu)), calc(-1.2 * var(--cu))) }
  45% { clip-path:inset(0 0 0 0);    filter:brightness(2.1) saturate(.6); transform:none }
  100%{ clip-path:inset(0 0 0 0);    filter:none;                         transform:none }
}

@media (prefers-reduced-motion: reduce){ .dxc-res i{ transition:none } .dxc-wounds i.is-new{ animation:none } }

/* BOTTOM-ANCHORED, so the strip grows UP into empty floor instead of down into the prose.
   Centred on the hero, anything added to this cluster descends into the inspect band: measured,
   a hero carrying the full four status chips put the strip ON the inspect line in 10 of 10
   captures, 10px of overlap at 1880x1350 - "Elite Restless Skeleton" rendered as circled typos. */
/* ---- GEAR RARITY ----
   The ladder the game already teaches, extended by one rung. Boons and Spoils run
   plain / violet / gold; gear runs bone / verdigris / violet / gold, so a player learns ONE
   rarity language and reads it everywhere. Verdigris is drawn from --accent-t1 (#7fae6a), the
   crypt green, rather than invented - a fourth colour from outside the palette would have made
   gear the only system speaking for itself.

   Every one of these is stated in WORDS beside the colour. Colour is emphasis, never the fact. */
.dx-rarity{
  font-family:'Cinzel',serif; letter-spacing:.2em; text-transform:uppercase;
  font-size:clamp(10px,1.15cqw,13px); line-height:1; margin-bottom:calc(3 * var(--cu));
  text-shadow:0 1px 0 #000, 0 0 10px rgba(0,0,0,.9);
}
/* Centred explicitly rather than by inheritance from .dx-spoil. The rung is a one-word line whose
   whole job is to be read at a glance, and leaving its alignment to an ancestor four levels up is
   how it would quietly go left again the next time this card is restructured. */
.dx-rarity{ text-align:center }
.dx-rarity.is-common{ color:#a8a091 }
.dx-rarity.is-uncommon{ color:#6fae86 }
.dx-rarity.is-rare{ color:#c79be6 }
.dx-rarity.is-epic{ color:#e8c860 }

/* The find's own plate takes a rim in its rung's colour, and a glow that only an Epic really
   earns - the top rung has to be recognisable across the room, before it is read. */
/* The rim needs something to enclose. Without padding it was a hairline drawn hard against the
   stat line, and on the Epic — the longest line, and the only one with a second line under it —
   the type touched the border top, bottom and both sides. A frame that tight reads as a clipping
   bug rather than as a frame. The faint wash gives the rim an inside, so the find sits ON
   something instead of floating over dungeon brick. */
.dx-item.is-uncommon,.dx-item.is-rare,.dx-item.is-epic{
  /* Sized off the WIDEST line, which is the stat row and not the name — an Epic carries three
     stats where a Common carries one, so the rung that most needs the room is the one that has
     the least of it. */
  padding:clamp(5px,.7cqw,9px) clamp(15px,2cqw,28px) clamp(7px,.95cqw,13px);
  border-radius:2px;
  background:radial-gradient(120% 140% at 50% 0%, rgba(10,9,14,.82), rgba(10,9,14,.62));
}
.dx-item.is-uncommon{ box-shadow:0 0 0 1px rgba(111,174,134,.55), 0 0 18px rgba(111,174,134,.14) }
.dx-item.is-rare{ box-shadow:0 0 0 1px rgba(199,155,230,.65), 0 0 24px rgba(199,155,230,.20) }
/* Epic gets a DOUBLE rim and a reach far past the plate. The three lower rungs step evenly; the
   top one has to break the pattern, because the moment a player sees it they should know before
   reading a word. This is the only gear treatment that lights the room around it. */
.dx-item.is-epic{ box-shadow:0 0 0 1px rgba(232,200,96,.9), 0 0 0 4px rgba(232,200,96,.16),
                              0 0 46px 6px rgba(232,200,96,.30),
                              inset 0 1px 0 rgba(255,248,214,.26) }

/* The signature passive. Gold on every rung that has one, because only Epics carry them - the
   colour is saying "this is the part that is not a stat". */
.dx-sig{
  margin-top:calc(3 * var(--cu)); color:#e8c860;
  font-family:'EB Garamond',Georgia,serif; font-style:italic;
  font-size:clamp(11px,1.4cqw,16px); line-height:1.35;
  text-shadow:0 1px 0 #000, 0 0 12px rgba(0,0,0,.9);
}

.dxc-cluster.hero{
  transform:translate(-100%,-100%); margin-left:calc(-14 * var(--cu));
  flex-direction:column; align-items:flex-end; gap:calc(2.5 * var(--cu));
}
.dxc-cluster.hero .dxc-chips{flex-direction:column}
.dxc-cluster.hero.flip{transform:translate(0,-100%); margin-left:calc(14 * var(--cu)); align-items:flex-start}
.dxc-cluster.hero::before{width:210%; height:135%}

/* Turn order — top-left, UNDER THE DIRECTIVE (C.Directive, which holds this corner for the whole
   run and keeps it through a fight). Same --cu, same left edge; the directive's lockup runs to
   y=26, so the strip starts a clear gap below it. */
.dxc-order{position:absolute; left:calc(8 * var(--cu)); top:calc(33 * var(--cu)); z-index:2}
/* READABLE OVER ANY WALL (owner, 2026-10-05: "too dark, too hard to see"). The label was #8a8374 at
   6cu and the names #b9b2a2 on a .72 plate: grey on brown brick. The label is now a muted leaf, a
   heading under the directive's gold rather than a whisper; the names are bone on a near-solid
   plate with a hairline edge, a size up. */
.dxc-order-t{
  font-family:'Cinzel',serif; font-weight:700; font-size:calc(6.4 * var(--cu)); letter-spacing:calc(.9 * var(--cu));
  color:#d2bd84; text-shadow:0 1px 0 #000, 0 0 6px rgba(0,0,0,.95), 0 0 12px rgba(0,0,0,.8);
}
.dxc-order-r{display:flex; gap:calc(3 * var(--cu)); margin-top:calc(2.2 * var(--cu)); flex-wrap:wrap; max-width:calc(300 * var(--cu))}
.dxc-pip{
  font-family:'Cinzel',serif; font-size:calc(7.6 * var(--cu)); white-space:nowrap;
  padding:calc(1.2 * var(--cu)) calc(4.4 * var(--cu)); color:#ebe3d0;
  background:rgba(8,8,12,.88); box-shadow:0 0 0 1px rgba(214,196,150,.22), 0 2px 6px rgba(0,0,0,.6);
  text-shadow:0 1px 0 #000;
}
.dxc-pip.you{color:#f0d272; box-shadow:0 0 0 1px rgba(200,165,70,.95), 0 2px 6px rgba(0,0,0,.6)}
/* acted this round: stepped back, but still legible (.32 lost the names entirely) */
.dxc-pip.done{opacity:.5}
.dxc-pip.next{box-shadow:0 0 0 1px rgba(232,200,96,.75), 0 0 9px rgba(232,200,96,.35)}

/* one fixed line above the deck: whatever the cursor is on. Fixed height so the grid above it
   never reflows under the cursor, and the only place long text appears on this screen. */
/* Vertical offsets are PERCENTAGES of the overlay, not cqh. .dx-overlay is
   `container-type:inline-size`, which supplies cqw and nothing else — a cqh length there is
   invalid, the declaration is dropped at computed-value time, and the element silently lands at
   its static position with no error anywhere. Percentages resolve against this layer's own
   height, which is the canvas, which is what we actually mean. */
/* THIS LINE BELONGS TO THE VERB ROW, so it sits with it. At 24% it floated in the middle of the
   room, a caption with no visible owner; the thing it describes is whatever the cursor is on,
   twenty percent of the screen below. */
.dxc-inspect{
  /* Static: it is the deck's first row now, so it tracks the deck's height instead of guessing
     at it. margin-bottom buys the descenders clearance from the aura of the row beneath. */
  position:static; margin-bottom:clamp(5px,.8cqw,11px);
  max-width:88cqw; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  font-family:'EB Garamond',Georgia,serif; font-size:clamp(12px,1.75cqw,19px); color:#c8c0ae;
  text-shadow:0 1px 0 #000, 0 0 10px rgba(0,0,0,.95);
  min-height:1.3em;
}
/* Bottom-anchored so the deck grows UPWARD into the empty floor when the grid opens, leaving
   the inspect line above it exactly where it was. */
.dxc-deck{
  /* Lower, now that Inspect is gone. The row used to sit high to leave the second line room;
     with four verbs on one line it can take the floor it was borrowing against. */
  position:absolute; left:50%; bottom:1%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:clamp(3px,.6cqw,8px);
}
/* ONE LINE, ALWAYS. The deck is absolutely placed at left:50%, so its shrink-to-fit width is capped
   at half the room (460px at 1280x800) and a wrapping row broke at that. The Occultist's verbs
   need 490px since his Skill verb became "Disciplines", which dropped Defend onto a second line
   under the other three. nowrap makes the row's own width the deck's minimum; five verbs (the
   Threshold's Flee) is about 590px against a 920px room. */
.dxc-verbs{display:flex; gap:clamp(6px,1.1cqw,14px); justify-content:center; flex-wrap:nowrap}
/* SIZED FROM THE LONGEST NAME IN THE GAME, not from a column count. `repeat(3, minmax(0,1fr))`
   inside a shrink-wrapped deck let the columns collapse to 150px, and four abilities clipped -
   "Bloodied Resolve" needed 135px of name in the 105px it was given, and "Crushing Blow" did not
   fit either. Measured worst case is the name plus its icon, gap, cost and padding: ~193px.

   auto-fit rather than a fixed three, so the row count follows the space available: three columns
   at full width, two when the window is narrow, and never a clipped name at either. The ellipsis
   below stays as a last resort for a future name longer than any that exists today. */
.dxc-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(clamp(160px, 21cqw, 215px), 1fr));
  width:min(70cqw, 690px);
  /* Roughly double the old gap. At 3px the cells' auras ran into one another and the row read as
     one continuous bar of text rather than as separate things to choose between. The width above
     is widened to match, so three columns still fit at full size. */
  gap:clamp(7px,1.1cqw,15px); justify-items:stretch;
}

/* Verbs and abilities are LIGHT ON DARKNESS, like everything else in here — a local aura and
   etched type, never a panel laid over the artwork. The gold rule under a focused entry is the
   cursor; it is not a hover effect, because a gamepad has no hover. */
.dxc-verb,.dxc-ab{
  position:relative; background:none; border:0; border-radius:0; box-shadow:none; outline:none;
  font-family:'Cinzel',serif; color:#cfc7b4; white-space:nowrap;
  text-shadow:0 1px 0 #000, 0 0 12px rgba(0,0,0,.95);
}
.dxc-verb,.dxc-verb:hover,.dxc-verb:active,.dxc-verb:focus,.dxc-verb:focus-visible,
.dxc-ab,.dxc-ab:hover,.dxc-ab:active,.dxc-ab:focus,.dxc-ab:focus-visible{
  background:none; border:0; box-shadow:none; outline:none;
}
/* The press-nudge in the global button rule REPLACES transforms rather than composing with
   them, which is how a centred element jumps half its own width on mousedown. Pinned here. */
.dxc-verb:active,.dxc-ab:active{transform:none}
.dxc-verb{font-size:clamp(13px,2.05cqw,23px); letter-spacing:.06em; padding:clamp(2px,.35cqw,5px) 1.4cqw}
.dxc-verb::before,.dxc-ab::before{
  content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:150%; height:190%; z-index:-1; pointer-events:none; border-radius:50%;
  background:radial-gradient(60% 60% at 50% 50%, rgba(4,4,9,.72) 0%, rgba(4,4,9,.46) 55%, rgba(4,4,9,0) 100%);
}
.dxc-verb.on,.dxc-ab.on{color:#f0e3bc}
.dxc-verb.on::after{
  content:""; position:absolute; left:12%; right:12%; bottom:-2px; height:2px;
  background:linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow:0 0 10px rgba(232,200,96,.8);
}
/* The ability cursor was COLOUR ALONE — #cfc7b4 to #f0e3bc, about a 1.35:1 step. Verbs get the
   gold rule above; abilities got nothing but a slightly warmer grey, so for anyone who cannot
   separate those two, or on a dim panel, the deck had no cursor at all. A caret is a SHAPE:
   it survives greyscale, it survives colour blindness, and it survives a bad screen. */
.dxc-ab.on::after{
  content:"‹"; position:absolute; left:-.15em; top:50%; transform:translateY(-52%);
  color:var(--gold); font-size:1.15em; line-height:1; pointer-events:none;
  text-shadow:0 0 8px rgba(232,200,96,.85);
}
.dxc-verb.no,.dxc-ab.no{color:#6d6659;}
.dxc-verb.danger{color:#d99a92}
.dxc-verb.danger.on{color:#f0b3aa}
.dxc-verb.primary{color:#f0e3bc}

.dxc-ab{
  display:flex; align-items:baseline; gap:.5cqw; padding:clamp(1px,.3cqw,4px) .75cqw;
  font-size:clamp(11px,1.55cqw,17px);
}
.dxc-ab.on{background:rgba(232,200,96,.09)}
.dxc-ab-i{font-size:1.05em}
.dxc-ab-n{flex:1 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.dxc-ab-c{margin-left:auto; color:#8fb0d8; font-size:.85em}
.dxc-ab.no .dxc-ab-c{color:#7a5a52}

/* ---- FIGHT TIPS (ui_diegetic.jsx, FIGHT TIPS; owner, 2026-11-04) ----
   THE GUIDE IS ITS OWN LAYER. Everything that teaches is drawn in one cold wisp-light (--guide,
   :root) that nothing else in the game uses, so the walkthrough reads as something laid over the
   game for now, not as interface that is always there; gold stays the interface's (owner's call
   over a gold version that blended in, and a parchment slip that read as a web pop-up). Still
   light on darkness, like everything in this room: the line is the inspect line's voice (EB
   Garamond) in italic between two hairlines, led by a small GUIDE mark, with the names it means in
   the deck's Cinzel. What it points at breathes in the same light. No box, no arrow, no dimming.
   It rises in once when it changes, and holds still while it is read. */
/* THE INSPECT LINE'S BOX EXACTLY (size, margin, min-height), because the two take turns in one slot
   and the deck must not move by a pixel when they swap */
.dxc-coach{
  position:relative; display:flex; align-items:center; justify-content:center; gap:clamp(7px,1.1cqw,14px);
  margin-bottom:clamp(5px,.8cqw,11px); min-height:1.3em; max-width:90cqw; white-space:nowrap;
  font-family:'EB Garamond',Georgia,serif; font-style:italic; font-size:clamp(12px,1.75cqw,19px);
  color:var(--guide-ink); text-shadow:0 1px 0 #000, 0 0 12px rgba(0,0,0,.95);
  animation:dxcCoachIn .5s cubic-bezier(.2,.7,.2,1) both;
}
/* its own pool of shadow, wider than the words, so it reads over the brightest floor in the game */
.dxc-coach::before{
  content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:118%; height:290%; z-index:-1; pointer-events:none; border-radius:50%;
  background:radial-gradient(60% 50% at 50% 50%, rgba(4,4,9,.80) 0%, rgba(4,4,9,.55) 52%, rgba(4,4,9,0) 100%);
}
.dxc-coach b{
  font-style:normal; font-family:'Cinzel',serif; font-weight:700; font-size:.8em; letter-spacing:.05em;
  color:var(--guide); text-shadow:0 1px 0 #000, 0 0 10px rgba(var(--guide-glow),.5);
}
/* the mark that says what this is: small engraved caps in a hairline frame, the guide's colour */
.dxc-coach-k{
  display:inline-block; margin-right:.8em; padding:.2em .55em .14em; vertical-align:.2em;
  font-family:'Cinzel',serif; font-style:normal; font-weight:700; font-size:.6em; letter-spacing:.22em;
  text-transform:uppercase; line-height:1; color:var(--guide);
  border:1px solid rgba(var(--guide-glow),.6); border-radius:2px; box-shadow:0 0 8px rgba(var(--guide-glow),.35);
}
.dxc-coach-rule{ flex:0 0 auto; width:clamp(16px,3.6cqw,48px); height:1px;
  background:linear-gradient(90deg, rgba(var(--guide-glow),0), rgba(var(--guide-glow),.85)); box-shadow:0 0 6px rgba(var(--guide-glow),.55) }
.dxc-coach-rule.r{ background:linear-gradient(270deg, rgba(var(--guide-glow),0), rgba(var(--guide-glow),.85)) }
@keyframes dxcCoachIn{ from{ opacity:0; transform:translateY(5px) } to{ opacity:1; transform:none } }

/* THE BECKON: the verb's own shadow pool takes the guide's light and breathes, and a rule in the
   same light sits under it, over the cursor's gold one when the cursor is there too (the tip puts
   it there). An ability card keeps the cursor's gold caret, so the two never read as one thing. */
.dxc-verb.is-beckon,.dxc-ab.is-beckon{ color:#eaf9fc }
.dxc-verb.is-beckon::before,.dxc-ab.is-beckon::before{
  background:radial-gradient(60% 60% at 50% 50%, rgba(var(--guide-glow),.30) 0%, rgba(40,110,135,.30) 34%, rgba(4,4,9,.62) 64%, rgba(4,4,9,0) 100%);
  animation:dxcBeckon 1.9s ease-in-out infinite;
}
.dxc-verb.is-beckon::after{
  content:""; position:absolute; left:12%; right:12%; bottom:-2px; height:2px;
  background:linear-gradient(90deg, transparent, var(--guide), transparent);
  box-shadow:0 0 10px rgba(var(--guide-glow),.9);
}
.dxc-ab.is-beckon{ background:rgba(var(--guide-glow),.12) }
@keyframes dxcBeckon{ 0%,100%{ opacity:.62 } 50%{ opacity:1 } }

/* First turn only: what each button is, in three words under its name. The inspect line's own size
   and its upright face: italic at this size was 11px on desktop and 7.8px on a phone, unreadable
   (owner). In the guide's colour, so the captions go with the tip rather than with the buttons. */
.dxc-verb.has-cap{ display:inline-flex; flex-direction:column; align-items:center; line-height:1.05 }
.dxc-verb-cap{
  margin-top:.2em; font-family:'EB Garamond',Georgia,serif; font-style:normal; letter-spacing:0;
  font-size:clamp(12px,1.75cqw,19px); color:var(--guide-cap); white-space:nowrap;
}
.dxc-verb.is-beckon .dxc-verb-cap{ color:var(--guide) }
.dxc-verb.no .dxc-verb-cap{ color:#6f8a90 }
.dxc-verb.danger .dxc-verb-cap{ color:#b98a84 }

/* The resource plate and a foe's intent, when a tip is about them: the guide's light, as a ring */
.dxc-res.is-beckon{
  box-shadow:0 0 0 1px rgba(0,0,0,.75), 0 0 0 calc(1.2 * var(--cu)) rgba(var(--guide-glow),.65), 0 0 calc(12 * var(--cu)) rgba(var(--guide-glow),.34);
  animation:dxcBeckonRing 1.9s ease-in-out infinite;
}
.dxc-i.is-beckon{
  box-shadow:0 0 0 calc(1 * var(--cu)) rgba(var(--guide-glow),.75), 0 0 calc(9 * var(--cu)) rgba(var(--guide-glow),.4);
  animation:dxcBeckonRing 1.9s ease-in-out infinite;
}
@keyframes dxcBeckonRing{ 0%,100%{ filter:brightness(.92) } 50%{ filter:brightness(1.18) } }
/* The Health Draught's Drink, on the rail, outside the fight overlay (lit by html.tip-draught) */
html.tip-draught .rxs-flask-icon.hp ~ .rxs-drink:not(:disabled){
  border-color:var(--guide); color:#eaf9fc;
  box-shadow:0 0 0 1px rgba(var(--guide-glow),.55), 0 0 14px rgba(var(--guide-glow),.45);
  animation:dxcBeckonRing 1.9s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce){
  .dxc-coach, .dxc-verb.is-beckon::before, .dxc-ab.is-beckon::before, .dxc-res.is-beckon, .dxc-i.is-beckon,
  html.tip-draught .rxs-flask-icon.hp ~ .rxs-drink{ animation:none }
}

/* ---- THE GUIDE IN THE ROOM (js/guide.js; owner, 2026-11-05) ----
   The fight tip's voice, laid over the bottom of the room when there is no deck to sit in: the same
   GUIDE mark, italic line, hairlines, names in the guide's Cinzel, the same pool of shadow under it.
   It may take two lines (the owner's sentences are longer than a fight's), balanced, and never
   wider than three quarters of the room. In #dir-layer, so it scales with the room (cqw). */
.gd{
  /* above the bottom wall's door labels (their plates stand 35-47 canvas px off the floor's edge) */
  position:absolute; left:50%; bottom:calc(54 * var(--cu)); transform:translate(-50%, 6px); z-index:3;
  display:flex; align-items:center; justify-content:center; gap:clamp(7px,1.1cqw,14px);
  width:max-content; max-width:76cqw; pointer-events:none; opacity:0;
  font-family:'EB Garamond',Georgia,serif; font-style:italic; font-size:clamp(12px,1.75cqw,19px); line-height:1.32;
  color:var(--guide-ink); text-shadow:0 1px 0 #000, 0 0 12px rgba(0,0,0,.95);
  transition:opacity .45s ease, transform .5s cubic-bezier(.2,.7,.2,1);
}
.gd.is-on{ opacity:1; transform:translate(-50%, 0) }
.gd.is-out{ opacity:0; transform:translate(-50%, 4px); transition-duration:.4s }
.gd.is-hid{ visibility:hidden }
.gd::before{
  content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:116%; height:220%; z-index:-1; pointer-events:none; border-radius:50%;
  background:radial-gradient(60% 50% at 50% 50%, rgba(4,4,9,.84) 0%, rgba(4,4,9,.6) 52%, rgba(4,4,9,0) 100%);
}
.gd-t{ text-align:center }   /* its width is fitted to even lines by guide.js (hug) */
/* a name, or a hyphenated word, is never split across lines, wherever the guide speaks */
.gd-nb, .gd b, .rx-map-route.is-guide b, .pg-flavour.is-guide b{ white-space:nowrap }
/* ITALIC INTO UPRIGHT: the italic word before a name leans into the space, and the upright Cinzel
   after it has no slant to give it back ("Points?DEFEND"). A hair of lead-in on every name the
   guide sets, in every place it speaks. */
.dxc-coach b, .gd b, .rx-map-route.is-guide b, .pg-flavour.is-guide b{ padding-left:.14em }
.gd b{ font-style:normal; font-family:'Cinzel',serif; font-weight:700; font-size:.8em; letter-spacing:.05em;
  color:var(--guide); text-shadow:0 1px 0 #000, 0 0 10px rgba(var(--guide-glow),.5) }
.gd-k{ display:inline-block; margin-right:.8em; padding:.2em .55em .14em; vertical-align:.2em;
  font-family:'Cinzel',serif; font-style:normal; font-weight:700; font-size:.6em; letter-spacing:.22em;
  text-transform:uppercase; line-height:1; color:var(--guide);
  border:1px solid rgba(var(--guide-glow),.6); border-radius:2px; box-shadow:0 0 8px rgba(var(--guide-glow),.35) }
.gd-rule{ flex:0 0 auto; width:clamp(16px,3.6cqw,48px); height:1px;
  background:linear-gradient(90deg, rgba(var(--guide-glow),0), rgba(var(--guide-glow),.85)); box-shadow:0 0 6px rgba(var(--guide-glow),.55) }
.gd-rule.r{ background:linear-gradient(270deg, rgba(var(--guide-glow),0), rgba(var(--guide-glow),.85)) }
/* A PHONE'S ROOM IS SHORT AND ITS TYPE HAS A FLOOR: the line runs wider and sits lower, the rules go
   (as the fight tip's do on a phone), so two lines never climb into the middle of the room. */
html.is-phone .gd{ bottom:calc(52 * var(--cu)); max-width:88cqw; gap:0 }
html.is-phone .gd-rule{ display:none }
/* THE TOUCH STICK'S SEAL HOLDS THE LOWER LEFT (js/touchstick.js): about a sixth of an iPad's room and a
   quarter of an iPhone's. The line takes the floor to its right instead of running under it. The
   chest hides the seal, so its line keeps the middle. */
html.ts-on .gd{ left:calc(50% + 11cqw); max-width:72cqw }
html.ts-on.is-phone .gd{ left:calc(50% + 14cqw); max-width:70cqw }
/* A SCREEN'S LINE (the chest, the pool, Level Up, the Spoils): no door is labelled while an overlay
   owns the room, so it takes the floor's edge, centred (the overlay hides the touch stick), and
   guide.js (fit) moves it up under the banner when what the screen offers sits low. */
.gd.is-loot, .gd.is-pool, .gd.is-virtue, .gd.is-spoils{ bottom:calc(12 * var(--cu)) }
html.is-phone .gd.is-loot, html.is-phone .gd.is-pool, html.is-phone .gd.is-virtue, html.is-phone .gd.is-spoils{ bottom:calc(4 * var(--cu)) }
html.ts-on .gd.is-loot, html.ts-on .gd.is-pool, html.ts-on .gd.is-virtue, html.ts-on .gd.is-spoils{ left:50% }
/* and on a phone, the room's whole width: a screen line has no stick to step around, and every line it
   saves is a line further from the descriptions above it (the Spoils' longest ran into it at 70cqw) */
html.is-phone .gd.is-loot, html.is-phone .gd.is-pool, html.is-phone .gd.is-virtue, html.is-phone .gd.is-spoils{ max-width:94cqw }

/* WHAT A LINE IS ABOUT BREATHES IN THE GUIDE'S LIGHT: the Drink button for that draught (exactly as
   the fight's Draught tip lights it), the chest's Equip verb, the mini-map, the hero's panel. */
html.guide-drink-hp .rxs-flask-icon.hp ~ .rxs-drink:not(:disabled),
html.guide-drink-sp .rxs-flask-icon.sp ~ .rxs-drink:not(:disabled),
html.guide-drink-mp .rxs-flask-icon.mp ~ .rxs-drink:not(:disabled){
  border-color:var(--guide); color:#eaf9fc;
  box-shadow:0 0 0 1px rgba(var(--guide-glow),.55), 0 0 14px rgba(var(--guide-glow),.45);
  animation:dxcBeckonRing 1.9s ease-in-out infinite;
}
html.guide-pool-drink .dx-act.is-pool-drink .dx-act-label,
html.guide-pool-leave .dx-act.is-pool-leave .dx-act-label,
html.guide-equip .dx-act.is-equip .dx-act-label{ color:#eaf9fc; text-shadow:0 1px 0 #000, 0 0 12px rgba(var(--guide-glow),.85) }
html.guide-pool-drink .dx-act.is-pool-drink .dx-act-aura,
html.guide-pool-leave .dx-act.is-pool-leave .dx-act-aura,
html.guide-equip .dx-act.is-equip .dx-act-aura{
  background:radial-gradient(60% 60% at 50% 50%, rgba(var(--guide-glow),.32) 0%, rgba(40,110,135,.28) 38%, rgba(4,4,9,0) 100%);
  animation:dxcBeckonRing 1.9s ease-in-out infinite }
html.guide-minimap #minimap-mount .rx-mini,
html.guide-hero .rxs-id{
  box-shadow:0 0 0 1px rgba(0,0,0,.75), 0 0 0 2px rgba(var(--guide-glow),.7), 0 0 16px rgba(var(--guide-glow),.4);
  animation:dxcBeckonRing 1.9s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce){
  .gd{ transition:none }
  html[class*="guide-"] .rxs-drink, html.guide-equip .dx-act-aura, html.guide-minimap #minimap-mount .rx-mini, html.guide-hero .rxs-id{ animation:none }
}

/* ---- resolution (Phase 6) ----
   Light on darkness, like everything else here: etched type over the room's own answer, never a
   panel dropped on top of it. The canvas has already warmed or drained by the time this lands. */
.dxc-resolve{display:flex; flex-direction:column; align-items:center; gap:clamp(3px,.7cqw,9px)}
.dxc-resolve-t{
  font-family:'Cinzel',serif; font-size:clamp(17px,3.1cqw,34px); letter-spacing:.05em;
  color:#f0e3bc; white-space:nowrap;
  text-shadow:0 2px 0 #000, 0 0 22px rgba(0,0,0,.95);
}
.dxc-resolve.victory .dxc-resolve-t{color:#f7e6ae; text-shadow:0 2px 0 #000, 0 0 26px rgba(232,200,96,.75)}
.dxc-resolve.defeat .dxc-resolve-t{color:#e08a8a; text-shadow:0 2px 0 #000, 0 0 26px rgba(224,106,106,.55)}
.dxc-resolve.fled .dxc-resolve-t{color:#b9b2a2}
.dxc-resolve-s{
  display:flex; align-items:baseline; gap:clamp(5px,.9cqw,11px);
  font-family:'Cinzel',serif; font-size:clamp(11px,1.6cqw,18px); color:#d8cfae;
  text-shadow:0 1px 0 #000, 0 0 12px rgba(0,0,0,.95);
}
.dxc-resolve.fled .dxc-resolve-s{font-family:'EB Garamond',Georgia,serif; font-style:italic; color:#8a8374}
.dxc-resolve-s i{font-style:normal; color:#8a8374}
.dxc-resolve .dxc-verb{margin-top:clamp(2px,.5cqw,6px)}

/* Targeting is diegetic: the ring goes ON the monster, on the canvas. Nothing about it is a
   list — you are pointing at the thing you mean to hit. */
.dxc-ring{
  position:absolute; transform:translate(-50%,-50%);
  background:none; border:1px solid rgba(224,138,138,.45); border-radius:6px;
  box-shadow:0 0 0 1px rgba(0,0,0,.55) inset; padding:0;
}
.dxc-ring:active{transform:translate(-50%,-50%)}
.dxc-ring.on{
  border-color:#e08a8a; box-shadow:0 0 14px rgba(224,138,138,.7), 0 0 0 1px rgba(0,0,0,.6) inset;
  animation:dxcRing 1.1s ease-in-out infinite;
}
.dxc-ring.peek{border-color:rgba(143,176,216,.5)}
.dxc-ring.peek.on{border-color:#8fb0d8; box-shadow:0 0 14px rgba(143,176,216,.7)}
@keyframes dxcRing{0%,100%{opacity:1}50%{opacity:.55}}
@media (prefers-reduced-motion:reduce){.dxc-ring.on{animation:none}}

/* ---- action: a verb, not an object ---- */
/* width:max-content is load-bearing. An absolutely positioned box gets only the space between
   its offset and the container edge to shrink-to-fit in, so the rightmost verb at left:87% was
   being squeezed into 13% of the room and wrapped "Re-roll" onto two lines. max-content lets it
   size to its text and simply straddle its own centre. */
.dx-act{
  position:absolute; transform:translate(-50%,-50%); z-index:4;
  /* max-width is what lets the sub-line WRAP. Without it, width:max-content sizes the button
     to its longest unwrapped line, and a shop description like "Restores 40% Health. +1 to
     stock." made each ware wide enough to run straight through its neighbours. */
  width:max-content; max-width:min(250px,24cqw);
  background:none; border:0; padding:7px 16px 9px;
  pointer-events:auto;              /* opting back in — .dx-overlay disables hit-testing */
  display:flex; flex-direction:column; align-items:center; gap:1px;
  animation:dxActIn 460ms ease-out both 760ms;
}
.dx-act-label,.dx-act-note{white-space:nowrap}
.dx-act,.dx-act:hover,.dx-act:active,.dx-act:focus,.dx-act:focus-visible{
  background:none; border:0; border-radius:0; box-shadow:none; outline:none;
}
/* Same trap as .dx-mote:active — these are centred with translate(-50%,-50%) and the global
   button press-nudge would replace it, jumping the verb half its own width on mousedown. */
.dx-act:active{transform:translate(-50%,-50%)}
@keyframes dxActIn{from{opacity:0; transform:translate(-50%,-50%) translateY(9px)} to{opacity:1; transform:translate(-50%,-50%) translateY(0)}}
.dx-act-aura{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:-1;
  /* Tightened from 170x230%: the aura is a legibility well, not a spotlight, and at the old
     size a row of verbs threw shade over whatever sat above them. */
  width:150%; height:180%; border-radius:50%; pointer-events:none;
  background:radial-gradient(ellipse at center, rgba(3,3,7,.9) 0%, rgba(3,3,7,.55) 46%, rgba(3,3,7,0) 74%);
}
.dx-act-label{
  font-family:'Cinzel',serif; font-size:clamp(17px,2.2cqw,25px); letter-spacing:.07em;
  color:#e7d9ae; text-shadow:0 1px 0 #000, 0 0 12px rgba(0,0,0,.9);
  transition:color .16s ease, text-shadow .16s ease, transform .16s ease;
}
.dx-act-note{
  font-family:'EB Garamond',Georgia,serif; font-style:italic;
  font-size:clamp(15px,1.8cqw,20px); color:#b8ae99;
  text-shadow:0 1px 0 #000, 0 0 8px rgba(0,0,0,.95); transition:color .16s ease;
}
/* The stats of the piece being displaced. Cinzel and letterspaced so it reads as DATA rather
   than as more prose — it sits directly under an italic line and needs to separate from it. */
.dx-act-sub{
  margin-top:1px; font-family:'Cinzel',serif; letter-spacing:.05em;
  font-size:clamp(14px,1.6cqw,18px); color:#a29a86; line-height:1.3; text-align:center;
  text-shadow:0 1px 0 #000, 0 0 8px rgba(0,0,0,.95); transition:color .16s ease;
}
.dx-act.is-focused .dx-act-sub{color:#bfae86}
/* the rule under a verb is the focus tell: it draws outward from the centre */
.dx-act-rule{
  display:block; width:100%; height:1px; margin-top:4px;
  background:linear-gradient(90deg, rgba(201,169,78,0), rgba(232,200,96,.95), rgba(201,169,78,0));
  transform:scaleX(0); transition:transform .18s cubic-bezier(.16,1,.3,1);
}
.dx-act.is-focused .dx-act-label{color:#fff3cd; text-shadow:0 1px 0 #000, 0 0 16px rgba(232,200,96,.75); transform:scale(1.06)}
.dx-act.is-focused .dx-act-note{color:#cfc4ab}
.dx-act.is-focused .dx-act-rule{transform:scaleX(1)}
.dx-act.is-dimmed{animation:dxActOut 320ms ease-in forwards; pointer-events:none}
@keyframes dxActOut{to{opacity:0; transform:translate(-50%,-50%) translateY(6px)}}
.dx-act.is-committing .dx-act-label{color:#fffaf0; text-shadow:0 0 22px rgba(255,240,190,.95)}

/* ---- gold spiral ----
   A gold chest is a quantity, and one coin sprite hovering there said nothing about how much.
   Sparks climb continuously out of the open lid on a helix while the choice is up. They are
   points of LIGHT coming off the pile, not little coins — at 5px a drawn coin would be mud,
   and the heap sprite above them already says "coins". */
.dx-coins{position:absolute; transform:translate(-50%,-50%); pointer-events:none; z-index:2}
.dx-coins.is-done{animation:dxFadeOut 340ms ease-out forwards}
.dx-coin{
  position:absolute; left:0; top:0; width:5px; height:5px; margin:-2.5px 0 0 -2.5px;
  border-radius:50%;
  background:radial-gradient(circle, #fff4cf 0%, #f0d47a 45%, rgba(200,160,60,0) 100%);
  box-shadow:0 0 6px rgba(240,212,122,.8);
  animation:dxCoinSpiral var(--dur,2.2s) linear infinite;
  animation-delay:var(--delay,0s);
}
/* A real helix: the spark crosses the axis twice on the way up, so it reads as circling the
   column rather than being blown straight off it. --r is the swing, handed in per spark (some
   climb tight to the middle, some wide) and negated at the far side of the turn. Written as
   keyframes rather than a trig function because CSS sin() is too new to depend on. */
@keyframes dxCoinSpiral{
  0%{opacity:0; transform:translate(0,8px) scale(.35)}
  12%{opacity:1}
  25%{transform:translate(var(--r,12px),-14px) scale(.95)}
  50%{transform:translate(0,-36px) scale(1)}
  75%{transform:translate(calc(var(--r,12px) * -1),-56px) scale(.85); opacity:.9}
  100%{opacity:0; transform:translate(0,-78px) scale(.6)}
}

/* the Chalice does not present an item, it floods the room */
.dx-flood{
  position:absolute; inset:0; pointer-events:none; z-index:2; overflow:hidden;
  background:radial-gradient(circle at 50% 42%, rgba(255,226,150,.55) 0%, rgba(232,200,96,.22) 34%, rgba(232,200,96,0) 68%);
  animation:dxFlood 2400ms ease-out both;
}
@keyframes dxFlood{
  0%{opacity:0; transform:scale(.25)}
  22%{opacity:1}
  100%{opacity:.5; transform:scale(1)}
}
/* Rays turning behind the wash. One static gradient was thin for the object the whole run is
   about — this is the only moment in the game that earns god-rays. The conic is masked to a
   soft disc so the blades dissolve before they reach the walls instead of ending on a hard
   circle, and it turns slowly enough to read as light rather than as a spinning wheel. */
.dx-rays{
  position:absolute; left:50%; top:42%; width:150%; aspect-ratio:1; transform:translate(-50%,-50%);
  pointer-events:none; z-index:2; mix-blend-mode:screen;
  background:conic-gradient(from 0deg,
    rgba(255,232,166,.30) 0deg, rgba(255,232,166,0) 14deg, rgba(255,232,166,0) 30deg,
    rgba(255,232,166,.22) 44deg, rgba(255,232,166,0) 58deg, rgba(255,232,166,0) 84deg,
    rgba(255,232,166,.34) 96deg, rgba(255,232,166,0) 110deg, rgba(255,232,166,0) 140deg,
    rgba(255,232,166,.20) 152deg, rgba(255,232,166,0) 166deg, rgba(255,232,166,0) 200deg,
    rgba(255,232,166,.30) 214deg, rgba(255,232,166,0) 228deg, rgba(255,232,166,0) 262deg,
    rgba(255,232,166,.24) 276deg, rgba(255,232,166,0) 290deg, rgba(255,232,166,0) 322deg,
    rgba(255,232,166,.28) 334deg, rgba(255,232,166,0) 348deg, rgba(255,232,166,0) 360deg);
  -webkit-mask-image:radial-gradient(circle, #000 0%, #000 26%, transparent 62%);
  mask-image:radial-gradient(circle, #000 0%, #000 26%, transparent 62%);
  animation:dxRaysIn 2600ms ease-out both, dxRaysTurn 42s linear infinite;
}
@keyframes dxRaysIn{from{opacity:0} to{opacity:.85}}
@keyframes dxRaysTurn{from{transform:translate(-50%,-50%) rotate(0deg)} to{transform:translate(-50%,-50%) rotate(360deg)}}
@media (prefers-reduced-motion:reduce){ .dx-rays{animation:dxRaysIn 1ms ease-out both} }

@media (prefers-reduced-motion:reduce){
  .dx-loot,.dx-spoil,.dx-act,.dx-flood{animation-duration:1ms !important; animation-delay:0ms !important}
  .dx-loot-glow{animation:none}
}

/* ---- impact ----
   Blooms on the hero at the frame the wisp lands. This is what makes the sidebar tick read as
   a consequence of the hit rather than as an unrelated number changing somewhere else. */
.dx-impact{
  position:absolute; width:16px; height:16px; margin:-8px 0 0 -8px; pointer-events:none; z-index:4;
  border-radius:50%; border:2px solid rgba(255,240,190,.9);
  box-shadow:0 0 22px rgba(255,232,170,.75), inset 0 0 14px rgba(255,232,170,.5);
  animation:dxImpact 620ms cubic-bezier(.12,.75,.3,1) forwards;
}
@keyframes dxImpact{
  0%{transform:scale(.3); opacity:0}
  14%{opacity:1}
  100%{transform:scale(9); opacity:0; border-color:rgba(255,240,190,0)}
}

/* The boon's name, inscribed on the hero as it takes hold. Rises and fades. */
.dx-claimed{
  position:absolute; transform:translate(-50%,-50%); pointer-events:none; z-index:5;
  animation:dxClaimed 1100ms cubic-bezier(.2,.8,.3,1) forwards;
}
@keyframes dxClaimed{
  0%{opacity:0; transform:translate(-50%,-50%) translateY(10px) scale(.86)}
  18%{opacity:1; transform:translate(-50%,-50%) translateY(0) scale(1)}
  70%{opacity:1; transform:translate(-50%,-50%) translateY(-22px) scale(1)}
  100%{opacity:0; transform:translate(-50%,-50%) translateY(-40px) scale(1)}
}

/* ---- motes ---- */
.dx-mote{
  position:absolute; transform:translate(-50%,-50%);
  /* 72px, not 52: the flame reaches ~67px at its focused scale, and the hit area has to
     cover what the player can see, not the sprite's resting size. */
  width:72px; height:72px; padding:0; border:0; background:none;
  pointer-events:auto;              /* opting back in — .dx-overlay disables hit-testing */
  animation:dxDriftA var(--dx-driftA,6s) ease-in-out infinite alternate,
            dxDriftB var(--dx-driftB,8s) ease-in-out infinite alternate,
            dxMoteIn 620ms cubic-bezier(.16,1,.3,1) both;
  animation-delay:var(--dx-delay,0s), var(--dx-delay,0s), var(--dx-in,0s);
  transition:filter .18s ease;
}
/* Strip the global button chrome. `button` (line ~75) paints a gradient fill, a 1px border and
   an 8px radius, and `button:hover` adds an inset gold box-shadow — that hover shadow was
   drawing a rounded rectangle around the flame. The base .dx-mote rule cleared background and
   border but not box-shadow, and `button:hover` outranks a single class anyway, so the states
   have to be named explicitly. Listed after the global rule, so equal specificity still wins. */
.dx-mote,.dx-mote:hover,.dx-mote:active,.dx-mote:focus,.dx-mote:focus-visible{
  background:none; border:0; border-radius:0; padding:0; box-shadow:none; outline:none;
}
/* `button:active` sets transform:translateY(1px) — a nudge that reads fine on a normal button,
   but these are centred on their own position with translate(-50%,-50%), and a transform
   REPLACES rather than adds. Pressing one therefore dropped the centering and threw the wisp
   and its label ~36px (half its own size) down and to the right. Measured while held:
   matrix(1,0,0,1,0,1). A class+pseudo beats a type+pseudo, so this wins; a running animation
   still outranks both, so the entrance and commit are unaffected. */
.dx-mote:active{transform:translate(-50%,-50%)}
.dx-mote-drift{position:absolute; inset:0}
.dx-mote-halo,.dx-mote-core{position:absolute; left:50%; top:50%; transform:translate(-50%,-50%)}
.dx-mote-halo{border-radius:50%; width:74px; height:74px; transition:width .2s ease,height .2s ease,opacity .2s ease}
/* The core is a hand-authored pixel sprite (tools/gen_wisp_sprite.py), not a CSS disc.
   A smooth radial-gradient circle read as a web element composited onto pixel art; this
   burns in the same world as the Reaper and the Ferryman. The HALO above stays CSS,
   because that is light falling on the room rather than an object in it. */
.dx-mote-core{
  width:48px; height:48px;
  background-image:url(../assets/wisp.png?v=8ccc359e);
  background-repeat:no-repeat;
  background-size:384px 96px;                  /* 8 frames x 2 rarity rows, drawn at 2x */
  image-rendering:pixelated;
  animation:dxWispFlicker .72s steps(8) infinite;
  animation-delay:var(--dx-delay,0s);          /* per-mote phase, so they never flicker in lockstep */
  transform:translate(-50%,-50%) scale(var(--wisp-s,1));
  transition:transform .2s ease, filter .2s ease;
}
@keyframes dxWispFlicker{from{background-position-x:0} to{background-position-x:-384px}}
.dx-mote.common .dx-mote-halo{background:radial-gradient(circle, rgba(255,224,150,.34) 0%, rgba(232,200,96,.13) 42%, rgba(232,200,96,0) 70%)}
/* NO FILTER ON THE MOTE ITSELF (2026-11-06, an iPad Air player, twice). A focused mote was brightened by
   `filter` on its 72px button, and its name hangs far outside that box (centred on it, wider than it).
   iOS Safari clips a filtered element's overflow to the wrong rectangle: the halo drew as a hard-edged
   square and the name was cut off at that square's left edge ("...R TISSUE", "...UTIONER'S INSTINCT"),
   on Level Up and on the Spoils alike, on the first mote, which a touch screen opens focused. Desktop
   browsers and Playwright's WebKit do not do it, which is why no capture showed it. The brightness (and
   the disabled greying) now go on the three leaves that paint, each of which holds its own content:
   the halo, the flame, and the name's inner box. --mote-b is brightness, --mote-g greyscale. */
.dx-mote-halo{filter:grayscale(var(--mote-g,0)) brightness(var(--mote-b,1))}
.dx-mote .dx-etch-in{filter:grayscale(var(--mote-g,0)) brightness(var(--mote-b,1))}
.dx-mote.common .dx-mote-core{background-position-y:0; filter:grayscale(var(--mote-g,0)) brightness(var(--mote-b,1)) drop-shadow(0 0 7px rgba(240,212,122,.6))}
.dx-mote.rare .dx-mote-halo{background:radial-gradient(circle, rgba(216,168,255,.38) 0%, rgba(168,110,226,.15) 42%, rgba(168,110,226,0) 70%)}
.dx-mote.rare .dx-mote-core{background-position-y:-48px; filter:grayscale(var(--mote-g,0)) brightness(var(--mote-b,1)) drop-shadow(0 0 8px rgba(200,150,240,.68))}
/* Focus is MAGNIFICATION + brightness. NEVER colour — rarity already owns colour.
   The ring is gone: a hard geometric circle drawn around a hand-painted flame was the one
   piece of this screen still admitting it was a web widget. Scale carries it better anyway —
   the flame swells, its glow opens up, and the type grows with it, so the hovered boon reads
   as picked-up rather than as outlined. */
/* The focused wisp stops drifting. The two drift animations move the mote — and therefore its
   label — by several pixels continuously, so a click aimed at the edge of the type can land
   where the type WAS. Pausing (rather than removing) keeps the current offset, so it settles in
   place with no jump, and "it steadies as you reach for it" is the right read anyway.
   Order matches the shorthand: driftA, driftB, entrance. The entrance keeps running so hovering
   during it cannot freeze a wisp half-materialised. */
.dx-mote.is-focused{--mote-b:1.3; animation-play-state:paused, paused, running}   /* brightness on the leaves, never here */
.dx-mote.is-focused .dx-mote-halo{width:118px; height:118px}
.dx-mote.is-focused .dx-mote-core{--wisp-s:1.4}
.dx-mote.is-focused .dx-mote-label .dx-etch-in{transform:scale(1.09)}
.dx-mote.common.is-focused .dx-mote-ring{border-color:rgba(255,232,168,.85)}
.dx-mote.rare.is-focused .dx-mote-ring{border-color:rgba(226,190,255,.9)}
/* CARDINAL. Layered over the violet sprite rather than replacing it — there are exactly two
   sprite rows — but the halo, ring and label are now SCARLET rather than gold. Gold made the
   rarest tier look like the commonest one, and about eight Spoils are offered in a whole escape,
   so the one card in that hand that can define the run has to be recognisable before it is read.
   Rose rather than orange-red so it reads as precious, not dangerous (--hp is #b5303a). */
/* THE TRANSLATE MUST BE REPEATED. .dx-mote-halo is centred by `transform:translate(-50%,-50%)`
   on the shared rule above, and `transform` is one property: writing `transform:scale(1.18)` here
   DISCARDED the centring and threw the halo down-and-right of its own mote. It has always done
   that — a gold halo behind a gold-labelled mote simply hid it, and recolouring Cardinal to
   scarlet made it obvious in the first screenshot. Order matters: translate first, then scale. */
.dx-mote.is-cardinal .dx-mote-halo{
  background:radial-gradient(circle, rgba(255,168,158,.55) 0%, rgba(232,115,107,.24) 44%, rgba(232,115,107,0) 72%);
  transform:translate(-50%,-50%) scale(1.18) }
/* THE FLAME ITSELF, not just its glow. The core is the violet wisp sprite — there are only two
   rows — so a hue rotation carries it from violet (~270deg) FORWARD to scarlet (~360deg)
   without a third asset. Rotating the short way round (-96deg) lands on teal, which the first
   attempt did; the arithmetic looked right and the screenshot said otherwise.
   Applied here because the halo alone left a violet mote with a warm smudge behind it: at mote
   size the CORE is what the eye reads, and Cardinal has to be recognisable before it is read. */
.dx-mote.is-cardinal .dx-mote-core{
  filter:grayscale(var(--mote-g,0)) brightness(var(--mote-b,1)) hue-rotate(88deg) saturate(1.3) drop-shadow(0 0 11px rgba(255,150,140,.85)) }
.dx-mote.is-cardinal.is-focused .dx-mote-ring{ border-color:rgba(255,170,160,.95) }
.dx-mote.is-cardinal .dx-mote-label{ color:#ff9e96 }
/* Offset from the BUTTON's top edge, so it moves with the button box (72px tall -> centre is
   36px down). 78px puts the type 42px below centre, clearing the flame at its focused 1.4
   scale (34px below centre) with room to spare — and it does not shift on focus, so the label
   never jumps as you move between boons.

   pointer-events is restored here (and on the .dx-etch inside it, which sets none of its own):
   the name and description are part of the target. Having to hit the flame itself, a ~48px
   dot, when a 300px label is sitting right under it was needless precision. Clicks bubble to
   the parent <button>, and mouseenter on it fires for descendants, so focus works too. */
/* top:70 + 8px of padding puts the label's HIT box at +34 from the mote centre while the type
   still starts at +42, closing the 6px dead strip between the bottom of the 72px flame button
   and the top of the label. The two targets now overlap rather than leaving a seam. */
.dx-mote-label{
  position:absolute; left:50%; top:70px; padding-top:8px; transform:translateX(-50%);
  display:flex; justify-content:center;
}
.dx-mote-label,.dx-mote-label .dx-etch{pointer-events:auto;}
/* Roomier than the shared .dx-etch padding: at the focus scale the type grows ~13px past its
   own box, and the click target must always be the larger of the two. */
.dx-mote-label .dx-etch{padding:7px 18px}
/* The SCALE goes on the inner wrapper, never on .dx-etch (the click target) or on
   .dx-mote-label (which owns transform via its entrance animation's `both` fill). Scaling the
   target changed its hit area and set up a hover feedback loop — see the note in Etched(). */
.dx-etch-in{display:block; transition:transform .18s ease}
.dx-mote.is-disabled{ --mote-g:.7; --mote-b:.5 }   /* on the leaves, as focus is: no filter on the mote */

/* ---- entrance ----
   Nothing used to enter: all three wisps appeared fully formed, at full brightness, with
   their type already rendered, on the same frame. They now kindle off the floor in sequence
   and the label resolves only once the flame has settled. --dx-in is the per-mote stagger. */
   The entrance is a THIRD entry in .dx-mote's animation shorthand rather than its own class:
   `animation` is one property, so a separate rule would have replaced the two drift
   animations outright instead of adding to them. Drift moves margins, the entrance moves
   transform/opacity, so they compose without fighting. */
@keyframes dxMoteIn{
  0%{opacity:0; transform:translate(-50%,-50%) translateY(26px) scale(.28)}
  55%{opacity:1}
  100%{opacity:1; transform:translate(-50%,-50%) translateY(0) scale(1)}
}
.dx-mote-label{animation:dxLabelIn 420ms ease-out both; animation-delay:calc(var(--dx-in,0s) + 340ms)}
@keyframes dxLabelIn{from{opacity:0; transform:translateX(-50%) translateY(-7px)} to{opacity:1; transform:translateX(-50%) translateY(0)}}

/* commit: the choice drives into the hero */
.dx-mote.is-committing{
  animation:dxCommit 560ms cubic-bezier(.55,0,.85,.35) forwards;
  z-index:3;
}
.dx-mote.is-committing .dx-mote-label{opacity:0; transition:opacity .12s}
/* ---- rejected ----
   The wisps you did NOT take used to sit at full brightness with their descriptions still
   legible for the whole flight, then vanish when React unmounted. They now gutter out the
   instant you commit, which is what sells the choice as costing something. */
.dx-mote.is-rejected{animation:dxMoteOut 420ms ease-in forwards; pointer-events:none}
@keyframes dxMoteOut{
  0%{opacity:1}
  100%{opacity:0; transform:translate(-50%,-50%) translateY(14px) scale(.62); filter:brightness(.45) saturate(.4)}
}
@keyframes dxCommit{
  0%{left:var(--dx-x,50%); top:var(--dx-y,50%); opacity:1; filter:brightness(1.3)}
  100%{left:var(--dx-hx,50%); top:var(--dx-hy,55%); opacity:0; filter:brightness(2.6)}
}

@keyframes dxDriftA{from{margin-left:-5px}to{margin-left:5px}}
@keyframes dxDriftB{from{margin-top:-6px}to{margin-top:4px}}

@media (prefers-reduced-motion:reduce){
  .dx-mote{animation:none}
  .dx-mote-core{animation:none}
  .dx-mote-label{animation:none}
  .dx-burst{animation:dxBurstReduced 400ms ease-out forwards}
  .dx-mote.is-committing{animation:dxFadeOut 160ms ease-out forwards}
  .dx-mote.is-rejected{animation:dxFadeOut 160ms ease-out forwards}
  @keyframes dxBurstReduced{0%{opacity:0}40%{opacity:.8}100%{opacity:0; transform:scale(12)}}
  @keyframes dxFadeOut{to{opacity:0}}
}

/* generic confirm dialog */
.modal-backdrop{position:fixed; inset:0; z-index:120; background:rgba(4,4,8,.8);
  display:flex; align-items:center; justify-content:center; padding:5vh 5vw; animation:fadein .16s ease}
.modal-box{max-width:440px; width:100%; padding:22px 24px}
.modal-box h3{font-size:20px}
.modal-actions{display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap}
.modal-actions button{padding:9px 16px}

/* full-screen map overlay */
.map-modal-backdrop{position:fixed; inset:0; z-index:100; background:rgba(4,4,8,.86);
  display:flex; align-items:center; justify-content:center; padding:3vh 3vw; animation:fadein .16s ease}
.map-modal{max-width:96vw; max-height:94vh; display:flex; flex-direction:column; gap:10px; padding:16px}
.map-modal-head{display:flex; align-items:center; justify-content:space-between; gap:20px}
.map-close{font-size:13px; padding:5px 12px;}
.map-modal-body{overflow:auto; display:flex; justify-content:center; align-items:center; flex:1; min-height:0}
.map-legend{font-size:16px; line-height:1.5; text-align:center; color:var(--ink); letter-spacing:.3px}
.map-legend span{font-weight:600}
@keyframes fadein{from{opacity:0}to{opacity:1}}
svg .edge.cur-edge{stroke:var(--gold); stroke-width:3.5; opacity:.9}
#explore-canvas{
  width:100%; max-width:1080px; height:auto; aspect-ratio:544/416;
  image-rendering:pixelated; image-rendering:crisp-edges;
  border:1px solid var(--border); border-radius:10px;
  background:#07070e; box-shadow:var(--shadow);
  outline:none;
}

svg .edge{stroke:#2a2a38; stroke-width:2}
svg .node{fill:#22222e; stroke:#3a3222; stroke-width:2}
svg .node.visited{fill:#2c2c1a}
svg .node.current{fill:var(--gold); stroke:#fff}
svg .node.chalice{stroke:var(--gold)}
svg .node.pool{fill:#123}
svg .node.exit{stroke:var(--mp)}
svg text.nlab{fill:var(--ink-dim); font-size:11px; font-family:'Cinzel'}
/* Fogged frontier: a room you know a door leads to, but have never entered. Hollow and dim so
   it reads as "unknown" next to the solid, tier-coloured rooms you've actually walked. */
svg .node.fog{fill:rgba(10,10,16,.55); stroke:#4a4436; stroke-dasharray:3 3; stroke-width:1.5}
/* A gold rim means there is a door in THIS room leading to that one; anything without it has to
   be walked to the long way round, however close it is drawn. Declared AFTER .fog deliberately:
   both selectors have identical specificity, so source order is the only thing that decides,
   and a fogged room you can reach still needs to show that you can reach it. */
svg .node.reachable{stroke:rgba(232,200,96,.95); stroke-width:2.5; stroke-dasharray:none}
/* Route highlighting — cyan so it reads as a plan you asked for, distinct from the gold that
   means "already adjacent". Last in the file so it wins over .fog and .reachable alike: a route
   very often runs through rooms that are one or the other. */
svg .node.on-route{stroke:#8ee0ff; stroke-width:3; stroke-dasharray:none}
svg line.route{stroke:#8ee0ff; stroke-width:3.5; opacity:1}
.map-route{
  text-align:center; margin-top:6px; font-family:'EB Garamond',Georgia,serif; font-style:italic;
  font-size:13px; color:#9fe6ff; min-height:18px;
}
svg text.nlab.fog{fill:#6b6454}

/* ---------- end screens ---------- */
.end-big{font-size:40px; font-family:'Cinzel'; text-align:center}
.win{color:var(--gold)}
.lose{color:var(--danger)}

/* ---------- toast ---------- */
#toast-layer{position:fixed; top:18px; left:0; right:0; display:flex; flex-direction:column; align-items:center; gap:8px; pointer-events:none; z-index:50}
.toast{
  background:#1c1712; border:1px solid var(--gold-dim); color:var(--gold);
  padding:8px 18px; border-radius:20px; font-family:'Cinzel'; font-size:14px;
  box-shadow:var(--shadow); animation:toast 2.6s ease forwards;
}
@keyframes toast{0%{opacity:0;transform:translateY(-8px)}12%{opacity:1;transform:none}82%{opacity:1}100%{opacity:0;transform:translateY(-8px)}}

/* An iron stud with a gold glyph, not a web circle with an emoji in it. This sits in the corner of
   every screenshot of the title screen, so it has to belong to the same world as the plaque. */
#mute-btn{
  position:fixed; top:14px; right:16px; z-index:60;
  width:43px; height:43px; padding:0; border-radius:50%;
  font-size:0; line-height:0; opacity:.72;
  background:radial-gradient(120% 120% at 32% 26%, #2a241d 0%, #141110 62%, #0a0807 100%);
  border:1px solid #4e4336;
  box-shadow:inset 0 1px 0 rgba(255,238,206,.16), 0 2px 6px rgba(0,0,0,.6);
  transition:opacity .18s, border-color .18s, box-shadow .18s;
}
/* ---------------------------------------------------------------- the volume stud, four states
   A METER, NOT A COUNT. All three arcs are drawn in every state: the lit ones are struck gold, the
   unlit ones are engraved recesses. The eye reads how far the light reaches instead of counting
   arcs, which is the only thing that works at this size — three 1.9-wide strokes inside 18px is
   about 2px of arc separated by 2px of gap, and nobody counts that at a glance. It is the same
   idiom as `.pg-pip`, where owned ranks are struck studs and unowned ones are recesses.

   A lit arc is the game's Edge recipe rather than a flat stroke: a near-black halo under a gold
   core under a thin highlight. The halo guarantees a lit arc always sits on black even where it
   passes a recess, and the highlight is the extra luminance that makes lit read BRIGHT rather than
   merely present — which is what carries the fill level at 13 rendered pixels of glyph.

   Recesses are THINNER than lit arcs (1.4 against 1.9) and only about two value-steps above the
   stud itself. They must be findable, not visible; lighten them and they become a third stroke
   weight competing with the meter.

   18px, not the 17 this button used to draw at: 18/24 is exactly 0.75, so every stroke lands on
   the same quarter-pixel grid and the three arcs antialias identically. At 17 (0.7083) they smear
   unevenly, and unequal smearing on the one element whose job is comparing three arcs is fatal.

   OFF IS CODED THREE TIMES — no gold anywhere, a straight slash, and an empty meter. Hue is the
   channel that survives smallest, the slash is geometrically unconfusable with an arc and carries
   the meaning for colour-impaired players, and the empty meter agrees with both. A cross was
   rejected: two diagonals crossing the arc field at this size is a knot, and it reads as a web
   widget rather than as something struck into metal. */
/* The pseudo-element itself. The per-state rules below only swap the background; without
   `content` here there is no box for them to paint into and the stud renders empty. */
#mute-btn::before{ content:""; position:absolute; inset:0 }

/* OFF */
#mute-btn[data-vol="0"]::before{
  background:center/21.6px 21.6px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 9.5v5h3.4l4.6 4V5.5L5.9 9.5H2.5z' stroke='%238a7f6a' stroke-width='1.9'/%3E%3Cpath d='M14.0 8.8L20.4 15.2' stroke='%238a7f6a' stroke-width='1.9'/%3E%3Cpath d='M20.4 8.8L14.0 15.2' stroke='%238a7f6a' stroke-width='1.9'/%3E%3C/svg%3E");
}
/* LOW */
#mute-btn[data-vol="1"]::before{
  background:center/21.6px 21.6px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.09 7.31A7.3 7.3 0 0 1 16.09 16.69' stroke='%232e2209' stroke-width='1.4'/%3E%3Cpath d='M18.39 5.38A10.3 10.3 0 0 1 18.39 18.62' stroke='%232e2209' stroke-width='1.4'/%3E%3Cpath d='M13.79 9.24A4.3 4.3 0 0 1 13.79 14.76' stroke='%230a0807' stroke-width='3.1'/%3E%3Cpath d='M13.79 9.24A4.3 4.3 0 0 1 13.79 14.76' stroke='%23e8c860' stroke-width='1.9'/%3E%3Cpath d='M13.79 9.24A4.3 4.3 0 0 1 13.79 14.76' stroke='%23f7e6b0' stroke-width='0.7' stroke-opacity='.55'/%3E%3Cpath d='M2.5 9.5v5h3.4l4.6 4V5.5L5.9 9.5H2.5z' stroke='%23c9a94e' stroke-width='1.9'/%3E%3C/svg%3E");
}
/* MEDIUM */
#mute-btn[data-vol="2"]::before{
  background:center/21.6px 21.6px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18.39 5.38A10.3 10.3 0 0 1 18.39 18.62' stroke='%232e2209' stroke-width='1.4'/%3E%3Cpath d='M13.79 9.24A4.3 4.3 0 0 1 13.79 14.76' stroke='%230a0807' stroke-width='3.1'/%3E%3Cpath d='M16.09 7.31A7.3 7.3 0 0 1 16.09 16.69' stroke='%230a0807' stroke-width='3.1'/%3E%3Cpath d='M13.79 9.24A4.3 4.3 0 0 1 13.79 14.76' stroke='%23e8c860' stroke-width='1.9'/%3E%3Cpath d='M16.09 7.31A7.3 7.3 0 0 1 16.09 16.69' stroke='%23e8c860' stroke-width='1.9'/%3E%3Cpath d='M13.79 9.24A4.3 4.3 0 0 1 13.79 14.76' stroke='%23f7e6b0' stroke-width='0.7' stroke-opacity='.55'/%3E%3Cpath d='M16.09 7.31A7.3 7.3 0 0 1 16.09 16.69' stroke='%23f7e6b0' stroke-width='0.7' stroke-opacity='.55'/%3E%3Cpath d='M2.5 9.5v5h3.4l4.6 4V5.5L5.9 9.5H2.5z' stroke='%23c9a94e' stroke-width='1.9'/%3E%3C/svg%3E");
}
/* HIGH */
#mute-btn[data-vol="3"]::before{
  background:center/21.6px 21.6px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.79 9.24A4.3 4.3 0 0 1 13.79 14.76' stroke='%230a0807' stroke-width='3.1'/%3E%3Cpath d='M16.09 7.31A7.3 7.3 0 0 1 16.09 16.69' stroke='%230a0807' stroke-width='3.1'/%3E%3Cpath d='M18.39 5.38A10.3 10.3 0 0 1 18.39 18.62' stroke='%230a0807' stroke-width='3.1'/%3E%3Cpath d='M13.79 9.24A4.3 4.3 0 0 1 13.79 14.76' stroke='%23e8c860' stroke-width='1.9'/%3E%3Cpath d='M16.09 7.31A7.3 7.3 0 0 1 16.09 16.69' stroke='%23e8c860' stroke-width='1.9'/%3E%3Cpath d='M18.39 5.38A10.3 10.3 0 0 1 18.39 18.62' stroke='%23e8c860' stroke-width='1.9'/%3E%3Cpath d='M13.79 9.24A4.3 4.3 0 0 1 13.79 14.76' stroke='%23f7e6b0' stroke-width='0.7' stroke-opacity='.55'/%3E%3Cpath d='M16.09 7.31A7.3 7.3 0 0 1 16.09 16.69' stroke='%23f7e6b0' stroke-width='0.7' stroke-opacity='.55'/%3E%3Cpath d='M18.39 5.38A10.3 10.3 0 0 1 18.39 18.62' stroke='%23f7e6b0' stroke-width='0.7' stroke-opacity='.55'/%3E%3Cpath d='M2.5 9.5v5h3.4l4.6 4V5.5L5.9 9.5H2.5z' stroke='%23c9a94e' stroke-width='1.9'/%3E%3C/svg%3E");
}

/* A strike of light on metal when the level changes. One composited filter, no movement, nothing
   that reflows — this is a corner stud, not a set piece. */
@keyframes muteTick{ 0%{filter:brightness(1)} 30%{filter:brightness(1.55)} 100%{filter:brightness(1)} }
#mute-btn.tick::before{ animation:muteTick 160ms ease-out }
@media (prefers-reduced-motion:reduce){ #mute-btn.tick::before{ animation:none } }

/* Focus has to survive the radial gradient, so it rings the stud from OUTSIDE rather than
   recolouring it. This ships on a Deck; the corner control must be reachable without a pointer. */
#mute-btn:focus-visible{
  opacity:1; border-color:var(--leaf, #c9a94e);
  outline:1.5px solid #e8c860; outline-offset:2px;
  box-shadow:inset 0 1px 0 rgba(255,238,206,.22), 0 0 10px rgba(232,200,96,.28);
}

#mute-btn:hover{opacity:1; border-color:var(--leaf, #c9a94e); box-shadow:inset 0 1px 0 rgba(255,238,206,.22), 0 0 10px rgba(232,200,96,.28)}

/* ══════════════════════════ CLOUD SAVE (js/cloud.js, js/ui_cloud.jsx; owner, 2026-11-04) ══
   THE STUD. The volume stud's twin (the same metal, rim, size and gold) standing directly under it,
   on the main menu only. Its glyph is the full-screen stud's way of drawing: a gold stroke on the
   metal. Three faces (cloud.js): an arrow rising into the cloud (not on yet), a check (on and in
   step), a mark (something needs the player), which also warms the rim so it is noticed. It exists
   only where Cloud Save does (deathlaughslast.com and the test site), so itch never shows it. */
#cloud-btn{ display:none }
html:has(.rx-title-screen) #cloud-btn{
  display:flex; align-items:center; justify-content:center; position:fixed; z-index:60; top:65px; right:16px;
  width:43px; height:43px; padding:0; border-radius:50%; opacity:.72; cursor:pointer;
  background:radial-gradient(120% 120% at 32% 26%, #2a241d 0%, #141110 62%, #0a0807 100%);
  border:1px solid #4e4336; box-shadow:inset 0 1px 0 rgba(255,238,206,.16), 0 2px 6px rgba(0,0,0,.6);
  transition:opacity .18s, border-color .18s, box-shadow .18s }
#cloud-btn svg{ width:52%; height:52%; fill:none; stroke:#e8c860; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;
  filter:drop-shadow(0 1px 0 #000) }
#cloud-btn svg .cl-alert{ stroke:#ffb27a; stroke-width:2.3 }
html:has(.rx-title-screen) #cloud-btn:hover, html:has(.rx-title-screen) #cloud-btn:focus-visible{ opacity:1; border-color:var(--leaf, #c9a94e);
  box-shadow:inset 0 1px 0 rgba(255,238,206,.22), 0 0 10px rgba(232,200,96,.28) }
#cloud-btn:focus-visible{ outline:1.5px solid #e8c860; outline-offset:2px }
html:has(.rx-title-screen) #cloud-btn[data-state="alert"]{ opacity:1; border-color:#c98a52; box-shadow:inset 0 1px 0 rgba(255,238,206,.2), 0 0 12px rgba(255,160,90,.35) }
html:has(.rx-title-screen) #cloud-btn.is-busy svg{ animation:cloudBusy 1.2s ease-in-out infinite }
@keyframes cloudBusy{ 0%,100%{ opacity:1 } 50%{ opacity:.45 } }
@media (prefers-reduced-motion:reduce){ html:has(.rx-title-screen) #cloud-btn.is-busy svg{ animation:none } }

/* THE MAIN MENU'S STUDS ARE BIGGER ON A TOUCH SCREEN (owner, 2026-11-04: the volume stud "is rather
   small" on the iPad's main menu). Only on the main menu: in play they keep their sizes, which the
   room and the rail were fitted around. iPad: 43 -> 54px, the volume stud then the cloud then the
   app stud in one column. iPhone: 32 -> 40px, the cloud under the volume stud, the app stud beside
   it as before. The volume glyph is a fixed-size background, so it is scaled with its stud.
   ANOTHER HALF AGAIN, EVERYWHERE (owner, 2026-11-05: "another 50% larger on the main menu"), the
   gaps between studs with them: a desk 43 -> 65px (it had no main-menu size before; the full-screen
   stud is never on a desk, it needs a touch screen), iPad 54 -> 81px. A phone: see below. */
html:has(.rx-title-screen) #mute-btn{ width:65px; height:65px; top:14px; right:16px }
html:has(.rx-title-screen) #mute-btn::before{ background-size:33px 33px }
html:has(.rx-title-screen) #cloud-btn{ width:65px; height:65px; top:91px; right:16px }
html.is-tablet:has(.rx-title-screen) #mute-btn{ width:81px; height:81px; top:14px; right:16px }
html.is-tablet:has(.rx-title-screen) #mute-btn::before{ background-size:41px 41px }
html.is-tablet:has(.rx-title-screen) #cloud-btn{ width:81px; height:81px; top:110px; right:16px }
html.fs-ok.is-tablet:has(.rx-title-screen) #fs-btn, html.fs-app.is-tablet:has(.rx-title-screen) #fs-btn{ width:81px; height:81px; top:206px; right:16px }
/* A PHONE GETS ONE COLUMN TOO, AT 50px (owner, 2026-11-05: the full-screen stud beside the volume
   stud, carried over from the rail in play, looked lopsided at 60px; "perhaps they should be
   smaller"). Three 50px studs with 10px gaps stand 182px tall: well inside the shortest phone's 320. */
html.is-phone:has(.rx-title-screen) #mute-btn{ width:50px; height:50px; top:12px }
html.is-phone:has(.rx-title-screen) #mute-btn::before{ background-size:25px 25px }
html.is-phone:has(.rx-title-screen) #cloud-btn{ width:50px; height:50px; top:72px; right:max(8px, calc(env(safe-area-inset-right) + 6px)) }
html.fs-ok.is-phone:has(.rx-title-screen) #fs-btn, html.fs-app.is-phone:has(.rx-title-screen) #fs-btn{ width:50px; height:50px; top:132px;
  right:max(8px, calc(env(safe-area-inset-right) + 6px)) }
/* A phone is too short for a Dialog's plate (z 200) to clear studs this size: they peeked out from
   under its right edge as cut-off half circles. While a Dialog is up on the main menu they step out. */
html.is-phone:has(.rx-title-screen):has(.rx-dlg-host) #mute-btn,
html.is-phone:has(.rx-title-screen):has(.rx-dlg-host) #cloud-btn,
html.is-phone:has(.rx-title-screen):has(.rx-dlg-host) #fs-btn{ visibility:hidden }

/* THE SCREENS: the Dialog's plate (ui_rx_shared.jsx) with what a Dialog cannot hold. The key is set
   like a coin's inscription, in Cinzel on a dark inlay; a save is a small inlaid card. */
/* THE PLATE NEVER SCROLLS; ITS INSIDE DOES. The rim is pseudo-elements drawn 2px outside the box,
   so a scrolling plate counts them as overflow (2px of scroll on every screen) and scrolls them
   away from the content (seen on an iPhone with its keyboard up). Scrolling the inside keeps the
   rim still around it. */
.cl-dlg .rx-dlg-inner{ max-height:calc(100dvh - 24px); overflow-y:auto; box-sizing:border-box }
/* A touch keyboard is up (ui_cloud.jsx sets .is-kb from the visual viewport): the plate stands at
   the top of what is still visible, above the keyboard, rather than centered behind it. */
.rx-dlg-host.is-kb .rx-dlg-backdrop{ top:var(--cl-vv-top, 0px); bottom:auto; height:var(--cl-vv-h, 100%);
  align-items:flex-start; padding-top:10px; box-sizing:border-box }
.rx-dlg-host.is-kb .cl-dlg{ animation:none }
.rx-dlg-host.is-kb .cl-dlg .rx-dlg-inner{ max-height:calc(var(--cl-vv-h, 100dvh) - 20px) }
/* An iPhone's landscape keyboard leaves about 144px: the plate must FIT, not scroll (its rim is
   drawn by pseudo-elements that scroll with the content and come apart from it). The line saying
   what to type goes, since the field's own placeholder shows a key; the keyboard's Go submits. */
html.is-phone .rx-dlg-host.is-kb .cl-dlg .cl-lead,
html.is-phone .rx-dlg-host.is-kb .cl-dlg .cl-menu{ display:none }   /* Go submits; the menu returns with the keyboard down */
html.is-phone .rx-dlg-host.is-kb .cl-dlg .rx-dlg-inner{ padding-top:12px; padding-bottom:8px }
html.is-phone .rx-dlg-host.is-kb .cl-dlg .rx-dlg-title{ margin-bottom:8px }
/* The stud's glyph before the title (owner, 2026-11-05): the stud's own stroke and gold, sized to the
   title's caps and set on their baseline, so it reads as part of the name rather than as a button */
.cl-title{ display:flex; align-items:center; gap:.45em }
.cl-title-ico{ flex:0 0 auto; display:inline-flex; width:1.25em; height:1.25em; margin-top:-.08em }
.cl-title-ico svg{ width:100%; height:100%; fill:none; stroke:#e8c860; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;
  filter:drop-shadow(0 1px 0 #000) }
.cl-title-ico svg .cl-alert{ stroke:#ffb27a; stroke-width:2.3 }
.cl-lead{ margin:0 0 14px; font-family:'EB Garamond',serif; font-size:17px; line-height:1.45; color:#cfc7b8; max-width:48ch }
/* a button named in a sentence, set as the button is: small engraved caps in gold */
.cl-em{ font-family:'Cinzel',serif; font-weight:700; font-size:.82em; letter-spacing:.08em; text-transform:uppercase; color:#e8c860; white-space:nowrap }
.cl-points{ margin:0 0 22px; padding:0; list-style:none; font-family:'EB Garamond',serif; font-size:16px; line-height:1.4; color:#b9b1a2 }
.cl-points li{ position:relative; padding-left:20px; margin-bottom:7px }
.cl-points li::before{ content:''; position:absolute; left:3px; top:.55em; width:6px; height:6px; transform:rotate(45deg);
  background:#c9a94e; box-shadow:0 0 6px rgba(232,200,96,.45) }
.cl-key{ display:flex; align-items:center; justify-content:space-between; gap:16px; margin:2px 0 14px; padding:14px 18px;
  background:rgba(0,0,0,.38); border:1px solid rgba(201,169,78,.45); border-radius:3px;
  box-shadow:inset 0 2px 8px rgba(0,0,0,.6) }
.cl-key-text{ font-family:'Cinzel',serif; font-weight:700; font-size:30px; letter-spacing:.16em; color:#f0dca0;
  text-shadow:0 1px 0 #000, 0 0 14px rgba(232,200,96,.35); user-select:all; -webkit-user-select:all; white-space:nowrap }
.cl-key.is-small{ justify-content:center; padding:10px 16px } .cl-key.is-small .cl-key-text{ font-size:22px }
.cl-btn,.cl-btn:hover,.cl-btn:focus,.cl-btn:active{
  flex:0 0 auto; font-family:'Cinzel',serif; font-size:13px; letter-spacing:.14em; text-transform:uppercase; color:#e8c860;
  background:linear-gradient(180deg,#332913,#211a0b); border:1px solid rgba(201,169,78,.55); border-radius:3px;
  padding:9px 16px; cursor:pointer; outline:none; transform:none; transition:box-shadow .15s, border-color .15s }
.cl-btn:hover,.cl-btn:focus-visible{ border-color:#e8c860; box-shadow:0 0 12px rgba(232,200,96,.32); color:#fff3d6 }
/* The key's warning, readable (owner, 2026-11-05: "a little difficult to read"): it was #a69c88 italic at
   15px on the plate's ember-lit brown. Now the lead's own ink a step down, a size up, with the shadow the
   plate's other text has. Still italic, so it stays the aside it is. */
.cl-note{ margin:0 0 6px; font-family:'EB Garamond',serif; font-style:italic; font-size:16px; color:#d2c8b3;
  text-shadow:0 1px 0 #000, 0 0 8px rgba(0,0,0,.8) }
/* the "saved just now" line that used to follow it is gone (owner), so the note keeps its own air above
   the menu; a no-connection warning still follows it when there is one */
.cl-note:not(:has(+ .cl-status)){ margin-bottom:16px }
.cl-nb{ white-space:nowrap }       /* "one-time" never breaks at its hyphen */
.cl-status{ margin:0 0 18px; font-family:'EB Garamond',serif; font-size:15px; color:#b9b1a2 }
.cl-msg{ margin:0 0 16px; font-family:'EB Garamond',serif; font-size:16px; color:#f0b3aa }
.cl-input{ display:block; width:100%; box-sizing:border-box; margin:0 0 14px; padding:12px 16px; text-align:center;
  font-family:'Cinzel',serif; font-weight:700; font-size:26px; letter-spacing:.16em; text-transform:uppercase; color:#f0dca0;
  background:rgba(0,0,0,.42); border:1px solid rgba(201,169,78,.5); border-radius:3px; outline:none;
  box-shadow:inset 0 2px 8px rgba(0,0,0,.6) }
.cl-input::placeholder{ color:#5f574a; letter-spacing:.16em }
.cl-input:focus{ border-color:#e8c860; box-shadow:inset 0 2px 8px rgba(0,0,0,.6), 0 0 12px rgba(232,200,96,.3) }
.cl-cards{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:4px 0 18px }
.cl-card{ display:flex; flex-direction:column; gap:3px; padding:14px 16px; background:rgba(0,0,0,.34);
  border:1px solid rgba(201,169,78,.28); border-radius:3px }
.cl-card.is-cloud{ border-color:rgba(201,169,78,.5) }
.cl-card-k{ font-family:'Cinzel',serif; font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:#a8946a; margin-bottom:4px }
.cl-card-main{ font-family:'Cinzel',serif; font-size:17px; color:#f0e3bc }
.cl-card-sub{ font-family:'EB Garamond',serif; font-size:15.5px; color:#cfc7b8 }
.cl-card-at{ font-family:'EB Garamond',serif; font-style:italic; font-size:14.5px; color:#8f8775; margin-bottom:10px }
.cl-card .cl-btn{ margin-top:auto; align-self:flex-start }
/* The Dialog's menu hangs 8px into the plate's bottom padding; in a plate that can scroll, that
   overhang is 2px of scroll on every screen. The same space, as padding instead. */
.cl-menu{ margin-top:4px } .cl-dlg .rx-dlg-menu{ margin-bottom:0 } .cl-dlg .rx-dlg-inner{ padding-bottom:18px }
/* A phone is short: the same screens, tighter, scrolling if they must */
html.is-phone .cl-dlg .rx-dlg-inner{ padding:16px 22px 12px }
html.is-phone .cl-dlg .rx-dlg-title{ font-size:19px; margin-bottom:8px }
html.is-phone .cl-dlg .cl-lead{ font-size:15px; margin-bottom:10px }
html.is-phone .cl-dlg .cl-points{ font-size:14px; margin-bottom:12px } html.is-phone .cl-dlg .cl-points li{ margin-bottom:4px }
html.is-phone .cl-dlg .cl-key{ padding:9px 14px; margin-bottom:10px } html.is-phone .cl-dlg .cl-key-text{ font-size:24px }
html.is-phone .cl-dlg .cl-input{ font-size:22px; padding:9px 12px; margin-bottom:10px }
html.is-phone .cl-dlg .cl-card{ padding:10px 12px } html.is-phone .cl-dlg .cl-cards{ gap:10px; margin-bottom:10px }
html.is-phone .cl-dlg .rx-dlg-menu{ margin:0 -22px 0 }
html.is-phone .cl-dlg .rx-dlg-item{ padding:8px 22px 8px 50px; font-size:15px }
html.is-phone .cl-dlg .rx-dlg-item .rx-caret{ left:24px }

.flash-hit{animation:flash .3s}
@keyframes flash{0%,100%{filter:none}40%{filter:brightness(2.2) drop-shadow(0 0 6px #fff)}}
/* a blow fully eaten by a barrier reads cold and gold, never like a real hit */
.flash-shield{animation:flashshield .34s}
@keyframes flashshield{0%,100%{filter:none}40%{filter:brightness(1.5) drop-shadow(0 0 7px #e8c860)}}
.shake{animation:shake .3s}
@keyframes shake{0%,100%{transform:none}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}


/* ============================================================================
   HERO SELECT — THE VESTING NICHE
   A lancet recess cut into the crypt wall, a vessel lit by one candle, and a
   tally plate hanging beside it. Same iron, same gold leaf, same primitives as
   the title plaque — the opposite operation. See js/ui_heroselect.jsx.
   ========================================================================= */

/* SCROLLS RATHER THAN CLIPS. Centring inside `overflow:hidden` means anything taller than the
   viewport is cut off at BOTH ends with no way to reach it — at 1280x800 that put the rank of
   three, including the selected class, entirely above the top edge. Content-height layouts must
   never be centred in a hidden box; the failure mode is silent and total. */
.hs-screen{
  position:fixed; inset:0; z-index:20; overflow-y:auto; overflow-x:hidden; outline:none;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  padding:clamp(12px,3vh,40px) 0 76px;
}
/* THE FOOTER IS NAVIGATION, NOT DECORATION, so it leaves the centred flow entirely. Measured at
   1280x800 — Deck resolution — the stage was 927px tall in an 800px viewport with overflow
   hidden and no scroll: the Knight was fully off-screen, the selected class was off-screen, and
   Back, the coin and the whole control legend sat 95px below the fold. A player on the target
   hardware could not see what they had selected or how to leave. */
/* IN THE FLOW, not pinned. position:fixed does not resolve against the viewport here — an
   ancestor of the mount point establishes a containing block (a transform or filter somewhere
   above), so a "fixed" footer landed 200px below the fold. In the scroll flow it is always
   reachable, which is the property that actually matters. Worth revisiting if that ancestor is
   ever found. */
.hs-foot{ position:static; justify-content:center; padding-bottom:8px }
.hs-stage{ align-items:stretch }
/* The rank is navigation and must never scroll away; only the detail scrolls, and the action
   sits outside it so DESCEND is always reachable. */
.hs-plate{ display:flex; flex-direction:column; min-height:0 }
.hs-body{ display:flex; flex-direction:column; min-height:0; overflow:hidden }
.hs-detail{ flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain }
.hs-act{ flex:0 0 auto }
/* Visually hidden, still announced. */
.hs-sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap }

/* THE PUSH-IN IS NOT DECORATION — it manufactures the space this screen needs.
   Usable dark real estate in the untransformed key art runs only x 0 -> 0.31.
   scale(1.35) from origin 0% pins source x=0 to screen x=0, so that band maps to
   screen 0 -> 0.42: 42% of the width goes genuinely dark, created out of nothing.
   origin y 40% crops the dead vault off the top and the blown foreground candles
   off the bottom, taking the hottest pixels in the image out of frame.
   It costs no resolution: the CSS already serves a 2560px master above 1700px, so
   1920/1.35 samples 1422 source px into 1920 screen px — still supersampled. */
.hs-backdrop{
  position:absolute; inset:0; z-index:0;
  background-image:url("../assets/menu/key-art-1080.jpg?v=ff34b7c2");
  background-image:image-set(url("../assets/menu/key-art-1080.webp?v=136244ec") type("image/webp"),
                             url("../assets/menu/key-art-1080.jpg?v=ff34b7c2")  type("image/jpeg"));
  background-size:cover; background-position:center;
  transform:scale(1.35); transform-origin:0% 40%;
  /* 1.85 authored here becomes ~2.5px on screen once the scale multiplies it. 2.5 is the knee
     of the specular-suppression curve: isolated bright points in the dark zones drop 34-44%,
     while 30-120px architectural features stay legible — which they must, or the niche has
     nothing to visibly occlude. */
  filter:blur(1.85px);
  animation:hsPushIn 1100ms cubic-bezier(.16,1,.3,1) both;
}
/* Warm-neutral, never violet — the same rule the title obeys. An ELLIPSE rather than the
   title's left-to-right ramp, because this screen's content is a shape rather than a column;
   a linear ramp dark enough at the middle would flatten the left edge to a void. */
.hs-backdrop::before{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(86% 92% at 20% 52%,
      rgba(11,9,8,.72) 0%, rgba(11,9,8,.56) 44%,
      rgba(11,9,8,.20) 74%, rgba(11,9,8,0) 100%),
    linear-gradient(rgba(9,8,12,.28), rgba(9,8,12,.28));
}
.hs-backdrop::after{
  content:""; position:absolute; inset:0;
  background:radial-gradient(112% 88% at 44% 46%, rgba(0,0,0,0) 30%, rgba(0,0,0,.74) 100%);
}
@keyframes hsPushIn{ from{ transform:scale(1.04); filter:blur(0) } to{ transform:scale(1.35); filter:blur(1.85px) } }

.hs-stage{
  position:relative; z-index:1;
  display:flex; align-items:flex-start; gap:0;
  padding:0 max(72px, 4.5vw);
  width:100%; max-width:1680px;
}

/* Aspect-locked. The vh term is mandatory for the same reason --plaque-w carries one: width
   drives height, and without it a short viewport forces a scrollbar and then overflow. */
.hs-niche{
  position:relative; flex:0 0 auto;
  width:clamp(300px, min(33vw, 62vh), 640px);
  aspect-ratio:400 / 534;
  animation:rxPlaqueIn 800ms cubic-bezier(.2,.7,.3,1) 60ms both;
}
.hs-niche-svg{ position:absolute; inset:-13% -17.5%; width:135%; height:126%; overflow:visible }
.hs-surround{ fill:var(--iron-hi, #2a2520) }
.hs-ring{ fill:none; stroke:var(--gold-dim); stroke-width:2 }
.hs-smoke{ animation:hsSmoke 9s ease-in-out infinite }
@keyframes hsSmoke{ 0%,100%{ transform:translateX(0); opacity:.16 } 50%{ transform:translateX(3px); opacity:.07 } }

/* THE VESSEL. Integer scale only — fractional nearest-neighbour makes some source pixels 15px
   wide and others 16, the most reliable way to make pixel art look amateur. */
.hs-vessel-wrap{ position:absolute; left:50%; bottom:9.5%; transform:translateX(-50%); --hero-scale:16 }
.hs-vessel,.hs-vessel-cast{
  width:calc(16px * var(--hero-scale)); height:calc(28px * var(--hero-scale));
  background-size:calc(64px * var(--hero-scale)) auto;   /* 4 frames across */
  background-position:left bottom; background-repeat:no-repeat;
  image-rendering:pixelated;
}
/* Zero blur, one scale-unit offset. A blurred shadow at 16x advertises the source resolution;
   a crisp one reads as deliberate. */
.hs-vessel{
  position:relative; z-index:2;
  filter:drop-shadow(calc(1px * var(--hero-scale)) 0 0 rgba(0,0,0,.55));
  animation:hsVesselIn 520ms ease both;
}
.hs-vessel.is-dark{
  /* Present in the dark and edge-lit, never absent and never greyed. drop-shadow traces the
     alpha, so a zero-blur offset gives exactly a one-pixel warm rim on the candle side. */
  filter:brightness(0) drop-shadow(calc(-1px * var(--hero-scale)) 0 0 rgba(255,178,92,.55));
}
/* A real cast shadow. Blurring THIS is correct — it is a shadow, not the figure. */
.hs-vessel-cast{
  position:absolute; left:0; bottom:0; z-index:1;
  transform-origin:50% 100%; transform:scaleY(-.34) skewX(38deg);
  filter:brightness(0) opacity(.45) blur(2px);
}
@keyframes hsVesselIn{ from{ opacity:0 } to{ opacity:1 } }

/* THE HANGING ASSEMBLY. The title plate is bolted to the wall and cannot move. This one hangs,
   and is swapped when you choose a different vessel — so it may sway, and the sway is earned by
   the construction rather than added as an effect. */
.hs-hang{
  position:relative; z-index:2; flex:1 1 auto;
  margin-left:-25px;                 /* the interlock: the plate's rail passes IN FRONT of the
                                        niche's bolt line, so the two sit at different depths */
  margin-top:-6%;
  max-width:clamp(300px, min(25vw, 46vh), 480px);
  display:flex; flex-direction:column; align-items:center;
}
.hs-chain{ width:40px; height:34px; flex:0 0 auto }
.hs-plate{
  width:100%; transform-origin:50% -6%;
  animation:rxPlaqueIn 800ms cubic-bezier(.2,.7,.3,1) 120ms both;
  transition:transform 900ms cubic-bezier(.2,.9,.25,1);
}
.hs-body{ padding:22px 26px 20px }

/* The rank. This IS the title menu — bare Cinzel, a sliding scythe caret, a letter-spacing tick
   on the active row — because that language is already solved and already learned. */
.hs-rank{ display:flex; flex-direction:column; gap:2px }
.hs-rank-item{
  position:relative; background:none; border:0; box-shadow:none; outline:none;
  display:flex; flex-direction:column; align-items:flex-start; gap:1px;
  padding:7px 10px 7px 26px; text-align:left; width:100%;
}
.hs-rank-item:active{ transform:none }
.hs-caret{ position:absolute; left:2px; top:50%; transform:translateY(-50%); width:15px; height:15px }
.hs-rank-name{
  font-family:'Cinzel',serif; font-size:16.5px; letter-spacing:.15em;
  color:#9a9280; transition:color .18s, letter-spacing .18s;
}
.hs-rank-item.on .hs-rank-name{ color:#fff3d6; letter-spacing:.175em }
.hs-rank-verbs{ font-family:'Cinzel',serif; font-size:11px; letter-spacing:.15em; color:#9a9280 }
.hs-rank-item.on .hs-rank-verbs{ color:var(--gold-dim) }
.hs-rank-item.sealed .hs-rank-name{ font-style:italic }
.hs-rank-item[disabled]{ opacity:.35;}

.hs-detail{ margin-top:12px }
/* Struck in the same metal as the game's own title. That single inheritance is what makes the
   screen feel expensive. */
.hs-name{
  font-family:'Cinzel',serif; font-weight:700; letter-spacing:.10em;
  font-size:clamp(28px,2.6vw,40px); margin:0 0 4px;
}
.hs-role{
  font-family:'EB Garamond',Georgia,serif; font-style:italic; font-size:16px;
  color:#e6dfcf; margin:0 0 10px; line-height:1.35;
}
.hs-fights{ list-style:none; margin:0 0 12px; padding:0 }
.hs-fights li{
  font-family:'EB Garamond',Georgia,serif; font-size:14px; line-height:1.42;
  color:var(--ink); padding-left:12px; position:relative; margin-bottom:3px;
}
.hs-fights li::before{ content:"·"; position:absolute; left:2px; color:var(--gold-dim) }

/* Never a run of text. Struck key over tabular value, the sidebar's own language at scale. */
.hs-tracks{ margin:0 0 12px; border-top:1px solid rgba(201,169,78,.16); padding-top:8px }
.hs-track-row{ display:grid; grid-template-columns:64px 34px 1fr; align-items:center; gap:8px; margin-bottom:4px }
.hs-track-k{ font-family:'Cinzel',serif; font-size:10px; letter-spacing:.16em; color:var(--ink-dim) }
.hs-track-v{ font-family:'EB Garamond',serif; font-size:16px; color:var(--ink); font-variant-numeric:tabular-nums; text-align:right }
.hs-track{ position:relative; height:6px; background:#0b0a10; border-radius:3px; overflow:visible; box-shadow:inset 0 1px 2px rgba(0,0,0,.8) }
.hs-track-fill{ position:absolute; left:0; top:0; bottom:0; border-radius:3px; background:linear-gradient(90deg,#6b5a24,var(--gold)) }
/* Hatched, not a lighter tint — growth must not read as "more of the same colour". */
.hs-track-grow{
  position:absolute; left:0; top:0; bottom:0; border-radius:3px; opacity:.5;
  background:repeating-linear-gradient(135deg, rgba(201,169,78,.55) 0 2px, rgba(0,0,0,0) 2px 5px);
}
/* The comparison lives in the SPACING of these marks, not in the length of the bar. Letters,
   not coloured dots, so it survives greyscale. */
.hs-rival{
  position:absolute; top:-9px; transform:translateX(-50%);
  font-family:'Cinzel',serif; font-size:8px; font-weight:600; color:#8a8374; font-style:normal;
}

.hs-eyebrow{ font-family:'Cinzel',serif; font-size:10px; letter-spacing:.18em; color:var(--ink-dim); margin-bottom:4px }
.hs-kit{ margin-bottom:10px; border-top:1px solid rgba(201,169,78,.16); padding-top:8px }
.hs-kit-row{ display:grid; grid-template-columns:auto auto 1fr; gap:8px; align-items:baseline; margin-bottom:2px }
.hs-kit-name{ font-family:'EB Garamond',serif; font-size:14px; color:var(--ink) }
.hs-kit-cost{ font-family:'Cinzel',serif; font-size:9.5px; letter-spacing:.1em; color:var(--gold-dim) }
.hs-kit-desc{ font-family:'EB Garamond',serif; font-size:12.5px; color:var(--ink-dim); line-height:1.3 }

.hs-act{ margin-top:14px }
.hs-descend{
  position:relative; background:none; border:0; box-shadow:none; outline:none;
  display:block; width:100%; text-align:left; padding:8px 10px 8px 26px;
  font-family:'Cinzel',serif; font-size:16.5px; letter-spacing:.15em; color:var(--leaf,#e8c860);
}
.hs-descend:active{ transform:none }
.hs-descend em{
  display:block; font-family:'EB Garamond',serif; font-style:normal; font-size:12px;
  letter-spacing:0; color:var(--ink-dim); margin-top:3px;
}
.hs-sealed{ color:var(--gold-dim);}
.hs-notyet{ font-family:'Cinzel',serif; font-size:13px; letter-spacing:.16em; color:#6d6659 }

/* A hexagonal coffin plate, hanging off the confirm. The grammar of this screen is things
   hanging from other things, so hanging the second decision off the first says "subordinate"
   without saying "afterthought" — and it puts difficulty literally under DESCEND. Three objects
   on screen, three silhouettes: lancet, tall tally, wide hexagon. */
.hs-tag{
  position:relative; margin-top:22px; width:62%;
  display:flex; align-items:center; justify-content:space-between; gap:6px;
  padding:6px 10px; outline:none;
  background:linear-gradient(180deg, var(--iron-hi,#2a2520), var(--iron-lo,#171410));
  clip-path:polygon(0 50%, 14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%);
  box-shadow:0 0 0 1px rgba(0,0,0,.7), inset 0 1px 0 rgba(201,169,78,.18);
  transition:transform 700ms cubic-bezier(.2,.9,.25,1);
}
.hs-tag.on{ box-shadow:0 0 0 1px rgba(201,169,78,.5), inset 0 1px 0 rgba(201,169,78,.28) }
/* THE MIDDLE IS A BUTTON, and it has to look and behave like the biggest target here: it was a
   passive <span> between two 20px carets, so the obvious thing to click was the only thing that
   did nothing. `flex:1` hands it every pixel the carets do not use. */
.hs-tag-mid{
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  line-height:1; gap:2px; padding:4px 6px; min-height:38px;
  background:none; border:0; outline:none; color:inherit;
  border-radius:3px; transition:background 160ms ease;
}
.hs-tag-mid:hover{ background:rgba(201,169,78,.10) }
.hs-tag-mid:focus-visible{ box-shadow:0 0 0 2px rgba(201,169,78,.55) }
.hs-tag-val{ font-family:'Cinzel',serif; font-size:20px; letter-spacing:.06em; color:var(--leaf,#e8c860) }
/* 20x20 was a decoration-sized hit area on a control players reported as broken. 34x34 clears the
   24px minimum with room for a shaky mouse, without changing the caret glyph itself. */
.hs-tag-step{ background:none; border:0; box-shadow:none; outline:none; padding:2px;
  width:34px; height:34px; position:relative; display:flex; align-items:center; justify-content:center;
  border-radius:3px; transition:background 160ms ease; flex:0 0 auto }
.hs-tag-step:not(:disabled):hover{ background:rgba(201,169,78,.12) }
.hs-tag-step:disabled{ opacity:.35;}

/* AT THE HEAD OF THE RIGHT COLUMN, above the attributes: full width of that column rather than
   62% of the left one, and no top margin because it is now the first thing in its stack. */
/* Spans the column rather than stopping at an arbitrary 420px: the attribute bars below run the
   full width, and a header that stops two thirds of the way across reads as misaligned rather than
   as a narrower object. Also puts the two carets at the far edges, which is where a stepper's
   arrows belong and as far apart as the hit targets can get. */
.hs-tag.hs-tag-top{ width:100%; max-width:none; margin:0 }

/* ---- THE ASCENSION BLOCK, above the attributes -----------------------------------------------
   Closed with the SAME rule that opens Opening Hand (.hs-kit's border-top), so the column reads as
   three banded sections rather than a control floating over a list. */
.hs-asc{
  /* THE RULE IS NOT ON THIS BLOCK. It used to be its border-bottom, so lifting the block took the
     rule with it and opened a 71px gulf above the Health bar. The rule belongs to the boundary
     between the two sections, not to the Ascension box, so it lives on .hs-evidence now and stays
     put while the box rises. */
  text-align:center;
  /* LIFTED INTO THE SPACE ABOVE IT, and the same amount given back below, so the block rises
     while the attributes, the opening hand and BEGIN stay exactly where they were. The pair of
     margins is the point: a bare margin-top would have dragged the whole column up with it and
     undone the anchoring.

     GUARDED BY HEIGHT, because .hs-right is vertically centred and short viewports have no slack
     to lift into. Measured at 1280x720 the block already sits 26px from the top, so a 55px lift
     put its top at -29 and cut the plaque's crown off. The lift only applies where the room
     exists; below that the block simply sits where it did. */
  margin-top:0; margin-bottom:0;
}
/* BIGGER AND BRIGHTER, and scoped to the tag so Opening Hand's eyebrow is untouched. 10px of
   --ink-dim on artwork this busy was a label you had to hunt for. */
.hs-tag .hs-eyebrow{ font-size:13px; letter-spacing:.2em; color:#d8cdb2; margin-bottom:5px }
.hs-tag .hs-tag-val{ font-size:26px; color:#f2dc86; text-shadow:0 1px 0 #000, 0 0 12px rgba(0,0,0,.85) }

/* A FIXED WELL, so stepping the tier cannot move the attributes, the opening hand or BEGIN.
   Height is set for the two-line case, which every tier above 0 produces; the one-line case at
   Ascension 0 centres inside the same box rather than collapsing it. */
.hs-terms-well{
  min-height:3.2em; margin-top:10px;
  display:flex; align-items:center; justify-content:center;
}
/* Block, not the inline-block `.dx-etch` was forcing -- an inline-block cannot centre itself in a
   full-width column, which is why this sat left of a plaque that spans the whole column. The dark
   elliptical aura went with it: it was washing the left of the sentence into the artwork, which is
   what made it unreadable. A plain shadow does the same job evenly across the line. */
.hs-asc .hs-terms{
  display:block; margin:0 auto; max-width:640px; width:100%;
  font-size:17px; line-height:1.5; color:#e4dac2; white-space:normal;
  text-shadow:0 1px 2px #000, 0 0 10px rgba(0,0,0,.95);
}
/* THE SAME opacity:0 BUG, IN THE OTHER PLACE THAT REUSES THIS CARET. `.rx-caret` defaults hidden
   and is revealed per-context; the note further down records this being found once for
   `.hs-rank-item` and fixed only there. The Ascension stepper reuses `.hs-caret` too and was never
   given a reveal, so BOTH its arrows have been invisible since it shipped -- a plaque with a label
   and no affordance, which is exactly what "clicking the Ascension button does nothing" looks
   like from the outside. A rule written for one branch and never extended to its sibling. */
.hs-tag-step .hs-caret{ position:static; transform:scaleX(-1); opacity:1 }
.hs-tag-step.flip .hs-caret{ transform:none; opacity:1 }
/* The DIMMING lives on the button (`.hs-tag-step:disabled`), never on the caret. A second
   opacity on the caret fought the two rules above on equal specificity and settled by source
   order rather than by state, so the left arrow read dim while enabled and the right read bright
   while disabled. One property, one owner. */
/* No plate at all — one etched line on bare artwork, using the treatment that was contrast
   tested to 5.4-11.1:1 against the brightest pixel beneath it. */
.hs-terms{ margin:10px 0 0; font-family:'EB Garamond',serif; font-style:italic; font-size:13px; color:var(--ink-dim); text-align:center; max-width:420px }

.hs-foot{
  position:relative; z-index:2; margin-top:26px;
  display:flex; align-items:center; gap:22px;
}
.hs-back{
  background:none; border:0; box-shadow:none; outline:none;
  font-family:'Cinzel',serif; font-size:13px; letter-spacing:.14em; color:var(--ink-dim);
}
.hs-back:hover{ color:var(--ink) }
.hs-coin{ font-family:'EB Garamond',serif; font-size:14px; color:var(--ink-dim) }
.hs-coin b{ color:var(--gold) }
.hs-legend{ font-family:'Cinzel',serif; font-size:10.5px; letter-spacing:.14em; color:#6d6659 }

/* FOCUS MUST BE VISIBLE. Every interactive element here carried outline:none and nothing
   replaced it — a WCAG 2.4.7 failure, and combined with the Enter bug a keyboard user could
   neither see where focus was nor predict what Enter would do. Mirrors .rx-menu-item. */
.hs-rank-item:focus-visible,.hs-descend:focus-visible,.hs-back:focus-visible,
.hs-tag:focus-visible,.hs-tag-step:focus-visible{
  outline:1px solid var(--leaf,#e8c860); outline-offset:-3px;
}
/* The Ascension row's cursor was a 1px box-shadow HUE CHANGE and nothing else — the one
   colour-only state on the screen, and the dangerous one, because while it holds the cursor the
   arrow keys change difficulty instead of class. It gets a shape and a movement now. */
.hs-tag.on{ transform:translateY(2px) }
.hs-tag.on::before{
  content:""; position:absolute; left:-14px; top:50%; width:0; height:0;
  transform:translateY(-50%);
  border-top:5px solid transparent; border-bottom:5px solid transparent;
  border-left:7px solid var(--gold);
}
.hs-tag-step[disabled]{ opacity:.28;}

/* ---- THE ASCENSION PLAQUE IS CRIMSON (owner, 2026-11-09) ----------------------------------------
   It only exists once a tier is unlocked, so its colour is the news: the one red, lit object on a
   screen of iron and gold. A player who escaped walked past the iron version without seeing it.
   Red, not the Guide's blue, which means "look here" everywhere else.
   Its rims are INSET shadows: the plaque's clip-path cuts off any shadow drawn outside it (a glow
   behind it was tried and never showed, the plaque filling its column at the top of the screen). */
.hs-asc .hs-tag.hs-tag-top{
  background:linear-gradient(180deg, #6a1c1f 0%, #451014 55%, #2c090c 100%);
  box-shadow:inset 0 1px 0 rgba(255,170,140,.38), inset 0 -1px 0 rgba(0,0,0,.55) }
.hs-asc .hs-tag.hs-tag-top.on{ box-shadow:inset 0 1px 0 rgba(255,190,160,.5), inset 0 0 0 1px rgba(232,200,96,.55) }
.hs-asc .hs-tag .hs-eyebrow{ color:#f0cdbd }
.hs-asc .hs-tag .hs-tag-val{ color:#ffd98a; text-shadow:0 1px 0 #000, 0 0 12px rgba(255,120,80,.45) }
.hs-asc .hs-tag-mid:hover{ background:rgba(255,170,140,.12) }
.hs-asc .hs-tag-step:not(:disabled):hover{ background:rgba(255,170,140,.14) }
/* a tier chosen: brighter, rimmed in gold, so a harder run never looks like the default */
.hs-asc.is-up .hs-tag.hs-tag-top, .hs-asc.is-up .hs-tag.hs-tag-top.on{
  background:linear-gradient(180deg, #8a2226 0%, #5c1418 55%, #370b0f 100%);
  box-shadow:inset 0 0 0 2px rgba(232,200,96,.7), inset 0 0 18px rgba(255,150,90,.25) }
/* the Guide's visit: its cold light rims the plaque and breathes, and its line sits in the terms well */
.hs-asc.is-guide .hs-tag.hs-tag-top, .hs-asc.is-guide .hs-tag.hs-tag-top.on{
  animation:hsAscGuide 1.9s ease-in-out infinite }
@keyframes hsAscGuide{
  0%,100%{ box-shadow:inset 0 0 0 2px rgba(var(--guide-glow),.55), inset 0 0 14px rgba(var(--guide-glow),.18) }
  50%{ box-shadow:inset 0 0 0 2px rgba(var(--guide-glow),.95), inset 0 0 26px rgba(var(--guide-glow),.38) } }
.hs-asc.is-guide .hs-tag .hs-eyebrow{ color:var(--guide); text-shadow:0 1px 0 #000, 0 0 10px rgba(var(--guide-glow),.6) }
.hs-asc .hs-terms.is-guide{ color:var(--guide-ink); animation:dxcCoachIn .5s cubic-bezier(.2,.7,.2,1) both }
.hs-asc .hs-terms.is-guide b{ font-style:normal; font-family:'Cinzel',serif; font-size:.82em; letter-spacing:.05em; white-space:nowrap;
  padding-left:.14em; color:var(--guide); text-shadow:0 1px 0 #000, 0 0 10px rgba(var(--guide-glow),.5) }
@media (prefers-reduced-motion: reduce){ .hs-asc.is-guide .hs-tag.hs-tag-top{ animation:none;
  box-shadow:inset 0 0 0 2px rgba(var(--guide-glow),.85), inset 0 0 20px rgba(var(--guide-glow),.3) } }

.hs-modal{ position:fixed; inset:0; z-index:40; display:flex; align-items:center; justify-content:center; background:rgba(4,4,8,.72) }
.hs-modal-box{
  max-width:420px; padding:26px 30px 22px; text-align:center;
  background:linear-gradient(180deg, var(--iron-hi,#2a2520), var(--iron-lo,#171410));
  box-shadow:0 0 0 1px rgba(201,169,78,.35), 0 18px 50px rgba(0,0,0,.8);
}
.hs-modal-box h3{ font-family:'Cinzel',serif; color:var(--gold); margin:0 0 20px; font-size:21px;
  letter-spacing:.04em; line-height:1.25 }
.hs-modal-box p{ font-family:'EB Garamond',serif; color:var(--ink); font-size:14.5px; line-height:1.45; margin:0 0 14px }
/* STACKED, PRIMARY FIRST. Side by side, the decline read as the unlock's equal — and the one
   that actually spends the coin should be the one the eye lands on and the thumb finds. Back sits
   under it, quieter and smaller, which is the shape every confirm in the game already uses. */
.hs-modal-acts{ display:flex; flex-direction:column; gap:4px; align-items:stretch }
.hs-modal-acts .hs-descend{ width:auto; padding-left:10px }
/* THE DIALOG'S BUTTONS ARE DIALOG BUTTONS, not the screen's chrome wearing the same names.
   `.hs-back` is the BACK link in the top-left corner of the hero screen and carries
   `position:absolute; left:…; top:8px; z-index:7` to put it there — so the modal's Cancel was
   yanked out of the dialog and rendered ON TOP of that BACK link, 350px away from the box it
   belongs to. There was no visible way to decline a purchase at all, and the two controls
   overlapped each other in the corner. `.hs-begin` is the full-width BEGIN plate at 26px, which
   is why "Unlock · 25" wrapped its coin glyph onto a second line inside a 435px box.
   Re-scoped rather than renamed so both keep the screen's material and only their LAYOUT is
   local; specificity carries it, so these hold wherever the base rules sit in the cascade. */
/* The full plate, kept: same leaf, same lit top edge, same glow as BEGIN — this is the moment
   the coin is spent and it should feel like the screen's primary act. nowrap because the coin
   glyph wrapping to a second line was what made it look broken at 26px in a 435px box. */
.hs-modal-acts .hs-begin{
  width:100%; padding:15px 24px; font-size:22px; letter-spacing:.18em; white-space:nowrap;
}
.hs-modal-acts .hs-back{
  position:static; left:auto; top:auto; margin:0; z-index:auto; align-self:center;
  font-size:14px; letter-spacing:.16em; padding:11px 16px; line-height:1;
}
/* THE PAD'S CURSOR, drawn on whichever option it sits on. A gold ring rather than a fill: the
   primary is already a gold plate, so filling the highlight would have made "which one is
   selected" and "which one is the primary" the same signal, and the pad user would have had no
   way to tell that Back was armed. Same ring on both, so the cursor reads as the cursor. */
.hs-modal-acts .hs-begin.on{ box-shadow:0 0 0 2px var(--gold), 0 0 0 4px rgba(4,4,8,.9),
  0 0 26px rgba(232,200,96,.45), inset 0 1px 0 rgba(255,248,214,.8) }
.hs-modal-acts .hs-back.on{ color:var(--gold); box-shadow:0 0 0 2px var(--gold); border-radius:2px }

@media (max-width:1280px){
  .hs-vessel-wrap{ --hero-scale:11 }
  .hs-body{ padding:16px 18px 14px }
  .hs-name{ font-size:clamp(24px,2.4vw,32px) }
}
@media (max-width:900px){
  .hs-vessel-wrap{ --hero-scale:8 }
  .hs-stage{ flex-direction:column; align-items:center; gap:18px }
  .hs-hang{ margin-left:0; margin-top:0 }
}
@media (prefers-reduced-motion:reduce){
  .hs-backdrop,.hs-niche,.hs-plate,.hs-vessel{ animation:none }
  .hs-backdrop{ transform:scale(1.35); filter:blur(1.85px) }
  .hs-plate,.hs-tag{ transition:none }
  .hs-smoke{ animation:none }
}

/* --- hero select: art-direction review fixes --------------------------------------------- */

/* P1-7 — percentage margins resolve against the containing block's WIDTH, not its height, so
   -6% became -90px against a 1507px stage and threw the chain and its ring off the top of the
   frame. The chain is the entire justification for a hanging plate; it has to be visible. */
.hs-hang{ margin-top:0 }

/* P1-8 — the push-in uses transform-origin:0% specifically so the manufactured dark band starts
   at screen x=0. A centred max-width stage pushed the niche to x=211 and gave 211px of that
   hard-won darkness away as margin. */
.hs-stage{ max-width:none; margin-right:auto }

/* P0-2 — the surround was a flat, untextured, hard-edged rectangle covering 45% x 99% of the
   screen in one uniform #171412: a box on a picture at the largest scale on screen, burying the
   push-in and scrim behind it. It gets the vertical ramp the material system requires, and its
   outer edge dissolves rather than terminating in corners. */
.hs-surround{ fill:url(#hsWall) }
.hs-niche-svg{ -webkit-mask-image:radial-gradient(120% 108% at 34% 52%, #000 52%, rgba(0,0,0,.55) 74%, rgba(0,0,0,0) 100%);
               mask-image:radial-gradient(120% 108% at 34% 52%, #000 52%, rgba(0,0,0,.55) 74%, rgba(0,0,0,0) 100%) }

/* P1-4 — the sprite is saturated cyan armour with an orange plume. Invisible at 32px in game; at
   448px it is a large teal-and-orange mass on a charcoal-and-gold screen, and the art direction
   doc's own negatives include "no teal grading". Graded into candlelight. */
.hs-vessel,.hs-vessel-cast{ filter:saturate(.62) sepia(.14) brightness(.96) }
.hs-vessel{ filter:saturate(.62) sepia(.14) brightness(.96) drop-shadow(calc(1px * var(--hero-scale)) 0 0 rgba(0,0,0,.55)) }
.hs-vessel.is-dark{ filter:brightness(0) drop-shadow(calc(-1px * var(--hero-scale)) 0 0 rgba(255,178,92,.55)) }
.hs-vessel-cast{ filter:brightness(0) opacity(.45) blur(2px) }

/* P1-4 — the figure filled 36% of a recess specced for 46-55%. Shrink the arch, never grow the
   sprite: 20x would only be blockier. This also shrinks the surround slab above. */
.hs-niche{ width:clamp(280px, min(26vw, 50vh), 520px) }

/* P1-9 — .dx-etch sets nowrap, and 120 characters of NG+ copy ran off its 420px box across the
   artwork unclipped. */
.hs-terms{ white-space:normal }

/* The developer's first reaction on seeing it: "wow, the character is huge". 16 -> 11 is a 31%
   reduction, which also buys back horizontal room in the niche column. Integer scale is still
   mandatory — 11 is a whole number, so no source pixel is wider than its neighbour. */
.hs-vessel-wrap{ --hero-scale:11 }
@media (min-width:1600px) and (min-height:900px){ .hs-vessel-wrap{ --hero-scale:12 } }
@media (max-width:1280px){ .hs-vessel-wrap{ --hero-scale:9 } }
@media (max-width:900px){ .hs-vessel-wrap{ --hero-scale:7 } }

/* --- hero select: developer round 2 ------------------------------------------------------- */

/* "The space the character is in can shrink along with him. It now looks too cavernous. We can
   use that space to enlarge our information panel and the fonts within it."
   The niche was sized for a 16x figure; at 11x it became an empty vault. Shrinking the recess
   and spending the width on the plate is the whole trade. */
.hs-niche{ width:clamp(200px, min(17vw, 34vh), 340px) }
.hs-hang{ max-width:clamp(360px, min(42vw, 78vh), 720px); margin-left:-18px }
.hs-body{ padding:26px 32px 24px }

/* "The fonts are very small and some are hard to read due to low contrast." Everything up a
   step, and every dim grey lifted off --ink-dim (#8a8374, which measures ~4.3:1 on this ground)
   to #b3aa96 (~7.4:1). Labels are not decoration; they are how you read the numbers. */
.hs-rank-name{ font-size:19px }
.hs-rank-verbs{ font-size:12px; color:#a89e88 }
.hs-rank-item.on .hs-rank-verbs{ color:#e0c477 }
.hs-rank-item{ padding:9px 12px 9px 30px }
.hs-rank-top{ display:flex; align-items:baseline; gap:10px; width:100% }
/* Locked classes now say so IN THE LIST — before this the lock and the price appeared only on
   the selected class's action, so scanning the three told you nothing about what you could play. */
.hs-rank-lock{ margin-left:auto; font-family:'Cinzel',serif; font-size:12px; letter-spacing:.08em; color:#9a8f78 }
.hs-rank-lock.afford{ color:var(--gold) }
.hs-rank-item.sealed .hs-rank-name{ font-style:normal; color:#8f8674 }

.hs-name{ font-size:clamp(34px,3.2vw,52px) }
.hs-role{ font-size:18px; color:#efe7d6 }
.hs-fights li{ font-size:16px; line-height:1.5 }
.hs-track-row{ grid-template-columns:82px 40px 1fr; gap:12px; margin-bottom:7px }
.hs-track-k{ font-size:12px; color:#b3aa96 }
.hs-track-v{ font-size:19px }
.hs-track{ height:8px }
.hs-rival{ font-size:9.5px; color:#a89e88; top:-11px }
.hs-eyebrow{ font-size:11.5px; color:#b3aa96 }
.hs-kit-name{ font-size:16px }
.hs-kit-cost{ font-size:11px; color:#c2a44e }
.hs-kit-desc{ font-size:14px; color:#a89e88 }
.hs-coin,.hs-back,.hs-legend{ font-size:13.5px }
.hs-back,.hs-legend{ color:#a89e88 }

/* "BEGIN needs to be a big button that is obvious to the user that it starts the game. Its
   current placement is not obvious or big enough."
   It was a left-aligned text row indistinguishable from the menu items above it. Now it is a
   struck plate with its own edge and ember, the widest thing on the panel — the only element
   here that looks pressable. */
.hs-act{ margin-top:20px; border-top:1px solid rgba(201,169,78,.16); padding-top:18px }
.hs-begin{
  position:relative; display:block; width:100%; text-align:center;
  padding:16px 18px; border:0; outline:none;
  font-family:'Cinzel',serif; font-size:26px; letter-spacing:.22em; color:#1a1510;
  background:linear-gradient(180deg,#f0d98a 0%, var(--gold) 48%, #a8862f 100%);
  box-shadow:0 0 0 1px rgba(0,0,0,.8), 0 0 22px rgba(232,200,96,.30), inset 0 1px 0 rgba(255,248,214,.7);
  transition:filter .16s, box-shadow .16s;
}
.hs-begin:hover,.hs-begin:focus-visible{ filter:brightness(1.08); box-shadow:0 0 0 1px rgba(0,0,0,.8), 0 0 30px rgba(232,200,96,.5), inset 0 1px 0 rgba(255,248,214,.85) }
.hs-begin:active{ filter:brightness(.94) }
.hs-begin em{ display:block; font-family:'EB Garamond',serif; font-style:normal; font-size:13px; letter-spacing:.02em; color:#2a2114; margin-top:4px }
/* Sealed and unaffordable is not a button you can press — it must not look like one. */
.hs-begin.hs-sealed{
  background:none; color:#b3aa96; font-size:17px; letter-spacing:.14em;
  box-shadow:0 0 0 1px rgba(201,169,78,.22);
}
.hs-begin.hs-sealed em{ color:#9a8f78 }

/* --- hero select: IA round 2. The finding that reframed it -------------------------------- */
/* Contrast was no longer the binding constraint — measured against the real plate ramp, the
   BOTTOM rows sat near 11.7:1 and still read worst, because the plate darkens downward. What
   reads as "low contrast" is x-height. EB Garamond measures a 0.43 x-height ratio against the
   0.52-0.55 of a normal UI face, so 14px Garamond has the apparent size of 11px; Cinzel is
   caps-only and 10px yields 6px letterforms. Two floors follow: Garamond never below 15px on
   this plate, Cinzel never below 11px — and Cinzel's tracking must come DOWN as size comes
   down, because display tracking on a small label destroys word-shape and forces the reader to
   spell it out. That is why "Health · Mana · Skill" were hard to read at a perfectly
   respectable 5.15:1. */

.hs-rank-name{ font-size:18px; letter-spacing:.12em; color:#b8b0a0 }
.hs-rank-item.on .hs-rank-name{ letter-spacing:.14em; color:#fff3d6 }
.hs-rank-verbs{ font-size:12px; letter-spacing:.12em; color:#a89f8c }
.hs-rank-item.on .hs-rank-verbs{ color:#e8c860 }
.hs-role{ font-size:18px; color:#e6dfcf }
.hs-fights li{ font-size:16px; color:#cfc7b8 }
/* label quieter, value gold: the number is what you came for, and the two were competing at the
   same weight of grey. */
.hs-track-k{ font-size:12px; letter-spacing:.09em; color:#b8b0a0 }
.hs-track-v{ font-size:18px; color:#e8c860 }
.hs-eyebrow{ font-size:11px; letter-spacing:.14em; color:#a89f8c }
.hs-kit-name{ font-size:16px; color:#cfc7b8 }
.hs-kit-cost{ font-size:11px; letter-spacing:.08em; color:#e8c860 }
.hs-kit-row{ grid-template-columns:auto auto; gap:10px }
.hs-coin{ font-size:15px; color:#b8b0a0 }
/* The ONLY remaining AA failure, at 3.48:1 — and it is the line that teaches gamepad users
   which button does what. */
.hs-legend,.hs-back{ font-size:12px; color:#a89f8c }
.hs-terms{ font-size:15px; color:#a89f8c }
.hs-asc .hs-terms{ font-size:17px; color:#e4dac2 }   /* keeps the Ascension line above the later override */

/* Rival letters measured a 5px x-height — smaller than anything complained about — and on the
   Magic track the Knight and Rogue marks landed 9px apart with 6px glyphs: a smudge, not a
   comparison. Numerals in the gutter give the real value and need no legend. */
.hs-track-row{ grid-template-columns:82px 42px 1fr 104px; gap:12px }
/* 15px, and lining figures: EB Garamond defaults to OLD-STYLE numerals, where 6 and 9 descend
   and 1 sits at x-height, so a rival row set in text figures has the same small-apparent-size
   problem the letters had. */
.hs-vs{ font-family:'EB Garamond',serif; font-variant-numeric:lining-nums; font-size:15px; color:#a89f8c; text-align:right; white-space:nowrap }
.hs-rival{ display:none }
/* At 6px the hatch fitted about two stripes in the bar and read as nothing. */
.hs-track{ height:10px }
.hs-track-grow{ opacity:.75;
  background:repeating-linear-gradient(135deg, rgba(201,169,78,.55) 0 3px, rgba(0,0,0,0) 3px 7px) }
.hs-legend-line{ margin:0 0 8px; font-family:'EB Garamond',serif; font-size:15px; color:#a89f8c }

/* --- hero select: art round 2 -------------------------------------------------------------- */
/* The recess is now 400x470 instead of 400x560. Shrinking the figure 31% without shortening the
   niche is what made it cavernous: a small man at the bottom of a tall empty hole. Together with
   the raised sill he occupies 46% of the recess height, which is the target. */
.hs-niche{ aspect-ratio:400/470 }

/* ZONE C. Etched light on the artwork, no plate. This is the move that lets the type grow: the
   numbers were only small because they had to share a box with everything else. */
.hs-stage{ display:grid; grid-template-columns:auto minmax(0,1fr) minmax(0,1.02fr);
  align-items:center; gap:clamp(18px,2.4vw,46px); justify-content:start }
.hs-evidence{ position:relative; align-self:center; max-width:430px;
  padding:2px 0 2px 4px; animation:hsEvid .24s cubic-bezier(.22,.61,.36,1) both .06s }
@keyframes hsEvid{ from{ opacity:0; transform:translateY(6px) } to{ opacity:1; transform:none } }
/* Unboxed, so it can be read at a real size. */
.hs-evidence .hs-track-k{ font-size:13px }
.hs-evidence .hs-track-v{ font-size:20px }
.hs-evidence .hs-kit-name{ font-size:17px }
.hs-evidence .hs-legend-line,
.hs-evidence .hs-vs{ font-size:15px }
.hs-evidence .hs-track-row{ grid-template-columns:88px 46px 1fr 108px }
.hs-evidence .hs-kit{ margin-top:16px }
.hs-evidence .hs-tracks{ margin:0 }

/* Below 1400px zone C measures ~243px, too narrow to etch type into, so it stops being a third
   column and stacks under the plate in the second one. It does NOT get hidden: these are the
   numbers the choice is made on, and a breakpoint that deletes them is worse than a cramped
   layout at any width. */
@media (max-width:1399px){
  .hs-stage{ grid-template-columns:auto minmax(0,1fr); align-items:start }
  .hs-evidence{ grid-column:2; grid-row:2; max-width:none; margin-top:14px;
    justify-self:center; width:100% }
  .hs-hang{ grid-column:2; grid-row:1 }
  .hs-niche{ grid-row:1/span 2; align-self:center }
}

/* The plate no longer needs to hold the numbers, so it stops being a receipt. */
.hs-hang{ max-width:clamp(340px, min(34vw,62vh), 560px) }

/* THE SELECTION MOMENT. The candle finds someone new - light moves, nothing anchored does. */
.hs-niche .rx-ember,
.hs-niche .hs-candle{ transition:opacity .32s ease-out, filter .32s ease-out }
.hs-niche.is-flare .rx-ember{ opacity:1; filter:brightness(1.6) saturate(1.15);
  transition-duration:.14s }
.hs-niche.is-flare .hs-candle{ filter:brightness(1.55); transition-duration:.14s }
/* Opacity ONLY on the vessel. Anything that moves it re-opens the anchored-object problem that
   has cost this screen three rounds. */
.hs-vessel{ animation:hsVessel .22s ease-out both .14s }
@keyframes hsVessel{ from{ opacity:0 } to{ opacity:1 } }
.hs-intaglio{ opacity:.85 }

/* The plate carried none of the material layers, which is precisely why it read as a web panel
   with a border rather than a hanging iron sign. */
.hs-body{ position:relative; isolation:isolate }
.hs-body > .rx-grain,
.hs-body > .rx-wear,
.hs-body > .rx-ember,
.hs-body > .rx-ember-slow{ position:absolute; inset:0; pointer-events:none; border-radius:inherit }
.hs-body > .hs-rank,
.hs-body > .hs-detail,
.hs-body > .rx-strap{ position:relative; z-index:1 }

/* The agent computed --hero-scale:11 against a 405px-wide niche. Ours is the SHRUNK niche the
   developer asked for, so its sill fix - correct for its own composition - stacked on top of a
   shrink we had already made and pushed the figure to 98% of the recess height: he was touching
   the arch. The 46% fill target belongs to a large recess. A compact portrait niche wants
   70-80%, which reads as framed rather than either cavernous or crammed. Keep his 31% smaller
   figure; give the recess back the width to sit in. */
.hs-niche{ width:clamp(230px, min(21vw,40vh), 356px) }
@media (min-width:1600px){ .hs-vessel-wrap{ --hero-scale:13 } }

/* In the folded layout the evidence ran to x=0.93, straight through the seam and the chalice -
   art the composition marks as never-touch. Cap it to the plate it now sits under. */
@media (max-width:1399px){ .hs-evidence{ max-width:470px } }

/* Zone C precedes the plate in the DOM (it is inserted before .hs-hang), so source order alone
   put the STATS in column 2 and pushed the plate out to x=0.94 - through the seam and the
   chalice, and with the reading order inverted: numbers before the name they belong to. Place
   both explicitly rather than relying on source order. */
@media (min-width:1400px){
  .hs-niche{ grid-column:1 }
  .hs-hang{ grid-column:2 }
  .hs-evidence{ grid-column:3 }
}
/* 13 put the figure at 88% of the recess - crammed again. */
@media (min-width:1600px){ .hs-vessel-wrap{ --hero-scale:11 } }

/* The composition reserves everything right of 0.74 for untouched art - the seam at 0.83 and the
   chalice at 0.824. A 560px plate pushed the evidence column out to 0.877, straight over the
   chalice. The plate no longer holds the numbers, so it does not need that width; its verdict
   lines run 69/65/50 characters, which is already ideal measure and gets WORSE if widened. */
@media (min-width:1400px){
  .hs-hang{ max-width:clamp(320px, min(25vw,52vh), 430px) }
  .hs-evidence{ max-width:clamp(290px, 20vw, 340px) }
}

/* fr columns are FREE-SPACE shares, not content sizes: column 3 was allotted ~621px for 336px of
   content, so the evidence floated out to 0.821 with a 173px hole between it and the plate. The
   three zones are content-sized and packed from the left; the whole point of the composition is
   that the space LEFT OVER stays as art, not that it gets divided up. */
.hs-stage{ grid-template-columns:auto auto auto }
@media (max-width:1399px){ .hs-stage{ grid-template-columns:auto auto } }

/* Zone C precedes the plate in the DOM, so grid SPARSE auto-placement put the evidence in column
   3 and then refused to place the plate back in column 2 - the cursor had already passed it - and
   started a second row. The stage silently became 414px + 704px of rows and the three zones
   stopped sharing a baseline entirely. Explicit row, not just explicit column. */
@media (min-width:1400px){ .hs-niche,.hs-hang,.hs-evidence{ grid-row:1 } }

/* --- ONE COLUMN: THE ALCOVE CAPS THE PLATE -------------------------------------------------
   The alcove and the plaque were two free-floating objects side by side, and no amount of
   aligning them was going to stop them reading as two things - which is what 'disjointed' kept
   pointing at. Stacked, the alcove becomes the head of the plate and the pair reads as one
   carved object: figure above, verdict below. The chain goes, because a plate joined to the
   stone it hangs under is not hanging from anything. */
.hs-stage{ grid-template-columns:auto auto; align-items:center;
  column-gap:clamp(20px,2.6vw,54px); row-gap:0 }
.hs-niche   { grid-column:1; grid-row:1; justify-self:center; align-self:end }
.hs-hang    { grid-column:1; grid-row:2 }
.hs-evidence{ grid-column:2; grid-row:1/span 2; align-self:center }
@media (min-width:1400px){
  .hs-niche{ grid-column:1; grid-row:1 }
  .hs-hang { grid-column:1; grid-row:2 }
  .hs-evidence{ grid-column:2; grid-row:1/span 2 }
}
/* The two must share a width to read as one column. The alcove is the narrower head, centred on
   the plate's axis - a pediment, not a second panel of the same size. */
.hs-hang{ width:clamp(320px, min(26vw,46vh), 440px); max-width:none }
.hs-niche{ width:72%; margin:0 auto -2px; }
.hs-chain{ display:none }

/* The surround was a hard-edged grey RECTANGLE sitting on the artwork - the single most pasted-on
   thing on the screen. Now that the alcove caps the plate it wants the plate's own material and
   its own edges, so it stops being a box and becomes the head of the object. */
.hs-surround{ fill:url(#hsWall) }
.hs-niche-svg{ display:block }

/* The four material layers went on full-bleed and washed the whole plate warm; on the title
   screen they are localised glows over near-black. Grain and wear are the material and stay.
   The embers are light, and light belongs at the candle in the alcove, not smeared over the
   text you are trying to read. */
.hs-body > .rx-ember     { opacity:.28 }
.hs-body > .rx-ember-slow{ opacity:.20 }

/* Stacking doubles the column height, so the alcove has to be sized against the VIEWPORT rather
   than against the plate: at 960px tall the pair came to 977 and ran off the bottom. */
.hs-niche{ width:clamp(170px, min(62%, 26vh), 320px); justify-self:center; margin:0 0 -2px }

/* THE FIGURE IS SIZED BY THE ALCOVE, not by a pixel ladder. --hero-scale was a fixed px multiple
   while the alcove is now clamped against vh, so the two drifted apart at every viewport and the
   hero ended up 105% of the recess that is supposed to contain him - the third time this pair has
   gone out of step this session. Percentage of the recess cannot drift. */
.hs-vessel-wrap{ height:60%; width:auto }
.hs-vessel{ height:100%; width:auto; aspect-ratio:16/28; background-size:400% 100%;
  image-rendering:pixelated }

/* --- THE BARS ARE THE POINT ----------------------------------------------------------------
   These were a secondary readout squeezed into a plate. As the developer put it, the bar
   presentation is what makes this look professional, so it stops being a footnote and becomes
   the second object on the screen. Bigger track, bigger numbers, room to breathe between rows.
   Seven rows at this rhythm stand ~340px tall, which the freed height can carry. */
.hs-evidence .hs-tracks{ margin:0; border-top:0; padding-top:0 }
.hs-evidence .hs-track-row{
  grid-template-columns:104px 54px minmax(0,1fr) 46px; gap:16px; margin-bottom:11px }
.hs-evidence .hs-track-k{ font-size:13px; letter-spacing:.10em; color:#b8b0a0 }
.hs-evidence .hs-track-v{ font-size:23px; color:#e8c860 }
.hs-evidence .hs-track{ height:16px; border-radius:2px;
  background:linear-gradient(180deg,#07060a 0%,#0d0c12 100%);
  box-shadow:inset 0 2px 3px rgba(0,0,0,.9), inset 0 -1px 0 rgba(255,244,222,.05),
             0 0 0 1px rgba(0,0,0,.75) }
/* Struck metal, not a progress bar: a bright top edge, a warm body, a dark foot. */
.hs-evidence .hs-track-fill{ border-radius:1px;
  background:linear-gradient(180deg,#f4e2a4 0%,#e8c860 34%,#b48f33 78%,#7d611f 100%);
  box-shadow:0 0 10px rgba(232,200,96,.28), inset 0 1px 0 rgba(255,250,228,.75) }
.hs-evidence .hs-track-grow{ opacity:.5;
  background:repeating-linear-gradient(135deg, rgba(201,169,78,.62) 0 3px, rgba(0,0,0,0) 3px 8px) }

/* THE TICK IS THE LEGEND. The hatch now terminates in a hard vertical rule with the level-ten
   number sitting immediately past it, so a row reads "14 now, reaching 22" without a caption
   underneath telling you how to read a bar. */
.hs-track-tick{ position:absolute; top:-3px; bottom:-3px; width:2px; margin-left:-1px;
  background:linear-gradient(180deg, rgba(201,169,78,.15), rgba(201,169,78,.85), rgba(201,169,78,.15)) }
.hs-track-then{ font-family:'EB Garamond',serif; font-variant-numeric:lining-nums; font-size:15px;
  color:#9a917f; text-align:left; white-space:nowrap }

/* --- LEAVING: THE ENTRANCE, UNWOUND -------------------------------------------------------- */
/* THE UNWIND MUST BE AN ANIMATION, not a transform. hsPushIn runs with fill-mode BOTH, so the
   animation keeps holding the backdrop's transform after it finishes; a plain transform:scale(1)
   on .is-leaving loses to it every time and nothing moves. Replacing the animation is the only
   thing that wins. Ends at scale(1) - true full size, slightly wider than the 1.04 the entrance
   starts from - because 'zooming back to full scale' is the whole point. */
@keyframes hsPullOut{
  from{ transform:scale(1.35); filter:blur(1.85px) }
  to  { transform:scale(1);    filter:blur(0) }
}
.hs-screen.is-leaving .hs-backdrop{ animation:hsPullOut 620ms cubic-bezier(.7,0,.84,0) both }
/* The furniture goes first and faster, so the last thing on screen is the artwork at full size
   rather than a plate shrinking on top of it. */
.hs-screen.is-leaving .hs-stage,
.hs-screen.is-leaving .hs-foot{ opacity:0; transform:translateY(6px);
  transition:opacity .2s ease-in, transform .2s ease-in; pointer-events:none }
@media (prefers-reduced-motion:reduce){
  .hs-screen.is-leaving .hs-backdrop{ animation:none }
  .hs-screen.is-leaving .hs-stage,.hs-screen.is-leaving .hs-foot{ transition:none }
}

/* THE BARS HAD 3px OF WIDTH. The evidence column was capped at 340px back when it held text;
   the row grid spends 104+54+46 on fixed columns plus 48 of gaps, so the 1fr track that IS the
   chart was left with the remainder - about three pixels. Every DOM check I ran measured the
   bar HEIGHT and passed. A bar chart whose bars have no length is not a small styling miss, it
   is the entire content of the panel missing, and it took a rendered screenshot to see it. */
@media (min-width:1400px){
  .hs-evidence{ max-width:none; width:clamp(420px, 38vw, 660px) }
}
@media (max-width:1399px){ .hs-evidence{ max-width:none; width:100% } }
.hs-evidence .hs-track{ min-width:120px }

/* SKILL POINTS is twice the set width of SKILL and wrapped the label column onto two lines,
   which broke the row rhythm for every row below it. */
.hs-evidence .hs-track-row{ grid-template-columns:150px 54px minmax(0,1fr) 46px }

/* Cinzel is caps-only, so 13px yields roughly 8px letterforms - the same x-height trap that made
   this block read as "too small" the first time. */
.hs-evidence .hs-track-k{ font-size:15px; letter-spacing:.09em }
.hs-evidence .hs-track-row{ grid-template-columns:168px 56px minmax(0,1fr) }
/* Room for the level-ten number to sit past the end of a bar that runs the full width. */
.hs-evidence .hs-tracks{ padding-right:56px }
.hs-evidence .hs-track{ overflow:visible }

/* THE NUMBER ANNOTATES THE BAR IT BELONGS TO. Right-aligned in a gutter it was a tidy column
   with no visible connection to any particular bar; parked at the end of the hatch it labels the
   thing it describes, and the ragged right edge that results is itself the shape of how much
   each stat grows. */
.hs-track-then{
  position:absolute; top:50%; transform:translateY(-50%); margin-left:11px;
  font-family:'EB Garamond',serif; font-variant-numeric:lining-nums; font-weight:400;
  font-size:16px; color:#9a917f; white-space:nowrap; pointer-events:none }

/* TWO SWATCHES, NOT A SENTENCE. The caption this replaces asked the player to hold "solid" and
   "hatched" in mind and map them onto a bar. A filled chip beside a striped chip is the same
   information with nothing to remember. */
.hs-track-key{
  display:flex; gap:26px; align-items:center; margin:14px 0 0; padding-top:12px;
  border-top:1px solid rgba(201,169,78,.14) }
.hs-key-item{ display:inline-flex; align-items:center; gap:9px;
  font-family:'EB Garamond',serif; font-size:15px; color:#a89f8c }
.hs-key-sw{ display:inline-block; width:30px; height:15px; border-radius:2px;
  box-shadow:inset 0 1px 0 rgba(255,250,228,.5), 0 0 0 1px rgba(0,0,0,.7) }
.hs-key-sw.is-now{
  background:linear-gradient(180deg,#f4e2a4 0%,#e8c860 34%,#b48f33 78%,#7d611f 100%) }
/* Same channel + same hatch as a bar, so the chip is literally a sample of the bar rather than
   an approximation of it. */
.hs-key-sw.is-then{
  background:repeating-linear-gradient(135deg, rgba(201,169,78,.62) 0 3px, rgba(0,0,0,0) 3px 8px),
             linear-gradient(180deg,#07060a 0%,#0d0c12 100%) }

/* --- footer out of the vertical flow -------------------------------------------------------
   At 1680x960 the whole footer sat at y=967 - BELOW THE FOLD. Main menu, the coin and the entire
   gamepad legend required a scroll, on the primary target resolution, on a screen whose own CSS
   comment records this being fixed once already. It also cost 70px of the column budget it was
   pushing off the screen. Taking it out of flow fixes the usability bug and pays for the
   restructure at the same time.
   Back goes TOP-LEFT: that is where back lives, and down beside BEGIN it was competing for the
   same reading position as the one control that starts the run. */
.hs-foot{ display:contents }
.hs-back{
  position:absolute; left:max(72px,4.5vw); top:26px; z-index:6;
  display:inline-flex; align-items:center; gap:8px }
.hs-coin,.hs-legend{
  position:absolute; right:max(72px,4.5vw); bottom:26px; z-index:6; white-space:nowrap }
.hs-coin{ bottom:52px }
.hs-screen{ padding-top:26px; padding-bottom:26px }

/* .rx-ember-slow was authored as PERCENTAGES against the title plaque's short body. On a 611px
   plate, 46% of the height is a 281px y-radius, so its influence runs from y=347 to the foot -
   the bottom 43% of the plate - which is the real reason the lower half reads warmer and lighter.
   Two rounds were spent dialling its OPACITY down, which dims a boundary uniformly and can never
   remove one that is a function of height. Absolute units cannot re-scale. */
.hs-body > .rx-ember-slow{
  background:radial-gradient(300px 130px at calc(100% + 18px) calc(100% - 34px),
                             rgba(255,170,80,.30), rgba(255,170,80,0) 100%);
  opacity:1 }

/* --- ONE PANEL, TWO COLUMNS ---------------------------------------------------------------
   The alcove is now the HEAD of the identity panel rather than an object stacked above it, so
   there is a single box with a single background ramp and a single pair of gold rails running
   its whole height. The tan rectangle is gone because the thing that drew it is gone: a
   full-viewBox rect with the arch punched out of it, i.e. a positive slab laid on the painting,
   which is the exact inverse of a recess cut into iron. */
.hs-niche{ position:relative; width:100%; margin:0; aspect-ratio:400/430; z-index:1;
  border-radius:0 }
.hs-niche-svg{ position:absolute; inset:0; width:100%; height:100%; overflow:visible }
.hs-body{ overflow:visible }
.hs-plate{ overflow:hidden; border-radius:inherit }

/* The strap divides identity from selector and overhangs both rails, so it reads as a strap
   bolted across the panel rather than a rule drawn inside it. */
.hs-body > .rx-strap{ position:relative; z-index:3; margin:16px -14px 14px }

.hs-stage{ grid-template-columns:auto auto; align-items:start }
.hs-niche,.hs-hang,.hs-evidence,.hs-right{ grid-row:auto }
.hs-hang{ grid-column:1; grid-row:1 }
.hs-right{ grid-column:2; grid-row:1; display:flex; flex-direction:column;
  align-items:stretch; gap:34px; padding-top:8px }
.hs-evidence{ position:relative; max-width:none; width:100% }
@media (min-width:1400px){
  .hs-hang{ grid-column:1; grid-row:1 }
  .hs-right{ grid-column:2; grid-row:1 }
  .hs-evidence{ max-width:none; width:100% }
}

/* BEGIN floats. It is attached to nothing, which is the point: it is not part of the evidence,
   it is what you do once you have read it. */
.hs-commit{ display:flex; justify-content:center; width:100% }
.hs-begin{ width:auto; min-width:340px; padding:20px 54px; font-size:27px; letter-spacing:.24em }
.hs-begin em{ display:none }
.hs-begin.is-locked{
  background:linear-gradient(180deg,#2a2620 0%,#1d1a15 48%,#12100c 100%);
  color:#8c8371;
  box-shadow:0 0 0 1px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,248,214,.07) }
.hs-begin.is-locked:hover,.hs-begin.is-locked:focus-visible{
  filter:none; color:#a89f8c;
  box-shadow:0 0 0 1px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,248,214,.10) }

/* An auto grid column shrink-wraps to max-content, and a 1fr track inside contributes ZERO to
   that - the same trap that gave the bars 3px last time, one level up. The right column gets an
   explicit width so the bars have length to be measured by. */
.hs-stage{ grid-template-columns:clamp(340px,26vw,430px) clamp(430px,40vw,660px);
  justify-content:start; align-items:start }
.hs-right{ width:100% }
.hs-hang{ width:100%; max-width:none }

/* The alcove at 400/430 stood 470px tall on its own and pushed the selector off the bottom of a
   960px screen. 400/300 is the block proportion the recess was drawn for. */
.hs-niche{ aspect-ratio:400/300 }
.hs-vessel-wrap{ height:74% }

/* The column must fit the viewport, not merely start inside it. */
.hs-screen{ overflow:hidden }
.hs-hang{ max-height:calc(100vh - 52px) }

/* --- THE PANEL IS THE ARCH -----------------------------------------------------------------
   Until now the arch was drawn INSIDE a rectangular plate, so the column still presented a
   straight horizontal top edge across the widest object on screen — which is the "rectangle on a
   painting" read, undiluted, and no amount of texture fixes it. The plate is now MASKED to the
   lancet itself: head at the top, jambs running straight down into the body, one silhouette from
   apex to foot. It also retires the argument about bolting on a separate crown cap, because the
   panel no longer has a top edge for a cap to cover. */
.hs-stage{ --hs-pw:clamp(300px, 23vw, 392px);
  grid-template-columns:var(--hs-pw) clamp(430px,40vw,660px) }
.hs-hang{ width:var(--hs-pw) }
.hs-niche{ aspect-ratio:1/1 }          /* the head is 400x400 in its own units */

.hs-plate{
  /* Two mask layers: the lancet head, then a plain rectangle for everything below it. The head
     layer is exactly as tall as the panel is wide, matching the 400x400 viewBox, so
     preserveAspectRatio="none" cannot distort the curve. */
  --cap-h:var(--hs-pw);
  -webkit-mask-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 330' preserveAspectRatio='none'%3E%3Cpath d='M0,330 L0,290 C0,164 80,51 200,10 C320,51 400,164 400,290 L400,330 Z' fill='%23fff'/%3E%3C/svg%3E"),
    linear-gradient(#000,#000);
          mask-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 330' preserveAspectRatio='none'%3E%3Cpath d='M0,330 L0,290 C0,164 80,51 200,10 C320,51 400,164 400,290 L400,330 Z' fill='%23fff'/%3E%3C/svg%3E"),
    linear-gradient(#000,#000);
  -webkit-mask-size:100% var(--cap-h), 100% calc(100% - var(--cap-h) + 1px);
          mask-size:100% var(--cap-h), 100% calc(100% - var(--cap-h) + 1px);
  -webkit-mask-position:top left, bottom left;
          mask-position:top left, bottom left;
  -webkit-mask-repeat:no-repeat, no-repeat;
          mask-repeat:no-repeat, no-repeat;
  border-radius:0; overflow:visible;
}
/* The gold edge must be able to sit ON the mask boundary, so it cannot be clipped by it. */
.hs-niche{ overflow:visible; z-index:2 }
.hs-niche-svg{ overflow:visible }
/* The body's own rails pick the jambs up where the arch stops curving and carry them to the foot. */
.hs-body{ position:relative }
.hs-body::before,.hs-body::after{
  content:""; position:absolute; top:var(--cap-h); bottom:0; width:1px; z-index:3;
  background:linear-gradient(180deg, rgba(201,169,78,.34), rgba(201,169,78,.16) 70%, rgba(201,169,78,.06)) }
.hs-body::before{ left:0 }
.hs-body::after{ right:0 }

/* --- THE GOLD FRAME, RESTORED ---------------------------------------------------------------
   Masking the panel to the lancet clipped every stroke that was supposed to sit ON the mask
   boundary, so the arch head kept its Edge and the whole body below it lost the frame. The fix
   is not to weaken the mask - it is to draw the frame OVER the panel rather than inside it. */
.hs-plate{ position:relative; overflow:visible }

/* Rails matched to Edge rather than the faint hairline they had become: a lit inner line with a
   dark line outboard of it, which is what makes the title's plates read as bevelled iron rather
   than as a div with a border. */
.hs-body::before,.hs-body::after{
  content:""; position:absolute; top:calc(var(--cap-h) - 2px); bottom:0; width:2px; z-index:4;
  background:linear-gradient(90deg, rgba(0,0,0,.85) 0 1px, rgba(214,180,92,.85) 1px 2px) }
.hs-body::after{ background:linear-gradient(90deg, rgba(214,180,92,.85) 0 1px, rgba(0,0,0,.85) 1px 2px) }
.hs-body::before{ left:0 }
.hs-body::after{ right:0 }
/* The foot hangs below the masked body and overhangs both rails{
  position:absolute; left:-17.5%; width:135%; top:100%; margin-top:-2px;
  aspect-ratio:540/100; overflow:visible; z-index:5; pointer-events:none }
.hs-hang{ padding-bottom:calc(var(--hs-pw) * 0.185) }

.hs-hang{ position:relative }
/* The springing sits at y=290 of a 400-unit head{ top:calc(var(--cap-h) * 0.66); aspect-ratio:540/66 }

/* --cap-h was declared on .hs-plate, but the frame overlays are children of .hs-hang, so the var
   resolved to nothing and calc() collapsed them to the top of the screen. It belongs on the
   common ancestor. */
.hs-hang{ --cap-h:var(--hs-pw); padding-bottom:calc(var(--hs-pw) * 0.20) }
/* Anchor the foot's TOP to the panel's bottom edge{ top:calc(100% - var(--hs-pw) * 0.20 - 2px); bottom:auto }

/* The foot cap adds its own height below the panel, which pushed the column past the viewport
   and clipped the last verdict line behind the strap. The alcove is sized off the panel width,
   so narrowing the column slightly buys the height back from the head rather than from the text. */
.hs-stage{ --hs-pw:clamp(290px, 21vw, 356px) }

/* The head loses 70 units of straight JAMB - the arch itself is untouched, so rise/span stays at
   0.70. That is where the height for the third verdict line comes from; taking it out of the
   type would have undone the readability work, and squashing the arch would have undone the
   lancet. */
.hs-stage{ --hs-pw:clamp(320px, 23vw, 386px) }
.hs-hang{ --cap-h:calc(var(--hs-pw) * 0.825) }
.hs-niche{ aspect-ratio:400/330 }
.hs-vessel-wrap{ bottom:9%; height:70% }

/* --- round: six corrections ---------------------------------------------------------------- */

/* 3 — THE HERO'S CAST SHADOW GOES. It was a drop-shadow on the sprite itself, so it fell outside
   the recess and down across the class name beneath - a shadow thrown by a figure standing in a
   niche cannot land on the panel in front of the niche. The contact shadow under his feet stays;
   that one is inside the recess and is what keeps him standing on the sill rather than floating. */
.hs-vessel{ filter:saturate(.62) sepia(.14) brightness(.96) }
.hs-vessel.is-dark{ filter:brightness(0) }

/* 4 — FIXED SECTION HEIGHTS. The three classes carry role lines and verdict bullets of different
   lengths, so every cursor move re-laid the whole column and the panel jumped. Reserving the
   worst case means the frame, the strap and the selector never move: only the words inside them
   change, which is what makes a cursor feel like it is moving over one object rather than
   rebuilding it. */
.hs-role{ min-height:82px; margin-bottom:0 }
.hs-fights{ min-height:206px; margin-top:10px }
.hs-detail{ min-height:0 }

/* 5 — FILL AT THE FOOT. .rx-body's ramp bottoms out at #0b0a09, which against dark artwork is
   indistinguishable from nothing at all, so the selector looked like it was sitting on the
   painting rather than on the panel. The ramp now holds a floor. */
.hs-body{ background:linear-gradient(180deg,#171412 0%,#131110 42%,#141210 78%,#181513 100%) }

/* 6 — THE STRAP OVERHANGS, AS IT DOES ON THE MAIN MENU. It could not, because .hs-plate is
   MASKED and a mask clips the overhang exactly like overflow:hidden would. Widening the mask's
   rectangle layer past the panel lets the strap run beyond both rails again - that overhang is
   the whole difference between a strap bolted across a plate and a rule drawn inside one. */
.hs-plate{
  -webkit-mask-size:100% var(--cap-h), 300% calc(100% - var(--cap-h) + 1px);
          mask-size:100% var(--cap-h), 300% calc(100% - var(--cap-h) + 1px);
  -webkit-mask-position:top left, center bottom;
          mask-position:top left, center bottom;
}
.hs-body > .rx-strap{ margin-left:-22px; margin-right:-22px; width:auto }

/* 1 — and the frame runs unbroken from apex to foot. */
.hs-body::before,.hs-body::after{ top:calc(var(--cap-h) - 1px) }

/* --cap-h WAS DECLARED TWICE. .hs-hang sets it to width x 0.825 (the head's real aspect) and
   .hs-plate re-declared it as plain width, which wins on the element that carries the mask. So
   the arch MASK stood 386px tall while the arch DRAWING stood 318px - the silhouette and the art
   have been out of register by 68px, which is a large part of why the frame never looked like it
   belonged to the picture. One declaration, on the shared ancestor. */
.hs-plate{ --cap-h:calc(var(--hs-pw) * 0.825) }

/* Reserved heights are MEASURED now, not guessed. Natural maxima across the three classes are
   role 48px and verdict 148px; the 82 and 206 I reserved on the last pass were invention, and
   they pushed the third verdict line straight out of the panel. */
.hs-role{ min-height:50px }
.hs-fights{ min-height:150px }

/* The strap was NARROWER than the plate - 361 against 380 - because -22px of margin could not
   clear .hs-body's own 31.5px of padding, let alone overhang. It now runs past both rails, the
   way the main menu's straps do. */
.hs-body > .rx-strap{ margin-left:-46px; margin-right:-46px; width:auto }

/* Opening hand reads as one sentence per ability: what it is, what it costs, what it does. The
   cost sits hard against the name because it belongs to it - pushed out to a far column it read
   as a separate quantity and the eye had to pair them up. */
.hs-evidence .hs-kit-row{
  display:grid; grid-template-columns:auto auto minmax(0,1fr); align-items:baseline;
  column-gap:10px; margin-bottom:6px }
.hs-evidence .hs-kit-name{ font-size:17px; color:#e6dfcf }
.hs-evidence .hs-kit-cost{ font-size:11px; letter-spacing:.08em; color:#e8c860; white-space:nowrap }
.hs-evidence .hs-kit-desc{
  font-family:'EB Garamond',serif; font-size:15px; color:#a89f8c; padding-left:6px }

/* The column measured 925px of content inside a 908px cap, so the Occultist and the Rogue - the
   two with the longest verdict text - lost the bottom of their third line. Reserving the text
   height was correct and insufficient: the reservation guarantees the sections do not MOVE, not
   that the column FITS. Three shavings, each with a reason rather than a guess:
     - the foot padding reserved 0.20 of the width while the cap's visible shape occupies 0.175
       (BASE_D fills y 0..70 of a 100-unit viewBox), so 9.6px of it was reserving nothing;
     - the verdict list carried a 10px top margin under a role block that already has its own
       bottom spacing;
     - the panel's foot padding was set for a panel that ended in a button rather than in a
       selector row that brings its own.
   Total 26px, against a 17px overflow. */
.hs-hang{ padding-bottom:calc(var(--hs-pw) * 0.175) }
.hs-fights{ margin-top:4px }
.hs-body{ padding-bottom:22px }

/* THE ARCH MUST SPAN THE PANEL, NOT THE PANEL'S TEXT COLUMN. .hs-niche sat inside .hs-body's
   horizontal padding, so it drew 205px tall while --cap-h reserved 264px from the panel width -
   the mask and the drawing out of register again, by a different route than last time. The head
   is full-bleed now, so cap-h and the drawn arch are the same number by construction. */
.hs-body{ --pad:30px; padding-left:var(--pad); padding-right:var(--pad) }
.hs-niche{ margin-left:calc(-1 * var(--pad)); margin-right:calc(-1 * var(--pad));
  width:calc(100% + 2 * var(--pad)) }

/* COMPACT TIER. At 1280x800 the column needs 762px of a 748px box even before the head is
   corrected, and the verdict text wraps to 174px against the 150px that fits at 1680. Reserving
   more would overflow further, so the type steps down instead - the alternative is clipping the
   third verdict line, and a line the player cannot read is worse than one set a point smaller. */
@media (max-width:1500px), (max-height:900px){
  .hs-stage{ --hs-pw:clamp(286px, 22vw, 320px) }
  .hs-name{ font-size:36px }
  .hs-role{ font-size:16px; min-height:44px }
  .hs-fights li{ font-size:15px; line-height:1.42 }
  .hs-fights{ min-height:152px }
  .hs-rank-name{ font-size:16px }
  .hs-rank-verbs{ font-size:11px }
  .hs-rank-item{ padding-top:7px; padding-bottom:7px }
  .hs-body{ --pad:24px }
}

/* Narrowing the panel in the compact tier was backwards: a narrower column wraps the verdict
   text to MORE lines, so it bought head height and spent more than it bought. The compact tier
   now goes the other way - a wider column so the text wraps less, a smaller display name, and a
   tighter selector - and the head gives up the rest. The arch itself is never squashed; only the
   straight jamb below the springing changes, so rise/span stays 0.70 at every size. */
@media (max-width:1500px), (max-height:900px){
  .hs-stage{ --hs-pw:clamp(330px, 27vw, 372px) }
  .hs-name{ font-size:32px; letter-spacing:.04em }
  .hs-role{ font-size:15px; min-height:40px }
  .hs-fights li{ font-size:14px; line-height:1.4 }
  .hs-fights{ min-height:128px }
  .hs-rank-item{ padding-top:5px; padding-bottom:5px }
  .hs-rank-name{ font-size:15px }
  .hs-rank-verbs{ font-size:10px }
  .hs-body{ --pad:22px; padding-bottom:16px }
  .hs-hang{ padding-bottom:calc(var(--hs-pw) * 0.16) }
}

/* --- round: nine corrections ---------------------------------------------------------------- */

/* 3 — THE SCROLLBAR. .hs-detail carries overflow-y:auto from when this panel had to scroll; a
   box with overflow-y:auto computes overflow-x as auto too, so the moment the Occultist's longer
   verdict text overflowed it produced a horizontal scrollbar inside the panel. The heights are
   reserved now, so nothing needs to scroll and nothing may. */
.hs-detail{ overflow:hidden !important; overscroll-behavior:auto }

/* 4 — THE PANEL MUST NOT RESIZE. min-height only guarantees a floor; the Occultist and Rogue
   exceed it at some widths and the panel grew. Fixed height, and the overflow is handled by
   dropping a line rather than by moving the frame. */
.hs-role{ height:50px; min-height:0 }
.hs-fights{ height:152px; min-height:0; overflow:hidden }

/* 8 — THIRD BULLET GOES AT 1280x800 ONLY. Three classes of verdict text will not fit beside a
   lancet head in 800px, and a line clipped in half is worse than a line not shown. */
@media (max-width:1400px) and (max-height:860px){
  .hs-fights li:nth-child(3){ display:none }
  .hs-fights{ height:104px }
}

/* 2 — FILL AT THE FOOT, properly this time. The ramp ended at #181513, which against dark
   artwork still read as nothing. The selector now sits on iron that is plainly lighter than the
   crypt behind it. */
.hs-body{ background:linear-gradient(180deg,#1b1714 0%,#191512 38%,#1d1815 74%,#221c17 100%) }

/* 5 — NOTHING PAINTS OUTSIDE THE ARCH. .hs-niche-svg was overflow:visible so the recess fills and
   the ember wash bled past the outline as a halo above the apex. The viewBox gains 8 units of
   margin so the Edge stroke still has room, and everything else is clipped to the arch. */
.hs-niche-svg{ overflow:hidden }
.hs-niche{ overflow:visible }

/* 6/7/9 — the rails, now drawn with Edge, run from the arch's springing to the foot. */
.hs-rails{
  position:absolute; left:0; width:100%; top:calc(var(--cap-h) - 1px);
  height:calc(100% - var(--cap-h) + 2px); z-index:5; pointer-events:none; overflow:visible }
.hs-body::before,.hs-body::after{ display:none }
/* The strap sits ABOVE the rails so its ends read as passing over the frame, which is what the
   main menu does; underneath, it looked severed. */
.hs-body > .rx-strap{ z-index:6 }

/* A fixed height stops the panel resizing, but 152px was the wrong number: the Occultist needs
   176px at 1680. Reserving the true worst case costs 24px, so 39px comes back out of the
   decoration - display name, selector rhythm, foot reserve - rather than out of the text. */
.hs-fights{ height:176px }
.hs-name{ font-size:38px }
.hs-rank-item{ padding-top:6px; padding-bottom:6px }
.hs-body{ padding-bottom:16px }
.hs-hang{ padding-bottom:calc(var(--hs-pw) * 0.16) }

/* --- ONE SHELL ------------------------------------------------------------------------------
   The panel is no longer a masked div with a frame drawn over it in three pieces. It is one SVG
   path - arch, jambs, tapered foot - filled and stroked once, with the HTML content laid over
   it. That kills the two seams by removing the joins, and it kills the whole class of register
   bug that cost this screen three rounds: the fill and the outline are literally the same path,
   so they cannot drift apart. */
.hs-plate{
  position:relative; overflow:visible; border-radius:0;
  -webkit-mask-image:none; mask-image:none;
  padding-bottom:64px;                       /* the base taper lives here */
}
.hs-shell{ position:absolute; inset:0; width:100%; height:100%; z-index:0; overflow:visible;
  pointer-events:none }
/* The body is now layout only — the shell carries the material. */
.hs-body{ position:relative; z-index:1; background:none; overflow:visible }
.hs-body > .rx-grain,.hs-body > .rx-wear{ display:none }   /* CapTexture does this on the path */
.hs-hang{ padding-bottom:0 }

/* Nothing masks the panel any more, so the strap simply overhangs, the way the main menu's does.
   Above the shell in z so its ends read as passing over the frame rather than being cut by it. */
.hs-body > .rx-strap{ position:relative; z-index:4; margin-left:-40px; margin-right:-40px }

/* The recess sits inside the shell's head. */
.hs-niche{ position:relative; z-index:2 }

/* ORDER, not value: the unconditional .hs-fights{height:176px} added for the 1680 worst case was
   appended AFTER the compact media query, so it won at 1280x800 too and the column overflowed
   again. The compact reservation has to come last. */
@media (max-width:1400px) and (max-height:860px){
  .hs-fights li:nth-child(3){ display:none }
  .hs-fights{ height:110px }
  .hs-role{ height:44px }
  .hs-name{ font-size:32px }
}

/* Two bullets at 1280 wrap to two lines each; 110px held four lines minus the item gaps. */
@media (max-width:1400px) and (max-height:860px){ .hs-fights{ height:132px } }

/* THE ACTUAL CLIPPER. .hs-body is a flex column and .hs-detail is flex:1 1 auto with
   min-height:0, so it SHRANK below its own content and cut it - which is why raising the
   reserved height on .hs-fights kept doing nothing. I have been tuning a number that was never
   the constraint. The identity block takes its natural height now; the reservations keep that
   height identical across the three classes, which is what stops the panel resizing, and the
   column fits because the compact tier drops the third verdict line. */
.hs-detail{ flex:0 0 auto; overflow:visible !important }
.hs-fights{ overflow:visible }

/* With two bullets at two lines each the block needs ~88px; 132 was reserving 44px of nothing,
   which is what pushed the selector off the bottom once the flex shrink stopped hiding it. */
@media (max-width:1400px) and (max-height:860px){ .hs-fights{ height:108px } }

/* THE GLOW ABOVE THE APEX. .rx-ember and .rx-ember-slow are inset:0 on .hs-body - a full
   RECTANGLE - and once the mask came off there was nothing left to clip them to the arch, so
   they washed the corners either side of the head. The shell's CapTexture carries the material
   now; these were doubling it anyway. */
.hs-body > .rx-ember,.hs-body > .rx-ember-slow{ display:none }

/* THE STRAP CROSSES THE FRAME, exactly as the main menu's does: .rx-strap there is
   margin:12px -40px, i.e. 40px past the plate edge, drawn above the rails so it reads as bolted
   ACROSS the plate. .hs-body carries 30px of padding, so -70px puts the ends the same 40px past
   the gold. */
.hs-body > .rx-strap{ margin-left:-70px; margin-right:-70px; width:auto; z-index:4 }

/* Measured at 1680: the tallest verdict block is 150px (Occultist and Rogue), not the 176 I
   reserved from a narrower measurement - 26px of dead air under every class, which is the
   'nothing comes close to using that space' note. */
.hs-fights{ height:152px }

/* 56px of bare jamb ran below the last selector row before the taper began - the vertical lines
   extending too far. The taper is full width for its first 24 of 70 units, so content only needs
   to clear the last 46; 64px of padding was reserving 20px of nothing and stretching the jambs
   through it. */
.hs-plate{ padding-bottom:44px }

/* --- round: five ---------------------------------------------------------------------------- */

/* 1 — THE CRESCENT AT THE APEX. .hs-body carried 26px of padding-top, so the recess began 44px
   BELOW the arch the shell draws from the plate's top edge. The gap between them is the band of
   bare panel face showing above the room. Both now start at the same line, and the shell's arch
   and the recess arch are the same curve at the same scale, so they coincide exactly. The
   identity block takes its own top spacing instead. */
.hs-body{ padding-top:0 }
.hs-niche{ margin-top:0 }
.hs-detail{ margin-top:18px }

/* 2 — THE GLOW OFF THE TOP OF THE SCREEN. .dx-etch-aura is inset -660px/-688px around the stats
   column, which makes it 990x903 starting at y=-196 - it ran off the top of the viewport and
   past the panel. It is a scrim for etched type, not a light source, so it is bound to the block
   it backs. */
/* AND THE REST OF THE FIX. Setting `inset` alone did not bind it: the base `.dx-etch-aura` also
   carries width:150%, height:210% and transform:translate(-50%,-50%), and an explicit width beats
   the `right` half of an inset shorthand. So the scrim stayed 150% of this block's width and was
   then shifted left by 75% of it and up by 105% of its height -- landing squarely over the
   Ascension plaque above, which is what put a dark wash across the left of that whole section and
   made the description unreadable. Measured with a solid red test fill: 130 at the plaque's left
   edge against 255 at its centre, on a colour that should be 255 everywhere.
   Cancel the sizing and the transform too, so the rectangle the inset describes is the rectangle
   that paints. */
.hs-evidence > .dx-etch-aura{
  inset:-40px -60px -40px -60px;
  left:-60px; top:-40px; width:auto; height:auto; transform:none;
}

/* 3 — THE STRAP OVERHANG MATCHES THE MAIN MENU. Measured there: body 414px, strap 441px, so 14px
   past the edge on each side. Mine was 39px. .hs-body carries 30px of padding, so -44px lands on
   the same 14px. */
.hs-body > .rx-strap{ margin-left:-44px; margin-right:-44px }

/* 4 — the foot strap sits above the shell, like the one above the selector. */
.hs-strap-foot{ margin-top:16px; margin-bottom:0; z-index:5 }


/* THE GLOW OUTSIDE THE PANEL, at last. .rx-body carries an inset box-shadow -
   rgba(255,196,116,.42) -22px 0 22px -20px inset - candlelight raking the plate's right edge.
   On the main menu the plate IS a rectangle so it lands on the plate. Here .hs-body is still a
   rectangle while the panel is an arch, and with the mask gone the glow ran the full height of
   that rectangle, up past the springing and out of the silhouette to the top of the screen.
   The shell carries the material now, so the body should paint nothing at all. */
.hs-body{ box-shadow:none }

/* --- light, and the selection wash ---------------------------------------------------------- */

/* The ember layers are SVG paths now, so the .rx-ember CSS background is inert and only the
   animation applies — which is all that is wanted. But the earlier blanket display:none was
   written for the DIV layers and would kill these too. */
.hs-shell .rx-ember,.hs-shell .rx-ember-slow{ display:block }

/* 4 — THE SELECTION WASH, copied from the main menu rather than invented. .rx-menu-item::before
   is a radial anchored to the row's left edge, faded out by 64% — "a wash, not a highlight bar",
   as the title screen's own comment puts it, because a rect with a hard terminus reads as a
   listbox row on a photograph. Same gradient, same timing, so moving the cursor feels identical
   on both screens. */
.hs-rank-item{ position:relative }
.hs-rank-item::before{
  content:""; position:absolute; inset:-4px 0; opacity:0; pointer-events:none;
  transition:opacity .24s;
  background:radial-gradient(92% 128% at 0% 50%,
             rgba(255,178,92,.16), rgba(255,178,92,.05) 38%, transparent 64%);
}
.hs-rank-item.on::before,.hs-rank-item:hover::before{ opacity:1 }
.hs-rank-top,.hs-rank-verbs{ position:relative }

/* The dead air under the last verdict line becomes breathing room INSIDE the block instead of
   being handed back. The flavour line was sitting on top of the first bullet with 4px between
   them, and the bullets were tighter than the leading inside them - so the block read as one
   dense paragraph rather than a sentence followed by three findings.
   The column has exactly 0px of slack, so every pixel spent here is taken from the 28px that
   sat between the box and the strap: the strap's own top margin, and the trailing margin under
   the last bullet, which was spacing against nothing. */
.hs-fights li:last-child{ margin-bottom:0 }
.hs-body > .rx-strap{ margin-top:8px }
.hs-detail{ margin-top:12px }

.hs-role{ margin-bottom:16px }
.hs-fights{ margin-top:0 }
.hs-fights li{ margin-bottom:11px }

/* The extra 14px the breathing room needs comes out of the recess FLOOR, not out of the spacing
   just added and not out of the arch: apex 10 and springing 290 are untouched, so rise/span
   stays 0.70 and the recess still registers with the shell outline. Decoration yields to text. */
.hs-niche{ aspect-ratio:400/315 }
.hs-fights{ height:166px }

/* The rule above the swatches fenced them off from the bars they explain, so the key read as a
   separate block rather than as part of the chart. */
.hs-track-key{ border-top:0; padding-top:2px; margin-top:10px }

/* BEGIN MUST NOT MOVE. The opening hand runs to three rows for the Occultist, two for the
   Knight and one for the Rogue, so the button was rising and falling by two rows as the cursor
   moved - the one control on the screen that has to stay put. Reserving the three-row worst
   case pins it, the same reasoning as the verdict block on the left. */
/* 106, not 104: the Occultist measures 105 and I had reserved one pixel under it. */
.hs-evidence .hs-kit{ height:106px; overflow:visible }

/* The right column centres on the left panel rather than hanging from its top edge. */
.hs-stage{ align-items:center }
.hs-right{ align-self:center; padding-top:0 }

/* The lock and its price were 12px Cinzel - the smallest thing on the panel, and the one piece
   of information that decides whether a row is even choosable. */
.hs-rank-lock{ font-size:15px; letter-spacing:.06em }

/* THE HIGHLIGHT REACHES THE PANEL EDGE, as the main menu's does. There, .rx-menu-item is
   width:100% of a .rx-body with ZERO horizontal padding, so the wash runs rail to rail. Here the
   rows sat inside .hs-body's 30px padding, so the wash stopped 30px short on both sides and read
   as a floating chip rather than a lit row. The rows now cancel that padding and take it back as
   their own, so the text does not move - only the lit area grows. */
.hs-rank{ margin-left:calc(-1 * var(--pad)); margin-right:calc(-1 * var(--pad)) }
.hs-rank-item{ padding-left:calc(var(--pad) + 26px); padding-right:calc(var(--pad) + 10px) }
.hs-caret{ left:calc(var(--pad) + 2px) }

/* THE CARET WAS THERE ALL ALONG, at opacity 0. .rx-caret defaults hidden and the main menu
   reveals it with .rx-menu-item.on .rx-caret; this screen only ever RENDERED it conditionally
   and never wrote the reveal, so it sat invisible in the right place. Measured: 32px from the
   row edge, 9px off the name - the spacing was already correct. */
.hs-rank-item.on .hs-caret{ opacity:1 }

/* --- main menu: the wash reaches the rails, matching the hero select --------------------------
   .rx-inner pads 26px and .rx-menu only pulled 14px of it back, so every menu row stopped 12px
   short of the gold on both sides and the lit area read as a chip floating inside the plate
   rather than as the row itself being lit. Cancelling the full 26px and giving it back as the
   row's own padding means the LABEL does not move - the row centres its text, so symmetric
   padding is invisible - while the wash, the hover state and the focus ring all now run rail to
   rail. This is the hero select's treatment brought back to the screen it was copied from. */
.rx-menu{ margin-left:-26px; margin-right:-26px }
.rx-menu-item{ padding-left:28px; padding-right:28px }

/* Straddles the recess ledge rather than sitting below it: half the strap height up, so the
   ledge line runs through its middle and the band reads as bolted across the join. */
.hs-strap-head{ margin-top:-7px; margin-bottom:2px; z-index:6 }

/* .hs-body is a flex column, so a 14px strap with no shrink guard gets compressed to a line -
   which is exactly what it looked like: a rule with two bolts on it rather than a band. */
.hs-body > .rx-strap{ flex:0 0 auto }
.hs-strap-head{ margin-top:-8px; margin-bottom:6px }

/* Two corrections in one rule.
   SPECIFICITY: .hs-strap-head could never win against .hs-body > .rx-strap{margin-top:8px} - two
   classes plus a combinator against one - so the -8px I wrote was silently discarded and the
   strap kept the +8px. Matching that specificity is what makes the value stick.
   POSITION: measured in PIXELS rather than from the DOM, because getBoundingClientRect on the
   ledge path reports its unclipped geometry (354) while it actually paints at 329 - the SVG
   clips it. Scanning every row for a gold spike found the true line: R-B of 90 against ~30 for
   its neighbours. Strap centre 355 -> 329 is 26px up, so 8 - 26 = -18. */
/* -18 overshot: the painted band landed at 312-327 with the ledge at 329, so the line sat
   just under its bottom edge. The band is 14px of paint plus border and shadow, and its painted
   extent is not its layout box - hence measuring the band in pixels rather than trusting the
   margin arithmetic. Down 10px puts 329 through its middle. */
.hs-body > .rx-strap.hs-strap-head{ margin-top:-8px; margin-bottom:8px }

/* --- the exit no longer snaps ---------------------------------------------------------------
   TWO causes, and the second is why it read as "snapping back INTO PLACE" rather than merely
   stopping hard.

   1. THE IMAGE CHANGED AT THE SWAP. .hs-backdrop was pinned to the 1080 asset while
      .menu-backdrop steps up to the 2560 one above 1700px - and their URLs carry different
      cache-busting queries, so they are different files even at the same tier. The moment
      onBack() replaced the DOM the art jumped sharpness. Same tiers, same URLs, no pop.

   2. THE EASING ARRIVED AT FULL SPEED. cubic-bezier(.7,0,.84,0) is the exact mirror of the
      entrance, which is mathematically "played backwards" and perceptually wrong here: the
      mirror of an ease-OUT is an ease-IN, and an ease-in ends at maximum velocity. The entrance
      can do that because it decelerates into rest; an exit that hits full speed and then cuts to
      another screen reads as a snap. It now accelerates away and settles into rest, and onBack
      fires 90ms AFTER the motion stops so the eye sees the image come to rest before the screen
      changes rather than at the same instant. */
@media (min-width:1100px), (min-width:560px) and (min-resolution:2dppx){
  .hs-backdrop{
    background-image:url("../assets/menu/key-art-1080.jpg?v=ff34b7c2");
    background-image:image-set(url("../assets/menu/key-art-1080.webp?v=136244ec") type("image/webp"),
                               url("../assets/menu/key-art-1080.jpg?v=ff34b7c2")  type("image/jpeg"));
  }
}
@media (min-width:1700px), (min-width:900px) and (min-resolution:2dppx){
  .hs-backdrop{
    background-image:url("../assets/menu/key-art.jpg?v=c61ce289");
    background-image:image-set(url("../assets/menu/key-art.webp?v=10fdb36f") type("image/webp"),
                               url("../assets/menu/key-art.jpg?v=c61ce289")  type("image/jpeg"));
  }
}
.hs-screen.is-leaving .hs-backdrop{ animation:hsPullOut 700ms cubic-bezier(.45,0,.15,1) both }

/* BACK lives under BEGIN now, not in the top-left corner where it crowded the arch. */
.hs-commit{ flex-direction:column; align-items:center; gap:0 }
.hs-back{
  position:static; margin-top:34px;            /* a real gap under the primary, not a nudge */
  font-family:'Cinzel',serif; font-size:26px; letter-spacing:.16em; text-transform:uppercase;
  color:#8c8371; background:none; border:0; padding:8px 18px;
  transition:color .18s, letter-spacing .18s }
.hs-back:hover,.hs-back:focus-visible{ color:#e8c860; letter-spacing:.185em }

/* BACK returns to the top-left, at 21px (26 less 20%). Pushed nearer the true corner than it sat
   originally - max(32px,1.8vw) rather than max(72px,4.5vw) - because the complaint about that
   corner was never the corner itself, it was sitting close enough to the arch to feel attached
   to the panel. Out at the frame edge it reads as chrome. */
.hs-back{
  position:absolute; left:max(32px,1.8vw); top:24px; margin-top:0; z-index:7;
  font-size:21px; letter-spacing:.14em; padding:6px 10px }

/* Collapse the button's own leading before positioning it: at line-height 1.5 plus 6px of top
   padding, most of the 26px gap between the glyphs and the panel apex was empty box, not
   placement. With the box tight to the type, top: is the glyph position. */
.hs-back{ line-height:1; padding:0 10px; top:8px }

/* --- THE DIALOG ------------------------------------------------------------------------------
   Same iron, same gold edge, same candlelight as every other object in the game, so an overlay
   reads as part of the world rather than as the browser interrupting it. */
.rx-dlg-host{ position:fixed; inset:0; z-index:200 }
.rx-dlg-backdrop{
  position:fixed; inset:0; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(120% 120% at 50% 50%, rgba(4,4,7,.62), rgba(4,4,7,.86));
  animation:rxDlgFade .18s ease-out both }
@keyframes rxDlgFade{ from{ opacity:0 } to{ opacity:1 } }

.rx-dlg{
  position:relative; width:min(560px, 88vw); padding:0; overflow:visible;
  border-radius:3px;
  /* the plate ramp, verbatim */
  background:linear-gradient(180deg,#171412 0%,#100e0c 48%,#0b0a09 100%);
  box-shadow:0 26px 60px -12px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.9);
  animation:rxDlgIn .22s cubic-bezier(.16,1,.3,1) both }
@keyframes rxDlgIn{ from{ opacity:0; transform:translateY(10px) scale(.985) } to{ opacity:1; transform:none } }

/* The gold rim, as Edge draws it elsewhere: a dark stroke outboard of a lit one. */
.rx-dlg::before,.rx-dlg::after{ content:''; position:absolute; inset:0; border-radius:3px;
  pointer-events:none }
.rx-dlg::before{ border:2px solid rgba(0,0,0,.85); margin:-2px }
.rx-dlg::after { border:1px solid rgba(201,169,78,.72);
  box-shadow:inset 0 1px 0 rgba(255,246,214,.20) }

.rx-dlg-grain,.rx-dlg-wear,.rx-dlg-ember,.rx-dlg-glow{
  position:absolute; inset:0; border-radius:3px; pointer-events:none }
/* Candlelight from the right, on the plaque's own keyframes so every lit surface in the game
   breathes together. */
.rx-dlg-ember{ background:linear-gradient(270deg, rgba(255,186,104,.30) 0%,
                                          rgba(255,186,104,.09) 16%, transparent 44%) }
.rx-dlg-glow { background:radial-gradient(300px 150px at calc(100% + 20px) calc(100% - 30px),
                                          rgba(255,170,80,.26), transparent 70%) }

.rx-dlg-inner{ position:relative; z-index:2; padding:30px 34px 26px }
.rx-dlg-title{
  margin:0 0 14px; font-family:'Cinzel',serif; font-size:23px; letter-spacing:.09em;
  color:#e8c860; text-transform:none }
.rx-dlg-body{
  margin:0 0 26px; font-family:'EB Garamond',serif; font-size:17px; line-height:1.5;
  color:#cfc7b8; max-width:46ch }

/* The menu, in the language both other screens use. */
.rx-dlg-menu{ display:flex; flex-direction:column; margin:0 -34px -8px }
.rx-dlg-item{
  position:relative; display:flex; align-items:center; justify-content:flex-start;
  width:100%; padding:12px 34px 12px 62px; text-align:left;
  background:none; border:0; outline:none;
  font-family:'Cinzel',serif; font-size:17px; letter-spacing:.14em; text-transform:uppercase;
  color:#9a9280; transition:color .18s, letter-spacing .18s }
.rx-dlg-item::before{
  content:''; position:absolute; inset:-2px 0; opacity:0; pointer-events:none;
  transition:opacity .24s;
  background:radial-gradient(92% 128% at 0% 50%,
             rgba(255,178,92,.16), rgba(255,178,92,.05) 38%, transparent 64%) }
.rx-dlg-item.on{ color:#fff3d6; letter-spacing:.165em }
.rx-dlg-item.on::before,.rx-dlg-item:hover::before{ opacity:1 }
.rx-dlg-item.on.danger{ color:#f0c98a }
.rx-dlg-item.off,.rx-dlg-item.off:hover,.rx-dlg-item.off:active{
  color:#6d675a; cursor:default; box-shadow:none; transform:none }
.rx-dlg-item.off:hover::before{ opacity:0 }
.rx-dlg-item .rx-caret{ position:absolute; left:32px; top:50%; margin-top:-7.5px;
  width:15px; height:15px; opacity:1 }

/* --- THE DECREE: the dialog's plate, set as a document rather than a menu ----------------------
   Centered, because it is a statement with one answer, not a list to choose from. Four voices in
   strict order: the name of what is acting (small, dim, spaced caps, the way Purgatory names its
   pages), the moment (the dialog's own gold title), the line in the world's voice (italic, warm),
   and the plain rule (upright, the body ink). The gold rule between title and words is the seal. */
.rx-decree{ width:min(540px, 88vw); text-align:center }
.rx-decree-inner{ padding:30px 44px 0 }
.rx-decree-kicker{ font-family:'Cinzel',serif; font-size:12.5px; letter-spacing:.26em;
  text-transform:uppercase; color:#a89f8c; margin:0 0 10px }
.rx-decree-title{ font-size:27px; letter-spacing:.07em; margin:0 }
/* a hairline each side of a lozenge, both fading to nothing at the ends, so it reads as a mark
   pressed into the plate rather than a divider ruled across it */
.rx-decree-rule{ display:flex; align-items:center; justify-content:center; gap:10px; margin:15px auto 17px; width:62% }
.rx-decree-rule i{ flex:1; height:1px }
.rx-decree-rule i:first-child{ background:linear-gradient(90deg, transparent, rgba(232,200,96,.62)) }
.rx-decree-rule i:last-child{ background:linear-gradient(270deg, transparent, rgba(232,200,96,.62)) }
.rx-decree-rule b{ width:7px; height:7px; transform:rotate(45deg); background:#e8c860;
  box-shadow:0 0 6px rgba(232,200,96,.55) }
/* BALANCED, not greedy: centred copy that wraps greedily leaves one word alone on the last line
   ("Threshold." did, at 1:1), and a lone word under a centred block reads as a mistake. */
.rx-decree-flavor{ margin:0 auto 12px; font-family:'EB Garamond',serif; font-style:italic;
  font-size:20px; line-height:1.4; color:#e6dac2; max-width:40ch; text-wrap:balance }
.rx-decree-plain{ margin:0 auto 24px; font-family:'EB Garamond',serif; font-size:16.5px;
  line-height:1.55; color:#b3aa98; max-width:44ch; text-wrap:balance }
/* The answer sits on its own ledge, ruled off from the words, the full width of the plate. */
.rx-decree-foot{ margin:0 -44px; padding:8px 0 10px; border-top:1px solid rgba(201,169,78,.18);
  display:flex; justify-content:center }
.rx-decree-go{ width:auto; padding:12px 30px 12px 52px; justify-content:center;
  animation:rxDecreeGo .3s .32s ease-out both }
.rx-decree-go::before{ background:radial-gradient(70% 128% at 50% 50%,
  rgba(255,178,92,.16), rgba(255,178,92,.05) 46%, transparent 72%) }
.rx-decree-go .rx-caret{ left:24px }
@keyframes rxDecreeGo{ from{ opacity:0 } to{ opacity:1 } }
@media (prefers-reduced-motion: reduce){ .rx-decree-go{ animation:none } }

/* --- the plaque is one path now ---------------------------------------------------------------
   .rx-body carried the middle third of the plate: its own ramp restarting at the crown seam, and
   an inset rim light that stopped dead at its own box. Both were half of a join. The shell paints
   the whole silhouette, so the body is layout only. */
.rx-plaque{ position:relative }
.rx-plaque-shell{ position:absolute; inset:0; width:100%; height:100%; z-index:0;
  overflow:visible; pointer-events:none }
.rx-plaque > .rx-body{ background:none; box-shadow:none }
.rx-crown,.rx-base{ z-index:2 }
.rx-plaque > .rx-body{ z-index:1 }

/* The body still held its own grain, wear and candle layers at inset:0. With the shell now
   carrying all four for the whole silhouette, those were a SECOND set bounded by the body box —
   so they painted a bright band beginning exactly at the crown seam, which made the top join
   worse rather than better. One set, on the shell. */
.rx-plaque > .rx-body > .rx-grain,.rx-plaque > .rx-body > .rx-wear,
.rx-plaque > .rx-body > .rx-ember,.rx-plaque > .rx-body > .rx-ember-slow{ display:none }
/* The shell carries the flicker for the whole plaque instead. */
.rx-plaque-shell .rx-cap-ember{ animation:rxFlickerA 4.7s ease-in-out infinite }

/* The crown element still reserves its full 122px of layout even though it now paints only
   ornaments — the plate underneath is drawn by the shell. So content could not rise above it,
   and 73px of FULL-WIDTH plate sat empty between the arch shoulder and the title. That gap was
   always there; the seam used to break it up, and removing the seam left one large empty expanse
   above the header. The body reclaims it. Ornaments stay above (crown z-index 2, body 1), so the
   scythes and shoulder rivets are unaffected. */
.rx-plaque > .rx-body{ margin-top:-46px }

/* Elite names run to 24 characters ("Choirmaster of Ash Falls") against the 18 of the fixed
   title they replace, so the longest ones get a step down rather than overflowing the banner. */
.dx-sp.is-long .dx-sp-word{ font-size:clamp(24px, 4.1cqw, 46px) }

/* The elite room banner. Same object as the Spoils / Pool / Ferryman banners, but this one sits
   over a room you can still walk around in, so it must not swallow clicks and must not stay:
   it announces, then gets out of the way. */
.dx-sp-room{
  position:absolute; left:50%; top:7%; z-index:40; pointer-events:none;
  animation:dxSpIn 700ms cubic-bezier(.16,1,.3,1) both, dxRoomOut 900ms ease-in 2600ms both;
}
@keyframes dxRoomOut{ from{ opacity:1 } to{ opacity:0 } }
@media (prefers-reduced-motion:reduce){
  .dx-sp-room{ animation:dxSpIn 1ms both, dxRoomOut 1ms ease 3200ms both }
}

/* Clear of the minimap. The Spoils, Pool and Ferryman banners live on overlays that hide the
   map, so none of them ever had to share the canvas with it; this one does, and at full size
   "Sealed Chamber" ran straight under the map panel at x .67. Dropped below it and scaled down
   a step, which also reads better for what it is: an announcement in a room you are standing in,
   not the title of a screen. */
.dx-sp-room{ top:31% }
.dx-sp-room .dx-sp-word{ font-size:clamp(24px, 4.2cqw, 44px) }
.dx-sp-room .dx-sp-sub{ font-size:clamp(14px, 2.1cqw, 24px) }

/* Enemy HP, under its bar. The cluster is bottom-anchored (translate(-50%,-100%)), so a row
   added here grows the stack UPWARD and never crowds the sprite beneath it.
   Fixed to the bar's own width so "right" means the bar's right END, not the cluster's centre;
   tabular figures so the digits do not jitter as HP falls from three characters to two. */
.dxc-hpnum{
  width:calc(52 * var(--cu)); text-align:right; line-height:1;
  margin-top:calc(-1 * var(--cu));
  font-family:'EB Garamond',Georgia,serif;
  font-variant-numeric:tabular-nums lining-nums;
  font-size:calc(7.5 * var(--cu)); color:#cfc3b2;
  text-shadow:0 1px 0 rgba(0,0,0,.95), 0 0 5px rgba(0,0,0,.9);
}

/* The container must not intercept the room: it holds a banner or nothing. */
#explore-banner{ position:absolute; inset:0; pointer-events:none }

/* Elite rooms on the FULL map, matching the minimap's marker. Declared late so it wins over
   .fog and .reachable: a room can be all three at once, and "there is an elite in there" is the
   thing you opened the map to find out. Same #c9563f the minimap uses. */
svg .node.elite{ stroke:#c9563f; stroke-width:3; stroke-dasharray:none }
svg .node.elite.current{ stroke:#fff }

/* Tooltips were painting UNDER the panel's own gold rails and corner bolts. The tip carries
   z-index:40, but it lives inside .rxs-panel-inner, which has z-index:2 AND position:relative —
   so it creates a stacking context and the 40 is scoped inside it. Against the rails (3) and the
   bolts (4), which are siblings of the inner at the panel level, the tip could never win.
   Raising the inner above both is safe: the rails are 3px at the panel's extreme edges and the
   bolts sit in its corners, and the content is padded clear of all of them — so nothing changes
   except that a tooltip is now allowed over the frame it escapes through.

   THIS ONLY FIXES THE HALF OF THE PROBLEM INSIDE THE PANEL. Because the inner is a stacking
   context, 5 is also the highest any tooltip can rank against anything OUTSIDE the panel — and
   .dx-overlay, which spans the dungeon canvas, is 6. The half of every tip that overhangs the
   canvas was therefore painted over by that overlay's vignette. The companion fix is on
   .sidebar-mount, which lifts the whole rail above the room; see the note there. */
.rxs-panel-inner{ z-index:5 }


/* ============================================================================================
   THE ASCENT — the dungeon map (js/ui_map.jsx, js/map_layout.js)

   Mounted into #map-mount inside .explore-row, NOT document.body. The old map was a
   position:fixed backdrop on the body, which is exactly why it read as a different application:
   it covered the whole page, including the chrome that tells you which game you are in. This
   covers the sidebar and the dungeon view and stops there.

   TOKENS ARE LOCAL TO .rx-map, not :root. They are consumed only by rules inside this block, so
   scoping them keeps :root clean. (The warning in ui_rx_shared.jsx about :root applies to tokens
   read by the SHARED primitives from arbitrary subtrees — a different case. Do not "fix" these
   by hoisting them.)
   ============================================================================================ */
.explore-row{ position:relative }          /* the mount's containing block; was static */

#map-mount{ position:absolute; inset:0; z-index:60; pointer-events:none }
#map-mount:empty{ display:none }
#map-mount > *{ pointer-events:auto }
#map-mount > .rx-map-backdrop.is-still{ pointer-events:none }   /* Fast Travel: on its way out */

.rx-map-backdrop{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  /* No backdrop-filter: it is expensive, and blurring the pixel art beneath into mush is worse
     than darkening it. Leaving the room faintly readable is what makes this read as OVER the
     game rather than instead of it. */
  /* NOT ANIMATED, DELIBERATELY. This started as an opacity fade, which multiplied the plate
     inside it and left the whole map translucent whenever the animation was frozen or cut short
     — the sidebar read straight through it. Moving the fade to the background alpha fixed the
     bleed but kept the other half of the problem: a stranded `both`-filled animation holds the
     FROM state, so the dim simply never arrived and the map floated on an undimmed room. The
     separation between game and map is not worth 160ms of easing. The plate's drop is the
     entrance; this is just there. */
  background:rgba(4,4,7,.72);
}

/* Declared for BOTH surfaces at once. The minimap is the same components rendered smaller, so
   it must read the same variables — a second copy is how the two drifted apart last time. */
.rx-map,.rx-mini{
  /* ---- THE CONTRAST RAMP ----
     Measured against --map-stone, which is what every one of these is drawn on. The first ramp
     was built to sit quietly inside a dark-fantasy plate and it succeeded far too well: the
     cleared node was 1.07:1 against its own background, the "known passage" line 1.64:1, the
     walked passage 2.48:1 and the room rim 2.04:1 — that is, EVERY mark on the map was between
     1.1 and 2.5, and the drawing was legible only because the eye fills in what it expects. A
     player who cannot make fine tonal distinctions had nothing to read at all.

     The floor is WCAG 1.4.11 (3:1) for anything that carries meaning and 1.4.3 (4.5:1) for
     anything that is text. Contrast is spent on the BOUNDARY rather than the area — a rim at
     3.4:1 delineates a node completely, and lets the fills stay dark enough that forty rooms do
     not read as forty lamps. Values are annotated with what they actually measure. */
  --map-stone:#0a0a0e;
  --map-seam:#c9a94e;
  /* THESE ARE NOMINAL VALUES AND A THIN STROKE NEVER REACHES ITS NOMINAL VALUE. Measured off
     the rendered frame, the 1.75px dashed "known passage" peaked at 2.71:1 while its token said
     3.31 — antialiasing on a diagonal spends most of the line on blend pixels, and the map is
     drawn through a fit transform that shrinks every stroke further. Each token below is set
     high enough that what actually lands on the screen clears the floor, and the widths are
     part of the same budget: brightening a hairline and thickening it are the same instrument. */
  --map-edge:#786f56;           /* known passage        3.96:1 nominal, 3.3 rendered */
  --map-edge-trod:#8c8069;      /* walked passage       5.09:1  (was 2.48) */
  --map-route:#8ee0ff;          /* your route          13.42:1 */
  --map-elite:#c9563f;          /* sealed chamber       4.60:1 */
  --map-elite-fill:#3a1c17;
  --map-node:#1a1a22;
  --map-rim:#6e6552;            /* the rim of a room    3.43:1  (was --border, 1.34) */
  --map-q:#a39a82;              /* the ? glyph — TEXT   7.06:1 nominal, 4.6 rendered */
  /* THE TWO FILLS ARE SEPARATED ON THE BLUE-YELLOW AXIS, not on red-green. Warm brown against
     cool slate survives protanopia and deuteranopia, which a green/red pair would not; and the
     distinction is carried three more times over — by the ember ring, by the ember dot, and by
     the legend — so no single channel failing can take the fact with it. */
  --map-node-live:#5c4326;      /* still occupied — embers banked   2.15:1 (was 1.25) */
  --map-node-cleared:#22242e;   /* cleared — cold and quiet         1.28:1 (was 1.07) */
  --map-unknown:rgba(10,10,16,.55);
  --map-unknown-stroke:#7a7160; /* unknown room rim     4.10:1 nominal (was 2.04) */
  --mp-hi:#7fb2d9;
  --f-maptitle:20px;  --f-maptier:12px;  --f-legend-eyebrow:12.5px; --f-legend:16px;
  --f-mtipname:15.5px; --f-mtipdetail:14px; --f-mstrap:14.5px;

  /* TOP-ALIGNED WITH THE MINIMAP, not centred (owner, 2026-10-07). The map opens out of the minimap
     (the Lens), and a plate centred in the room put its top edge 3.5px above the minimap's at
     1280x800 and 27px below it at 1920x1080, so the top line slid as it grew. The minimap sits at
     MM_PANEL.y = 8 of the canvas's 416 logical px (js/ui_map.jsx), and the backdrop is the canvas's
     height, so `top` as a share of it lands on the same line at every size. `top` is relative
     positioning, so the % is of the backdrop's HEIGHT, which margin % would not be. The bottom
     keeps its old 10px clearance. */
  position:relative; top:calc(100% * 8 / 416); align-self:flex-start;
  margin:0 auto; flex:0 1 auto; max-width:1400px; width:calc(100% - 20px);
  max-height:calc(100% * 408 / 416 - 10px);
  display:flex; flex-direction:column; min-height:0; overflow:hidden;
  padding:12px 16px 14px;
  background:linear-gradient(180deg, var(--iron-hi) 0%, #100e0c 48%, var(--iron-lo) 100%);
  border-radius:3px;
  /* An iron shutter dropping over the view — which is what it is. One movement, 220ms; the
     content arrives with the plate rather than staggering in behind it, because this is a
     utility you open to check one thing, not a cutscene. */
  animation:rxMapDrop 220ms cubic-bezier(.2,.8,.25,1) both;
}
/* TRANSFORM ONLY, NEVER OPACITY. An entrance that animates opacity can strand the whole plate
   invisible if the animation is frozen or interrupted — which is exactly what happened the first
   time this rendered, and it is indistinguishable from "the map is broken". Animating only the
   transform means the worst case is a plate sitting 10px high: still completely legible. The
   backdrop carries the fade, where failing to dim is a harmless degradation. */
@keyframes rxMapDrop{
  from{ transform:translateY(-10px) scaleY(.985) }
  to{ transform:none }
}
/* the .rx-dlg rim recipe, verbatim, so this plate is made of the same metal as the dialog */
.rx-map::before{ content:''; position:absolute; inset:0; margin:-2px; border:2px solid rgba(0,0,0,.85);
  border-radius:5px; pointer-events:none; z-index:2 }
.rx-map::after{ content:''; position:absolute; inset:0; border:1px solid rgba(201,169,78,.72);
  border-radius:3px; box-shadow:inset 0 1px 0 rgba(255,246,214,.20); pointer-events:none; z-index:2 }
.rx-map > .rx-grain,.rx-map > .rx-wear,.rx-map > .rx-ember,.rx-map > .rx-ember-slow{ border-radius:3px }
/* Absolutely positioned, one per corner. Rendered as a single in-flow <svg> they were a FLEX
   CHILD and reserved an empty ~160px band across the top of the plate. */
.rx-map-bolt{ position:absolute; width:13px; height:13px; z-index:5; pointer-events:none; overflow:visible }
.rx-map-bolt.is-tl{ left:6px;  top:6px }
.rx-map-bolt.is-tr{ right:6px; top:6px }
.rx-map-bolt.is-bl{ left:6px;  bottom:6px }
.rx-map-bolt.is-br{ right:6px; bottom:6px }

/* ---- header ---- */
.rx-map-head{ position:relative; z-index:4; display:flex; align-items:flex-start; gap:20px;
  padding-bottom:9px; flex:0 0 auto }
.rx-map-id{ flex:0 0 auto; min-width:180px; align-self:center }
.rx-map-title{ font-family:'Cinzel',serif; font-size:var(--f-maptitle); color:var(--gold);
  letter-spacing:.06em; line-height:1.1 }
/* The answer to "which way do I go", in words, naming the wall the room actually has. Only
   sayable because the layout is true — see js/map_layout.js. */
.rx-map-route{ flex:1 1 auto; text-align:center; align-self:center; color:var(--ink);
  font-size:var(--f-mstrap); line-height:1.4 }
.rx-map-route b{ color:var(--gold); font-weight:700 }
/* The Guide's Fast Travel line in this slot (js/guide.js): the room Guide's voice, its mark and its light */
.rx-map-route.is-guide{ font-family:'EB Garamond',Georgia,serif; font-style:italic; color:var(--guide-ink);
  text-shadow:0 1px 0 #000, 0 0 10px rgba(0,0,0,.9); animation:dxcCoachIn .5s cubic-bezier(.2,.7,.2,1) both }
.rx-map-route.is-guide b{ font-style:normal; font-family:'Cinzel',serif; font-size:.82em; letter-spacing:.05em;
  color:var(--guide); text-shadow:0 1px 0 #000, 0 0 10px rgba(var(--guide-glow),.5) }
.rx-map-gd-k{ display:inline-block; margin-right:.8em; padding:.2em .55em .14em; vertical-align:.15em;
  font-family:'Cinzel',serif; font-style:normal; font-weight:700; font-size:.6em; letter-spacing:.22em;
  text-transform:uppercase; line-height:1; color:var(--guide);
  border:1px solid rgba(var(--guide-glow),.6); border-radius:2px; box-shadow:0 0 8px rgba(var(--guide-glow),.35) }
/* The primary way out, sitting on the brightest, ember-lit corner of the plate, was the
   LOWEST-contrast text on the screen at 2.89:1. Full --ink plus a darkened well behind it. */
.rx-map-close{ flex:0 0 auto; align-self:center; border:1px solid rgba(201,169,78,.22);
  font-family:'Cinzel',serif; font-size:var(--f-mstrap); letter-spacing:.18em; text-transform:uppercase;
  color:var(--ink); background:rgba(6,5,4,.55); padding:6px 12px; border-radius:2px; position:relative }
.rx-map-close:hover,.rx-map-close:focus-visible{ color:var(--gold);
  background:linear-gradient(90deg, rgba(255,178,92,.14), transparent) }

/* ---- the map field is a RECESS, not the plate ----
   The plaque is bolted ONTO the wall; a niche is cut INTO it. That inversion is this game's
   established language (see .rxs-alcove) and the map is a niche. */
/* THE FIELD CARRIES THE MAP'S OWN ASPECT RATIO and the plate hugs it. Left to fill the
   available height it letterboxed hard — the map is roughly 3:1 and the plate was 2.3:1, so a
   ~70px band of dead stone sat above and below the drawing at every viewport. Sizing the field
   from the viewBox means the plate is exactly as tall as the map needs and no taller. */
.rx-map-field{ position:relative; flex:0 1 auto; min-height:0; width:100%; z-index:4;
  background:var(--map-stone); border-radius:2px;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.8), inset 0 -2px 6px rgba(0,0,0,.6);
  border:1px solid #05050a }
.rx-map-svg{ position:absolute; inset:0; width:100%; height:100%; z-index:1 }
/* Reuses the plate's grain at about half strength: enough that the recess has a surface, not so
   much that it competes with the linework drawn on it. */
.rx-map-vellum{ opacity:.09; border-radius:2px; pointer-events:none }

/* ---- edges ---- */
.rx-map-edge{ fill:none }
.rx-map-edge-shadow{ stroke:#07070b; stroke-width:3.4; transform:translateY(1px) }
/* A PASSAGE YOU HAVE NOT WALKED IS DASHED. It used to differ from a trodden one by tone
   alone — #3a3628 against #5a5038, which is 1.52:1 against each other and invisible. Two of the
   four entries in "Ways through" were spending a row each on a distinction the eye could not
   make. Dashing encodes it by pattern instead of hue, so it also survives colour-blindness, and
   it carries the right meaning on its own: a broken line is a way you know of but have not
   taken. */
.rx-map-edge-core{ stroke:var(--map-edge); stroke-width:1.75; stroke-linecap:round }
/* Scoped to .is-known ONLY. Put on the base rule it dashed the traced route and the open doors
   too — every line on the map broken, which is the opposite of the hierarchy this is for. */
/* Wider and with longer dashes than the solid lines, not narrower: a broken line has fewer
   pixels to make its case with, so it needs more of each one. */
.rx-map-edge.is-known .rx-map-edge-core{ stroke-dasharray:5.5 3.5; stroke-width:2.1 }
.rx-map-edge.is-trodden .rx-map-edge-core{ stroke:var(--map-edge-trod); stroke-width:2.3 }
.rx-map-edge.is-open .rx-map-edge-core{ stroke:var(--leaf); stroke-width:2.6; opacity:.95;
  animation:rxMapBreathe 3.7s ease-in-out infinite }
.rx-map-edge.is-route .rx-map-edge-core{ stroke:var(--map-route); stroke-width:3 }
/* MINIMAP ONLY, and it had no rule at all. The minimap marks the door the hero is actually
   standing in front of as `is-preview` and ranks it top of the paint order — but with nothing
   matching the class it fell through to the BASE stroke, which is --map-edge: the dimmest line
   on the surface, painted last, for the single most relevant passage on screen. It is not in the
   legend because the legend belongs to The Ascent and this state cannot occur there; on the
   minimap the hero's own position is the caption. */
/* BRIGHTER, NOT A NEW COLOUR (owner, 2026-10-28; the first, lighter step could not be told from
   the old line at the panel's real size): a near-cream cut of the ember, a little wider, with a
   warm halo in two layers, so the way you are about to take is the brightest line on the panel. */
.rx-map-edge.is-preview .rx-map-edge-core{ stroke:#ffd9a6; stroke-width:3.8; opacity:1;
  filter:drop-shadow(0 0 3px rgba(255,190,110,.9)) drop-shadow(0 0 7px rgba(255,170,80,.55)) }
/* 3.7s against the pulse's 2.6s: co-prime, so the two never visibly sync. Same rule as the
   title screen's 4.7/7.3 flicker, and the reason its light reads as flame and not as an effect. */
/* The floor of the breath is a contrast value, not a taste value: --leaf at .55 composites to
   3.30:1 and at .62 to 3.63:1, so the trough keeps its margin over 3:1 rather than sitting on it. */
@keyframes rxMapBreathe{ 0%,100%{ opacity:.62 } 50%{ opacity:.95 } }
.rx-map-seam{ stroke:var(--map-seam) }

/* ---- nodes ---- */
/* Bold, because this is the smallest mark on the map and Cinzel's regular weight is a hairline
   serif: at the fit transform's scale it rendered below its own token value. */
.rx-map-q{ font-family:'Cinzel',serif; font-size:14px; font-weight:700; fill:var(--map-q) }
.rx-map-cursor{ fill:none; stroke:var(--gold); stroke-width:1.5; stroke-dasharray:4 4; opacity:.9 }
.rx-map-exitlight path{ fill:rgba(143,183,214,.16) }
/* Two rings, offset, so it never reads as a single ping. The only thing on the plate that
   changes position, marking the one thing you must find instantly. */
.rx-map-pulse circle{ fill:none; stroke:var(--gold); stroke-width:1.5;
  animation:rxMapPulse 2.6s ease-out infinite }
.rx-map-pulse .p2{ animation-delay:1.3s }
@keyframes rxMapPulse{ 0%{ r:17px; opacity:.55 } 100%{ r:30px; opacity:0 } }

/* ---- HTML laid over the SVG ---- */
.rx-map-zlabel{ position:absolute; transform:translateX(-50%); pointer-events:none;
  font-family:'Cinzel',serif; font-size:var(--f-maptier); letter-spacing:.16em;
  text-transform:uppercase; white-space:nowrap; padding-bottom:2px; border-bottom:1px solid transparent }
.rx-map-proxy{ position:absolute; width:34px; height:34px; opacity:0; border:0; background:none;
  padding:0;}
.rx-map-tip{ position:absolute; transform:translate(-50%,-100%); pointer-events:none; z-index:8;
  min-width:170px; max-width:250px; padding:8px 11px; text-align:left;
  background:linear-gradient(180deg,#14110e,#0a0908);
  border:1px solid rgba(201,169,78,.55); border-radius:5px;
  box-shadow:0 6px 22px rgba(0,0,0,.75) }
.rx-map-tip.is-below{ transform:translate(-50%,0) }
.rx-map-tip-name{ font-family:'Cinzel',serif; font-size:var(--f-mtipname); color:var(--leaf); margin-bottom:3px }
.rx-map-tip-detail{ font-size:var(--f-mtipdetail); color:var(--ink-dim); line-height:1.45 }
.rx-map-tip-gold{ color:var(--gold) }
.rx-map-tip-dist{ margin-top:5px; padding-top:5px; border-top:1px solid rgba(201,169,78,.22);
  font-family:'Cinzel',serif; font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--gold) }

/* ---- legend ----
   Inside the frame, never floating over the map — a legend that overlaps the map costs you map.
   Every entry at full opacity, and no "unseen" marking at all: the key explains marks. */
.rx-map-legend{ position:relative; z-index:4; flex:0 0 auto; display:grid;
  grid-template-columns:1.5fr 1.1fr 1fr; gap:0 18px; margin-top:11px; padding-top:10px;
  border-top:1px solid rgba(201,169,78,.28) }
/* Only PLACES is two columns. The other two groups carry labels that actually explain
   something ("Unknown — a door leads here"), and at half-group width those wrapped to two lines,
   which is precisely the "cramped and unreadable" failure the old legend had. One column each,
   four rows, nothing wraps. */
.rx-map-leg-group{ display:grid; grid-template-columns:minmax(0,1fr); gap:2px 10px;
  align-content:start; padding-right:16px; border-right:1px solid rgba(201,169,78,.14) }
.rx-map-leg-group.is-wide{ grid-template-columns:repeat(2,minmax(0,1fr)) }
.rx-map-legend > .rx-map-leg-group:last-child{ border-right:0; padding-right:0 }
/* --ink-dim measured 3.77-4.13:1 here, under AA. These are the labels that tell you what the
   whole group means, so they are the last thing that should be faint. */
.rx-map-leg-eyebrow{ grid-column:1/-1; font-family:'Cinzel',serif; font-size:var(--f-legend-eyebrow);
  letter-spacing:.18em; text-transform:uppercase; color:#a89f8c; margin-bottom:3px }
.rx-map-leg-item{ display:flex; align-items:center; gap:7px; min-width:0 }
/* 30px, not 24: at 24 the node drew ~8px across and its inlaid mark ~4px, which is mush —
   and the legend is the one element the brief singled out as needing to be very readable. */
/* THE SWATCH IS A WINDOW ONTO A 50-UNIT viewBox, so every stroke inside it renders at
   width x 30/50 — a 2.1px dashed passage arrived as 1.26px and measured 2.68:1 while the same
   line on the map measured 3.37:1. The legend was the LEAST legible copy of the very marks it
   exists to explain. Widening the window restores the scale rather than maintaining a second set
   of stroke widths that would drift from the map's. */
.rx-map-leg-mark{ flex:0 0 auto; width:42px; height:42px; overflow:visible }
/* THE KEY DOES NOT BREATHE. The open door pulses on the map because movement is how it says
   "here, now"; in the legend there is no here and no now, and all the pulse does is spend up to
   38% of the swatch's contrast at random — frozen mid-trough it measured 2.92:1 against the
   plate, against 7.90:1 held still. A key is read once and must be right in that instant. */
.rx-map-leg-mark .rx-map-edge.is-open .rx-map-edge-core{ animation:none; opacity:1 }
.rx-map-leg-label{ font-family:'EB Garamond',serif; font-size:var(--f-legend); color:var(--ink);
  line-height:1.3; min-width:0 }

/* Breakpoint matched to .rxs-rail's so the sidebar and the map compress at the same viewport
   and the screen is never half-scaled. Applies to HTML type only — the SVG scales itself. */
@media (max-width:1420px){
  .rx-map{ --f-maptitle:18px; --f-maptier:10.5px; --f-legend-eyebrow:11.5px; --f-legend:14.5px;
           --f-mtipname:14px; --f-mtipdetail:13px; --f-mstrap:13px }
  .rx-map-legend{ gap:0 12px }
}

/* ---- THE LENS: the map opens out of the minimap (js/ui_map.jsx, THE MAP OPENS OUT OF THE MINIMAP) ----
   While .is-lens is on the backdrop, the real plate's layers are driven by custom properties the
   flight sets every frame. Each has a fallback, and removing the one class is the whole cleanup:
   the plate is then exactly the plate, so no exit path can strand it half-drawn. */
.rx-map-backdrop.is-lens{ background:rgba(4,4,7,var(--mm-dim,0)) }
.rx-map-backdrop.is-lens .rx-map{ animation:none; visibility:var(--mm-vis,hidden) }
.rx-map-backdrop.was-lens .rx-map{ animation:none }    /* landed: the flight was its entrance */
.rx-map-backdrop.is-lens .rx-map-svg,.rx-map-backdrop.is-lens .rx-map-zlabel{
  opacity:var(--mm-ink,0); filter:blur(var(--mm-blur,0px)) }
.rx-map-backdrop.is-lens .rx-map-head,.rx-map-backdrop.is-lens .rx-map-legend{
  opacity:var(--mm-head,0); transform:translateY(var(--mm-rise,0px)) }
/* filter, not opacity: the ember layers flicker BY animating opacity, and an animation beats any
   declared value, so an opacity fade here is silently ignored and the candle-light pops on */
.rx-map-backdrop.is-lens .rx-map > .rx-ember,.rx-map-backdrop.is-lens .rx-map > .rx-ember-slow,
.rx-map-backdrop.is-lens .rx-map-bolt{ filter:opacity(var(--mm-light,0)) }
/* THE SURVEY HATCH: the plate's own mark for ground nothing has been drawn on yet. The field wears
   it while the plate is in flight, and the drawing develops out of it on landing. */
.rx-map-mmhatch,.mm-hatch{ position:absolute; inset:0; pointer-events:none;
  background-image:repeating-linear-gradient(128deg, rgba(122,113,92,.20) 0 1px, transparent 1px 9px) }
.rx-map-mmhatch{ display:none; z-index:2 }
.rx-map-backdrop.is-lens .rx-map-mmhatch{ display:block; opacity:var(--mm-hatch,1) }
/* while the plate stands in for it, the minimap is not also in its corner */
html.mm-map-up #minimap-mount .rx-mini{ visibility:hidden }
/* the plate in flight: the minimap's own iron, freed from its corner */
.rx-mini.mm-ghost{ position:fixed; z-index:9000; margin:0; padding:0; display:block; overflow:visible;
  animation:none; pointer-events:none; box-sizing:border-box; visibility:visible }
.mm-field{ position:absolute; box-sizing:border-box; border-radius:2px; overflow:hidden;
  background:var(--map-stone); border:1px solid #05050a;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.8), inset 0 -2px 6px rgba(0,0,0,.6) }
.mm-hatch{ z-index:3 }
.mm-ghost > .mm-foot{ position:absolute; left:2px; right:2px; bottom:2px; z-index:4 }
/* the drawing riding in the field: the minimap's own SVG, clipped to the field as it grows */
.rx-mini.mm-rider{ position:fixed; z-index:9001; margin:0; padding:0; display:block; overflow:hidden;
  background:none; animation:none; pointer-events:none; border-radius:2px; visibility:visible }
.rx-mini.mm-rider::before,.rx-mini.mm-rider::after{ display:none }
.mm-rider > .rx-mini-svg{ position:absolute; inset:auto; transform-origin:0 0 }

@media (prefers-reduced-motion: reduce){
  .rx-map,.rx-map-backdrop{ animation:none }
  .rx-map-pulse circle{ animation:none; opacity:.5 }
  .rx-map-edge.is-open .rx-map-edge-core{ animation:none; opacity:.95 }
  .rx-map .rx-ember,.rx-map .rx-ember-slow{ animation:none; opacity:.8 }
}

/* ============================================================================================
   THE SCONCE — the on-canvas minimap plate.

   Every token it draws with is declared on the shared selector above, so it and The Ascent read
   the SAME variables rather than two copies that drift. The material is the plate recipe at a
   smaller radius: iron ramp, black outer, gold hairline, top highlight, and a recessed field.

   position:absolute inside .explore-wrap, sized in PERCENTAGES of the canvas. The canvas is a
   fixed 544x416 logical grid that CSS scales to the viewport, so a percentage box tracks it at
   every window width with no breakpoint — which the old canvas panel needed three hard-coded
   rectangles to achieve.

   pointer-events:none, because the click that opens The Ascent is still the canvas hit-rect
   underneath: one definition of that rectangle, unchanged.
   ============================================================================================ */
/* ITS OWN PADDING, NOT THE ASCENT'S. The shared selector above declares padding:12px 16px 14px
   for the full map's plate, and .rx-mini was silently inheriting it — 26px of vertical padding
   inside a panel 176px tall. That is 15% of the panel's height spent on nothing, all of it read
   by the eye as a gap under the zone strap, plus 32px of its width. The rim is drawn by ::before
   and ::after at inset 0, so the padding was never structural; the field carries its own 2px
   margin and that is the whole inset this panel needs. Reclaims ~24px of height for the drawing
   as well as closing the gap. */
.rx-mini{
  padding:2px;
  position:absolute; z-index:6; pointer-events:none;
  display:flex; flex-direction:column; overflow:hidden;
  border-radius:3px;
  background:linear-gradient(180deg, var(--iron-hi) 0%, #100e0c 48%, var(--iron-lo) 100%);
  animation:rxMiniIn 220ms cubic-bezier(.2,.8,.25,1) both;
}
/* Transform only, never opacity — a stranded entrance must never leave the panel invisible.
   Same rule the map's plate follows, and for the same reason. */
@keyframes rxMiniIn{ from{ transform:translateY(-4px) } to{ transform:none } }
.rx-mini::before{ content:''; position:absolute; inset:0; margin:-1px; border:1px solid rgba(0,0,0,.85);
  border-radius:4px; pointer-events:none; z-index:3 }
.rx-mini::after{ content:''; position:absolute; inset:0; border:1px solid rgba(201,169,78,.72);
  border-radius:3px; box-shadow:inset 0 1px 0 rgba(255,246,214,.20); pointer-events:none; z-index:3 }
.rx-mini > .rx-grain,.rx-mini > .rx-wear,.rx-mini > .rx-ember,.rx-mini > .rx-ember-slow{ border-radius:3px }

/* the field is a recess cut into the plate — the niche language, as on the big map */
.rx-mini-field{
  position:relative; flex:1 1 auto; min-height:0; margin:0 0 1px; border-radius:2px;
  background:var(--map-stone); border:1px solid #05050a; overflow:hidden;
  box-shadow:inset 0 2px 7px rgba(0,0,0,.8), inset 0 -2px 5px rgba(0,0,0,.6);
}
/* THE DRAWING FADES AT THE RIM. The panel crops rather than compressing, which is the right
   trade — but a hard crop slices a node in half at the edge and a half-node reads as a drawing
   fault rather than as a view that continues past the frame. Feathering the last few percent
   turns the cut into a horizon. The stone stays put; only the ink dissolves. */
.rx-mini-svg{ position:absolute; inset:0; width:100%; height:100%;
  -webkit-mask-image:radial-gradient(115% 115% at 50% 50%, #000 74%, transparent 99%);
  mask-image:radial-gradient(115% 115% at 50% 50%, #000 74%, transparent 99%) }

/* SET ON THE GLYPHS, NOT ON THE BOX. Cinzel's default line box is about 1.4x its size, so at
   9.5px the strap reserved 13px of height to draw 7px of letter and spent the difference as a
   dead band under the baseline — which read as the panel having a margin it does not have.
   line-height:1 hands that band back, which pays for the larger type outright: the strap is now
   12px in a box SHORTER than the 9.5px one it replaces, so the field above it gained room too. */
.rx-mini-foot{
  flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:6px;
  padding:1px 7px 2px; font-family:'Cinzel',serif; font-size:12px; line-height:1;
  letter-spacing:.13em; text-transform:uppercase; white-space:nowrap; overflow:hidden;
}
/* the zone name, fitted to the strap by ui_map.jsx fitZone(): smaller first, then two lines */
.rx-mini-zone{ flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis }
.rx-mini-zone.is-two{ white-space:normal; line-height:1.08; padding:1px 0; text-overflow:clip }
.rx-mini-foot.no-lens .rx-mini-lens{ display:none }
.rx-mini-lens{ flex:0 0 auto; width:16px; height:16px; overflow:visible;
  fill:none; stroke:var(--gold); stroke-width:1.6; stroke-linecap:round }

@media (prefers-reduced-motion: reduce){
  .rx-mini{ animation:none }
  .rx-mini .rx-ember,.rx-mini .rx-ember-slow{ animation:none; opacity:.8 }
}

/* ============================== DEATH OVERLAY ==============================
   See js/ui_death.jsx for the design rationale. Everything is dth- prefixed: the mockup used
   generic names (.rule, .exit, .coin, .void) and this stylesheet already carries bare `h1` and
   `button` rules that would have painted over the header and the exit control.

   STRUCTURE, AND IT IS LOAD-BEARING: every element's natural style IS the settled screen, and all
   motion lives under .dth-play. That is why prefers-reduced-motion is one override at the bottom
   rather than a duplicate set of end states that would drift out of sync with it.

   BEAT SHEET
     0.00-0.60  the frozen final frame holds: you see where you died
     0.60       the crescent enters and rakes the seam (0.60-1.06)
     0.66       impact: 5px frame quake; the cut lips ignite in the blade's wake
     0.70-1.56  the world is torn: the halves open ~5vw, HANG ~230ms, then are flung. They hold
                opacity 1 until 1.474 and are gone at 1.56 — every beat below hangs off that
     0.63-3.00  the scar burns in the void, peaking as the halves clear, cooling to nothing
     1.62/1.90  DEATH / LAUGHS stamp (the laugh's cadence)
     2.70       LAST, after a deliberate 0.80s silence: the title finishing itself
     2.92/2.97  header shudders; ash rules draw outward
     3.20/3.46  epithet, then kicker
     3.30-3.55  run-motes converge      3.62  coin drops, lands 3.98
     3.86/3.94  ember glow blooms (breathes from 4.76); strike ring
     4.15/4.45  label, then the exit button
     4.80       specular sweep crosses the coin, then rests 8s
   ========================================================================== */
/* HIDDEN UNTIL THE SEQUENCE STARTS. The settled screen is every element's natural CSS state —
   the property that makes reduced-motion free — which also means that for every frame between
   mount and .dth-play the finished screen is sitting there in full. In play that read as a
   500-750ms flash of the ENDING, then the rip revealing the same screen a second time. Whatever
   delays the start (React commit, the geometry pass, decoding the snapshot) now delays the first
   paint with it, rather than leaking the punchline. */
.dth-stage{
  visibility:hidden;
  position:absolute; inset:0; overflow:hidden; background:#030307;
  --bone-hi:#f1ead9; --bone:#cfc7b8; --bone-lo:#6e6857; --bone-dk:#44402f;
}
/* TWO IMPACTS, ONE ELEMENT. The tear at .66s and LAST landing at 3.30s both jolt the whole
   screen, and both drive `transform` on this element — which is safe only because they do not
   overlap in time. Declared together here rather than in a second .dth-play rule further down:
   a duplicate selector setting the same property is a trap for whoever edits one of them. */
.dth-play{visibility:visible;
  animation:dthQuake .18s linear .66s, dthQuakeLast .5s linear 3.30s;}
@keyframes dthQuake{
  0%{transform:translate(0,0)} 22%{transform:translate(-5px,3px)}
  45%{transform:translate(4px,-3px)} 68%{transform:translate(-2px,2px)}
  100%{transform:translate(0,0)}
}

/* THE VOID: not a shroud over a room. The room is gone. Black as consequence. */
.dth-void{position:absolute; inset:0;
  background:radial-gradient(120% 90% at 50% 55%, #0a0912 0%, #030307 100%);}
.dth-scarsvg{position:absolute; inset:0; pointer-events:none;}
.dth-scar{fill:none; stroke:#ffb25c; stroke-width:2; opacity:0;}
/* The lead-in is held INSIDE the keyframes. A delayed animation with `both` backwards-fills its
   from-state, which drew the cut line over the frozen frame during the hold. */
/* COMMITTED, after three reviews running found an element nobody could see: first painted UNDER
   the halves so it peaked while occluded, then re-timed against a 1.26s clear that the hang had
   already moved to 1.56s. Its best measured moment was 14/255 above the void. It is the wound the
   whole screen is about, so it now peaks exactly when the halves clear, and is bright enough to
   read: .34 where it was managing .081. */
/* A soft warm falloff, not a vector path. At a flat 2.5px #ffb25c with no glow it read as a
   CAD hairline against cut lips and a crescent that both carry warm bloom. */
.dth-scar{stroke-width:2.5; filter:drop-shadow(0 0 6px rgba(255,178,92,.55)) drop-shadow(0 0 18px rgba(255,178,92,.28));}
.dth-play .dth-scar{animation:dthScarCool 3s linear both;}
@keyframes dthScarCool{
  0%,21%{opacity:0}      /* 0.63s — nothing until the blade has passed */
  30%{opacity:.16}       /* 0.90s — glimpsed between the parting halves */
  52%{opacity:.34}       /* 1.56s — the halves clear and the wound is fully exposed */
  70%{opacity:.20}       /* 2.10s — cooling under the title */
  100%{opacity:0}        /* 3.0s — gone before the coin */
}

/* THE TWO HALVES. Each holds a copy of the frozen frame, clipped to one side of the tear. */
.dth-rip{position:absolute; inset:0; will-change:transform,opacity;}
.dth-ripA{transform:translate(-74vw,24vh) rotate(-2.5deg); opacity:0;}
.dth-ripB{transform:translate(74vw,-24vh) rotate(2.5deg); opacity:0;}
.dth-clip{position:absolute; inset:0;}
/* The cloned interface, reproducing #app's own box so every element lands exactly where it stood.
   Not full-bleed and not the canvas alone: an earlier version painted the room by itself across
   the whole viewport, which scaled it 1.43x, cropped it, and deleted the sidebar, log and minimap
   — so death jump-cut to a zoomed picture of somewhere similar and tore THAT. This tears the
   screen the player was actually looking at. */
.dth-frame{
  position:absolute; left:0; right:0; top:0;
  max-width:1120px; margin:0 auto; padding:24px 20px 60px;
  pointer-events:none; user-select:none;
}
.dth-frame img{image-rendering:pixelated;}
.dth-edge{position:absolute; inset:0; pointer-events:none;}
.dth-edge polyline{fill:none; stroke:#ffb25c; stroke-width:2.5; opacity:0;}

/* The crack opens while the blade transits, then the halves are flung. Two timing functions in
   one keyframe set: the crack eases slowly under the blade, the fling accelerates away. */
/* THE HANG. The parted-staircase frame is the shot that sells this whole idea and it used to be
   on screen for about 150ms: the halves crept to 0.9vw by the midpoint and were gone by 1.26s.
   They now open to ~5vw and HOLD there for ~230ms before the fling, so the chasm is legible as an
   image rather than as a smear. Three timing functions in one keyframe set: the crack eases open
   under the blade, the hold is near-linear, the fling accelerates away. */
.dth-play .dth-ripA{animation:dthTearA .86s linear .70s both;}
.dth-play .dth-ripB{animation:dthTearB .86s linear .70s both;}
@keyframes dthTearA{
  from{transform:none; opacity:1; animation-timing-function:cubic-bezier(.65,0,.8,.4);}
  30%{transform:translate(-4.2vw,1.2vh) rotate(-.7deg); opacity:1; animation-timing-function:linear;}
  57%{transform:translate(-5.4vw,1.6vh) rotate(-.9deg); opacity:1; animation-timing-function:cubic-bezier(.5,0,.85,.45);}
  90%{opacity:1}
  to{transform:translate(-74vw,24vh) rotate(-2.5deg); opacity:0}
}
@keyframes dthTearB{
  from{transform:none; opacity:1; animation-timing-function:cubic-bezier(.65,0,.8,.4);}
  30%{transform:translate(4.2vw,-1.2vh) rotate(.7deg); opacity:1; animation-timing-function:linear;}
  57%{transform:translate(5.4vw,-1.6vh) rotate(.9deg); opacity:1; animation-timing-function:cubic-bezier(.5,0,.85,.45);}
  90%{opacity:1}
  to{transform:translate(74vw,-24vh) rotate(2.5deg); opacity:0}
}
/* The lips ignite progressively BEHIND the blade, then cool ember to blood. --dth-seam is the
   seam's Manhattan length, measured in the component. */
.dth-play .dth-edge polyline{
  stroke-dasharray:var(--dth-seam) var(--dth-seam);
  animation:dthEdgeReveal .38s cubic-bezier(.4,.05,.75,.5) .64s both,
            dthEdgeCool 1.5s linear .64s both;
}
@keyframes dthEdgeReveal{from{stroke-dashoffset:var(--dth-seam)} to{stroke-dashoffset:0}}
@keyframes dthEdgeCool{
  0%{opacity:.95; stroke:#fffdf4;} 26%{opacity:.9; stroke:#f7e6b0;}
  55%{opacity:.55; stroke:#ffb25c;} 100%{opacity:0; stroke:#c94d3a;}
}

/* THE CRESCENT. Light with an edge, riding the seam. offset-path is set per death. */
.dth-crescent{
  position:absolute; left:0; top:0; width:360px; height:160px;
  pointer-events:none; opacity:0; offset-rotate:0deg;
  will-change:offset-distance,opacity;
}
.dth-crescent svg{overflow:visible;
  filter:drop-shadow(0 0 14px rgba(255,178,92,.65)) drop-shadow(0 0 42px rgba(255,178,92,.3));}
.dth-play .dth-crescent{
  animation:dthBladeRun .46s cubic-bezier(.4,.05,.75,.5) .60s both,
            dthBladeFlash .46s linear .60s both;
}
@keyframes dthBladeRun{from{offset-distance:0%} to{offset-distance:100%}}
@keyframes dthBladeFlash{0%{opacity:0} 10%{opacity:1} 86%{opacity:1} 100%{opacity:0}}

/* ---- the column ---- */
.dth-overlay{position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center; padding-bottom:1.5vh;}
/* The heading wraps both lines for assistive tech, and it must not become the thing that lays
   them out: as a bare block it shrank to the headrow's width, and .dth-h1 is a flex container
   defaulting to flex-start, so LAST pinned hard LEFT instead of centring under the title. */
.dth-head{display:flex; flex-direction:column; align-items:center;}
.dth-headrow{display:flex; align-items:center; gap:34px; margin-bottom:6px;}
/* A div, not an h1: the bare `h1` rule near the top of this file sets its own family and tracking. */
.dth-h1{
  /* Floor dropped 52 -> 30. At 52 the type stopped scaling below an 812px viewport while the
     headrow (title + two rules + gaps) kept needing the same width, so both edges clipped under
     ~795px with no fallback. The rules are dropped entirely on narrow screens below. */
  font-family:'Cinzel',serif; font-weight:900; font-size:clamp(30px,6.4vw,96px); line-height:1;
  /* margin-right cancels the trailing letter-space after the final S. text-indent cannot do it:
     this is a flex container, and text-indent does not apply to flex items. */
  letter-spacing:.13em; margin-right:-.13em; white-space:nowrap; display:flex; gap:.32em;
}
.dth-w{
  display:inline-block;
  background:linear-gradient(180deg,var(--bone-hi) 0%,var(--bone) 38%,var(--bone-lo) 74%,var(--bone-dk) 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  /* a blood undertone, not a glow: it should be felt rather than seen */
  text-shadow:0 0 34px rgba(181,48,58,.22), 0 0 90px rgba(181,48,58,.12);
  filter:drop-shadow(-4px 6px 8px rgba(0,0,0,.75));
}
.dth-rule{height:2px; width:min(190px,14vw); flex:none;
  background:linear-gradient(90deg, rgba(110,104,87,0) 0%, rgba(110,104,87,.9) 100%);}
/* The right rule reverses its GRADIENT rather than mirroring with scaleX(-1). Mirroring about a
   100% transform-origin renders the element in [W,2W] — one full width right of its own box,
   which is exactly the gap that made this header look lopsided. */
/* LAST sits on its own line under the headrow. Same weight and material as the setup — it is the
   payoff, not a subtitle — with the rules flanking only the first line, so the second lands naked
   in the void. */
.dth-h1last{margin-top:-.06em; margin-bottom:26px;}

.dth-rule-r{background:linear-gradient(270deg, rgba(110,104,87,0) 0%, rgba(110,104,87,.9) 100%);}
.dth-epithet{
  font-family:'EB Garamond',Georgia,serif; font-style:italic; font-weight:500;
  font-size:clamp(16px,1.7vw,24px); color:var(--ink-dim); letter-spacing:.015em;
  margin-bottom:clamp(28px,4.4vw,64px); text-shadow:0 2px 8px rgba(4,4,9,.9);
}
.dth-zone{color:var(--ink);}
.dth-kicker{
  font-family:'EB Garamond',Georgia,serif; font-style:italic; font-weight:500;
  font-size:clamp(15px,1.5vw,21px); color:var(--ink-dim);
  margin-bottom:26px; text-shadow:0 2px 8px rgba(4,4,9,.9);
}

/* ---- the coin: the only warm thing on the screen ---- */
.dth-coinwrap{position:relative; width:190px; height:190px; margin-bottom:18px;}
.dth-glow{position:absolute; left:50%; top:50%; width:520px; height:520px;
  transform:translate(-50%,-50%); pointer-events:none;
  background:radial-gradient(circle, rgba(255,178,92,.30) 0%, rgba(255,178,92,.10) 34%, transparent 68%);}
.dth-coin{position:absolute; inset:0; width:190px; height:190px;
  filter:drop-shadow(-7px 10px 14px rgba(0,0,0,.85));}
.dth-mint{position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:'Cinzel',serif; font-weight:900; font-size:76px; letter-spacing:.01em;
  color:#2e2209; text-shadow:0 1px 0 rgba(247,230,176,.45), 0 -1px 1px rgba(20,14,3,.55);}
.dth-sweepclip{position:absolute; inset:6px; border-radius:50%; overflow:hidden; pointer-events:none;}
.dth-sweep{position:absolute; top:-30%; bottom:-30%; left:-70%; width:44%;
  transform:translateX(-160%) rotate(18deg); mix-blend-mode:screen;
  background:linear-gradient(90deg, transparent 0%, rgba(247,230,176,0) 20%, rgba(247,230,176,.38) 50%, rgba(247,230,176,0) 80%, transparent 100%);}
.dth-mote{position:absolute; left:50%; top:50%; width:5px; height:5px; border-radius:50%;
  margin:-2.5px 0 0 -2.5px; pointer-events:none; opacity:0;
  background:#f2d98a; box-shadow:0 0 8px 2px rgba(255,178,92,.55);}
.dth-play .dth-mote{animation:dthMoteIn .55s cubic-bezier(.5,0,.9,.6) both; animation-delay:var(--md);}
@keyframes dthMoteIn{
  from{opacity:0; transform:translate(var(--dx),var(--dy)) scale(.7);}
  25%{opacity:.95;} to{opacity:0; transform:translate(0,0) scale(.25);}
}
.dth-strike{position:absolute; left:50%; top:50%; width:190px; height:190px; border-radius:50%;
  margin:-95px 0 0 -95px; pointer-events:none; opacity:0;
  border:2px solid rgba(247,230,176,.85);
  box-shadow:0 0 22px rgba(255,178,92,.4), inset 0 0 18px rgba(255,178,92,.25);}
.dth-play .dth-strike{animation:dthStrike .45s ease-out 3.94s both;}
@keyframes dthStrike{0%{opacity:0; transform:scale(.4);} 8%{opacity:.95; transform:scale(.47);}
  100%{opacity:0; transform:scale(1.28);}}
.dth-coinlabel{
  font-family:'Cinzel',serif; font-weight:700; font-size:17px; letter-spacing:.14em; text-indent:.14em;
  background:linear-gradient(180deg,#fff6da 0%,#f2d98a 34%,#c9a94e 62%,#8a6a22 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  margin-bottom:clamp(26px,4vw,58px);
}

/* ---- THE LEDGER: what the run banked, then the death's own pay (ui_death.jsx Ledger) ----
   The escape screen's rows, without its leaders or rule (owner, 2026-10-09): each line is one
   tally among the rest, FALLEN included, so all three share one size and one pitch. Narrow (the
   exit's footprint) so a label and its amount still read as a pair with nothing between them.
   line-height is in em, not unitless, so it is inherited as a LENGTH and FALLEN's smaller caps do
   not shorten their row. */
.dth-has-ledger .dth-coinlabel{ margin-bottom:clamp(14px,2vw,26px); }
/* Wide enough for the longest row, "Reached the Choir of the Threshold" at 20px (~300px of label
   plus its sum), which wrapped onto two lines at 300px. Labels never wrap: a ledger row is one line. */
.dth-ledger{ width:min(420px,92vw); margin-bottom:clamp(18px,3vw,40px); }
.dth-row{ display:flex; align-items:baseline; gap:.5em; padding:.14em 0;
  font-family:'EB Garamond',Georgia,serif; font-size:clamp(15px,1.3vw,20px); line-height:1.4em; color:var(--bone);
  text-shadow:0 0 12px rgba(0,0,0,.95), 0 2px 4px rgba(0,0,0,.9); }
.dth-row span{ font-style:italic; text-align:left; white-space:nowrap; }
.dth-row span em{ font-style:normal; color:var(--bone-hi); }
.dth-row i{ flex:1; }
.dth-row b{ font-family:'Cinzel',serif; font-weight:700; color:var(--gold); font-variant-numeric:tabular-nums; }
.dth-row-fallen span{ font-style:normal; font-family:'Cinzel',serif; letter-spacing:.12em; font-size:.86em; color:var(--bone-hi); }
/* after DEATH'S COIN (5.06s), one by one; the exit waits for them (LEDGER_SHIFT, 450ms) */
.dth-play .dth-row{ animation:dthRise .5s ease-out both; }
.dth-play .dth-row:nth-child(1){ animation-delay:5.20s; }
.dth-play .dth-row:nth-child(2){ animation-delay:5.32s; }
.dth-play .dth-row:nth-child(3){ animation-delay:5.44s; }
.dth-play.dth-has-ledger .dth-exit{ animation-delay:5.81s; }
/* The rows cost ~110px. On a screen the full stack does not fit (1280x800, the Deck), the column
   gives it back out of its own air and a smaller coin. Below 641px the compact block further down
   already shrinks everything. */
@media (max-height: 880px) and (min-height: 641px){
  .dth-has-ledger .dth-h1last{ margin-bottom:16px; }
  .dth-has-ledger .dth-epithet{ margin-bottom:28px; }
  .dth-has-ledger .dth-kicker{ margin-bottom:14px; }
  .dth-has-ledger .dth-coinwrap{ width:150px; height:150px; margin-bottom:12px; }
  .dth-has-ledger .dth-coin{ width:150px; height:150px; }
  .dth-has-ledger .dth-mint{ font-size:60px; }
  .dth-has-ledger .dth-strike{ width:150px; height:150px; margin:-75px 0 0 -75px; }
  .dth-has-ledger .dth-ledger{ margin-bottom:18px; }
}

/* The bare `button` rule in this stylesheet paints a gradient, a border, a radius and an inset
   hover shadow. Every one of those is restated here, so the control cannot inherit chrome that
   does not belong on this screen. */
.dth-exit, .dth-exit:hover, .dth-exit:active, .dth-exit:focus, .dth-exit:focus-visible{
  font-family:'Cinzel',serif; font-weight:700; font-size:15px;
  letter-spacing:.14em; text-indent:.14em; color:var(--ink);
  background:linear-gradient(180deg,var(--iron-hi) 0%,var(--iron-lo) 100%);
  border:1px solid var(--border); border-radius:0; padding:15px 44px; outline:none;
  box-shadow:-5px 7px 12px rgba(0,0,0,.7), inset 0 1px 0 rgba(207,199,184,.07);
  transition:border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.dth-exit:hover, .dth-exit:focus-visible{
  border-color:var(--leaf); color:var(--leaf-hi);
  box-shadow:-5px 7px 12px rgba(0,0,0,.7), 0 0 18px rgba(255,178,92,.14), inset 0 1px 0 rgba(247,230,176,.14);
}

/* ---- the settling ---- */
/* RE-TIMED AGAINST THE TEAR'S REAL END. The hang lengthened dthTearA/B from .56s to .86s, so the
   halves hold opacity 1 until 1.474s and are only gone at 1.56s — but the stamp still fired at
   1.31s, which put the hero title across a fully opaque, lit, textured half of the interface for
   ~250ms (measured: 25% of the title's band was room art, with the A of DEATH on an enemy HP bar).
   Everything downstream of the tear now hangs off 1.56s. */
.dth-play .dth-w1{animation:dthStamp .22s cubic-bezier(.2,.85,.3,1) 1.62s both;}
.dth-play .dth-w2{animation:dthStamp .22s cubic-bezier(.2,.85,.3,1) 1.90s both;}
/* LAST IS THE PUNCHLINE AND IT GETS THE ROOM TO ITSELF. It used to follow LAUGHS by 0.80s and
   stamp on the same curve as the other two words, which made it the third beat of a rhythm rather
   than the thing the rhythm was building to. The gap is now 1.25s — long enough that the screen
   reads as finished before it arrives — and it lands on its own keyframe: dropped in from much
   larger, overshooting PAST its resting size and compressing before it settles, which is what
   reads as weight rather than as an entrance. */
.dth-play .dth-w3{animation:dthStampLast .30s cubic-bezier(.16,.9,.28,1) 3.15s both;}
@keyframes dthStampLast{
  from{opacity:0; transform:scale(1.42)}
  10%{opacity:1}
  55%{transform:scale(.94)}        /* the slam: past the target, not up to it */
  74%{transform:scale(1.025)}
  to{opacity:1; transform:scale(1)}
}
/* NO `filter` IN THESE KEYFRAMES. The title is the only thing on this screen painted with
   background-clip:text over a transparent colour, and animating a filter across it lost the fill
   the moment the animation COMPLETED — the words rendered invisible while every other element
   settled normally. It only showed up in a free-running capture: pinning the animation with
   ?dfreeze holds it mid-flight and it draws correctly, so the pinned frames I had been checking
   all looked right. .dth-w already carries its drop-shadow as a static property, so the blur-in
   was the only thing this bought, and it is not worth a title nobody can see. */
@keyframes dthStamp{
  from{opacity:0; transform:scale(1.16);}
  60%{opacity:1; transform:scale(.985);}
  to{opacity:1; transform:scale(1);}
}
/* SHAKING THE WHOLE STAGE IS NEARLY INVISIBLE, and that is not a bug in the numbers — it was
   measured at 22px and still read as nothing. This screen is black, edge to edge, with the
   overscan covering its borders: every pixel moves together and there is no static reference
   left in frame, so there is no motion to see. Camera shake needs something that DOESN'T move.

   So the stage quake stays as the felt weight underneath, and the thing you actually SEE is
   DEATH LAUGHS shaking against a screen that holds still. That is the one element with a fixed
   backdrop to move against. Timed to 3.30s: the stamp starts at 3.15 and its slam frame is at 55% of
   .30s, so the screen jolts on the same frame the letters bottom out, not when they start
   moving. Short and hard on purpose — six oscillations decaying inside a quarter second reads
   as a blow. Half a second at 22px is a deliberately heavy hit, not a tap.

   Declared beside the tear's own quake on the .dth-play rule above. */
/* DEATH LAUGHS TAKES THE HIT, VIOLENTLY. The original was a 1.6px wobble for .22s, which is a
   flinch. This is 16px and a full degree of roll, twelve reversals inside half a second, decaying
   to nothing — and because the rest of the screen is still, every pixel of it is legible as
   motion. Rotation is safe here: the row is type in a flex line with nothing to clip against.

   LAST IS DELIBERATELY NOT IN THIS. It is stamping on its own keyframe at the same instant, and a
   word that is both slamming down and shaking sideways reads as neither. The line above it takes
   the blow; the word that caused it lands clean. */
.dth-play .dth-headrow{animation:dthShakeHard .5s linear 3.30s;}
@keyframes dthShakeHard{
  0%  {transform:translate(0,0)       rotate(0)}
  4%  {transform:translate(-16px,7px) rotate(-1.1deg)}
  9%  {transform:translate(15px,-8px) rotate(1deg)}
  15% {transform:translate(-14px,6px) rotate(-.95deg)}
  21% {transform:translate(13px,-6px) rotate(.85deg)}
  28% {transform:translate(-11px,5px) rotate(-.75deg)}
  35% {transform:translate(10px,-4px) rotate(.65deg)}
  43% {transform:translate(-8px,4px)  rotate(-.5deg)}
  51% {transform:translate(7px,-3px)  rotate(.4deg)}
  60% {transform:translate(-5px,2px)  rotate(-.3deg)}
  69% {transform:translate(4px,-2px)  rotate(.22deg)}
  78% {transform:translate(-3px,1px)  rotate(-.14deg)}
  87% {transform:translate(2px,-1px)  rotate(.08deg)}
  94% {transform:translate(-1px,0)    rotate(-.03deg)}
  100%{transform:translate(0,0)       rotate(0)}
}
@keyframes dthQuakeLast{
  /* SCALE 1.05 THROUGHOUT, RETURNING TO 1. Two jobs. It is overscan: at these amplitudes the
     stage pulls 22px off its own edge, and without bleed to shake within you would see the page
     behind it at the corners — the stage is the element being transformed, so its own
     overflow:hidden cannot save it. And the 5% punch-in on the first frame is itself part of the
     hit; the screen lurches toward you as the word lands. The decay lives in the keyframe values
     rather than in an easing curve, so the shake dies the way a struck object does. */
  0%  {transform:translate(0,0)        scale(1.05)}
  6%  {transform:translate(-22px,14px) scale(1.05)}
  13% {transform:translate(20px,-13px) scale(1.05)}
  20% {transform:translate(-18px,11px) scale(1.05)}
  28% {transform:translate(16px,-10px) scale(1.05)}
  36% {transform:translate(-13px,8px)  scale(1.05)}
  45% {transform:translate(11px,-7px)  scale(1.045)}
  54% {transform:translate(-9px,5px)   scale(1.04)}
  64% {transform:translate(7px,-4px)   scale(1.03)}
  74% {transform:translate(-5px,3px)   scale(1.02)}
  84% {transform:translate(3px,-2px)   scale(1.012)}
  92% {transform:translate(-2px,1px)   scale(1.006)}
  100%{transform:translate(0,0)        scale(1)}
}
.dth-play .dth-rule{transform-origin:100% 50%; animation:dthRule .7s cubic-bezier(.16,1,.3,1) 3.88s both;}
.dth-play .dth-rule-r{transform-origin:0% 50%;}
@keyframes dthRule{from{transform:scaleX(0)} to{transform:scaleX(1)}}
.dth-play .dth-epithet{animation:dthRise .5s ease-out 4.11s both;}
.dth-play .dth-kicker{animation:dthRise .5s ease-out 4.37s both;}
.dth-play .dth-coinlabel{animation:dthRise .5s ease-out 5.06s both;}
/* NOT CLICKABLE UNTIL IT EXISTS. dthRise backwards-fills opacity:0, and opacity has never
   affected hit-testing — so a 316x53 invisible target sat at bottom-centre from the first frame of
   the rip, exactly where the cursor rests after the click that got you killed. Proven: at 2.0s,
   with DEATH/LAUGHS still mid-stamp, elementFromPoint returned .dth-exit and a dispatched click
   took the phase to purgatory. The director declined a skip and the mouse had one anyway. */
.dth-exit{pointer-events:none;}
.dth-armed .dth-exit{pointer-events:auto;}
.dth-play .dth-exit{animation:dthRise .55s ease-out 5.36s both;}
@keyframes dthRise{from{opacity:0; transform:translateY(9px)} to{opacity:1; transform:translateY(0)}}
.dth-play .dth-coin, .dth-play .dth-mint{animation:dthCoinDrop .62s cubic-bezier(.2,.7,.3,1) 4.53s both;}
@keyframes dthCoinDrop{
  from{opacity:0; transform:translateY(-48px) scale(1.07);}
  58%{opacity:1; transform:translateY(3px) scale(1);}
  78%{transform:translateY(-1.5px) scale(1);}
  to{opacity:1; transform:translateY(0) scale(1);}
}
/* 3.86 / 4.80, NOT 4.80 / 4.94. Re-timing the sequence by bulk-replacing timestamps shifted this
   pair TWICE: the bloom had already moved 2.88 -> 3.86 correctly, and then a later rule meant for
   the specular sweep (also 3.86) moved it again to 4.80. The coin therefore dropped, landed, rang
   its strike ring and got its label against a DEAD BLACK background — the one warm thing on the
   screen was unlit through its entire beat, and the halo only completed 1.25s after the exit
   button. The breathe now starts exactly where the bloom ends (3.86 + .9), so it cannot override a
   still-running bloom and produce the opacity pop that measured 41.5 -> 54.0 in 60ms. */
.dth-play .dth-glow{animation:dthGlowBloom .9s ease-out 4.77s both, dthGlowBreathe 4.5s ease-in-out 5.67s infinite;}
@keyframes dthGlowBloom{from{opacity:0; transform:translate(-50%,-50%) scale(.6);}
  to{opacity:1; transform:translate(-50%,-50%) scale(1);}}
@keyframes dthGlowBreathe{0%,100%{opacity:1} 50%{opacity:.72}}
/* One pass every 8s. A continuously travelling highlight reads as a web shimmer. */
.dth-play .dth-sweep{animation:dthSweep 8s linear 5.71s infinite;}
@keyframes dthSweep{
  0%{transform:translateX(-160%) rotate(18deg);}
  9%{transform:translateX(560%) rotate(18deg);}
  100%{transform:translateX(560%) rotate(18deg);}
}

/* All of it is decoration; none of it carries meaning the settled screen does not already state. */
@media (prefers-reduced-motion: reduce){
  .dth-stage, .dth-stage *, .dth-stage *::before, .dth-stage *::after{
    animation:none !important; transition:none !important;
  }
}

/* The death overlay's host, appended to document.body. See the note in ui_death.jsx for why it
   cannot live inside #app: the shell is width-capped and its enter animation transforms, which
   would re-anchor any fixed descendant mid-rip. */
/* overflow:hidden so the LAST quake can never show the page behind the stage. */
.dth-host{position:fixed; inset:0; z-index:400; overflow:hidden;}

/* NARROW AND SHORT VIEWPORTS. The column is centred with overflow hidden, so anything that does
   not fit is silently cut rather than scrolled — measured clipping the title, epithet and button
   at 400x1400. 1280x800 (the Deck) is comfortably inside both breakpoints; these exist so nothing
   is ever amputated on a shape nobody tested. */
@media (max-width: 900px){
  .dth-rule{display:none;}                 /* the flanking ash rules are the first thing to go */
  .dth-headrow{gap:0;}
}
@media (max-height: 640px), (max-width: 620px){
  .dth-epithet{margin-bottom:clamp(14px,3vw,28px);}
  .dth-kicker{margin-bottom:14px;}
  .dth-coinwrap{width:132px; height:132px; margin-bottom:10px;}
  .dth-coin{width:132px; height:132px;}
  .dth-mint{font-size:54px;}
  .dth-strike{width:132px; height:132px; margin:-66px 0 0 -66px;}
  .dth-coinlabel{margin-bottom:clamp(14px,3vw,26px);}
  .dth-exit{padding:11px 26px; font-size:13px;}
}

/* ============================== VICTORY OVERLAY ==============================
   See js/ui_win.jsx for the design rationale, and js/explore.js playVictory() for the in-room
   half. All vic- prefixed: this stylesheet carries bare `h1` and `button` rules that would
   otherwise paint over the header and the exit control.

   ONE CLOCK, TWO HALVES. Every delay here is absolute seconds from the moment .vic-play lands,
   and explore.js's VIC table uses the same numbers. Nothing is messaged between them: the wash
   covers the screen from 5.00, so the room swaps to its "after" state inside the white.

   BEAT SHEET
     0.00-0.70  the room holds, the Reaper where he fell
     0.70       control is taken; the walk begins
     0.70-3.00  the hero walks to the doors, the seam brightening as he nears it
     3.00-3.65  THE LOOK BACK: one beat facing the room he is leaving, then away
     3.65-5.00  the opening. The doors never move; the LIGHT performs it. The braziers gutter
                out, he goes to silhouette at 4.35, and at 4.95 he is taken
     5.00-5.60  the wash: a bloom sourced at the doorway, overexposing everything
     5.60-6.90  white holds; at 6.00 the room changes and the interface leaves, unseen
     6.90-9.70  the room re-develops, CHANGED: doorway open, a standing beam, motes adrift,
                the corpse rim-lit in the light he kept out. No hero.
     9.50/9.78  YOU / ESCAPED stamp
    10.58       WITH YOUR LIFE, after a 0.80s silence
    10.80/10.85 header shudders; cold rules draw outward
    11.10-11.75 flavour, unlock, kicker
    11.65-11.90 motes converge     12.00 the coin is TOSSED, flips, lands 12.75
    12.40/12.55 ember glow blooms; strike ring
    12.85/13.15 label, then the exit button
    13.70       input arms
   ========================================================================== */
.vic-host{position:fixed; inset:0; z-index:400;}
.vic-stage{
  visibility:hidden; position:fixed; inset:0; overflow:hidden;
  --bone-hi:#f1ead9; --bone:#cfc7b8; --bone-lo:#6e6857; --bone-dk:#44402f;
  --cold:#8ee0ff; --cold-dim:#9fc7e6;
}
/* Hidden until the sequence starts, or the finished screen shows for a frame before it. NOT a
   background: the live room must be visible through this the entire time. */
.vic-stage.vic-play{visibility:visible;}

/* ---- the wash ----
   IT COVERS THE ENTIRE SCREEN, not the room canvas. Both layers are position:FIXED inset:0
   inside a host at z-index 400, so the sidebar, the draughts, the log and every other panel go
   white with the room. The hero is not stepping out of a picture on the left of your monitor; he
   is stepping out, and for a second and a half there is nothing else anywhere. Anything scoped to
   the canvas would have made this a transition between two panels instead. */
/* SOURCED AT THE DOORWAY, not at the middle of the screen. --vic-bx/--vic-by are measured off
   the live canvas by ui_win.jsx (see the placement effect) and set on .vic-stage. Hard-coded
   50%/16% put the bloom a long way LEFT of and ABOVE the door: the sidebar pushes the canvas
   right, and .vic-strip does not re-centre it until 6.00 — a full second AFTER the bloom fires
   at 5.00. So the one moment the effect names its own source, it named the wrong one, and the
   wash read as an unrelated flash that happened to be on screen at the time. The fallbacks are
   only for a canvas that cannot be measured; the real values arrive before .vic-play does. */
.vic-bloom{
  position:fixed; left:var(--vic-bx,50%); top:var(--vic-by,33%); width:340px; height:340px;
  margin:-170px 0 0 -170px; border-radius:50%; pointer-events:none; opacity:0; z-index:29;
  background:radial-gradient(circle, #ffffff 0%, #dff4fc 42%, rgba(142,224,255,.55) 66%, rgba(142,224,255,0) 78%);
  will-change:transform,opacity;
}
.vic-play .vic-bloom{animation:vicBloom 4.7s linear 5.00s both;}
@keyframes vicBloom{
  0%{opacity:0; transform:scale(.10)}
  8%{opacity:.9; transform:scale(1.4)}
  15%{opacity:1; transform:scale(7)}
  40%{opacity:1; transform:scale(9)}
  100%{opacity:0; transform:scale(9)}
}
.vic-white{position:fixed; inset:0; background:#eef9fd; opacity:0; pointer-events:none; z-index:30;}
.vic-play .vic-white{animation:vicWhite 4.7s linear 5.00s both;}
@keyframes vicWhite{
  0%{opacity:0} 13%{opacity:1}      /* 5.20 full white */
  39%{opacity:1}                     /* 6.40 the hold ends */
  100%{opacity:0}                    /* 9.20 the room is back */
}
/* Legibility. Kept OFF the room for the first 2.4 seconds of the after-state and then brought
   in one beat before the first word lands, which is the whole reason it is on a delay: the room
   gets to be looked at, and only then does the screen quiet down so the type can own it.

   IT HAS TO BE THIS STRONG. The column is centred on the viewport and .vic-strip re-centres the
   canvas under it, so the headline sits directly on the beam — bone-white letters on the one
   part of the frame that is blown out to white. At .48 the two were the same value. The falloff
   still lets the edges of the room through, and the doorway and the beam are additive, so they
   burn through this rather than being covered by it: the world is still plainly there. */
.vic-scrim{position:fixed; inset:0; z-index:15; pointer-events:none;
  background:radial-gradient(86% 74% at 50% 52%, rgba(3,3,7,.72) 0%, rgba(3,3,7,.46) 52%, rgba(3,3,7,.14) 100%);}
.vic-play .vic-scrim{animation:vicScrimIn .8s ease 9.30s both;}
@keyframes vicScrimIn{from{opacity:0} to{opacity:1}}

/* ---- the column ---- */
.vic-overlay{position:fixed; inset:0; z-index:20; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center; padding-bottom:1vh;
  pointer-events:none;}
.vic-overlay .vic-exit{pointer-events:none;}
.vic-armed .vic-overlay .vic-exit{pointer-events:auto;}
.vic-head{display:flex; flex-direction:column; align-items:center;}
.vic-headrow{display:flex; align-items:center; gap:34px; margin-bottom:6px;}
/* A div, not an h1: the bare `h1` rule near the top of this file sets its own family and tracking.
   margin-right cancels the trailing letter-space; text-indent cannot, on a flex container. */
.vic-h1{font-family:'Cinzel',serif; font-weight:900; font-size:clamp(26px,5.2vw,78px); line-height:1;
  letter-spacing:.13em; margin-right:-.13em; white-space:nowrap; display:flex; gap:.32em;}
/* Same bone ramp as the death title. The undertone swaps blood for the cold of outside, which is
   the door light's own colour: felt rather than seen. */
.vic-w{display:inline-block;
  background:linear-gradient(180deg,var(--bone-hi) 0%,var(--bone) 38%,var(--bone-lo) 74%,var(--bone-dk) 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  text-shadow:0 0 34px rgba(142,224,255,.20), 0 0 90px rgba(142,224,255,.10);
  filter:drop-shadow(-4px 6px 8px rgba(0,0,0,.75));}
/* SMALLER AND LOWER, and it took a picture to see why. At the same size as the line above it,
   WITH YOUR LIFE is forty per cent wider (fourteen glyphs against eleven) and a negative
   margin-top on a line-height of 1 put the caps of the two lines into each other — they
   physically collided at any viewport wide enough to hit the clamp. It measured fine: two
   elements, correct text, no overflow. Positive leading, and one step down in size, which is
   also the right typography for it: the payoff is the QUIETER line, not the louder one. */
.vic-h1last{font-size:clamp(24px,4.6vw,70px); margin-top:.16em; margin-bottom:30px;}
/* Cold rules where death had ash. */
.vic-rule{height:2px; width:min(190px,14vw); flex:none;
  background:linear-gradient(90deg, rgba(159,199,230,0) 0%, rgba(159,199,230,.8) 100%);}
.vic-rule-r{background:linear-gradient(270deg, rgba(159,199,230,0) 0%, rgba(159,199,230,.8) 100%);}

.vic-flavour{font-family:'EB Garamond',Georgia,serif; font-style:italic; font-weight:500;
  font-size:clamp(16px,1.7vw,24px); color:var(--ink-dim); letter-spacing:.015em;
  margin-bottom:14px; text-shadow:0 2px 8px rgba(4,4,9,.9);}
.vic-out{color:var(--ink);}
.vic-unlock{font-family:'EB Garamond',Georgia,serif; font-style:italic; font-weight:500;
  font-size:clamp(15px,1.55vw,21px); color:var(--ink-dim);
  margin-bottom:clamp(16px,2.2vw,30px); text-shadow:0 2px 8px rgba(4,4,9,.9);}
.vic-asc{color:var(--cold);}
.vic-kicker{font-family:'EB Garamond',Georgia,serif; font-style:italic; font-weight:500;
  font-size:clamp(15px,1.5vw,21px); color:var(--ink-dim);
  margin-bottom:26px; text-shadow:0 2px 8px rgba(4,4,9,.9);}

/* ---- the coin: presentation taken directly from the death screen ---- */
.vic-coinwrap{position:relative; width:190px; height:190px; margin-bottom:18px;}
.vic-glow{position:absolute; left:50%; top:50%; width:520px; height:520px;
  transform:translate(-50%,-50%); pointer-events:none;
  background:radial-gradient(circle, rgba(255,178,92,.30) 0%, rgba(255,178,92,.10) 34%, transparent 68%);}
.vic-coin{position:absolute; inset:0; width:190px; height:190px;
  filter:drop-shadow(-7px 10px 14px rgba(0,0,0,.85));}
.vic-coin g.flipper{transform-box:fill-box; transform-origin:center;}
.vic-mint{position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:'Cinzel',serif; font-weight:900; font-size:76px; letter-spacing:.01em;
  color:#2e2209; text-shadow:0 1px 0 rgba(247,230,176,.45), 0 -1px 1px rgba(20,14,3,.55);}
.vic-sweepclip{position:absolute; inset:6px; border-radius:50%; overflow:hidden; pointer-events:none;}
.vic-sweep{position:absolute; top:-30%; bottom:-30%; left:-70%; width:44%;
  transform:translateX(-160%) rotate(18deg); mix-blend-mode:screen;
  background:linear-gradient(90deg, transparent 0%, rgba(247,230,176,0) 20%, rgba(247,230,176,.38) 50%, rgba(247,230,176,0) 80%, transparent 100%);}
.vic-mote{position:absolute; left:50%; top:50%; width:5px; height:5px; border-radius:50%;
  margin:-2.5px 0 0 -2.5px; pointer-events:none; opacity:0;
  background:#f2d98a; box-shadow:0 0 8px 2px rgba(255,178,92,.55);}
.vic-play .vic-mote{animation:vicMoteIn .55s cubic-bezier(.5,0,.9,.6) both; animation-delay:var(--md);}
@keyframes vicMoteIn{
  from{opacity:0; transform:translate(var(--dx),var(--dy)) scale(.7)}
  25%{opacity:.95} to{opacity:0; transform:translate(0,0) scale(.25)}
}
.vic-strike{position:absolute; left:50%; top:50%; width:190px; height:190px; border-radius:50%;
  margin:-95px 0 0 -95px; pointer-events:none; opacity:0;
  border:2px solid rgba(247,230,176,.85);
  box-shadow:0 0 22px rgba(255,178,92,.4), inset 0 0 18px rgba(255,178,92,.25);}
.vic-play .vic-strike{animation:vicStrike .45s ease-out 12.55s both;}
@keyframes vicStrike{0%{opacity:0; transform:scale(.4)} 8%{opacity:.95; transform:scale(.47)}
  100%{opacity:0; transform:scale(1.28)}}
.vic-coinlabel{font-family:'Cinzel',serif; font-weight:700; font-size:17px;
  letter-spacing:.14em; text-indent:.14em;
  background:linear-gradient(180deg,#fff6da 0%,#f2d98a 34%,#c9a94e 62%,#8a6a22 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  margin-bottom:clamp(26px,4vw,58px);}

/* The bare `button` rule paints a gradient, a border, a radius and an inset hover shadow. Every
   one of them is restated here so the control cannot inherit chrome that does not belong. */
.vic-exit, .vic-exit:hover, .vic-exit:active, .vic-exit:focus, .vic-exit:focus-visible{
  font-family:'Cinzel',serif; font-weight:700; font-size:15px;
  letter-spacing:.14em; text-indent:.14em; color:var(--ink);
  background:linear-gradient(180deg,var(--iron-hi) 0%,var(--iron-lo) 100%);
  border:1px solid var(--border); border-radius:0; padding:15px 44px; outline:none;
  box-shadow:-5px 7px 12px rgba(0,0,0,.7), inset 0 1px 0 rgba(207,199,184,.07);
  transition:border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.vic-exit:hover, .vic-exit:focus-visible{
  border-color:var(--leaf); color:var(--leaf-hi);
  box-shadow:-5px 7px 12px rgba(0,0,0,.7), 0 0 18px rgba(255,178,92,.14), inset 0 1px 0 rgba(247,230,176,.14);
}

/* ---- the settling ---- */
/* NO `filter` IN ANY STAMP KEYFRAME. On the death screen, animating a filter across
   background-clip:text lost the fill the instant the animation COMPLETED — invisible to every
   pinned capture, visible in every real playthrough. Opacity and transform only, forever. */
.vic-play .vic-w1{animation:vicStamp .22s cubic-bezier(.2,.85,.3,1) 9.50s both;}
.vic-play .vic-w2{animation:vicStamp .22s cubic-bezier(.2,.85,.3,1) 9.78s both;}
.vic-play .vic-w3{animation:vicStamp .26s cubic-bezier(.2,.85,.3,1) 10.58s both;}
@keyframes vicStamp{from{opacity:0; transform:scale(1.16)} 60%{opacity:1; transform:scale(.985)}
  to{opacity:1; transform:scale(1)}}
.vic-play .vic-headrow{animation:vicShudder .22s linear 10.80s;}
@keyframes vicShudder{0%{transform:translate(0,0)} 30%{transform:translate(1.6px,-1.2px)}
  55%{transform:translate(-1.4px,1px)} 80%{transform:translate(.8px,-.5px)} 100%{transform:translate(0,0)}}
.vic-play .vic-rule{transform-origin:100% 50%; animation:vicRule .7s cubic-bezier(.16,1,.3,1) 10.85s both;}
.vic-play .vic-rule-r{transform-origin:0% 50%;}
@keyframes vicRule{from{transform:scaleX(0)} to{transform:scaleX(1)}}
.vic-play .vic-flavour{animation:vicRise .5s ease-out 11.10s both;}
.vic-play .vic-unlock{animation:vicRise .5s ease-out 11.45s both;}
.vic-play .vic-kicker{animation:vicRise .5s ease-out 11.75s both;}
.vic-play .vic-coinlabel{animation:vicRise .5s ease-out 12.85s both;}
.vic-play .vic-exit{animation:vicRise .55s ease-out 13.15s both;}
@keyframes vicRise{from{opacity:0; transform:translateY(9px)} to{opacity:1; transform:translateY(0)}}

/* THE TOSS. Death's coin FALLS to you; this one is flicked up and lands. Same coin, same rest,
   opposite gesture: consolation against payment. */
.vic-play .vic-coin{animation:vicCoinToss .75s cubic-bezier(.3,.6,.35,1) 12.00s both;}
@keyframes vicCoinToss{
  from{opacity:0; transform:translateY(52px) scale(.9)}
  38%{opacity:1; transform:translateY(-16px) scale(1.05)}
  70%{transform:translateY(4px) scale(1)}
  to{opacity:1; transform:translateY(0) scale(1)}
}
.vic-play .vic-coin g.flipper{animation:vicFlip .5s ease-out 12.02s both;}
@keyframes vicFlip{from{transform:scaleY(1)} 40%{transform:scaleY(.16)} 75%{transform:scaleY(1.05)}
  to{transform:scaleY(1)}}
/* The mint is read only once the coin has settled — a number spinning edge-on is noise. */
.vic-play .vic-mint{animation:vicMintIn .28s ease-out 12.45s both;}
@keyframes vicMintIn{from{opacity:0} to{opacity:1}}
.vic-play .vic-glow{animation:vicGlowBloom .9s ease-out 12.40s both, vicGlowBreathe 4.5s ease-in-out 13.30s infinite;}
@keyframes vicGlowBloom{from{opacity:0; transform:translate(-50%,-50%) scale(.6)}
  to{opacity:1; transform:translate(-50%,-50%) scale(1)}}
@keyframes vicGlowBreathe{0%,100%{opacity:1} 50%{opacity:.72}}
.vic-play .vic-sweep{animation:vicSweep 8s linear 13.40s infinite;}
@keyframes vicSweep{0%{transform:translateX(-160%) rotate(18deg)} 9%{transform:translateX(560%) rotate(18deg)}
  100%{transform:translateX(560%) rotate(18deg)}}

/* Narrow and short viewports: nothing is ever amputated on a shape nobody tested. */
@media (max-width: 900px){ .vic-rule{display:none;} .vic-headrow{gap:0;} }
@media (max-height: 640px), (max-width: 620px){
  .vic-flavour{margin-bottom:8px;}
  .vic-unlock{margin-bottom:12px;}
  .vic-kicker{margin-bottom:14px;}
  .vic-coinwrap{width:132px; height:132px; margin-bottom:10px;}
  .vic-coin{width:132px; height:132px;}
  .vic-mint{font-size:54px;}
  .vic-strike{width:132px; height:132px; margin:-66px 0 0 -66px;}
  .vic-coinlabel{margin-bottom:clamp(14px,3vw,26px);}
  .vic-exit{padding:11px 26px; font-size:13px;}
}

/* All of it is decoration; the settled screen already states everything it means. */
@media (prefers-reduced-motion: reduce){
  .vic-stage, .vic-stage *, .vic-stage *::before, .vic-stage *::after{
    animation:none !important; transition:none !important;
  }
  /* The wash and the scrim rest at opacity 0 and 1 respectively; with animations off the white
     must not sit over the finished screen. */
  .vic-white, .vic-bloom{opacity:0 !important;}
}

/* THE INTERFACE LEAVES, INSIDE THE WHITE.
   When the light thins, the room has to be the only thing left — a rail of hit points and a
   combat log framing it would say "you are looking at a game screen" at exactly the moment the
   screen is arguing that the world is real and you are gone from it. The class is applied by
   ui_win.jsx at SWAP (5.60s), which is a full 0.4s inside the overlay's white hold, so not one
   frame of the change is ever visible. display:none rather than opacity, deliberately: the row
   re-centres the canvas on the screen once the rail is out of it, and a layout shift under full
   white is free. The in-wrap layers are absolutely positioned, so opacity is enough for them. */
body.vic-strip #sidebar-mount,
body.vic-strip #explore-below,
body.vic-strip #map-mount,
body.vic-strip #mute-btn{display:none !important;}
body.vic-strip #minimap-mount,
body.vic-strip #dir-layer,
body.vic-strip #dx-overlay,
body.vic-strip #explore-banner{opacity:0 !important; pointer-events:none;}

/* THE TWO RULES SIT THE SAME DISTANCE FROM WHAT THEY SEPARATE. Measured: the swatches clear the
   Opening Hand rule by 16px, while this one cleared the Health bar by 75 -- .hs-asc's 12px margin,
   .hs-right's 34px flex gap, .hs-evidence's 14px margin and 2px padding, plus 7px inside the track
   before the bar draws. The gap is cancelled for the whole column and re-added to the one child
   that wanted it, so the pair can be set exactly rather than fought with a negative margin. */
.hs-right{ gap:0 }
.hs-right > .hs-evidence{ margin-top:1px }   /* measured to land gap A on gap B's 16px */
.hs-right > .hs-commit{ margin-top:34px }

/* The 55px lift, only where there is height to spend on it (see .hs-asc). */
@media (min-height:800px){
  .hs-asc{ margin-top:-55px; margin-bottom:55px }
}

/* The section rule, owned by the block BELOW it so the lifted Ascension box cannot carry it away.
   Adjacent-sibling scoped, so a player with no Ascension unlocked does not get a rule hanging at
   the top of the column with nothing above it. 8px + the 7px inside the track puts the Health bar
   the same 16px clear of it that the swatches sit clear of the Opening Hand rule. */
.hs-asc + .hs-evidence{ border-top:1px solid rgba(201,169,78,.16); padding-top:8px }

/* THE FOOT READS AT ARM'S LENGTH. The coin count and the control legend were 15px and 12px in a
   corner of a 1880px screen, which is a footnote rather than a readout -- and the legend is the
   only place the gamepad bindings are stated. Sized up together so the pair still reads as one
   block, and the coin keeps the larger of the two because it is a number the player is deciding
   against. Placed here because both are re-declared further up the sheet. */
.hs-coin{ font-size:18px }
.hs-legend{ font-size:14px; letter-spacing:.12em }

/* ==========================================================================================
   PURGATORY — "the ledger". Built to docs/purgatory-screen-spec.md rev 2.
   Every number here is the spec's, measured at the 1280x800 floor. Nothing scrolls.
   ========================================================================================== */
.pg-screen{
  position:fixed; inset:0; overflow:hidden; z-index:1;
  font-family:'EB Garamond',Georgia,serif;
}
/* The backdrop is Hero Select's, verbatim — same image, same camera, same grade, same push-in.
   Two screens standing in the same room must be photographed from the same place. */
.pg-backdrop{
  position:absolute; inset:0; z-index:0;
  background-image:url("../assets/menu/key-art-1080.jpg?v=ff34b7c2");
  background-image:image-set(url("../assets/menu/key-art-1080.webp?v=136244ec") type("image/webp"),
                             url("../assets/menu/key-art-1080.jpg?v=ff34b7c2")  type("image/jpeg"));
  background-size:cover; background-position:center;
  transform:scale(1.35); transform-origin:0% 40%;
  filter:blur(1.85px);
  animation:hsPushIn 1100ms cubic-bezier(.16,1,.3,1) both;
}
.pg-backdrop::before{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(86% 92% at 20% 52%, rgba(11,9,8,.72) 0%, rgba(11,9,8,.56) 44%,
                    rgba(11,9,8,.20) 74%, rgba(11,9,8,0) 100%),
    linear-gradient(rgba(9,8,12,.28), rgba(9,8,12,.28));
}
.pg-backdrop::after{
  content:""; position:absolute; inset:0;
  background:radial-gradient(112% 88% at 44% 46%, rgba(0,0,0,0) 30%, rgba(0,0,0,.74) 100%);
}
/* Guarantees the header band whatever the key art is doing beneath it. */
.pg-headscrim{
  position:absolute; left:0; right:0; top:0; height:110px; z-index:1; pointer-events:none;
  background:linear-gradient(180deg, rgba(9,8,12,.58), rgba(9,8,12,0));
}

/* ---- the head band -------------------------------------------------------------------- */
.pg-flavour{
  position:absolute; left:0; right:0; top:30px; z-index:3; margin:0;
  text-align:center; font-style:normal; font-size:19px; color:#cfc7b8;
  /* Written out rather than borrowing .dx-etch: that class is inline-block and drags an
     elliptical aura sized for a different label, which is the recorded bug source. */
  text-shadow:0 1px 0 #000, 0 0 10px rgba(0,0,0,.9);
}
/* THE GUIDE'S LINE in the flavour line's place (js/guide.js purgatoryTip): the room Guide's voice,
   mark and light, and the row it names breathing in the same light */
/* One sentence (owner's wording, 2026-11-05) where the flavour line stood, at its size, with all the
   band between Back and the Coin to wrap in if it must (the Coin's own text is about 150px of its
   280px box). */
.pg-flavour.is-guide{ font-family:'EB Garamond',Georgia,serif; font-style:italic; font-size:19px; line-height:1.28; color:var(--guide-ink);
  /* centred by its margins, not a transform: its rising entrance (dxcCoachIn) animates transform */
  margin:0 auto; width:min(880px, calc(100% - 2 * (max(72px,4.5vw) + 170px))); text-wrap:balance;
  animation:dxcCoachIn .5s cubic-bezier(.2,.7,.2,1) both }
.pg-flavour.is-guide b{ font-style:normal; font-family:'Cinzel',serif; font-size:.82em; letter-spacing:.05em;
  color:var(--guide); text-shadow:0 1px 0 #000, 0 0 10px rgba(var(--guide-glow),.5) }
.pg-gd-k{ display:inline-block; margin-right:.8em; padding:.2em .55em .14em; vertical-align:.2em;
  font-family:'Cinzel',serif; font-style:normal; font-weight:700; font-size:.6em; letter-spacing:.22em;
  text-transform:uppercase; line-height:1; color:var(--guide);
  border:1px solid rgba(var(--guide-glow),.6); border-radius:2px; box-shadow:0 0 8px rgba(var(--guide-glow),.35) }
/* a phone: the line on the plate in the epigraph's place (its header band has no room for it) */
.pg-epi-guide{ display:none }
html.is-phone .pg-epi-std{ display:none }
html.is-phone .pg-epi-guide{ display:block; color:var(--guide-ink); font-size:12.5px; line-height:1.3; text-wrap:balance;
  text-shadow:0 1px 0 #000, 0 0 10px rgba(0,0,0,.9); animation:dxcCoachIn .5s cubic-bezier(.2,.7,.2,1) both }
html.is-phone .pg-epi-guide b{ font-style:normal; font-family:'Cinzel',serif; font-size:.82em; letter-spacing:.05em; white-space:nowrap;
  padding-left:.14em; color:var(--guide); text-shadow:0 1px 0 #000, 0 0 10px rgba(var(--guide-glow),.5) }
.pg-row.is-guide{ box-shadow:inset 0 0 0 1px rgba(var(--guide-glow),.55), 0 0 16px rgba(var(--guide-glow),.3);
  animation:dxcBeckonRing 1.9s ease-in-out infinite }
.pg-row.is-guide .pg-row-name{ color:#eaf9fc; text-shadow:0 1px 0 #000, 0 0 10px rgba(var(--guide-glow),.6) }
@media (prefers-reduced-motion: reduce){ .pg-row.is-guide{ animation:none } }
.pg-coin{ position:absolute; right:max(72px,4.5vw); top:24px; z-index:3; text-align:right; width:280px }
/* 10.5px under a 30px number is a caption, not a label, and this one names the only currency in
   the game. At that size the .18em tracking was doing the legibility no favours either: wide
   letter-spacing costs more the smaller the type gets. Up to 13px, tracking eased to .15em, and a
   step brighter, which is the same #cec4ae the rail status and the pip captions moved to. */
.pg-coin-eyebrow{ font-family:'Cinzel',serif; font-size:13px; letter-spacing:.15em; color:#cec4ae; text-transform:uppercase }
.pg-coin-value{
  font-family:'Cinzel',serif; font-size:30px; letter-spacing:.04em; color:var(--gold);
  line-height:1.15; text-shadow:0 1px 0 #000, 0 0 14px rgba(0,0,0,.85);
  font-variant-numeric:tabular-nums;
}

/* ---- the rail ------------------------------------------------------------------------- */
/* THE BAND. Rail and plate are its two children, vertically centred together in the space the
   header and footer leave. Both used to be absolutely positioned against different anchors — the
   plate from a fixed top, the rail from the viewport's middle — so every pixel of extra height
   pulled them apart. One flex row means they cannot disagree about where the middle is. */
.pg-band{
  position:absolute; left:max(72px,4.5vw); right:max(72px,4.5vw); top:110px; bottom:56px;
  z-index:2; display:flex; align-items:center; gap:24px;
}
.pg-rail{
  flex:0 0 248px; width:248px; display:flex; flex-direction:column; gap:8px; z-index:3;
}
.pg-rail-item{
  display:flex; align-items:center; height:56px; padding:0; width:100%;
  background:none; border:0; box-shadow:none; outline:none; text-align:left;
  animation:pgRailIn 420ms cubic-bezier(.16,1,.3,1) both;
}
.pg-rail-item:nth-child(1){ animation-delay:300ms } .pg-rail-item:nth-child(2){ animation-delay:385ms }
.pg-rail-item:nth-child(3){ animation-delay:470ms } .pg-rail-item:nth-child(4){ animation-delay:555ms }
.pg-rail-item:nth-child(5){ animation-delay:640ms } .pg-rail-item:nth-child(6){ animation-delay:725ms }
.pg-rail-item:nth-child(7){ animation-delay:810ms }
@keyframes pgRailIn{ from{ opacity:0; transform:translateY(6px) } to{ opacity:1; transform:none } }
/* The caret supplants the numeral on the current entry: "VII" sets ~26px on its own and the two
   cannot share 26. Either way the name column's x never moves. */
.pg-rail-gut{
  position:relative; flex:0 0 26px; width:26px; height:26px;
  font-family:'Cinzel',serif; font-size:11px; letter-spacing:.14em; color:#6d6659;
  display:flex; align-items:center;
}
.pg-rail-body{ display:flex; flex-direction:column; gap:3px; min-width:0 }
.pg-rail-name{
  font-family:'Cinzel',serif; font-size:17px; letter-spacing:.15em; color:#9a9280;
  transition:color 160ms ease, letter-spacing 160ms ease;
}
.pg-rail-item:hover .pg-rail-name{ color:#cfc7b8 }
.pg-rail-item.on .pg-rail-name{ color:#fff3d6; letter-spacing:.175em }
.pg-rail-status{ font-family:'Cinzel',serif; font-size:10.5px; letter-spacing:.16em; color:#a89f8c }
.pg-rail-dot{
  margin-left:auto; width:6px; height:6px; background:var(--gold);
  transform:rotate(45deg); box-shadow:0 0 8px rgba(232,200,96,.5);
}

/* ---- the plate ------------------------------------------------------------------------- */
.pg-plate{
  position:relative; flex:1 1 auto; align-self:center;
  max-width:1104px; height:min(100%, 768px); min-height:616px;
  animation:rxPlaqueIn 800ms cubic-bezier(.2,.7,.3,1) 60ms both;
}
/* Height won above the floor becomes breathing room BETWEEN rows, never a pool of dead iron at
   the foot: the rows region distributes it and each row keeps its authored height. */
.pg-rows{ justify-content:space-evenly }
.pg-plate-svg{ position:absolute; inset:0; width:100%; height:100% }
.pg-plate-in{ position:absolute; inset:0; padding:46px 28px 0; display:flex; flex-direction:column }
.pg-title{
  margin:0; text-align:center; font-family:'Cinzel',serif; font-weight:700;
  font-size:30px; letter-spacing:.1em; line-height:1.2;
}
.pg-epigraph{ margin:6px 0 0; text-align:center; font-style:italic; font-size:16.5px; color:#a89f8c }
.pg-rule{ height:1px; background:rgba(201,169,78,.16); margin:10px 0 0; flex:0 0 auto }
.pg-rows{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column }
.pg-well{
  flex:0 0 44px; display:flex; align-items:center; justify-content:center; text-align:center;
  font-size:15px; line-height:1.4; color:#cfc7b8; padding:0 8px;
}
.pg-empty{ margin:auto; color:#a89f8c; font-style:italic }

/* ---- a ledger row ---------------------------------------------------------------------- */
.pg-row{
  position:relative; display:grid; align-items:center; column-gap:16px;
  grid-template-columns:26px minmax(0,1fr) 150px 190px;
  border-bottom:1px solid rgba(201,169,78,.16);
  padding:0 2px; outline:none;
  animation:pgRowIn 220ms cubic-bezier(.16,1,.3,1) both;
}
.pg-row.wide{ grid-template-columns:26px minmax(0,1fr) 240px }
.pg-row:last-child{ border-bottom:0 }
.pg-row:nth-child(1){ animation-delay:0ms } .pg-row:nth-child(2){ animation-delay:30ms }
.pg-row:nth-child(3){ animation-delay:60ms } .pg-row:nth-child(4){ animation-delay:90ms }
.pg-row:nth-child(5){ animation-delay:120ms } .pg-row:nth-child(6){ animation-delay:150ms }
@keyframes pgRowIn{ from{ opacity:0; transform:translateY(8px) } to{ opacity:1; transform:none } }
/* What you CHOSE, as distinct from where you ARE. The caret is the cursor; this is the mark. */
.pg-row.equipped::before{
  content:""; position:absolute; left:0; top:6px; bottom:6px; width:3px;
  background:linear-gradient(180deg, var(--leaf-hi), var(--leaf) 30%, var(--leaf-dk));
}
.pg-row-caret{ position:relative; width:26px; height:15px }
/* A Sigil's phase of Death's fight, set as the fight's own phase card sets its kicker (explore.js
   drawPhaseTurn: Cinzel 700, tracked, #b9665c), so the page and the fight read as one thing. */
/* Hung ABOVE the name, out of the flow: the caret, the pips and the price all align with the name
   (see "THE CARET SITS BESIDE THE NAME" below), and an in-flow line would push it off that line. */
.pg-row-text{ position:relative }
/* ...and the row's block steps down to make room for it, every column together so they stay
   aligned. The rows are fixed-height (136px) and top-aligned, so this spends empty space below. */
.pg-row.has-kicker{ padding-top:30px }
.pg-row-kicker{ position:absolute; left:0; bottom:100%; margin-bottom:5px; white-space:nowrap;
  font-family:'Cinzel',serif; font-weight:700; font-size:11px; letter-spacing:.24em;
  text-transform:uppercase; color:#b9665c }
.pg-row-name{ font-family:'Cinzel',serif; font-size:19px; letter-spacing:.06em; color:#efe7d6 }
.pg-row.wide .pg-row-name{ font-size:22px }
.pg-row-name.big{ font-size:22px }
.pg-row:focus .pg-row-name,.pg-row:hover .pg-row-name{ color:#fff3d6 }
.pg-row-desc{ font-size:16.5px; line-height:1.35; color:var(--ink); margin-top:3px }
.pg-row.wide .pg-row-desc{ font-size:17px }
.pg-row-desc.price{ font-style:italic; color:#a89f8c }
.pg-row-pips{ text-align:center }
.pg-pips{ display:flex; align-items:center; justify-content:center; gap:8px }
.pg-pip{ width:14px; height:14px; transform:rotate(45deg); display:block }
.pg-pip.on{ background:var(--leaf); box-shadow:inset 1px 1px 0 var(--leaf-hi) }
.pg-pip.open{ border:1.2px solid var(--gold-dim) }
/* A socket not yet cut open — categorically unlike "next", which is the empty outline above. */
.pg-pip.sealed{ background:#0b0a09; border:1px solid #3a3222; box-shadow:inset 0 1px 2px rgba(0,0,0,.9) }
.pg-pip-cap{ font-family:'Cinzel',serif; font-size:10px; letter-spacing:.1em; color:#a89f8c; margin-top:5px }
.pg-row-act{ text-align:right; display:flex; flex-direction:column; align-items:flex-end; gap:6px }

/* ---- actions ---------------------------------------------------------------------------- */
/* ONE WIDTH FOR EVERY ACTION CONTROL ON THE PLATE.
   These buttons were sized by their own text, so a column of them was ragged on the left edge
   purely because prices have different digit counts: ATTUNE ran 147.8px at ◈ 7 and 156px at ◈ 21,
   and across pages BUY was 118.7 while INSCRIBE was 171.7. The price is the variable, and the
   furniture should not move because a number got wider.

   176px is measured, not picked: the widest label the game can actually print is INSCRIBE · ◈ 92
   at 171.7px. The dearest sigil rank is ◈ 368, but INSCRIBE only ever shows at rank 0 where the
   cost is the base, so the theoretical INSCRIBE · ◈ 368 (184.4px) is not a reachable state. It
   stays a MIN width so an unforeseen longer string grows instead of clipping, and it still fits
   the narrower of the two action columns (187.1px on ranked pages, 236.4px on wide ones).

   The chip carries it too. It is the same slot saying the same thing when you cannot afford it,
   and letting it size itself would put the raggedness back the moment a price went out of reach. */
:root{ --pg-act-w:176px }
.pg-buy{
  min-width:var(--pg-act-w); box-sizing:border-box; text-align:center;
  font-variant-numeric:tabular-nums;   /* 1 as wide as 8, so a price change cannot resize a button */
}
.pg-buy{
  font-family:'Cinzel',serif; font-size:15px; letter-spacing:.14em; padding:9px 14px;
  color:#1a1510; border:0; border-radius:2px;
  background:linear-gradient(180deg,#f0d98a,var(--gold) 48%,#a8862f);
  box-shadow:0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.45);
  transition:filter 160ms ease, box-shadow 160ms ease;
}
.pg-buy:hover,.pg-buy:focus-visible{ filter:brightness(1.08); box-shadow:0 0 0 1px #000, 0 0 30px rgba(232,200,96,.45), inset 0 1px 0 rgba(255,255,255,.45) }
/* OUT OF REACH. Same box, same width, same words; struck in outline instead of gold leaf so it
   reads as the price of a thing rather than an offer. The row must still take a click, so this
   lets the press through to the row rather than swallowing it the way `disabled` would. */
.pg-buy.is-locked{
  display:inline-block; background:none; color:var(--gold-dim);
  border:1px solid rgba(201,169,78,.30); box-shadow:none;
 pointer-events:none;
}
.pg-buy.is-locked:hover{ filter:none; box-shadow:none }
/* What cannot be pressed must not look pressable. */
.pg-maxed{ font-family:'Cinzel',serif; font-size:12px; letter-spacing:.16em; color:var(--gold-dim) }
.pg-sealed{ font-family:'Cinzel',serif; font-size:12px; letter-spacing:.14em; color:#a89f8c; display:inline-flex; align-items:center; gap:6px }
/* An iron staple, drawn — never the emoji, which ignores the palette and dates the screen. */
/* A padlock is a BODY with a shackle over it. This drew one 9x10 box with a hairline beneath and
   read as an empty box on a plinth: the shackle was the whole glyph and the body was 1.4px. The
   body is now the box and the shackle is a narrower arch above it, which is what the eye expects
   at 12px. Shared with the Sigils page, which shows the same marker. */
/* SEALED until another card is owned (the Deep Ledger, the Bequest): two right-aligned lines */
.pg-sealed.pg-needs{ flex-direction:column; align-items:flex-end; gap:4px; text-align:right }
.pg-needs > span{ display:inline-flex; align-items:center; gap:6px }
.pg-needs em{ font-style:normal; white-space:nowrap }
.pg-lock{
  width:9px; height:7px; border:1.4px solid #6d6659; border-radius:1.5px;
  display:inline-block; position:relative; vertical-align:-1px; margin-right:3px;
}
.pg-lock::before{
  content:""; position:absolute; left:50%; top:-5px; transform:translateX(-50%);
  width:5px; height:5px; border:1.4px solid #6d6659; border-bottom:0; border-radius:3px 3px 0 0;
}
/* THE STATE OF A THING YOU OWN SHOULD NOT BE THE SMALLEST TYPE ON THE PLATE. "✦ SWORN" and its
   "Set aside" sat at 13px and 14px in the same column as a 15px gold pill, so the one row telling
   you what you have equipped read as a footnote to the rows selling you what you do not. Both go
   up, the release verb loses a step of grey, and the pair gets room to breathe. Shared with the
   Sigils page ("✦ BOUND / Unbind") and Titles ("✦ WORN"), which want it for the same reason. */
.pg-worn{ font-family:'Cinzel',serif; font-size:15px; letter-spacing:.1em; color:var(--gold); display:flex; flex-direction:column; align-items:flex-end; gap:5px }
.pg-quiet{ background:none; border:0; box-shadow:none; font-family:'EB Garamond',serif; font-style:italic; font-size:15.5px; color:#cec4ae; padding:0 }
.pg-quiet:hover{ color:var(--ink) }
/* Cosmetics never dress like purchases: outlined, never gold-filled. */
.pg-equip{
  font-family:'Cinzel',serif; font-size:13px; letter-spacing:.12em; padding:7px 12px;
  color:#e8dcc2; background:none; border:1px solid rgba(201,169,78,.35); border-radius:2px;
}
.pg-equip:hover{ border-color:rgba(201,169,78,.7); color:#fff3d6 }
.pg-equip.gold{ background:linear-gradient(180deg,#f0d98a,var(--gold) 48%,#a8862f); color:#1a1510; border:0; box-shadow:0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.45) }
.pg-locked-note{ font-size:14px; color:#a89f8c; font-style:italic }

/* ---- Bequest ---------------------------------------------------------------------------- */
/* Room under the plate's rule: the heir line (or the heir tabs) sat hard against it. */
.pg-beq{ display:flex; flex-direction:column; height:100%; box-sizing:border-box; padding-top:14px }
.pg-beq-heir{ margin:0 0 10px; text-align:center; font-style:italic; font-size:18px; color:#cfc7b8 }
/* One tab per hero with an estate (only when there is more than one). The active hero is gold and
   underlined like the page title's rule; the number is how many that hero is carrying down. */
.pg-beq-heirs{ display:flex; justify-content:center; gap:28px; margin:-2px 0 10px }
button.pg-beq-heirtab{ position:relative; padding:4px 2px 7px; background:none; border:0; box-shadow:none;
  font-family:'Cinzel',serif; font-size:13px; letter-spacing:.18em; text-transform:uppercase; color:#8f8779;
  transition:color .18s }
button.pg-beq-heirtab:hover{ color:#efe7d6; box-shadow:none }
button.pg-beq-heirtab.on{ color:#f2d98a }
button.pg-beq-heirtab::after{ content:""; position:absolute; left:0; right:0; bottom:0; height:1px;
  background:linear-gradient(90deg, transparent, var(--leaf) 20%, var(--leaf-hi) 50%, var(--leaf) 80%, transparent);
  opacity:0; transition:opacity .18s }
button.pg-beq-heirtab.on::after{ opacity:1 }
.pg-beq-heirn{ margin-left:8px; font-size:10px; letter-spacing:.1em; color:#c9a94e }
.pg-beq-cols{ display:grid; grid-template-columns:470px 32px minmax(0,1fr); flex:1 1 auto; min-height:0 }
.pg-beq-slots{ grid-column:3 }
.pg-eyebrow{ font-family:'Cinzel',serif; font-size:10.5px; letter-spacing:.18em; color:#a89f8c; margin-bottom:8px; text-transform:uppercase }
.pg-beq-row{
  display:flex; align-items:center; gap:8px; width:100%; height:44px; padding:0;
  background:none; border:0; box-shadow:none; text-align:left; outline:none;
}
.pg-beq-caret{ position:relative; width:20px; height:15px; flex:0 0 20px }
.pg-beq-name{ font-family:'Cinzel',serif; font-size:16px; color:#efe7d6 }
.pg-beq-row.carried .pg-beq-name,.pg-beq-row.focus .pg-beq-name{ color:#fff3d6 }
.pg-beq-tier{ margin-left:auto; font-family:'Cinzel',serif; font-size:10.5px; letter-spacing:.14em }
.pg-beq-tier.t-lesser,.pg-socket-tier.t-lesser{ color:#f4e2a6 }
.pg-beq-tier.t-greater,.pg-socket-tier.t-greater{ color:#dcc0f2 }
.pg-beq-tier.t-cardinal,.pg-socket-tier.t-cardinal{ color:#ffb3ad }
.pg-socket-tier{ font-size:11px; letter-spacing:.14em; margin-left:2px }
.pg-beq-cut{ margin:8px 0 0; font-style:italic; font-size:14px; color:#a89f8c }
/* A carried boon: the gold strip every equipped row in Purgatory wears, and its state in words,
   which turns to what a click will do once the cursor is on it. */
.pg-beq-row.carried::before{ z-index:0 }
.pg-beq-row.carried::after{
  content:""; position:absolute; left:0; top:8px; bottom:8px; width:3px; z-index:1;
  background:linear-gradient(180deg, var(--leaf-hi), var(--leaf) 30%, var(--leaf-dk));
}
.pg-beq-row.carried .pg-beq-name{ color:#f2d98a }
.pg-beq-carry{ margin-left:14px; font-family:'Cinzel',serif; font-size:9.5px; letter-spacing:.16em; color:#c9a94e }
.pg-beq-carry i{ font-style:normal } .pg-beq-carry b{ display:none; font-weight:400; color:#fff3d6 }
.pg-beq-row.carried:hover .pg-beq-carry i,.pg-beq-row.carried.focus .pg-beq-carry i{ display:none }
.pg-beq-row.carried:hover .pg-beq-carry b,.pg-beq-row.carried.focus .pg-beq-carry b{ display:inline }
/* The global button:hover (an inset gold ring) outranks the row's own box-shadow:none, and boxed a
   hovered row where the keyboard-focused one is only washed. The wash is this list's hover. */
.pg-beq-row:hover{ box-shadow:none }
.pg-socket{
  min-height:76px; margin-bottom:12px; padding:10px 12px; border-radius:2px;
  background:#0d0d14; border:1px solid rgba(201,169,78,.16);
  box-shadow:inset 0 2px 8px rgba(0,0,0,.8);
  display:flex; flex-direction:column; justify-content:center; gap:3px;
}
.pg-socket.empty{ align-items:center; justify-content:center; color:#6d6659; font-family:'Cinzel',serif; font-size:11px; letter-spacing:.16em }
.pg-socket.cardinal{ border-color:rgba(232,115,107,.35) }
.pg-socket-name{ font-family:'Cinzel',serif; font-size:15px; color:#fff3d6 }
.pg-socket-desc{ font-size:14.5px; line-height:1.3; color:var(--ink) }
.pg-socket-tag{ font-family:'Cinzel',serif; font-size:9.5px; letter-spacing:.14em; color:#ffb3ad; margin-top:4px }
/* A filled socket is a button: it returns its boon. */
button.pg-socket{ position:relative; width:100%; text-align:left; font:inherit; color:inherit;
  transition:border-color .18s, background-color .18s }
button.pg-socket:hover,button.pg-socket.focus,button.pg-socket:focus-visible{
  outline:none; border-color:rgba(242,217,138,.6); background:#15131a; box-shadow:inset 0 2px 8px rgba(0,0,0,.8) }
.pg-socket-return{ position:absolute; top:9px; right:12px; font-family:'Cinzel',serif; font-size:9.5px;
  letter-spacing:.16em; color:#f2d98a; opacity:0; transition:opacity .18s }
button.pg-socket:hover .pg-socket-return,button.pg-socket.focus .pg-socket-return,
button.pg-socket:focus-visible .pg-socket-return{ opacity:1 }
.pg-beq-offer{ margin:auto; text-align:center; max-width:640px }
.pg-beq-copy{ font-size:16.5px; line-height:1.35; color:var(--ink); margin:8px 0 14px }
.pg-beq-preview{ display:flex; gap:12px; justify-content:center; opacity:.55; margin-top:18px }
.pg-beq-preview .pg-socket{ width:200px; min-height:64px; margin:0 }
.pg-beq-note{ font-style:italic; font-size:14px; color:#a89f8c; margin-top:10px }
.pg-beq-state{ margin:auto; max-width:640px; text-align:center; font-size:16.5px; line-height:1.4; color:var(--ink) }

/* ---- foot ------------------------------------------------------------------------------- */
.pg-back{
  position:absolute; left:max(72px,4.5vw); bottom:26px; z-index:4;
  background:none; border:0; box-shadow:none;
  font-family:'Cinzel',serif; font-size:12px; letter-spacing:.14em; color:#a89f8c;
}
.pg-back:hover{ color:var(--ink) }
.pg-legend{
  position:absolute; left:0; right:0; bottom:26px; z-index:3; text-align:center;
  font-family:'Cinzel',serif; font-size:12px; letter-spacing:.14em; color:#a89f8c; pointer-events:none;
}

/* FOCUS IS LIGHT, NEVER A BOX. The rows carry their own indicator — the scythe caret in the
   gutter plus the name lifting to #fff3d6 — and that IS the cursor, which is the screen's first
   rule. An outline on top of it drew a gold rectangle round the row and turned the ledger into a
   web form. The rail keeps an outline because its entries are navigated by pointer and Tab as
   well, and there the caret marks the CURRENT PAGE rather than the focused control: two different
   facts that must not share one mark. */
.pg-rail-item:focus-visible{ outline:1px solid var(--leaf); outline-offset:-3px }
.pg-row:focus,.pg-row:focus-visible,.pg-beq-row:focus,.pg-beq-row:focus-visible{ outline:none }

/* ---- leaving ---------------------------------------------------------------------------- */
/* The unwind MUST be an animation. hsPushIn runs fill-mode both, so a transform on .is-leaving
   loses to it every time and the camera simply never moves. */
.pg-screen.is-leaving .pg-backdrop{ animation:hsPullOut 700ms cubic-bezier(.45,0,.15,1) both }
.pg-screen.is-leaving .pg-plate,
.pg-screen.is-leaving .pg-rail,
.pg-screen.is-leaving .pg-coin,
.pg-screen.is-leaving .pg-flavour,
.pg-screen.is-leaving .pg-legend,
.pg-screen.is-leaving .pg-back{ opacity:0; transform:translateY(6px); transition:opacity 200ms ease-in, transform 200ms ease-in }

@media (prefers-reduced-motion:reduce){
  .pg-backdrop{ animation:none; transform:scale(1.35); filter:blur(1.85px) }
  .pg-screen.is-leaving .pg-backdrop{ animation:none }
  .pg-plate,.pg-rail-item,.pg-row{ animation:none }
  .pg-screen.is-leaving .pg-plate,.pg-screen.is-leaving .pg-rail,.pg-screen.is-leaving .pg-coin,
  .pg-screen.is-leaving .pg-flavour,.pg-screen.is-leaving .pg-legend,.pg-screen.is-leaving .pg-back{ transition:none }
}

/* THE CARET, REVEALED AND REPOSITIONED. `.rx-caret` ships opacity:0 at right:100% with a
   translateX(-7px) and a margin tuned to the menu-label case — four properties, not one. Missing
   any of them puts an invisible caret 24px outside its gutter, which is exactly what happened
   here and has silently broken two other controls in this codebase already. Rendered only on the
   active element, so the hover-reveal rule scoped to .rx-menu-item has nothing here to resurrect. */
.pg-caret{
  opacity:1 !important;
  left:2px; right:auto; top:50%;
  transform:translateY(-50%);
  margin:0;
  width:15px; height:15px;
}

/* THE SAVINGS METER (Relics only). Distance to goal, in the hs-track idiom: a hairline channel
   with a solid fill. It appears only while the relic is out of reach, because once you can afford
   it the number is the whole story. */

/* THE CARET SITS BESIDE THE NAME, not beside the middle of the row. On 136px rows the grid was
   centring the caret cell, so the scythe pointed at description line two, forty pixels under the
   name it was meant to mark. "The caret plus the brightened name IS the cursor" only holds while
   the two share a line. */
.pg-row{ align-items:center }
.pg-row.wide,.pg-row.tall{ align-items:start }
.pg-row.wide .pg-row-caret,.pg-row.tall .pg-row-caret{ margin-top:8px }
.pg-row.wide .pg-row-text,.pg-row.tall .pg-row-text,
.pg-row.wide .pg-row-act,.pg-row.tall .pg-row-act{ margin-top:2px }
.pg-row.wide .pg-row-pips,.pg-row.tall .pg-row-pips{ margin-top:4px }

/* The Bequest's offer block is centred, so its price chip must be too — flex-end left it hanging
   off the right edge of a column whose every other line was centred. */
.pg-beq-offer .pg-buy{ display:inline-block }

/* ---- BACK GOES TOP-LEFT, matching Hero Select exactly ------------------------------------
   Same corner, same size, same collapsed leading, so the two screens put their exit in the same
   place and a player never hunts for it. Values copied from .hs-back's final overrides: out at
   the frame edge it reads as chrome rather than as part of the panel. */
.pg-back{
  /* Measured against Hero Select's own button rather than copied from its rule: .hs-back declares
     top:8px but renders at y=34, because it sits inside .hs-screen's 26px of padding and this
     screen has none. Matching the DECLARATION would have put it 26px too high. Same corner, same
     size, same word. */
  position:absolute; left:max(32px,1.8vw); top:34px; bottom:auto; z-index:7;
  font-family:'Cinzel',serif; font-size:21px; letter-spacing:.14em; text-transform:uppercase;
  line-height:1; padding:0 10px; color:var(--ink-dim);
  background:none; border:0; box-shadow:none; outline:none;
}
.pg-back:hover{ color:var(--ink) }

/* ---- THE BAND SITS HIGH ------------------------------------------------------------------
   It was centred in the space between header and footer, which at 1350 tall opened a 270px well
   of empty backdrop above the plate before the ledger began. Hero Select starts its niche just
   under the chrome and lets the art run out beneath; this now does the same. Top-anchored, and
   the band takes its height FROM the plate, so `align-items:center` still centres the rail
   against the ledger rather than against the viewport. */
.pg-band{
  top:96px; bottom:auto; align-items:center;
}
.pg-plate{ height:clamp(616px, 74vh, 820px); min-height:616px; max-height:none }

/* The coin block cleared the mute button by 14px, which is not clearance, it is a near miss. */
.pg-coin{ top:34px }

/* ---- PURCHASE MOTION (spec §6) -----------------------------------------------------------
   The screen had exactly one dopamine beat and played none of it. Four things now happen inside
   460ms: the bought pip strikes, the row washes gold and lets it decay, the balance counts down,
   and a socket flares when an inheritance takes. Sound was already there. */
@keyframes pgPipStrike{ from{ transform:rotate(45deg) scale(1.6) } to{ transform:rotate(45deg) scale(1) } }
.pg-pip.struck{ animation:pgPipStrike 220ms cubic-bezier(.16,1,.3,1) both }
@keyframes pgRowWash{
  0%  { background:rgba(201,169,78,.10) }
  100%{ background:rgba(201,169,78,0) }
}
/* BOTH NAMES, and pgRowIn stays at index 0. The row's own `animation` is the entrance fade, and
   this rule used to REPLACE it with the wash — so when `.bought` came off 320ms after the click,
   the name flipped back to pgRowIn and the entrance re-ran: the row blanked to opacity 0, waited
   out its nth-child delay, and faded in again. That was the "flash" on every purchase, and it was
   the buy going away rather than the buy happening.
   CSS matches running animations by their POSITION in the name list, so keeping pgRowIn at index
   0 through both class states leaves it finished and untouched while pgRowWash is added and
   removed at index 1. The delays are written into the shorthand because a single-value
   `animation-delay` from the nth-child rules is repeated across every name in the list, which
   would otherwise hold the wash back by up to 150ms depending on which row you bought. */
.pg-row.bought{
  animation:pgRowIn 220ms cubic-bezier(.16,1,.3,1) 0ms both,
            pgRowWash 300ms ease-out 0ms both;
}
@keyframes pgCoinTick{ 0%{ filter:brightness(1.5) } 100%{ filter:brightness(1) } }
.pg-coin-value.ticking{ animation:pgCoinTick 240ms ease-out both }
@keyframes pgSocketFlare{
  0%  { box-shadow:inset 0 2px 8px rgba(0,0,0,.8), 0 0 0 0 rgba(255,178,92,.55) }
  40% { box-shadow:inset 0 2px 8px rgba(0,0,0,.8), 0 0 22px 2px rgba(255,178,92,.45) }
  100%{ box-shadow:inset 0 2px 8px rgba(0,0,0,.8), 0 0 0 0 rgba(255,178,92,0) }
}
.pg-socket.flare{ animation:pgSocketFlare 240ms ease-out both }
/* Page turns had an incoming stagger and no outgoing phase, so a page vanished and the next one
   climbed in over the hole. */
@keyframes pgRowsOut{ from{ opacity:1; transform:none } to{ opacity:0; transform:translateY(-6px) } }
.pg-rows.turning{ animation:pgRowsOut 140ms ease-in both }

@media (prefers-reduced-motion:reduce){
  .pg-pip.struck,.pg-row.bought,.pg-coin-value.ticking,.pg-socket.flare,.pg-rows.turning{ animation:none }
}

/* ---- THE TWO SMALLEST TEXT NODES, MADE READABLE -------------------------------------------
   Both shipped at 10-10.5px in #a89f8c, which is a footnote to a footnote: the rank line is the
   single most consulted fact on a ranked row (how far along am I, and how far is left), and the
   rail status answers "where can my coin still go" for the whole screen. Neither is decoration
   and neither should have been sized like it.

   Sizes are up ~25% and the colour lifts to #cec4ae, which is the reading floor this screen holds
   for anything a player parses rather than glances at. Letter-spacing comes DOWN as the size goes
   up: .16em was buying legibility at 10px and costing width at 13, and "+2 BY ASCENSION" has to
   close inside a 150px column. Measured at the new size it sets ~124px with room to spare. */
.pg-rail-status{ font-size:13px; letter-spacing:.1em; color:#cec4ae }

.pg-pip-cap{ font-size:12.5px; letter-spacing:.06em; color:#cec4ae; margin-top:6px }
/* The second caption line is the aspiration, not the state — a half-step down in weight keeps the
   rank line first without pushing the Ascension note back into the footnote it just left. */
.pg-pip-cap + .pg-pip-cap{ font-size:11.5px; color:#a89f8c; margin-top:2px }

/* ---- THE SELECTION WASH, the third screen to use it ---------------------------------------
   Copied from `.rx-menu-item::before` and `.hs-rank-item::before` rather than invented: the same
   radial anchored to the row's LEFT edge, the same candle-orange, the same 64% falloff, the same
   .24s. A wash, not a highlight bar — a rect with a hard terminus reads as a listbox row on a
   photograph, which is the one thing this screen must never look like.

   The vertical inset is negative so the box does not clip the radial's 128% extent flat and leave
   the faint rectangle the wash exists to avoid. Behind the content, never over it.

   It answers HOVER and FOCUS both, because this screen is driven by a pad as often as a mouse and
   the two must light the same row the same way. The caret still says where you are; the wash is
   the surface agreeing with it. */
.pg-rail-item,.pg-row,.pg-beq-row{ position:relative; isolation:isolate }
.pg-rail-item::before,.pg-row::before,.pg-beq-row::before{
  content:""; position:absolute; inset:-4px 0; z-index:-1; opacity:0; pointer-events:none;
  transition:opacity .24s;
  /* The VERTICAL extent is 64% here where the other two screens use 128%, and that is not drift.
     The gradient is entirely percentage-based, so its shape is scale-invariant — which means the
     transparent stop lands at .64 x 1.28 = .82 of the half-height on EVERY row, always short of
     the edge, always leaving a hair of alpha there. On a 340px `.hs-rank-item` that residue is
     invisible. Stretched across an 830px `.pg-row` the same residue becomes a long straight
     horizontal line and the wash reads as a listbox rectangle. Halving the vertical extent brings
     the falloff to zero INSIDE the box (.64 x .64 = .41 of the half-height) and kills the edge.
     The horizontal figure is untouched, so the bloom itself is the shipped one. */
  background:radial-gradient(92% 64% at 0% 50%,
             rgba(255,178,92,.16), rgba(255,178,92,.05) 38%, transparent 64%);
}
.pg-rail-item:hover::before,.pg-rail-item.on::before,
.pg-row:hover::before,.pg-row:focus::before,
.pg-beq-row:hover::before,.pg-beq-row.focus::before{ opacity:1 }

/* Rows carry a 3px gold strip on their left edge when equipped, and the wash starts at that same
   edge — so the strip has to stay above it or the mark of what you chose dims under the mark of
   where you are. */
.pg-row.equipped::before{ z-index:0 }
.pg-row.equipped::after{
  content:""; position:absolute; left:0; top:6px; bottom:6px; width:3px; z-index:1;
  background:linear-gradient(180deg, var(--leaf-hi), var(--leaf) 30%, var(--leaf-dk));
}

/* ---- THE PLATE MUST LEAVE BY ANIMATION, NOT BY TRANSITION ---------------------------------
   Exactly the trap already recorded for the backdrop, and I guarded only that side of it:
   `rxPlaqueIn` runs with fill-mode BOTH, so its final keyframe keeps asserting opacity and
   transform after it ends, and an animation beats a plain declaration. The `.is-leaving` opacity
   therefore never applied and the plate hung there through the whole unwind, then blinked out
   when React unmounted it. Replacing the animation is the only thing that moves it. */
@keyframes pgPlateOut{ from{ opacity:1; transform:none } to{ opacity:0; transform:translateY(8px) } }
.pg-screen.is-leaving .pg-plate{ animation:pgPlateOut 260ms cubic-bezier(.45,0,.15,1) both }
/* The rail's entries carry pgRailIn with the same fill and LOOK like they need the same rule, but
   they do not: `.pg-rail` itself has no animation, so its own opacity transition already dissolves
   the whole subtree as one group. Animating the entries as well faded them twice over and pulled
   the rail out of step with the coin and the flavour line. The plate is the only element that was
   ever stuck, because the plate is the element that carries the fill-both animation itself. */
@media (prefers-reduced-motion:reduce){
  .pg-screen.is-leaving .pg-plate{ animation:none; opacity:0 }
}

/* ============================== TITLES: THE RELIQUARY ==============================
   js/ui_purgatory.jsx, C.TitlesUI. A screen of its own off the main menu, standing in Purgatory's
   room: .pg-screen, .pg-backdrop, .pg-plate and .pg-back are Purgatory's, so the push-in on the way
   in and the pull-out on the way out (.is-leaving, pgPlateOut, hsPullOut) are Purgatory's exactly.
   Only what is new to this screen is below. */
.tt-band{ position:absolute; left:max(72px,4.5vw); right:max(72px,4.5vw); top:96px; bottom:58px; z-index:2;
  display:flex; justify-content:center }
/* Taller than Purgatory's plate: fifteen niches and a nameplate. It takes the band, up to 860. */
.pg-plate.tt-plate{ flex:1 1 auto; align-self:flex-start; max-width:1240px; height:min(100%, 860px);
  /* One niche height for the whole screen, from the measured plate (--plate-h, set by the screen):
     148 at the 800 floor, 182 at the most. */
  --niche-h:clamp(148px, calc((var(--plate-h, 646px) - 206px) / 3), 182px) }
.pg-plate-in.tt-plate-in{ padding:42px 34px 18px; min-height:0 }

/* Height the niches cannot use becomes even margin above and below the walls, never a pool of bare
   iron at the foot. */
/* The height is fixed, not content-sized: the walls arrive over the first two frames (see the
   screen), and a centred block that grew as they landed would shift on the second. Three niches, two
   10px gaps, the 22px wall label and the 6px of padding (boxes here size border-box). */
.tt-walls{ flex:0 0 auto; margin:auto 0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  column-gap:30px; padding-top:6px; height:calc(var(--niche-h) * 3 + 48px) }
.tt-right{ display:flex; flex-direction:column; gap:16px; min-height:0 }
.tt-gname{ display:flex; align-items:baseline; justify-content:space-between; padding:0 2px 7px;
  font-family:'Cinzel',serif; font-size:11px; letter-spacing:.2em; text-transform:uppercase; color:var(--leaf) }
.tt-gname i{ font-style:normal; letter-spacing:.12em; color:#8f8779 }
.tt-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px }

/* A NICHE CUT INTO THE PLATE: recessed (dark at the top, a hair of light on the bottom lip), never a
   card. */
.tt-niche{ position:relative; isolation:isolate; height:var(--niche-h);
  /* Sized so the tallest content (a two-line condition under the name, and a button) fits the 148px
     floor with the button still on the bottom edge: state 18, name 26, two lines 36, foot 28, and the
     gaps and padding. Any taller and that niche's button sat lower than its neighbours'. */
  padding:10px 12px 9px; box-sizing:border-box; border-radius:2px; outline:none; cursor:default;
  display:flex; flex-direction:column; align-items:center; text-align:center;
  /* THE RECESS IS PAINTED, NOT BLURRED: a shadow band under the top edge and a falloff at the sides
     do what `inset 0 3px 9px` did. A blurred shadow on fifteen niches was ~40ms of raster on entry. */
  --recess:linear-gradient(180deg, rgba(0,0,0,.62), rgba(0,0,0,.18) 7px, rgba(0,0,0,0) 14px),
           linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,0) 8px, rgba(0,0,0,0) calc(100% - 8px), rgba(0,0,0,.28));
  background:var(--recess), linear-gradient(180deg,#08080c,#0e0d13 60%,#0c0b10);
  border:1px solid rgba(201,169,78,.13);
  box-shadow:inset 0 -1px 0 rgba(255,236,190,.05);
  transition:border-color .18s, background .18s }
/* NO ENTRANCE OF THEIR OWN. The walls arrive inside the plate's (rxPlaqueIn), in its first frames,
   while it is still near transparent. An animation per niche, then per wall, made each its own
   compositor layer, rasterised once on arrival and again as it folded back into the plate: measured,
   that was a second and third stall in the opening half second. */
.tt-niche.is-earned{ border-color:rgba(201,169,78,.30) }
.tt-niche.is-equipped{ border-color:rgba(242,217,138,.70);
  background:var(--recess), radial-gradient(90% 70% at 50% 118%, rgba(255,178,92,.18), rgba(255,178,92,0) 72%),
             linear-gradient(180deg,#0b0a0e,#110f13 60%,#0e0c10);
  box-shadow:inset 0 -1px 0 rgba(255,236,190,.05), 0 0 18px rgba(255,170,80,.10) }
/* FOCUS IS LIGHT, NOT GOLD. Gold leaf on the rim means "equipped", so the cursor must not borrow it:
   the candle wash from the left (Purgatory's selection wash) and a bone rim, the name lifting to
   white. Hover and the pad's cursor are the same state, because the screen keeps them one. */
.tt-niche.focus{ border-color:rgba(236,226,204,.42);
  background:var(--recess), radial-gradient(110% 95% at 0% 50%, rgba(255,178,92,.17), rgba(255,178,92,.05) 40%, rgba(255,178,92,0) 70%),
             linear-gradient(180deg,#0c0b10,#14121a 60%,#100f15) }
.tt-niche.is-equipped.focus{ border-color:rgba(255,236,180,.92);
  background:var(--recess), radial-gradient(110% 95% at 0% 50%, rgba(255,178,92,.14), rgba(255,178,92,0) 64%),
             radial-gradient(90% 70% at 50% 118%, rgba(255,178,92,.18), rgba(255,178,92,0) 72%),
             linear-gradient(180deg,#0c0b10,#131118 60%,#100e13) }
.tt-niche:focus,.tt-niche:focus-visible{ outline:none }
/* the hero alcove's corner brackets: dim iron while sealed, gold leaf once the name is cut */
.tt-k{ position:absolute; width:9px; height:9px; pointer-events:none }
.tt-k::before,.tt-k::after{ content:""; position:absolute; top:0; left:0; background:#4a4337 }
.tt-k::before{ width:7px; height:1px } .tt-k::after{ width:1px; height:7px }
.tt-niche:not(.is-sealed) .tt-k::before,.tt-niche:not(.is-sealed) .tt-k::after{ background:var(--leaf); opacity:.75 }
.tt-k.tl{ top:5px; left:5px } .tt-k.tr{ top:5px; right:5px; transform:scaleX(-1) }
.tt-k.bl{ bottom:5px; left:5px; transform:scaleY(-1) } .tt-k.br{ bottom:5px; right:5px; transform:scale(-1) }

.tt-state{ height:18px; display:flex; align-items:center; justify-content:center }
.tt-state .pg-sealed{ font-size:11px }
.tt-earned{ font-family:'Cinzel',serif; font-size:11px; letter-spacing:.16em; color:#8f8779 }
.tt-equipped{ font-family:'Cinzel',serif; font-size:12px; letter-spacing:.14em; color:var(--gold) }
.tt-new{ display:inline-block; padding:2px 6px 1px; font-family:'Cinzel',serif; font-size:10px; letter-spacing:.16em;
  color:#ffc583; border:1px solid rgba(255,178,92,.5); border-radius:2px; text-shadow:0 0 8px rgba(255,150,60,.5) }
/* TITLES ARE SPEECH, NOT LABELS: the body face, italic. */
.tt-name{ margin-top:8px; min-height:26px; display:flex; align-items:center; justify-content:center;
  font-family:'EB Garamond',Georgia,serif; font-style:italic; font-size:19px; line-height:1.15; color:#efe7d6; white-space:nowrap }
.tt-niche.is-equipped .tt-name{ color:#f2d98a }
.tt-niche.focus .tt-name{ color:#fff3d6 }
/* What it asks, while sealed, is read to be acted on, so it sits a step brighter than what it records. */
.tt-how{ flex:1 1 auto; margin-top:4px; font-size:14.5px; line-height:1.25; color:#a89f8c }
.tt-niche.is-sealed .tt-how{ color:#cec4ae }
.tt-foot{ margin-top:4px; min-height:28px; display:flex; align-items:center; justify-content:center }
.tt-foot .pg-equip{ padding:5px 16px; font-size:12px }

/* A name not yet cut: an inscription line between two studs. One width for every sealed name. */
.tt-blank{ display:inline-block; position:relative; width:116px; height:11px; vertical-align:middle;
  background:linear-gradient(90deg, rgba(201,169,78,0), rgba(201,169,78,.30) 14%, rgba(201,169,78,.30) 86%, rgba(201,169,78,0)) center/calc(100% - 16px) 1px no-repeat }
.tt-blank::before,.tt-blank::after{ content:""; position:absolute; top:50%; width:5px; height:5px;
  border:1px solid #6d6659; background:#0b0a09; transform:translateY(-50%) rotate(45deg) }
.tt-blank::before{ left:1px } .tt-blank::after{ right:1px }

/* A counted deed: Hero Select's track idiom, small. */
.tt-meter{ display:flex; align-items:center; gap:8px }
.tt-meter-track{ position:relative; width:64px; height:5px; background:#0b0a10; border-radius:3px;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.85), 0 0 0 1px rgba(201,169,78,.14) }
.tt-meter-fill{ position:absolute; left:0; top:0; bottom:0; border-radius:3px; background:linear-gradient(90deg,#6b5a24,var(--gold)) }
.tt-meter-n{ font-size:13.5px; color:#cec4ae; font-variant-numeric:tabular-nums; letter-spacing:.02em; white-space:nowrap }

.tt-preview{ margin-top:auto; display:flex; flex-direction:column; align-items:flex-end }
.tt-preview .pg-eyebrow{ margin-bottom:8px }
.tt-idwrap{ height:auto; width:262px; gap:0 }
.tt-none{ color:#8f8779 }

/* The main menu's mark for a Title earned and not yet seen: Purgatory's rail diamond. */
.rx-item-dot{ position:absolute; left:100%; top:50%; margin-left:12px; width:6px; height:6px;
  background:var(--gold); transform:translateY(-50%) rotate(45deg); box-shadow:0 0 8px rgba(232,200,96,.55) }


/* ============================== THE LEDGER LINE ==============================
   js/ui_coinfx.jsx. The moment Death's Coin is earned, in the corner of the room where it was
   earned. Anatomy: a row of [coin][+N], and the cause left-aligned beneath the coin.

   ARRIVAL IS GRAVITY, DEPARTURE IS DISSOLUTION. The coin falls in like a paid thing and leaves by
   the dark reclaiming it. Nothing retraces its entrance - a coin that rises back out un-pays the
   player. Exit order is by information priority: prose first, number second, coin lingers, scrim
   last, so gold is never left sitting on raw pixel art.

   THE SYNC POINT IS THE IMPACT FRAME - 58% through the fall, 338ms common / 505ms milestone. The
   ring and the amount are minted BY the landing, so their delays are GENERATED from it rather
   than staggered off t=0.

   WHY MID-SEQUENCE PARTS USE animation-delay AND NOT ONE LONG TIMELINE. They were on one, held at
   their start value until their moment. That works for a ramp and fails for a STEP: the ring goes
   0 to .55 instantaneously, and 1ms of a 2600ms timeline is 0.038%, under keyframe rounding. The
   step smeared into a ramp and the ring shipped at .33 against an authored .55, blunting the one
   frame the whole piece is built around by 40%. Anything beginning mid-sequence now owns its own
   animation whose 0% IS its first visible value. Only the scrim and the coin, which begin at or
   near zero and only ever ramp, keep the long timeline.

   ONLY transform AND opacity ANIMATE. This paints over a canvas that is already painting, on a
   Deck; one animated filter or box-shadow and the drop loses frames, and a 30fps coin reads as
   asset-flip. The ring's glow is a STATIC box-shadow on an element whose opacity animates. */
.cfx{
  position:fixed; z-index:40; pointer-events:none;
  font-family:'Cinzel',serif;
  transform:translateZ(0);
  /* The action bar (ATTACK / SPELLS / SKILLS / DEFEND) starts about 260px right of this anchor.
     The cap is the safety net; cause strings are authored short so it never actually fires. */
  max-width:250px;
}
.cfx-scrim{
  position:absolute; inset:-34px -62px -30px -38px;
  background:radial-gradient(62% 92% at 22% 46%, rgba(4,4,9,.72), rgba(4,4,9,.34) 46%, transparent 74%);
  animation:cfxScrimA 4100ms linear both;
}
.cfx-row{ position:relative; display:flex; align-items:center; gap:15px }
.cfx-coinwrap{ position:relative; display:flex; filter:drop-shadow(-3px 5px 7px rgba(0,0,0,.85)) }
.cfx-coin{ display:block }
.cfx-drop{ animation:cfxCoinA 4100ms linear both; transform-origin:50% 50% }
/* THE SPIN. Into the landing: two full turns as it falls, easing out to face-on on the impact frame
   itself, so the spin, the settle and the strike ring are one beat. Then one more turn in the
   hold, once the gleam has crossed the face, to pull the eye back while the amount is read.
   rotateY only, so it stays on the compositor like everything else here.

   THE RIM. A disc turned on its axis thins to a line and reads as paper. The ::before is the
   coin's milled edge, a plane at right angles to the face: invisible face-on, and the whole
   visible coin when it passes edge-on, so the coin has thickness. */
.cfx-spin{ position:relative; transform-style:preserve-3d; animation:cfxSpinA 4100ms linear both }
.cfx-spin::before{
  content:""; position:absolute; left:50%; top:50%; width:6px; height:94%;
  transform:translate(-50%, -50%) rotateY(90deg); border-radius:3px;
  background:
    repeating-linear-gradient(180deg, rgba(46,34,9,.55) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, #5c4414, #f2d98a 42%, #c9a94e 62%, #4a360f);
  /* SHOWN ONLY WHILE THE COIN IS TURNED. Nearly face-on, the rim is a plane seen almost exactly
     edge-on, and at 1x Chrome sorts that sliver IN FRONT of the face: a hairline down the coin
     through the whole hold (isolated: it went with the rim and nothing else). So the rim is lit
     only while the coin is turned far enough for a rim to be seen, fading out as it settles. */
  animation:cfxRimA 4100ms linear both;
}
.cfx.big .cfx-spin::before{ width:8px; animation-name:cfxRimB; animation-duration:3800ms }   /* a hair inside the faces, never touching them: flush, it seamed */
/* The faces sit half the rim's width in front of and behind it, each hidden from behind, so face-on
   the front face covers the rim entirely and edge-on the rim is all there is. */
.cfx-face{ backface-visibility:hidden; transform:translateZ(3.5px) }
.cfx-face.back{ position:absolute; inset:0; transform:rotateY(180deg) translateZ(3.5px) }
.cfx.big .cfx-face{ transform:translateZ(4.5px) }
.cfx.big .cfx-face.back{ transform:rotateY(180deg) translateZ(4.5px) }
.cfx-strike{
  position:absolute; left:50%; top:50%; width:100%; height:100%;
  margin:-50% 0 0 -50%; border-radius:50%;
  border:2px solid rgba(247,230,176,.85); box-shadow:0 0 14px rgba(247,230,176,.30);
  transform-origin:50% 50%;
  /* FORWARDS, NOT BOTH, and opacity 0 at rest. `both` includes BACKWARDS, which paints the 0%
     keyframe throughout the delay — so the ring sat at .55 on the landing spot for the whole
     fall and the coin again dropped into a waiting target. The delay moved that fault, it did
     not remove it; only the fill mode does. */
  opacity:0;
  animation:cfxStrikeA 320ms cubic-bezier(0,0,.2,1) 338ms forwards;
}
.cfx-gleam{ animation:cfxGleamA 4100ms linear both }
.cfx-amt{
  font-weight:700; font-size:39px; letter-spacing:.02em; line-height:1;
  background:linear-gradient(180deg,#fff6da 0%,#f2d98a 34%,#c9a94e 62%,#8a6a22 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 1px 0 #000) drop-shadow(0 0 10px rgba(0,0,0,.92));
  transform-origin:50% 50%;
  animation:cfxAmtA 3512ms linear 338ms both;
}
.cfx-plus{ font-size:26px; -webkit-text-fill-color:#c9a94e; color:#c9a94e }

/* INK, not the plate grey: read in one glance while the player is looking elsewhere.
   THE HEIGHT IS FIXED so the coin's landing point cannot move. The stack is bottom-anchored, so
   without this a two-line cause would shove the coin row upward and the coin - the fixed point of
   the whole element - would land somewhere else because a writer added a clause. */
.cfx-cause{
  /* TWO LINES ARE RESERVED WHETHER OR NOT THE SECOND IS USED. The stack is bottom-anchored,
     so an unreserved slot would let a long line push the coin upward and the coin would land
     in a different place depending on how long a writer's sentence was. 48px is exactly two
     lines at this line-height; a short line simply leaves the lower half empty, which is
     invisible against the floor. */
  position:relative; margin-top:11px; min-height:56px;
  font-family:'EB Garamond',Georgia,serif; font-style:italic;
  font-size:21px; line-height:28px; color:#efe7d6; letter-spacing:.01em;
  text-shadow:0 1px 2px rgba(4,4,9,.9), 0 0 14px rgba(4,4,9,.8);
  animation:cfxCauseA 3370ms linear 420ms both;
}

/* ---- the milestone: same anatomy, more weight, once per zone per save ---- */
.cfx.big .cfx-scrim{ animation:cfxScrimB 3800ms linear both }
.cfx.big .cfx-drop{ animation:cfxCoinB 3800ms linear both }
.cfx.big .cfx-spin{ animation:cfxSpinB 3800ms linear both }
.cfx.big .cfx-strike{ animation:cfxStrikeB 380ms cubic-bezier(0,0,.2,1) 505ms forwards;
  border-color:rgba(247,230,176,.95); box-shadow:0 0 22px rgba(247,230,176,.45) }
.cfx.big .cfx-amt{ animation:cfxAmtB 2945ms linear 505ms both; font-size:50px }
.cfx.big .cfx-gleam{ animation:cfxGleamB 3800ms linear both }
/* Two deliberate lines, broken DEEPER THAN / EVER BEFORE - the phrase kept whole. */
/* THE MILESTONE USES THE SAME BODY FACE AS THE COMMON TIER. It was Cinzel caps in gold leaf,
   which looks the part and costs far too much room: caps at .14em tracking measure 12.53px a
   character against the italic's 7.41, so the budget was 19 characters a line and 38 over the two
   reserved — narrower than anything worth writing. It inherits .cfx-cause now and gets the same 33
   a line, 66 in total. The tier still reads as rare through everything else it owns: a larger
   coin, a larger number, the converging motes, the pool, the second ring, and the rule below. */
.cfx.big .cfx-cause{ animation:cfxCauseB 2690ms linear 700ms both }
/* An underline being INSCRIBED. Outward-drawing flanking rules do not survive a left-aligned
   two-line lockup in a corner; a rule drawn left to right beneath it does the same work and needs
   no horizontal room. */
.cfx-rule{
  display:block; height:1px; width:200px; margin-top:8px;
  background:linear-gradient(90deg, rgba(201,169,78,.65), rgba(201,169,78,.15));
  transform-origin:0 50%; animation:cfxRule 500ms cubic-bezier(.16,1,.3,1) 1180ms both;
}
@keyframes cfxRule{ 0%{transform:scaleX(0); opacity:0} 12%{opacity:1}
                    82%{opacity:1; transform:scaleX(1)} 100%{opacity:0; transform:scaleX(1)} }

/* ---- milestone-only furniture. opacity/transform only, like everything else. ---- */
.cfx-pool{
  position:absolute; left:50%; top:50%; width:310px; height:310px; margin:-155px 0 0 -155px;
  border-radius:50%; pointer-events:none;
  background:radial-gradient(circle, rgba(255,178,92,.26) 0%, rgba(255,178,92,.10) 42%, transparent 68%);
  animation:cfxPool 3800ms ease-in-out both;
}
.cfx-mote{
  position:absolute; left:50%; top:50%; width:5px; height:5px; margin:-2.5px 0 0 -2.5px;
  border-radius:50%; background:#f2d98a; box-shadow:0 0 8px 2px rgba(242,217,138,.55);
  animation:cfxMote 450ms cubic-bezier(.5,0,.9,.6) both;
}
.cfx-strike2{
  position:absolute; left:50%; top:50%; width:100%; height:100%; margin:-50% 0 0 -50%;
  border-radius:50%; border:2px solid rgba(247,230,176,.4);
  opacity:0;   /* same reason as .cfx-strike above */
  transform-origin:50% 50%; animation:cfxStrike2 380ms cubic-bezier(0,0,.2,1) 565ms forwards;
}
@keyframes cfxMote{
  0%{opacity:0; transform:translate3d(var(--mx),var(--my),0) scale(.4)}
  22%{opacity:1}
  100%{opacity:0; transform:translate3d(0,0,0) scale(.9)}
}
@keyframes cfxPool{ 0%{opacity:0} 13.3%{opacity:1} 42%{opacity:.72} 71%{opacity:1}
                    86.8%{opacity:.85} 100%{opacity:0} }
@keyframes cfxStrike2{ 0%{opacity:.4; transform:scale(.7)} 100%{opacity:0; transform:scale(1.35)} }

/* QUEUE PRESSURE trims the HOLD and never the reveal or the hide: those carry all the meaning,
   the hold is the only fat. Two elites cleared quickly would otherwise serialise into five
   seconds of turnstile. */
/* A queued ELITE payment plays the original 2600ms cut (the *Q keyframes), without the longer
   hold: the player has just watched the full one. The milestone keeps its compressed trim. */
.cfx.big.rush .cfx-scrim,.cfx.big.rush .cfx-drop,.cfx.big.rush .cfx-spin,.cfx.big.rush .cfx-spin::before{ animation-duration:1900ms }
.cfx.big.rush .cfx-amt{ animation-duration:1312ms }
.cfx.big.rush .cfx-cause{ animation-duration:1170ms }
.cfx.rush:not(.big) .cfx-scrim{ animation:cfxScrimAQ 2600ms linear both }
.cfx.rush:not(.big) .cfx-drop{ animation:cfxCoinAQ 2600ms linear both }
.cfx.rush:not(.big) .cfx-spin{ animation:cfxSpinAQ 2600ms linear both }
.cfx.rush:not(.big) .cfx-spin::before{ animation:cfxRimAQ 2600ms linear both }
.cfx.rush:not(.big) .cfx-gleam{ animation:cfxGleamAQ 2600ms linear both }
.cfx.rush:not(.big) .cfx-amt{ animation:cfxAmtAQ 2012ms linear 338ms both }
.cfx.rush:not(.big) .cfx-cause{ animation:cfxCauseAQ 1870ms linear 420ms both }

/* ---- A: total 4100ms, impact frame 338ms ----
   THE HOLD IS 1.5s LONGER than it was (owner's call, 2026-09-26: the Elite payment went by too fast
   to take in). The time was INSERTED at 1800ms, after the hold's turn (1144-1742ms) and before any
   part begins to leave (the scrim's first dip was at 1980ms), so every keyframe before 1800ms keeps
   its exact time - the fall, the landing ring and its sound are untouched - and every one after it
   is the same motion 1.5s later. The *Q keyframes below are the original 2600ms cut, used for a
   queued second payment. */
@keyframes cfxScrimA{
  0%{opacity:0} 5.854%{opacity:1; animation-timing-function:cubic-bezier(.33,1,.68,1)}
  84.878%{opacity:1} 86.634%{opacity:.68} 87.951%{opacity:.92}
  89.268%{opacity:.8} 92.683%{opacity:.8; animation-timing-function:cubic-bezier(.4,0,1,1)}
  100%{opacity:0}
}
@keyframes cfxCoinA{
  0%,1.464%{opacity:0; transform:translate3d(0,-32px,0) scale(1.06); animation-timing-function:cubic-bezier(.2,.7,.3,1)}
  8.253%{opacity:1; transform:translate3d(0,2px,0) scale(1)}
  10.595%{transform:translate3d(0,-1px,0) scale(1)}   /* the settle, not a park */
  13.171%,90.975%{opacity:1; transform:translate3d(0,0,0) scale(1); animation-timing-function:cubic-bezier(.4,0,.6,1)}
  98.781%,100%{opacity:0; transform:translate3d(0,2px,0) scale(.965)}
}
@keyframes cfxStrikeA{
  0%{opacity:.55; transform:translate3d(0,0,0) scale(.55)}
  100%{opacity:0; transform:translate3d(0,0,0) scale(1.15)}
}
@keyframes cfxAmtA{
  0%{opacity:0; transform:scale(1.16); animation-timing-function:cubic-bezier(.2,.85,.3,1)}
  3.759%{opacity:1; transform:scale(.985)}
  6.266%,93.165%{opacity:1; transform:scale(1); animation-timing-function:cubic-bezier(.4,0,1,1)}
  100%{opacity:0; transform:translate3d(0,-4px,0) scale(1)}
}
@keyframes cfxCauseA{
  0%{opacity:0; transform:translate3d(0,8px,0); animation-timing-function:cubic-bezier(.16,1,.3,1)}
  11.276%,92.878%{opacity:1; transform:translate3d(0,0,0); animation-timing-function:cubic-bezier(.4,0,1,1)}
  100%{opacity:0; transform:translate3d(0,-4px,0)}
}
/* 60ms (2.308%) the coin appears, 338ms (13.015%) it lands: two turns between, easing out onto the
   impact frame. The hold turn runs 1144-1742ms, after the gleam (460-1060ms) has left the face. */
@keyframes cfxSpinA{
  0%,1.464%{transform:perspective(420px) rotateY(-720deg); animation-timing-function:cubic-bezier(.2,.75,.35,1)}
  8.253%{transform:perspective(420px) rotateY(0deg)}
  27.902%{transform:perspective(420px) rotateY(0deg); animation-timing-function:cubic-bezier(.45,0,.35,1)}
  42.488%,100%{transform:perspective(420px) rotateY(360deg)}
}
/* The rim is on while the coin is turned: through the spin-in until its last slow degrees, and
   through the hold turn once it has turned about 20 degrees, off again the same distance from the
   end (the eases above make that about the first and last fifth of each turn's window). */
@keyframes cfxRimA{
  0%,6.893%{opacity:1} 7.61%,30.82%{opacity:0} 31.707%,38.937%{opacity:1} 39.824%,100%{opacity:0}
}
/* ---- B: total 3800ms, impact frame 505ms ---- */
@keyframes cfxRimB{
  0%,11.57%{opacity:1} 12.43%,41.4%{opacity:0} 42.5%,50.6%{opacity:1} 51.6%,100%{opacity:0}
}
/* The milestone turns three times on the way in (180ms to 505ms), and once in the hold between its
   two gleams (1370ms and 2200ms). */
@keyframes cfxSpinB{
  0%,4.737%{transform:perspective(480px) rotateY(-1080deg); animation-timing-function:cubic-bezier(.2,.75,.35,1)}
  13.284%{transform:perspective(480px) rotateY(0deg)}
  38%{transform:perspective(480px) rotateY(0deg); animation-timing-function:cubic-bezier(.45,0,.35,1)}
  55%,100%{transform:perspective(480px) rotateY(360deg)}
}
@keyframes cfxScrimB{
  0%{opacity:0} 6.316%{opacity:1; animation-timing-function:cubic-bezier(.33,1,.68,1)}
  81.053%{opacity:1} 82.947%{opacity:.68} 84.368%{opacity:.92}
  85.789%{opacity:.8} 89.474%{opacity:.8; animation-timing-function:cubic-bezier(.4,0,1,1)}
  100%{opacity:0}
}
@keyframes cfxCoinB{
  0%,4.737%{opacity:0; transform:translate3d(0,-44px,0) scale(1.06); animation-timing-function:cubic-bezier(.2,.7,.3,1)}
  13.284%{opacity:1; transform:translate3d(0,2px,0) scale(1)}
  16.232%{transform:translate3d(0,-1px,0) scale(1)}   /* the settle, not a park */
  19.474%,87.632%{opacity:1; transform:translate3d(0,0,0) scale(1); animation-timing-function:cubic-bezier(.4,0,.6,1)}
  98.158%,100%{opacity:0; transform:translate3d(0,2px,0) scale(.965)}
}
@keyframes cfxStrikeB{
  0%{opacity:.55; transform:translate3d(0,0,0) scale(.55)}
  100%{opacity:0; transform:translate3d(0,0,0) scale(1.15)}
}
@keyframes cfxAmtB{
  0%{opacity:0; transform:scale(1.16); animation-timing-function:cubic-bezier(.2,.85,.3,1)}
  6.112%{opacity:1; transform:scale(.985)}
  10.186%,91.851%{opacity:1; transform:scale(1); animation-timing-function:cubic-bezier(.4,0,1,1)}
  100%{opacity:0; transform:translate3d(0,-4px,0) scale(1)}
}
@keyframes cfxCauseB{
  0%{opacity:0; transform:translate3d(0,8px,0); animation-timing-function:cubic-bezier(.16,1,.3,1)}
  14.126%,91.078%{opacity:1; transform:translate3d(0,0,0); animation-timing-function:cubic-bezier(.4,0,1,1)}
  100%{opacity:0; transform:translate3d(0,-4px,0)}
}

/* The gleam sweeps in SVG user units across a 200-wide viewBox: off the left of the face, across,
   off the right. Exactly one pass, and never `infinite` - the death screen's sweep loops on an 8s
   cycle and that behaviour must not follow it here. */
@keyframes cfxGleamA{ 0%,11.224%{transform:translateX(-70px)} 25.873%,100%{transform:translateX(280px)} }
@keyframes cfxGleamB{ 0%,20%{transform:translateX(-70px)} 36%{transform:translateX(280px)}
                      58%{transform:translateX(-70px)} 74%,100%{transform:translateX(280px)} }
/* ---- A, the original 2600ms cut: a queued second Elite payment (see .cfx.rush) ---- */
@keyframes cfxScrimAQ{
  0%{opacity:0} 9.231%{opacity:1; animation-timing-function:cubic-bezier(.33,1,.68,1)}
  76.154%{opacity:1} 78.923%{opacity:.68} 81.0%{opacity:.92}
  83.077%{opacity:.8} 88.462%{opacity:.8; animation-timing-function:cubic-bezier(.4,0,1,1)}
  100%{opacity:0}
}
@keyframes cfxCoinAQ{
  0%,2.308%{opacity:0; transform:translate3d(0,-32px,0) scale(1.06); animation-timing-function:cubic-bezier(.2,.7,.3,1)}
  13.015%{opacity:1; transform:translate3d(0,2px,0) scale(1)}
  16.708%{transform:translate3d(0,-1px,0) scale(1)}   /* the settle, not a park */
  20.769%,85.769%{opacity:1; transform:translate3d(0,0,0) scale(1); animation-timing-function:cubic-bezier(.4,0,.6,1)}
  98.077%,100%{opacity:0; transform:translate3d(0,2px,0) scale(.965)}
}
@keyframes cfxSpinAQ{
  0%,2.308%{transform:perspective(420px) rotateY(-720deg); animation-timing-function:cubic-bezier(.2,.75,.35,1)}
  13.015%{transform:perspective(420px) rotateY(0deg)}
  44%{transform:perspective(420px) rotateY(0deg); animation-timing-function:cubic-bezier(.45,0,.35,1)}
  67%,100%{transform:perspective(420px) rotateY(360deg)}
}
@keyframes cfxRimAQ{
  0%,10.87%{opacity:1} 12%,48.6%{opacity:0} 50%,61.4%{opacity:1} 62.8%,100%{opacity:0}
}
@keyframes cfxGleamAQ{ 0%,17.7%{transform:translateX(-70px)} 40.8%,100%{transform:translateX(280px)} }
@keyframes cfxAmtAQ{
  0%{opacity:0; transform:scale(1.16); animation-timing-function:cubic-bezier(.2,.85,.3,1)}
  6.562%{opacity:1; transform:scale(.985)}
  10.937%,88.069%{opacity:1; transform:scale(1); animation-timing-function:cubic-bezier(.4,0,1,1)}
  100%{opacity:0; transform:translate3d(0,-4px,0) scale(1)}
}
@keyframes cfxCauseAQ{
  0%{opacity:0; transform:translate3d(0,8px,0); animation-timing-function:cubic-bezier(.16,1,.3,1)}
  20.321%,87.166%{opacity:1; transform:translate3d(0,0,0); animation-timing-function:cubic-bezier(.4,0,1,1)}
  100%{opacity:0; transform:translate3d(0,-4px,0)}
}

/* A fallback with equal dignity, not a stripped one: the settled composition IS the element, so it
   fades in whole, holds motionless, and fades out whole - same duration, same information. */
@media (prefers-reduced-motion:reduce){
  .cfx-scrim,.cfx-drop,.cfx-amt,.cfx-cause{ animation:cfxCalmA 4100ms linear 0ms both }
  .cfx.rush:not(.big) .cfx-scrim,.cfx.rush:not(.big) .cfx-drop,.cfx.rush:not(.big) .cfx-amt,.cfx.rush:not(.big) .cfx-cause{
    animation:cfxCalm 2600ms linear 0ms both }
  .cfx-spin,.cfx.big .cfx-spin{ animation:none }
  .cfx-spin::before{ animation:none; opacity:0 }
  .cfx.big .cfx-scrim,.cfx.big .cfx-drop,.cfx.big .cfx-amt,.cfx.big .cfx-cause{
    animation:cfxCalm 3800ms linear 0ms both }
  .cfx-strike,.cfx-strike2,.cfx-gleam,.cfx-mote,.cfx-pool,.cfx-rule{ animation:none; opacity:0 }
  @keyframes cfxCalm{ 0%{opacity:0} 9.2%,88.5%{opacity:1} 100%{opacity:0} }
  /* the same fade-in (239ms) and fade-out (the last 299ms), with the 1.5s longer hold */
  @keyframes cfxCalmA{ 0%{opacity:0} 5.829%,92.707%{opacity:1} 100%{opacity:0} }
}

/* ================= THE ZONE TITLE (js/zonetitle.js) =================
   Option A, "Gilded Lockup": the title screen's gold leaf, used to name the zone you have just
   climbed into. Everything is sized in multiples of --s (the room's on-screen width over the
   920px it was designed at), so it sits the same on any window. One pass, about 3.6s: it rises
   out of the dark, the rules draw outward from the numeral, a light rakes each line once, it
   holds, and it goes. Sits under the coin toast (z-index 40), which can land at the same moment. */
.ztl{ position:fixed; z-index:39; pointer-events:none; overflow:hidden; opacity:0; }
.ztl.ztl-go{ animation:ztlLife 3.6s ease-in-out forwards; }
@keyframes ztlLife{ 0%{opacity:0} 15%{opacity:1} 70%{opacity:1} 100%{opacity:0} }
/* the room is dimmed only behind the lockup, so the walls and doors still read round it */
.ztl-dim{ position:absolute; inset:0;
  background:radial-gradient(ellipse 62% 40% at 50% 50%, rgba(5,4,8,.78) 0%, rgba(5,4,8,.5) 55%, rgba(5,4,8,0) 100%); }
.ztl-lock{ position:absolute; left:0; right:0; top:50%; transform:translateY(-50%);
  display:flex; flex-direction:column; align-items:center; text-align:center; }
.ztl-go .ztl-lock{ animation:ztlRise 3.6s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes ztlRise{
  0%{ transform:translateY(calc(-50% + 12px * var(--s,1))) scale(.985) }
  30%{ transform:translateY(-50%) scale(1) }
  100%{ transform:translateY(calc(-50% - 5px * var(--s,1))) scale(1) }
}
.ztl-kick{ display:flex; align-items:center; gap:calc(14px * var(--s,1)); margin-bottom:calc(14px * var(--s,1)); }
.ztl-kick i{ display:block; width:calc(120px * var(--s,1)); height:1px;
  background:linear-gradient(90deg, transparent, var(--leaf)); transform-origin:right center; }
.ztl-kick i:last-child{ background:linear-gradient(270deg, transparent, var(--leaf)); transform-origin:left center; }
.ztl-go .ztl-kick i{ animation:ztlGrow 1.1s .15s cubic-bezier(.2,.7,.2,1) both; }
@keyframes ztlGrow{ from{ transform:scaleX(0) } to{ transform:scaleX(1) } }
.ztl-kick b{ font-family:'Cinzel',serif; font-weight:700; font-size:calc(15px * var(--s,1)); letter-spacing:.08em;
  color:var(--leaf); padding:calc(2px * var(--s,1)) calc(12px * var(--s,1));
  border:1px solid rgba(201,169,78,.55); border-radius:2px; text-shadow:0 1px 0 rgba(0,0,0,.9); }
/* the lines: gold leaf clipped to the glyphs, engraved rather than glowing, as on the title plaque */
.ztl-line{ display:block; white-space:nowrap; font-family:'Cinzel',serif; font-weight:900;
  text-transform:uppercase; line-height:.92;
  background:
    linear-gradient(100deg, transparent 0 40%, rgba(255,252,236,.55) 47%, transparent 55% 100%),
    linear-gradient(172deg,#fff6da 0%, var(--leaf) 38%, #8f6f22 76%, #f0dda0 100%);
  background-size:260% 100%, 100% 100%; background-position:120% 0, 0 0;
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent;
  filter:drop-shadow(0 -1px 0 rgba(0,0,0,.85)) drop-shadow(0 2px 0 rgba(255,240,205,.22))
         drop-shadow(0 5px 7px rgba(0,0,0,.9)); }
.ztl-go .ztl-line{ animation:ztlSweep 1.9s .35s ease-in-out both; }
.ztl-go .ztl-l2{ animation-delay:.55s; }
@keyframes ztlSweep{ from{ background-position:120% 0, 0 0 } to{ background-position:-20% 0, 0 0 } }
.ztl-orn{ display:block; width:calc(560px * var(--s,1)); height:calc(26px * var(--s,1)); margin-top:calc(16px * var(--s,1)); }
@media (prefers-reduced-motion: reduce){
  .ztl-go .ztl-lock, .ztl-go .ztl-line, .ztl-go .ztl-kick i{ animation:none; }
}
/* ---- entrance cards (Death's Keeper): the zone lockup plus a chalice mark and an epigraph ---- */
.ztl-kick b.ztl-kick-mark{ display:flex; align-items:center; padding:calc(3px * var(--s,1)) calc(9px * var(--s,1)); }
.ztl-mark{ display:block; width:calc(17px * var(--s,1)); height:calc(17px * var(--s,1)); color:var(--leaf); }
.ztl-epi{ font-family:'EB Garamond',Georgia,serif; font-style:italic; font-size:calc(22px * var(--s,1));
  letter-spacing:.04em; color:#d9ccae; margin-top:calc(8px * var(--s,1));
  text-shadow:0 2px 6px rgba(0,0,0,.95), 0 0 18px rgba(0,0,0,.8); }
/* the epigraph arrives after the name has landed, so it is read second, as intended */
.ztl-go .ztl-epi{ animation:ztlEpi 1.2s .9s ease-out both; }
@keyframes ztlEpi{ from{ opacity:0; transform:translateY(calc(4px * var(--s,1))) } to{ opacity:1; transform:none } }
/* a card with an epigraph holds longer: there is a second line to read */
.ztl.ztl-long.ztl-go{ animation-duration:4.6s; }
.ztl-long.ztl-go .ztl-lock{ animation-duration:4.6s; }
@media (prefers-reduced-motion: reduce){ .ztl-go .ztl-epi{ animation:none; } }

/* ================= THE TITLE TOAST (js/zonetitle.js, C.TitleToast) =================
   "The Seal Breaks": the Titles screen's padlock, in gold leaf line, appears in the bottom-right
   corner of the screen, strains, and splits; the name is struck where it stood. One life of 3.9s:
   lock in by .26s, strain .3-.66s, the break at .62s (and its sound), the name at .86s, gone by
   3.85s. Every size is a multiple of --s (viewport over 1600x900, clamped), because it plays on the
   menus as well as in the room. Only transform and opacity animate. */
.tts{ position:fixed; right:calc(34px * var(--s)); bottom:calc(30px * var(--s)); z-index:41; pointer-events:none;
  font-family:'EB Garamond',Georgia,serif }
.tts *{ box-sizing:border-box }
.tts-out{ position:relative; animation:ttsOut .6s cubic-bezier(.4,0,.8,.6) 3.25s both }
@keyframes ttsOut{ from{ opacity:1; transform:none } to{ opacity:0; transform:translateY(calc(-9px * var(--s))) } }
/* a pool of dark behind the lockup, so gold never sits on raw pixel art or bright key art */
/* Deep and wide: on the menus this corner of the key art is a bank of lit candles, and a thin pool
   let their flames burn through the gold of the name. */
.tts-dim{ position:absolute; left:50%; top:50%; width:calc(170% + 160px * var(--s)); height:calc(170% + 80px * var(--s));
  transform:translate(-50%,-50%); opacity:0;
  background:radial-gradient(closest-side, rgba(5,4,8,.94), rgba(5,4,8,.8) 45%, rgba(5,4,8,.4) 72%, rgba(5,4,8,0));
  animation:ttsFade .3s ease-out both }
@keyframes ttsFade{ from{ opacity:0 } to{ opacity:1 } }
.tts-stage{ position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; white-space:nowrap }
.tts-eyebrow{ display:flex; align-items:center; gap:calc(11px * var(--s)); font-family:'Cinzel',serif;
  font-size:calc(12px * var(--s)); letter-spacing:.22em; color:#e6bd72; text-shadow:0 1px 0 #000, 0 0 10px rgba(0,0,0,.9);
  opacity:0; animation:ttsRise .45s cubic-bezier(.2,.7,.2,1) .78s both }
.tts-eyebrow i{ display:block; width:calc(36px * var(--s)); height:1px; background:linear-gradient(90deg, transparent, var(--leaf)) }
.tts-eyebrow i:last-child{ background:linear-gradient(270deg, transparent, var(--leaf)) }
@keyframes ttsRise{ from{ opacity:0; transform:translateY(calc(6px * var(--s))) } to{ opacity:1; transform:none } }
.tts-slot{ position:relative; height:calc(56px * var(--s)); display:flex; align-items:center; justify-content:center;
  margin-top:calc(2px * var(--s)); padding:0 calc(10px * var(--s)) }
/* the name: the title plaque's gold leaf and raking light, struck in */
.tts-name{ font-style:italic; font-weight:500; font-size:calc(38px * var(--s)); line-height:1.1; opacity:0;
  background:
    linear-gradient(100deg, transparent 0 40%, rgba(255,252,236,.6) 47%, transparent 55% 100%),
    linear-gradient(172deg,#fff6da 0%, var(--leaf) 40%, #8f6f22 78%, #f0dda0 100%);
  background-size:260% 100%, 100% 100%; background-position:120% 0, 0 0;
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent;
  filter:drop-shadow(0 -1px 0 rgba(0,0,0,.85)) drop-shadow(0 1.5px 0 rgba(255,240,205,.2)) drop-shadow(0 4px 6px rgba(0,0,0,.9));
  animation:ttsStrike .55s cubic-bezier(.2,.8,.2,1) .86s both, ttsSweep 1.6s ease-in-out 1.15s both }
@keyframes ttsStrike{ 0%{ opacity:0; transform:scale(1.18) } 55%{ opacity:1 } 100%{ opacity:1; transform:scale(1) } }
@keyframes ttsSweep{ from{ background-position:120% 0, 0 0 } to{ background-position:-20% 0, 0 0 } }
.tts-cond{ font-style:italic; font-size:calc(16px * var(--s)); color:#d8cfbd; margin-top:calc(1px * var(--s));
  text-shadow:0 1px 0 #000, 0 0 12px rgba(0,0,0,.95); opacity:0; animation:ttsRise .5s cubic-bezier(.2,.7,.2,1) 1.15s both }
/* the lock: shackle and two body halves, so it can spring and split */
.tts-lock{ position:absolute; left:50%; top:50%; width:calc(42px * var(--s)); height:calc(52px * var(--s));
  margin:calc(-28px * var(--s)) 0 0 calc(-21px * var(--s));
  filter:drop-shadow(0 0 calc(6px * var(--s)) rgba(255,190,90,.35)) drop-shadow(0 2px 3px rgba(0,0,0,.9));
  animation:ttsLockIn .26s cubic-bezier(.2,.9,.3,1.2) both, ttsShudder .36s linear .3s both }
.tts-lock svg{ position:absolute; inset:0; width:100%; height:100%; overflow:visible }
@keyframes ttsLockIn{ from{ opacity:0; transform:scale(.6) } to{ opacity:1; transform:scale(1) } }
@keyframes ttsShudder{ 0%{ transform:rotate(0) } 20%{ transform:rotate(-7deg) } 40%{ transform:rotate(6deg) }
  60%{ transform:rotate(-5deg) } 80%{ transform:rotate(3deg) } 100%{ transform:rotate(0) } }
.tts-shackle{ transform-box:fill-box; transform-origin:100% 100%; animation:ttsShackle .26s cubic-bezier(.2,.9,.3,1) .62s both }
@keyframes ttsShackle{ 0%{ opacity:1; transform:none } 45%{ opacity:1; transform:translateY(-34%) rotate(-28deg) }
  100%{ opacity:0; transform:translateY(-60%) rotate(-40deg) } }
/* the break: the halves split SIDEWAYS and drop, so they are gone before the name is struck */
.tts-half{ transform-box:fill-box; transform-origin:50% 0% }
.tts-half.l{ animation:ttsHalfL .24s cubic-bezier(.3,0,.8,.6) .62s both }
.tts-half.r{ animation:ttsHalfR .24s cubic-bezier(.3,0,.8,.6) .62s both }
@keyframes ttsHalfL{ 0%{ opacity:1; transform:none } 100%{ opacity:0; transform:translate(-90%,40%) rotate(-32deg) } }
@keyframes ttsHalfR{ 0%{ opacity:1; transform:none } 100%{ opacity:0; transform:translate(90%,40%) rotate(32deg) } }
.tts-spark{ position:absolute; left:50%; top:50%; width:calc(4px * var(--s)); height:calc(4px * var(--s)); margin:calc(-2px * var(--s));
  border-radius:50%; background:radial-gradient(circle, #fff6d8 0 35%, #ffb24a 60%, transparent 72%);
  box-shadow:0 0 calc(6px * var(--s)) rgba(255,170,70,.75); opacity:0;
  animation:ttsSpark .62s cubic-bezier(.15,.7,.3,1) .62s both }
@keyframes ttsSpark{ 0%{ opacity:1; transform:rotate(var(--a)) translateX(0) scale(1.2) }
  100%{ opacity:0; transform:rotate(var(--a)) translateX(calc(var(--d) * var(--s))) scale(.4) } }
.tts-flash{ position:absolute; left:50%; top:50%; width:calc(110px * var(--s)); height:calc(110px * var(--s)); margin:calc(-55px * var(--s));
  border-radius:50%; background:radial-gradient(closest-side, rgba(255,226,160,.55), rgba(255,180,90,.18) 50%, transparent);
  opacity:0; animation:ttsFlash .55s ease-out .62s both }
@keyframes ttsFlash{ 0%{ opacity:0; transform:scale(.4) } 25%{ opacity:1 } 100%{ opacity:0; transform:scale(1.25) } }
/* Reduced motion: no lock, no burst, no strike. The lockup simply fades in, holds and fades out. */
@media (prefers-reduced-motion: reduce){
  .tts-lock,.tts-spark,.tts-flash{ display:none }
  .tts-eyebrow,.tts-name,.tts-cond{ animation:ttsFade .4s ease-out both }
  .tts-out{ animation:ttsFade .5s ease-in 3.3s reverse both }
}

/* ================= THE DIRECTIVE (js/zonetitle.js, C.Directive) =================
   The run's objective in the room's top-left corner: FIND THE HOLY CHALICE, then ESCAPE DEATH'S
   SANCTUM. A chalice glyph in gold leaf line (hollow while lost, filled and breathing once held),
   the line in Cinzel with the Title toast's gold leaf, a hairline rule fading right. Light on
   darkness: a pool of shadow, no panel. Every size is in --cu, the turn order's canvas pixel, on a
   layer the size of the canvas, so the two scale as one. OVER the overlay (z 7 to its 6), like the
   turn order: under it, the fight's vignette (.dx-overlay::before, .52 black at the corners) took
   the gold down to brown beside a bright turn order. The screens that dim the room for a choice
   (level-up, Spoils, a chest, the pool, the Ferryman) dim it themselves instead: .is-under.
   .reveal strikes it in (out of a cutscene); .go is the turn, 2.4s, timed to escape_braziers
   (its roar builds under the burn, its flare at 1.05s is the chalice igniting). */
.dir-layer{ position:absolute; inset:0; z-index:7; pointer-events:none; overflow:hidden; border-radius:10px;
  container-type:inline-size; --cu:0.183824cqw }

/* ---- THE MOVE HINT (zonetitle.js, C.MoveHint; owner, 2026-10-09) ----
   Under the hero in the first room of an Escape, once the opening and its title card are done: the
   two ways to walk, as keys, and nothing else. In #dir-layer, so `cqw` is the room's width and it
   scales with the room. The keycaps are the minimap's iron (the same ramp, the gold rim, the dark
   outer line) with a dark lip under each so they read as keys you press; the arrows are the
   triangles the door labels already use. No panel: a pool of shadow behind it, the room's way.
   It fades in, and out over 1.0s on the first step, the pressed key lit and sunk as it goes. */
.mh{ position:absolute; transform:translateX(-50%); display:flex; flex-direction:column; align-items:center;
  gap:1.05cqw; opacity:0; transition:opacity .6s ease }
.mh.is-on{ opacity:1 }
/* LINEAR: `ease` front-loads the change, and measured 0.6s in it was already down to .10, a
   one-second fade that read as half of one */
.mh.is-out{ opacity:0; transition:opacity 1s linear }
.mh-aura{ position:absolute; left:50%; top:50%; width:150%; height:200%; transform:translate(-50%,-50%); z-index:-1;
  border-radius:50%; background:radial-gradient(ellipse at center, rgba(3,3,7,.78) 0%, rgba(3,3,7,.55) 42%, rgba(3,3,7,0) 72%) }
.mh-row{ display:flex; align-items:center; gap:2.1cqw }
.mh-set{ display:grid; grid-template-columns:repeat(3, 3.35cqw); grid-template-rows:repeat(2, 3.35cqw); gap:.42cqw }
/* placed, never flowed: the inverted T is the keyboard's own shape */
.mh-set > :nth-child(1){ grid-column:2; grid-row:1 }
.mh-set > :nth-child(2){ grid-column:1; grid-row:2 }
.mh-set > :nth-child(3){ grid-column:2; grid-row:2 }
.mh-set > :nth-child(4){ grid-column:3; grid-row:2 }
.mh-key{ position:relative; box-sizing:border-box; border-radius:3px; display:flex; align-items:center; justify-content:center;
  font-family:'Cinzel',serif; font-weight:700; font-size:1.6cqw; color:#e8c860;
  background:linear-gradient(180deg, #2a2520 0%, #1a1714 55%, #110f0d 100%);
  border:1px solid rgba(201,169,78,.72);
  box-shadow:0 0 0 1px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,246,214,.22), inset 0 -2px 0 rgba(0,0,0,.45),
             0 .32cqw 0 #070605, 0 .45cqw .9cqw rgba(0,0,0,.6);
  text-shadow:0 1px 0 #000, 0 0 .7cqw rgba(232,200,96,.35);
  transition:transform .09s ease-out, box-shadow .09s ease-out, color .09s, border-color .09s }
.mh-key svg{ width:48%; height:48%; overflow:visible }
.mh-key svg path{ fill:#e8c860; filter:drop-shadow(0 1px 0 #000) }
.mh-key.is-down{ transform:translateY(.28cqw); color:#fff3d0; border-color:#f0d870;
  box-shadow:0 0 0 1px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,246,214,.30), inset 0 -1px 0 rgba(0,0,0,.45),
             0 .04cqw 0 #070605, 0 0 1.4cqw rgba(232,200,96,.55) }
.mh-key.is-down svg path{ fill:#fff3d0 }
/* level with the bottom row: down by half a key and half a gap */
.mh-or{ font-family:'Cinzel',serif; font-size:1.3cqw; letter-spacing:.22em; color:#a89f8c; margin-top:3.77cqw;
  text-shadow:0 1px 0 #000, 0 0 8px rgba(0,0,0,.95) }
.mh-label{ font-family:'Cinzel',serif; font-size:1.55cqw; letter-spacing:.16em; color:#e6dfcf;
  text-shadow:0 1px 0 #000, 0 0 10px rgba(0,0,0,.95) }
@media (prefers-reduced-motion: reduce){ .mh, .mh.is-out, .mh-key{ transition:none } }
/* On a touch device the hint is the label alone, set over the seal's home (zonetitle.js places it):
   the seal itself is the picture of how to move. */
.mh.is-touch{ transform:translate(-50%,-100%) }
.mh.is-touch .mh-label{ font-size:max(1.55cqw, 12px) }

/* ---- THE SEAL: touch movement (js/touchstick.js; owner, 2026-10-22) ----
   An analog stick in the minimap's iron, lower left of the room, over the overlay and the directive
   (z 8). Sized in px (--ts, set from the room's height, 92-132), not in the room's units: a thumb is
   the same size on every screen. Faded at rest; full while held. It floats: .is-held carries it to
   the thumb at once, and letting go glides it home. pointer-events:none throughout: the document
   listener does the catching, so the seal never eats a tap meant for anything else. */
html.ts-on #explore-wrap{ touch-action:none; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none }
.ts{ position:absolute; z-index:8; pointer-events:none; width:var(--ts,132px); height:var(--ts,132px);
  left:max(22px, env(safe-area-inset-left)); bottom:max(22px, env(safe-area-inset-bottom));
  transition:transform .28s cubic-bezier(.2,.8,.3,1), opacity .25s ease }
.ts.is-held{ transition:opacity .12s ease }
.ts.is-hidden{ opacity:0 }
.ts svg{ position:absolute; inset:0; width:100%; height:100%; overflow:visible;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,.75)) }
.ts .ts-base{ opacity:.62; transition:opacity .25s ease }
.ts.is-held .ts-base{ opacity:1; transition-duration:.08s }
.ts-rim{ fill:none; stroke:rgba(201,169,78,.78); stroke-width:1.4 }
.ts-rim-in{ fill:none; stroke:rgba(0,0,0,.85); stroke-width:1.6 }
.ts-well{ stroke:rgba(201,169,78,.22); stroke-width:1 }
.ts-tick{ stroke:rgba(201,169,78,.45); stroke-width:1.1; stroke-linecap:round }
.ts-tick.big{ stroke:rgba(232,200,96,.85); stroke-width:1.8 }
.ts-rivet{ fill:#3a332a; stroke:rgba(0,0,0,.8); stroke-width:.6 }
.ts-wedge{ opacity:0; fill:none; stroke:rgba(240,216,112,.95); stroke-width:6; stroke-linecap:round }
/* the knob: iron with a gold rim and a gold diamond. Never a gold disc: that is Death's Coin. */
.ts-knob{ position:absolute; left:50%; top:50%; width:41%; height:41%; transform:translate(0,0); border-radius:50%;
  translate:-50% -50%; opacity:.85;
  background:radial-gradient(circle at 38% 30%, #4a4238 0%, #2a241e 40%, #14110f 80%, #0a0908 100%);
  box-shadow:0 0 0 1.5px #1a140a, 0 0 0 2.5px rgba(232,200,96,.75), 0 5px 9px rgba(0,0,0,.7),
             inset 0 -3px 5px rgba(0,0,0,.45), inset 0 2px 2px rgba(255,240,190,.28);
  transition:transform .22s cubic-bezier(.2,.8,.3,1), box-shadow .15s ease, opacity .25s ease }
.ts-knob i{ position:absolute; left:50%; top:50%; width:20%; height:20%; translate:-50% -50%; rotate:45deg;
  background:linear-gradient(135deg, #f3db8a, #c9a24a 55%, #8a6a26); box-shadow:0 0 0 1px rgba(0,0,0,.7) }
.ts.is-held .ts-knob{ opacity:1; transition:box-shadow .15s ease, opacity .08s ease;
  box-shadow:0 0 0 1.5px #1a140a, 0 0 0 2.5px #f0d870, 0 0 16px rgba(232,200,96,.6), 0 5px 9px rgba(0,0,0,.7),
             inset 0 -3px 5px rgba(0,0,0,.45), inset 0 2px 2px rgba(255,240,190,.28) }
.ts.is-held .ts-knob i{ background:linear-gradient(135deg, #fff4c8, #e8c860 55%, #b08a34);
  box-shadow:0 0 0 1px rgba(0,0,0,.7), 0 0 8px rgba(232,200,96,.9) }
@media (prefers-reduced-motion: reduce){ .ts, .ts-knob{ transition:none } }
.dir{ position:absolute; left:calc(8 * var(--cu)); top:calc(6 * var(--cu)); display:flex; align-items:center;
  gap:calc(5 * var(--cu)); transition:opacity .35s ease;
  --dsh:drop-shadow(0 -1px 0 rgba(0,0,0,.85)) drop-shadow(0 calc(1.1 * var(--cu)) calc(1.5 * var(--cu)) rgba(0,0,0,.95)) }
.dir.is-under{ opacity:.25 }
.dir.is-hidden{ opacity:0; visibility:hidden; transition:opacity .2s ease, visibility 0s .2s }
/* deep enough that the gold never sits on a lit stretch of wall, soft enough to read as shadow */
.dir-aura{ position:absolute; left:calc(-26 * var(--cu)); right:calc(-40 * var(--cu)); top:calc(-22 * var(--cu)); bottom:calc(-20 * var(--cu));
  background:radial-gradient(closest-side, rgba(6,5,9,.8), rgba(6,5,9,.55) 48%, rgba(6,5,9,.2) 78%, rgba(6,5,9,0)) }

/* ---- the glyph ---- */
.dir-glyph{ position:relative; flex:none; width:calc(18 * var(--cu)); height:calc(21 * var(--cu)) }
.dir-glyph svg{ position:absolute; inset:0; width:100%; height:100%; overflow:visible;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.95)) }
.dir-cup path,.dir-cup ellipse{ fill:url(#dirFill); fill-opacity:0; stroke:url(#dirLeaf); stroke-width:1.5;
  stroke-linejoin:round; stroke-linecap:round }
.dir-rays{ transform-box:fill-box; transform-origin:50% 100% }
/* LOST: the outline only, dimmed, no light above it */
.dir.s1 .dir-cup{ opacity:.72 }
.dir.s1 .dir-rays{ opacity:0 }
/* HELD: filled with leaf, crowned with light, and breathing */
.dir.s2 .dir-bowl,.dir.s2 .dir-foot,.dir.s2 .dir-knot{ fill-opacity:1 }
.dir.s2 .dir-rays{ opacity:.9 }
.dir.s2 .dir-glyph svg{ animation:dirBreathe 3.6s ease-in-out infinite }
@keyframes dirBreathe{
  0%,100%{ filter:drop-shadow(0 0 calc(1.5 * var(--cu)) rgba(255,196,90,.32)) drop-shadow(0 1px 1px rgba(0,0,0,.95)) }
  50%{ filter:drop-shadow(0 0 calc(4 * var(--cu)) rgba(255,196,90,.62)) drop-shadow(0 1px 1px rgba(0,0,0,.95)) } }
.dir-flash{ position:absolute; left:50%; top:46%; width:calc(64 * var(--cu)); height:calc(64 * var(--cu));
  margin:calc(-32 * var(--cu)) 0 0 calc(-32 * var(--cu)); border-radius:50%; opacity:0;
  background:radial-gradient(closest-side, rgba(255,240,200,.95), rgba(255,180,84,.42) 38%, rgba(255,150,60,0)) }

/* ---- the line ---- */
.dir-body{ position:relative; display:flex; flex-direction:column }
.dir-text{ position:relative; height:calc(12 * var(--cu)); line-height:calc(12 * var(--cu)); white-space:nowrap }
.dir-line{ display:block; white-space:pre }
/* only the outgoing line leaves the flow: the incoming one keeps the block (and the rule) its width */
.dir-line.is-old{ position:absolute; left:0; top:0 }
/* the Title toast's gold leaf, per letter, so each can burn and strike on its own */
.dir-c{ display:inline-block; font-family:'Cinzel',serif; font-weight:700; font-size:calc(9.5 * var(--cu));
  letter-spacing:.15em; text-transform:uppercase;
  background:linear-gradient(172deg,#fff6da 0%, var(--leaf) 42%, #a07d2c 82%, #f0dda0 100%);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent;
  filter:blur(0) brightness(1) sepia(0) saturate(1) hue-rotate(0deg) var(--dsh) }
.dir.s1 .dir-line.is-cur{ opacity:.93 }

/* ---- the rule: a leaf diamond and a hairline that dies away to the right ---- */
.dir-rule{ position:relative; height:calc(4 * var(--cu)); margin-top:calc(1.2 * var(--cu)) }
.dir-rule::before{ content:""; position:absolute; left:calc(.4 * var(--cu)); top:50%;
  width:calc(2.6 * var(--cu)); height:calc(2.6 * var(--cu)); margin-top:calc(-1.3 * var(--cu)); transform:rotate(45deg);
  background:linear-gradient(135deg,#fff2c8,#c9a24a 60%,#8f6c22); box-shadow:0 0 calc(2 * var(--cu)) rgba(255,196,90,.35) }
.dir-rule i{ position:absolute; left:calc(4.4 * var(--cu)); right:calc(-18 * var(--cu)); top:50%; height:1px;
  margin-top:-.5px; transform-origin:0 50%;
  background:linear-gradient(90deg, rgba(232,200,96,.85), rgba(232,200,96,.38) 55%, rgba(232,200,96,0)) }

/* ---- .reveal: struck in as a cutscene ends ---- */
.dir.reveal .dir-aura{ animation:dirFade .5s ease-out both }
.dir.reveal .dir-glyph{ animation:dirGlyphIn .65s cubic-bezier(.2,.8,.2,1) .05s both }
.dir.reveal .dir-c{ animation:dirStrike .55s cubic-bezier(.2,.75,.25,1) calc(.25s + var(--i) * 28ms) both }
.dir.reveal .dir-rule::before{ animation:dirPop .45s cubic-bezier(.2,.9,.3,1.3) .5s both }
.dir.reveal .dir-rule i{ animation:dirDraw .8s cubic-bezier(.3,.7,.2,1) .6s both }
@keyframes dirFade{ from{ opacity:0 } to{ opacity:1 } }
@keyframes dirGlyphIn{ from{ opacity:0; transform:translateY(calc(2 * var(--cu))) scale(.85) } to{ opacity:1; transform:none } }
@keyframes dirStrike{
  0%{ opacity:0; transform:translateY(calc(2.5 * var(--cu))); filter:blur(calc(1.2 * var(--cu))) brightness(1.8) sepia(0) saturate(1) hue-rotate(0deg) var(--dsh) }
  100%{ opacity:1; transform:none; filter:blur(0) brightness(1) sepia(0) saturate(1) hue-rotate(0deg) var(--dsh) } }
@keyframes dirPop{ from{ opacity:0; transform:rotate(45deg) scale(.2) } to{ opacity:1; transform:rotate(45deg) scale(1) } }
@keyframes dirDraw{ from{ transform:scaleX(0) } to{ transform:scaleX(1) } }

/* ---- .go: the turn. 0-.95s the old line heats to ember and burns away under the roar; 1.0s the
   chalice ignites on the flare; 1.02s on the new line is struck white-hot and cools to gold ---- */
.dir.go .is-old .dir-c{ animation:dirBurn .48s cubic-bezier(.5,0,.85,.45) calc(.1s + var(--i) * 21ms) both }
.dir.go .dir-cup{ animation:dirWarm 1s ease-in both }
.dir.go .dir-bowl,.dir.go .dir-foot,.dir.go .dir-knot{ animation:dirFillIn .45s ease-out 1s both }
.dir.go .dir-rays{ animation:dirRays .6s cubic-bezier(.2,.9,.3,1.2) 1.05s both }
.dir.go .dir-glyph svg{ animation:dirIgnite .8s cubic-bezier(.2,.9,.3,1.1) 1s both }
.dir.go .dir-flash{ animation:dirFlash .75s ease-out 1s both }
/* embers off the burning line, each on its letter's beat; the block is the NEW line's width, and the
   old one is 0.93 of it */
.dir-ember{ position:absolute; left:calc(var(--x) * .93); top:45%; width:calc(2 * var(--cu)); height:calc(2 * var(--cu));
  margin:calc(-1 * var(--cu)); border-radius:50%; opacity:0;
  background:radial-gradient(circle, #fff1c4 0 30%, #ff9a3c 58%, rgba(255,120,40,0) 72%);
  box-shadow:0 0 calc(2.5 * var(--cu)) rgba(255,140,40,.7) }
.dir.go .dir-ember{ animation:dirEmber .85s cubic-bezier(.2,.6,.35,1) var(--d) both }
@keyframes dirEmber{
  0%{ opacity:0; transform:translate(0,0) scale(1.2) }
  15%{ opacity:1 }
  100%{ opacity:0; transform:translate(calc(var(--dx) * var(--cu)), calc(var(--h) * -1 * var(--cu))) scale(.35) } }
/* the glint: once the new line has cooled, raking light crosses it, letter by letter */
.dir.go .is-new .dir-c{ animation:dirStrikeHot .7s cubic-bezier(.2,.75,.25,1) calc(1.02s + var(--i) * 26ms) both,
  dirGlint .5s ease-in-out calc(1.95s + var(--i) * 16ms) none }
@keyframes dirGlint{
  0%,100%{ filter:blur(0) brightness(1) sepia(0) saturate(1) hue-rotate(0deg) var(--dsh) }
  45%{ filter:blur(0) brightness(1.75) sepia(0) saturate(1) hue-rotate(0deg) var(--dsh) } }
.dir.go .dir-rule i{ animation:dirRuleTurn 2.2s linear both }
.dir.go .dir-rule::before{ animation:dirDiamondTurn 2.2s linear both }
@keyframes dirBurn{
  0%{ opacity:1; transform:none; filter:blur(0) brightness(1) sepia(0) saturate(1) hue-rotate(0deg) var(--dsh) }
  38%{ opacity:1; transform:translateY(calc(-.6 * var(--cu))); filter:blur(0) brightness(1.65) sepia(1) saturate(4) hue-rotate(-18deg) var(--dsh) }
  100%{ opacity:0; transform:translateY(calc(-5.5 * var(--cu))) scale(.9); filter:blur(calc(1.6 * var(--cu))) brightness(2.1) sepia(1) saturate(5) hue-rotate(-26deg) var(--dsh) } }
@keyframes dirStrikeHot{
  0%{ opacity:0; transform:translateY(calc(2.5 * var(--cu))) scale(1.14); filter:blur(calc(1.3 * var(--cu))) brightness(3) sepia(0) saturate(1) hue-rotate(0deg) var(--dsh) }
  35%{ opacity:1; transform:none; filter:blur(0) brightness(2.3) sepia(0) saturate(1) hue-rotate(0deg) var(--dsh) }
  100%{ opacity:1; transform:none; filter:blur(0) brightness(1) sepia(0) saturate(1) hue-rotate(0deg) var(--dsh) } }
@keyframes dirWarm{ from{ opacity:.72 } to{ opacity:1 } }
@keyframes dirFillIn{ from{ fill-opacity:0 } to{ fill-opacity:1 } }
@keyframes dirRays{ from{ opacity:0; transform:scale(.4) } to{ opacity:.9; transform:none } }
@keyframes dirIgnite{
  0%{ transform:scale(1); filter:brightness(1) drop-shadow(0 0 0 rgba(255,190,80,0)) drop-shadow(0 1px 1px rgba(0,0,0,.95)) }
  22%{ transform:scale(1.3); filter:brightness(2.3) drop-shadow(0 0 calc(6 * var(--cu)) rgba(255,190,80,.95)) drop-shadow(0 1px 1px rgba(0,0,0,.95)) }
  100%{ transform:scale(1); filter:brightness(1) drop-shadow(0 0 calc(2 * var(--cu)) rgba(255,196,90,.4)) drop-shadow(0 1px 1px rgba(0,0,0,.95)) } }
@keyframes dirFlash{ 0%{ opacity:0; transform:scale(.3) } 22%{ opacity:1 } 100%{ opacity:0; transform:scale(1.3) } }
/* one animation, not two: a second on the same property would hold its from-frame over the first */
@keyframes dirRuleTurn{
  0%{ transform:scaleX(1) } 11%{ transform:scaleX(1); animation-timing-function:cubic-bezier(.5,0,.8,.4) }
  32%{ transform:scaleX(0) } 62%{ transform:scaleX(0); animation-timing-function:cubic-bezier(.3,.7,.2,1) }
  100%{ transform:scaleX(1) } }
@keyframes dirDiamondTurn{
  0%,40%{ transform:rotate(45deg) scale(1); filter:brightness(1) }
  46%{ transform:rotate(45deg) scale(1.7); filter:brightness(2.4) }
  62%,100%{ transform:rotate(45deg) scale(1); filter:brightness(1) } }

/* the corner waits, unseen, under the presentation card, and flashes its diamond as the card lands */
.dir.is-awaiting{ visibility:hidden }
.dir.landed .dir-rule::before{ animation:dirLand .6s ease-out both }
.dir.landed .dir-glyph svg{ animation:dirLandGlyph .6s ease-out both }
@keyframes dirLand{ 0%{ transform:rotate(45deg) scale(1.9); filter:brightness(2.6) } 100%{ transform:rotate(45deg) scale(1); filter:brightness(1) } }
@keyframes dirLandGlyph{ 0%{ filter:brightness(1.8) drop-shadow(0 0 calc(4 * var(--cu)) rgba(255,200,110,.7)) drop-shadow(0 1px 1px rgba(0,0,0,.95)) }
  100%{ filter:brightness(1) drop-shadow(0 0 0 rgba(255,200,110,0)) drop-shadow(0 1px 1px rgba(0,0,0,.95)) } }

/* ---- THE PRESENTATION CARD (C.Directive cardShow): the first directive across the middle of the
   room, then flown into the corner. The lockup is the corner's own .dir at a larger --cu, so every
   material rule above applies to it and the flight is a pure scale. 0-2.75s the entrance, then the
   950ms flight on the launch screen's curve, the darkness lifting as it goes. ---- */
.dcard{ position:fixed; z-index:30; pointer-events:none; overflow:hidden; border-radius:10px }
.dcard-dim{ position:absolute; inset:0;
  /* deepest behind the line, and still .5 at the edges: at .28 the minimap's gold stayed bright in
     its corner and argued with the card */
  background:radial-gradient(ellipse 78% 62% at 50% 44%, rgba(4,3,7,.8), rgba(4,3,7,.6) 55%, rgba(4,3,7,.5) 100%);
  animation:dirFade .6s ease-out both }
.dcard.is-flying .dcard-dim{ animation:dcardLift .85s ease-in-out both }
@keyframes dcardLift{ from{ opacity:1 } to{ opacity:0 } }
/* centered by flex, never by a transform: the flight animates the lockup's transform, and a
   centering translate on it would be overwritten on the first frame (a jump at take-off) */
.dcard-stage{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding-bottom:12% }
.dir.dcard-lock{ position:relative; left:auto; top:auto; transform-origin:0 0 }
/* the aura grows with the card, so it is a halo of shadow here and the corner's own pool on landing */
.dcard .dir-aura{ animation:dirFade .7s ease-out .1s both }
/* the cup is DRAWN, rim to base, glowing as the gold runs */
.dcard .dir-cup path,.dcard .dir-cup ellipse{ stroke-dasharray:1 1; stroke-dashoffset:1;
  animation:dcardDraw .55s cubic-bezier(.45,0,.25,1) calc(.15s + var(--k) * .11s) forwards }
@keyframes dcardDraw{ to{ stroke-dashoffset:0 } }
.dcard .dir-glyph svg{ animation:dcardGlow 1.4s ease-out .15s both }
@keyframes dcardGlow{
  0%{ filter:drop-shadow(0 0 0 rgba(255,200,110,0)) drop-shadow(0 1px 1px rgba(0,0,0,.95)) }
  45%{ filter:drop-shadow(0 0 calc(3 * var(--cu)) rgba(255,200,110,.75)) drop-shadow(0 1px 1px rgba(0,0,0,.95)) }
  100%{ filter:drop-shadow(0 0 0 rgba(255,200,110,0)) drop-shadow(0 1px 1px rgba(0,0,0,.95)) } }
/* the line struck in from heat, letter by letter, then the raking glint */
.dcard .dir-c{ animation:dirStrikeHot .75s cubic-bezier(.2,.75,.25,1) calc(.5s + var(--i) * 34ms) both,
  dirGlint .6s ease-in-out calc(1.85s + var(--i) * 20ms) none }
/* the rule engraves (death_rule sounds at 1.1s) */
.dcard .dir-rule::before{ animation:dirPop .45s cubic-bezier(.2,.9,.3,1.3) 1.05s both }
.dcard .dir-rule i{ animation:dirDraw .95s cubic-bezier(.3,.7,.2,1) 1.1s both }
/* embers lifting through the dark around it */
.dcard-mote{ position:absolute; left:var(--x); top:70%; width:3px; height:3px; border-radius:50%; opacity:0;
  background:radial-gradient(circle, #fff1c4 0 30%, #ffa040 55%, transparent 72%); box-shadow:0 0 6px 2px rgba(255,140,40,.4);
  animation:dcardMote 2.2s cubic-bezier(.2,.5,.4,1) var(--d) both }
@keyframes dcardMote{ 0%{ opacity:0; transform:translate(0,0) } 18%{ opacity:.9 } 100%{ opacity:0; transform:translate(calc(var(--dx) * 3px), calc(var(--h) * -3px)) } }
.dcard.is-flying .dcard-mote{ opacity:0 !important; transition:opacity .3s }

/* Reduced motion: no burn, no strike, no ignition. The new line fades in over the old. */
@media (prefers-reduced-motion: reduce){
  .dir.reveal *,.dir.go *,.dir.s2 .dir-glyph svg{ animation:none !important }
  .dir.go .is-old{ display:none }
  .dir.reveal,.dir.go .dir-body,.dir.go .dir-glyph{ animation:dirFade .4s ease-out both }
}

/* ================================ EMBERS (C.RX.Embers, ui_rx_shared.jsx) ================================
   Sparks rising from the crypt floor on every screen that stands in the key art: the launch screen,
   the title, hero select and Purgatory. Each screen draws the layer just above its own art and below
   its panels; every ember is phased from one shared clock, so crossing screens never restarts them.
   Only transform and opacity animate. */
.rx-motes{ position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden }
.rx-mote{ position:absolute; bottom:-8px; left:var(--x); width:3px; height:3px; border-radius:50%; opacity:0;
  background:radial-gradient(circle, #fff1c4 0 30%, #ffa040 55%, transparent 72%);
  box-shadow:0 0 7px 2px rgba(255,140,40,.45);
  animation:rxMoteRise var(--t) linear var(--d) infinite }
@keyframes rxMoteRise{
  0%{opacity:0; transform:translate3d(0,0,0) scale(var(--s))}
  12%{opacity:.95} 70%{opacity:.55}
  100%{opacity:0; transform:translate3d(var(--dx),-78vh,0) scale(calc(var(--s) * .4))}
}
/* BEHIND EVERYTHING BUT THE ART. On hero select and Purgatory the panels' text and bars are not
   positioned, and a positioned layer paints over unpositioned content whatever its order, so the
   embers drew across the stat labels and the page rail (caught by blowing them up into red discs:
   a 3px spark in front of a panel and one behind it look the same). The art and the embers now sit
   at negative depths inside each screen, below ALL of its normal content, so nothing added to
   those screens later can end up under a spark either. The title needs none of this: its plaque
   is positioned above them already. */
.hs-screen > .hs-backdrop, .pg-screen > .pg-backdrop{ z-index:-2 }
.hs-screen > .rx-motes, .pg-screen > .rx-motes{ z-index:-1 }
@media (prefers-reduced-motion:reduce){ .rx-motes{ display:none } }

/* =============================== THE LAUNCH SCREEN (js/ui_splash.jsx) ===============================
   DEATH LAUGHS LAST and PLAY, asked for so the first click can start the music. .menu-backdrop is
   the menu's own element, so the art under the hand-over is literally the same. Each element's
   natural style is its FINISHED state; the entrance lives under .sp-intro, so skipping the intro
   and prefers-reduced-motion both land on the finished frame by removing a class. */
#splash-layer{ position:fixed; inset:0; z-index:60 }
.sp-screen{ position:absolute; inset:0; overflow:hidden; display:flex; align-items:center; justify-content:center;
  font-family:'Cinzel',serif }
.sp-screen .menu-backdrop{ position:absolute }
.sp-screen .rx-motes{ position:absolute; z-index:2 }
/* The menu darkens its LEFT third for the plaque; this screen centers on the title instead. */
.sp-screen .menu-backdrop::before{
  background:radial-gradient(70% 62% at 43% 44%, rgba(8,7,6,.66), rgba(8,7,6,.42) 55%, rgba(8,7,6,.28) 100%) }
/* LEFT OF CENTER, ON PURPOSE. The key art's Reaper holds his scythe up at about two thirds across,
   and a title centered on the screen ran its right edge through the blade. The lockup sits over
   the darker left of the room instead, where the art has nothing to say. */
.sp-stage{ position:relative; z-index:3; display:flex; flex-direction:column; align-items:center; gap:clamp(16px, 3.6vh, 40px);
  transform:translate(-7vw, -1.5vh) }
.sp-screen.is-exit{ animation:spOut 1350ms linear forwards; pointer-events:none }
@keyframes spOut{ 0%,55%{opacity:1} 100%{opacity:0} }
/* the wordmark in flight to the plaque (flyWordmark): above everything, transparent, inert */
.sp-screen.sp-flight{ position:fixed; z-index:61; pointer-events:none; display:block; overflow:visible; animation:none }
/* the embers are already rising when the screen opens; they come up out of the dark with it */
.sp-intro .rx-motes{ animation:spFadeIn 2.2s ease-out both }
@keyframes spFadeIn{ from{opacity:0} to{opacity:1} }

/* ---- the wordmark, at poster scale, in the plaque's own proportions (77 : 42 : 85) ---- */
.sp-wm{ --wm:min(9.4vw, 16.8vh); margin:0; display:flex; flex-direction:column; align-items:center;
  line-height:.9; text-transform:uppercase; font-weight:700; user-select:none }
.sp-line{ display:grid; position:relative }
.sp-line > .sp-t{ grid-area:1 / 1; display:block; white-space:nowrap }
.sp-line.l1 > .sp-t{ font-size:var(--wm); letter-spacing:.045em; margin-left:.045em }
.sp-line.l2 > .sp-t{ font-size:calc(var(--wm) * .545); letter-spacing:.414em; margin-left:.414em; margin-top:.06em }
.sp-line.l3 > .sp-t{ font-size:calc(var(--wm) * 1.104); letter-spacing:.235em; margin-left:.235em }
/* the dark carving the gold is poured into */
.sp-t.carve{ color:#16120d; -webkit-text-fill-color:#16120d;
  text-shadow:0 -2px 0 rgba(0,0,0,.95), 0 2px 1px rgba(255,232,190,.13), 0 0 1px rgba(0,0,0,.9) }
/* leaf, with the plaque's travelling specular band; LAST in bone */
.sp-t.gold{
  background:
    linear-gradient(100deg, transparent 0 40%, rgba(255,252,236,.6) 47%, transparent 55% 100%),
    linear-gradient(172deg,#fff6da 0%, var(--leaf) 38%, #8f6f22 76%, #f0dda0 100%);
  background-size:260% 100%, 100% 100%;
  animation:rxSweep 8.5s ease-in-out 1s infinite;
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent;
  filter:drop-shadow(0 -1px 0 rgba(0,0,0,.85)) drop-shadow(0 2px 0 rgba(255,240,205,.18)) drop-shadow(0 8px 14px rgba(0,0,0,.85));
}
.sp-line.l3 > .sp-t.gold{
  background:
    linear-gradient(100deg, transparent 0 40%, rgba(255,255,255,.4) 47%, transparent 55% 100%),
    linear-gradient(172deg,#f6efdd 0%,#ded4bc 44%,#9a9080 100%);
  background-size:260% 100%, 100% 100%;
  -webkit-background-clip:text; background-clip:text;
  filter:drop-shadow(0 -1px 0 rgba(0,0,0,.9)) drop-shadow(0 2px 0 rgba(255,252,240,.16)) drop-shadow(0 9px 16px rgba(0,0,0,.9));
}
/* THE POUR. The gold is revealed through a travelling mask, a molten front leading it. */
.sp-t.gold, .sp-t.melt{
  -webkit-mask-image:linear-gradient(100deg, #000 40%, transparent 60%); mask-image:linear-gradient(100deg, #000 40%, transparent 60%);
  -webkit-mask-size:280% 100%; mask-size:280% 100%; -webkit-mask-position:0 0; mask-position:0 0;
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat }
.sp-t.melt{
  background:linear-gradient(180deg, #fffbe6, #ffd070 45%, #ff8a26); -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
  -webkit-mask-image:linear-gradient(100deg, transparent 36%, #000 44%, #000 49%, transparent 56%);
  mask-image:linear-gradient(100deg, transparent 36%, #000 44%, #000 49%, transparent 56%);
  filter:drop-shadow(0 0 10px rgba(255,150,40,.9)); opacity:0 }
.sp-line.l3 > .sp-t.melt{ background:linear-gradient(180deg, #ffffff, #f4ecd6 50%, #d9cfb4); -webkit-background-clip:text; background-clip:text;
  filter:drop-shadow(0 0 12px rgba(255,248,230,.85)) }
.sp-intro .l1 > .gold, .sp-intro .l1 > .melt{ animation:spPour 1.15s cubic-bezier(.4,.1,.5,1) .45s both }
.sp-intro .l2 > .gold, .sp-intro .l2 > .melt{ animation:spPour .85s cubic-bezier(.4,.1,.5,1) 1.3s both }
.sp-intro .l3 > .gold, .sp-intro .l3 > .melt{ animation:spPour 1.1s cubic-bezier(.4,.1,.5,1) 1.95s both }
@keyframes spPour{ from{-webkit-mask-position:100% 0; mask-position:100% 0; opacity:1} 85%{opacity:1} to{-webkit-mask-position:0 0; mask-position:0 0} }

/* ---- PLAY: the word between two gold rules, a candle's glow behind it ---- */
.sp-screen button{ font-family:'Cinzel',serif; background:none; border:0; box-shadow:none; padding:0; color:inherit; border-radius:0 }
.sp-screen button:hover{ box-shadow:none }
.sp-screen button:focus{ outline:none }
.sp-screen .sp-playbtn{ display:flex; align-items:center; gap:22px; color:#e8c860; font-size:clamp(28px, 2.7vw, 40px);
  letter-spacing:.62em; font-weight:700; text-transform:uppercase; padding:8px 6px; margin-top:clamp(4px, 1vh, 12px) }
.sp-playbtn span{ position:relative; padding-left:.62em; text-shadow:0 2px 8px rgba(0,0,0,.9);
  transition:color .25s, transform .25s cubic-bezier(.3,.7,.3,1) }
.sp-playbtn span::after{ content:""; position:absolute; left:50%; top:50%; width:220%; height:260%; transform:translate(-50%,-50%);
  background:radial-gradient(closest-side, rgba(255,190,90,.34), rgba(255,190,90,0)); z-index:-1; animation:spBreathe 3.4s ease-in-out infinite }
@keyframes spBreathe{ 0%,100%{opacity:.55; transform:translate(-50%,-50%) scale(.96)} 50%{opacity:1; transform:translate(-50%,-50%) scale(1.04)} }
.sp-rule{ display:block; width:clamp(60px, 9vw, 130px); height:2px; background:linear-gradient(90deg, transparent, #e8c860);
  transition:transform .3s cubic-bezier(.3,.7,.3,1) }
.sp-rule.l{ transform-origin:100% 50% }
.sp-rule.r{ background:linear-gradient(90deg, #e8c860, transparent); transform-origin:0 50% }
.sp-playbtn:hover span, .sp-playbtn:focus-visible span{ color:#fff3cf; transform:scale(1.07) }
.sp-playbtn:hover span::after, .sp-playbtn:focus-visible span::after{ animation:none; opacity:1; transform:translate(-50%,-50%) scale(1.3) }
.sp-playbtn:hover .sp-rule, .sp-playbtn:focus-visible .sp-rule{ transform:scaleX(1.25) }
/* PLAY rises once LAST has bleached */
.sp-intro .sp-playbtn{ animation:spFadeUp .7s ease-out 2.95s both }
@keyframes spFadeUp{ from{opacity:0; transform:translateY(12px)} to{opacity:1; transform:none} }
/* the click: the candle behind the word flares, the rules run out, and the word lifts away while
   the title flies to its plaque. The word HOLDS its light through the peak and only then goes:
   fading from the first frame read as PLAY dimming on the click, the opposite of the intent. */
.sp-screen.is-exit .sp-playbtn span{ animation:spPlayGo .7s cubic-bezier(.3,.7,.3,1) forwards }
.sp-screen.is-exit .sp-playbtn span::after{ animation:spPlayFlare .7s ease-out forwards;
  background:radial-gradient(closest-side, rgba(255,220,150,.8), rgba(255,170,70,.32) 45%, rgba(255,170,70,0)) }
.sp-screen.is-exit .sp-rule{ animation:spRuleOut .7s cubic-bezier(.3,.7,.3,1) forwards }
@keyframes spPlayGo{ 0%{transform:none; color:#e8c860; opacity:1} 22%{transform:scale(1.14); color:#fffaf0; opacity:1}
  55%{transform:scale(1.1); color:#fff6da; opacity:1} 100%{transform:scale(1.04) translateY(-6px); color:#fff6da; opacity:0} }
@keyframes spPlayFlare{ 0%{opacity:.6; transform:translate(-50%,-50%) scale(1)} 22%{opacity:1; transform:translate(-50%,-50%) scale(2.2)}
  55%{opacity:.85; transform:translate(-50%,-50%) scale(2.8)} 100%{opacity:0; transform:translate(-50%,-50%) scale(3.4)} }
@keyframes spRuleOut{ 0%{transform:none; opacity:1} 100%{transform:scaleX(3.4); opacity:0} }

@media (prefers-reduced-motion:reduce){
  .sp-playbtn span::after{ animation:none !important }
  .sp-screen.is-exit, .sp-screen.is-exit *{ animation-duration:1ms !important; animation-delay:0s !important }
}

/* ══════════ THE FERRYMAN (ShopOverlay in ui_diegetic.jsx) ══════════
   Every ware is a .fx-ware button with the global button chrome stripped.
   THE RESET MUST NOT TOUCH MARGIN ON :hover. It did, and `.fx-ware:hover{margin:0}` outranks a
   row's own `.fd-lead{margin-bottom}`, so the moment the mouse touched the lesson its bottom gap
   collapsed and every row beneath it jumped 13px up, then dropped back when the mouse left.
   The keyboard never hovers, which is why only the mouse saw it. Margin is reset on the base
   state alone, where a row's own rule, declared later, wins. */
.fx-ware,.fx-ware:hover,.fx-ware:active,.fx-ware:focus,.fx-ware:focus-visible{
  background:none; border:0; border-radius:0; box-shadow:none; outline:none;
  color:inherit; font:inherit; cursor:pointer; pointer-events:auto; text-align:inherit;
}
.fx-ware{padding:0; margin:0}
.fx-ware:active{transform:none}
.fx-ware .rxs-vial{display:block; width:100%; height:100%}
@keyframes fxIn{from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:none}}
/* FOCUS: a 2px rule drawn out under the focused thing, plus brightness. Never colour alone. */
.fx-rule{
  display:block; align-self:stretch; height:2px; margin-top:4px; border-radius:1px;
  background:linear-gradient(90deg, transparent, var(--rule, #e8c860) 18%, var(--rule, #e8c860) 82%, transparent);
  box-shadow:0 0 8px var(--rule-glow, rgba(232,200,96,.55));
  transform:scaleX(0); transition:transform .2s cubic-bezier(.16,1,.3,1);
}
.fx-ware.is-focused .fx-rule{transform:scaleX(1)}

.fd{position:absolute; inset:0}
.fd-bubble{
  position:absolute; left:var(--bl); bottom:var(--bb); width:fit-content; max-width:min(354px,38.5cqw); min-width:calc(var(--tail) + 26px);
  pointer-events:none; padding:clamp(11px,1.5cqw,15px) clamp(14px,1.9cqw,18px) clamp(12px,1.6cqw,15px);
  background:rgba(10,10,18,.94); border:1.4px solid rgba(214,176,112,.85); border-radius:8px;
  box-shadow:0 6px 22px rgba(0,0,0,.55); animation:fdPop 420ms cubic-bezier(.2,1.3,.4,1) both 200ms; transform-origin:var(--tail) 100%;
}
@keyframes fdPop{from{opacity:0; scale:.92} to{opacity:1; scale:1}}
.fd-tag{position:absolute; left:12px; top:-1.6em; padding:0 4px; font-family:'Cinzel',serif; font-size:clamp(11px,1.35cqw,12.5px); letter-spacing:.2em; text-transform:uppercase;
  color:#e6bd72; text-shadow:0 1px 0 #000, 0 0 6px #000, 0 0 12px rgba(0,0,0,.95)}
.fd-say{display:block; font-family:'EB Garamond',Georgia,serif; font-size:clamp(16px,2cqw,19px); line-height:1.36; color:#ece6d8; text-wrap:pretty}
/* His own words before the sale: italic, a step quieter, and a beat of space before the pitch. */
.fd-say-lead{font-style:italic; color:#d8cfbd; margin-bottom:.4em}
/* PRETTY, NOT BALANCE. `balance` evens the lines, so it broke early wherever evening them won: "foe"
   dropped to line two with room for it on line one, and every line ran short of the bubble's
   width. `pretty` fills each line and only steps in to keep a lone word off the last. */
.fd-tail{position:absolute; left:var(--tail); bottom:-9px; width:15px; height:15px; translate:-50% 0; rotate:45deg;
  background:rgba(10,10,18,.94); border-right:1.4px solid rgba(214,176,112,.85); border-bottom:1.4px solid rgba(214,176,112,.85)}

/* PINNED AT THE TOP. The lesson must not move when buying it reveals a new draught (a Knight's
   first prayer reveals the Mana Draught); the asks grow down, on leading tight enough that three
   of them and the exit still clear the bottom wall. */
.fd-replies{position:absolute; left:19.5%; top:60%; width:min(640px,69cqw); display:flex; flex-direction:column; gap:clamp(2px,.35cqw,4px); pointer-events:none;
  animation:fxIn 520ms cubic-bezier(.16,1,.3,1) both 520ms}
.fd-replies::before{content:""; position:absolute; left:-10%; right:-6%; top:-12%; bottom:-10%; z-index:-1; pointer-events:none;
  background:radial-gradient(ellipse 58% 60% at 40% 50%, rgba(3,3,7,.86) 0%, rgba(3,3,7,.55) 55%, rgba(3,3,7,0) 100%)}
.fd-reply{display:flex; align-items:center; gap:clamp(10px,1.3cqw,13px); position:relative; text-align:left;
  padding:clamp(1px,.2cqw,2px) 10px clamp(1px,.2cqw,2px) clamp(24px,3cqw,28px); --rule:#e8c860}
/* the cursor: a small lit diamond beside whatever is focused */
.fd-reply::before{content:"\25C6"; position:absolute; left:clamp(5px,.8cqw,8px); top:1.05em; translate:0 -50%; font-size:11px; color:var(--acc, #e8c860);
  opacity:0; transition:opacity .14s ease, translate .14s ease; text-shadow:0 0 6px var(--acc-glow, rgba(232,200,96,.6))}
.fd-reply.is-focused::before{opacity:1; translate:3px -50%}
.fd-reply .fx-rule{width:100%; max-width:28em}

/* ---- the lesson: the headline of the screen ---- */
.fd-lead{margin-bottom:clamp(9px,1.5cqw,15px); align-items:flex-start; --rule:var(--acc-hi); --rule-glow:var(--acc-glow)}
.fd-lead::before{top:1.45em}
.fd-lead.fx-ware:not(.is-focused){opacity:.9}
.fd-mark{flex:none; width:clamp(52px,6.6cqw,60px); aspect-ratio:1; border-radius:50%; display:grid; place-items:center; margin-top:2px;
  font-size:clamp(24px,3.1cqw,29px); color:var(--acc-hi); text-shadow:0 0 10px var(--acc-glow);
  background:radial-gradient(circle, var(--acc-deep) 0%, rgba(8,10,18,.9) 72%); box-shadow:0 0 0 1px var(--acc), 0 0 14px var(--acc-deep);
  transition:box-shadow .16s ease}
.fd-lead.is-focused .fd-mark{box-shadow:0 0 0 1px var(--acc-hi), 0 0 28px var(--acc-glow)}
.fd-lead-t{display:flex; flex-direction:column; min-width:0}
.fd-lead-n{display:flex; flex-wrap:nowrap; white-space:nowrap; align-items:baseline; column-gap:.8em}
.fd-lead-name{font-family:'Cinzel',serif; font-weight:700; font-size:clamp(21px,2.95cqw,27px); letter-spacing:.035em; line-height:1.15; color:var(--acc-hi);
  text-shadow:0 1px 0 #000, 0 0 14px var(--acc-deep); transition:text-shadow .16s ease}
.fd-lead.is-focused .fd-lead-name{text-shadow:0 1px 0 #000, 0 0 18px var(--acc-glow)}
.fd-price{font-family:'EB Garamond',Georgia,serif; font-style:italic; font-size:clamp(18px,2.25cqw,21px); color:#e7d9ae; text-shadow:0 1px 0 #000, 0 0 8px rgba(0,0,0,.95)}
.fd-learned{font-family:'Cinzel',serif; font-size:clamp(12.5px,1.55cqw,14.5px); letter-spacing:.28em; text-transform:uppercase;
  color:var(--acc); text-shadow:0 1px 0 #000, 0 0 10px var(--acc-deep)}
.fd-learned::before{content:"\2726"; margin-right:.55em; letter-spacing:0}
.fd-lead-d{margin-top:3px; font-family:'EB Garamond',Georgia,serif; font-size:clamp(17px,2.2cqw,20.5px); color:#e6ddca; text-shadow:0 1px 0 #000}
.fd-lead-m{margin-top:3px; font-family:'Cinzel',serif; font-size:clamp(12px,1.45cqw,13.5px); letter-spacing:.08em; text-transform:uppercase;
  color:#b8b0a0; text-shadow:0 1px 0 #000; white-space:pre}
/* learned: kept in place, dimmed evenly, the "Learned" mark left bright */
.fd-lead.is-learned .fd-mark{opacity:.55; box-shadow:0 0 0 1px var(--acc)}
.fd-lead.is-learned .fd-lead-name,.fd-lead.is-learned .fd-lead-m{opacity:.6}
.fd-lead.is-learned .fd-lead-d{opacity:.75}

/* ---- the draughts: plain asks ---- */
/* The vial sits in a column as wide as the lesson's medallion, so every reply's words start on
   one edge. */
.fd-vial{display:flex; justify-content:center; width:clamp(52px,6.6cqw,60px); flex:none; filter:drop-shadow(0 1px 0 #000)}
.fd-vial .rxs-vial{width:clamp(20px,2.5cqw,23px); height:clamp(20px,2.5cqw,23px)}
.fd-ask-t{display:flex; flex-direction:column}
.fd-ask-n{font-family:'EB Garamond',Georgia,serif; font-size:clamp(15.5px,1.95cqw,18px); color:#cfc6b2; text-shadow:0 1px 0 #000; transition:color .14s ease; white-space:nowrap}
.fd-ask-p{margin-left:.8em; font-style:italic; font-size:.88em; color:#b1a78e}
.fd-ask .fx-rule{margin-top:2px}
.fd-reply.is-focused .fd-ask-n{color:#fff3cd}

/* ---- Press on: a real button, in the sidebar's Drink-button material ---- */
.fd-bye{margin-top:clamp(6px,1cqw,10px)}
.fd-bye::before{top:50%}
.fd-bye-b{
  margin-left:calc(clamp(52px,6.6cqw,60px) + clamp(10px,1.3cqw,13px));
  font-family:'Cinzel',serif; font-size:clamp(13px,1.6cqw,15px); letter-spacing:.18em; text-transform:uppercase; color:#d9c89a;
  background:linear-gradient(180deg,#332913,#211a0b); border:1px solid rgba(201,169,78,.5); border-radius:4px;
  padding:clamp(5px,.7cqw,7px) clamp(14px,1.9cqw,18px) clamp(4px,.6cqw,6px);
  box-shadow:inset 0 1px 0 rgba(255,236,190,.1), 0 2px 8px rgba(0,0,0,.6);
  transition:border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.fd-bye.is-focused .fd-bye-b{border-color:#e8c860; color:#fff3cd;
  box-shadow:inset 0 1px 0 rgba(255,236,190,.16), 0 2px 8px rgba(0,0,0,.6), 0 0 14px rgba(232,200,96,.38)}
.fd-bye:active .fd-bye-b{translate:0 1px}

/* ---- a purse too light: the ware shakes its head ---- */
.fd-reply.is-denied .fd-lead-t,.fd-reply.is-denied .fd-ask-t{animation:fdDeny 380ms ease-in-out}
@keyframes fdDeny{0%,100%{translate:0 0} 20%{translate:-5px 0} 40%{translate:4px 0} 60%{translate:-3px 0} 80%{translate:2px 0}}
@media (prefers-reduced-motion:reduce){ .fd-reply.is-denied .fd-lead-t,.fd-reply.is-denied .fd-ask-t{animation:none; opacity:.6} }

/* =====================================================================================
   THE ASCENT REMEMBERED (js/ascent.js, js/ui_ascent.jsx; docs/victory-payoff-design.md, A).
   Nothing below animates on its own. Every element is placed and faded each frame by the
   overlay from the one clock the canvas is drawn at, so a pinned capture shows one instant.
   The one exception is the way out's idle glow once armed, which belongs to no beat.
   ===================================================================================== */
.asc-host{position:fixed; inset:0; z-index:410;}
.asc-stage{position:absolute; inset:0; overflow:hidden; background:#050409;
  --bone-hi:#f1ead9; --bone:#cfc7b8; --bone-lo:#6e6857; --bone-dk:#44402f; --cold:#8ee0ff;
  font-family:'EB Garamond',Georgia,serif; color:var(--ink);}
.asc-canvas{position:absolute; inset:0; width:100%; height:100%; display:block;
  image-rendering:pixelated; image-rendering:crisp-edges;}
.asc-white{position:absolute; inset:0; background:#fffdf6;}
.asc-cap,.asc-low{position:absolute; left:0; top:0; opacity:0; visibility:hidden; pointer-events:none; will-change:transform,opacity;}

/* ---- the zones' words: carved in the flank rock beside the column ---- */
.asc-cap{width:max-content;}
.asc-cap::before{content:""; position:absolute; inset:-38px -46px; z-index:-1; pointer-events:none;
  background:radial-gradient(closest-side, rgba(3,2,6,.72), rgba(3,2,6,.45) 55%, rgba(3,2,6,0));}
.asc-cap-l{text-align:right;}
.asc-cap-r{text-align:left;}
.asc-cap-top{text-align:center; max-width:none;}
.asc-cap-top::before{inset:-40px -140px;}
.asc-cap-name{font-family:'Cinzel',serif; font-weight:700; font-size:clamp(17px,1.75vw,30px); letter-spacing:.16em; white-space:nowrap;
  color:var(--acc); text-transform:uppercase; line-height:1.1;
  text-shadow:0 1px 0 rgba(0,0,0,.9), 0 -1px 0 rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.95);}
.asc-cap-rule{height:1px; margin:.5em 0 .45em; width:min(230px,15vw);
  background:linear-gradient(90deg, transparent, var(--acc) 40%, var(--acc));}
.asc-cap-l .asc-cap-rule{margin-left:auto;}
.asc-cap-r .asc-cap-rule{background:linear-gradient(270deg, transparent, var(--acc) 40%, var(--acc));}
.asc-cap-top .asc-cap-rule{margin-left:auto; margin-right:auto; width:min(300px,24vw);
  background:linear-gradient(90deg, transparent, var(--acc) 30%, var(--acc) 70%, transparent);}
.asc-cap-note{font-style:italic; font-weight:500; font-size:clamp(15px,1.3vw,21px); color:#e2dccd; line-height:1.3;
  letter-spacing:.015em; text-shadow:0 0 14px rgba(0,0,0,.95), 0 2px 5px rgba(0,0,0,.95);}

.asc-low{font-style:italic; font-weight:500; font-size:clamp(22px,2.3vw,35px); color:var(--bone-hi); white-space:nowrap; text-align:center;
  text-shadow:0 0 22px rgba(0,0,0,.95), 0 2px 6px rgba(0,0,0,.95), 0 0 30px rgba(255,40,30,.25);}
.asc-low b{font-family:'Cinzel',serif; font-style:normal; font-weight:900; color:#ff5a48; font-size:1.3em;
  text-shadow:0 0 18px rgba(255,40,30,.6), 0 2px 6px rgba(0,0,0,.9);}
/* a Minion felled: a small card on its room, in the zone cards' voice (a Cinzel name over an italic
   line, on a feathered band of dark so neither the bricks nor the thread cut through the words) */
.asc-minion{position:absolute; left:0; top:0; opacity:0; visibility:hidden; pointer-events:none; will-change:transform,opacity;
  width:max-content; text-align:center;}
.asc-minion::before{content:""; position:absolute; inset:-26px -56px; z-index:-1; pointer-events:none;
  background:radial-gradient(closest-side, rgba(3,2,6,.8), rgba(3,2,6,.55) 55%, rgba(3,2,6,0));}
.asc-minion-name{font-family:'Cinzel',serif; font-weight:700; font-size:clamp(16px,1.45vw,25px); letter-spacing:.14em;
  text-transform:uppercase; color:var(--gold); line-height:1.1; white-space:nowrap;
  text-shadow:0 0 16px rgba(255,200,90,.4), 0 1px 0 rgba(0,0,0,.9), 0 2px 8px rgba(0,0,0,.95);}
.asc-minion-note{font-style:italic; font-weight:500; font-size:clamp(15px,1.3vw,21px); color:#e2dccd; line-height:1.3;
  margin-top:.15em; text-shadow:0 0 14px rgba(0,0,0,.95), 0 2px 5px rgba(0,0,0,.95);}

/* ---- the wide shot: the title in the sky over the summit ---- */
.asc-title{position:absolute; left:0; right:0; top:6.5%; text-align:center; opacity:0; visibility:hidden; pointer-events:none;
  font-family:'Cinzel',serif; font-weight:900; font-size:clamp(30px,4.4vw,74px); letter-spacing:.16em; text-indent:.16em; line-height:1;
  background:linear-gradient(180deg,#fff3c4 0%,#e8c860 48%,#b08a34 78%,#6e5418 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 0 7px rgba(5,4,14,.95)) drop-shadow(0 3px 0 rgba(40,26,6,.9)) drop-shadow(0 6px 14px rgba(0,0,0,.7));}
.asc-stats{position:absolute; left:14%; top:31%; transform:translateX(-50%); text-align:center; opacity:0; visibility:hidden;
  pointer-events:none; width:max-content; max-width:24vw;}
.asc-stat{font-style:italic; font-weight:500; font-size:clamp(19px,1.9vw,30px); color:var(--bone); line-height:1.55;
  text-shadow:0 0 14px rgba(0,0,0,.95), 0 2px 5px rgba(0,0,0,.9);}
.asc-stat-who{font-family:'Cinzel',serif; font-style:normal; font-weight:700; letter-spacing:.1em; color:var(--gold);
  font-size:clamp(20px,1.95vw,31px); margin-bottom:.25em;}
/* THE NEW DIFFICULTY IS THE PAYOFF, THE TALLY IS THE RECORD (owner, 2026-11-06): the rooms and foes
   step down, and the unlock steps up past them, its Ascension named in Cinzel in its cold light. */
.asc-stat-tally{font-size:clamp(15px,1.4vw,22px); color:var(--ink-dim);}
.asc-unlock{margin-top:.75em; font-style:italic; font-size:clamp(18px,1.75vw,27px); color:var(--bone); line-height:1.35;
  text-shadow:0 0 12px rgba(0,0,0,.95), 0 2px 5px rgba(0,0,0,.9); white-space:normal;}
.asc-unlock span{display:block; margin-top:.15em; font-family:'Cinzel',serif; font-style:normal; font-weight:700;
  font-size:1.2em; letter-spacing:.08em; color:var(--cold); text-shadow:0 0 14px rgba(120,190,255,.45), 0 2px 5px rgba(0,0,0,.9);}
/* ---- the payout: kicker, coin, ledger, and the way out beneath it ---- */
.asc-pay{position:absolute; left:86.5%; top:15%; transform:translateX(-50%); display:flex; flex-direction:column; align-items:center;
  pointer-events:none; width:clamp(240px,23vw,380px);}
.asc-kicker{font-style:italic; font-weight:500; font-size:clamp(18px,1.75vw,28px); color:#c9b98a; white-space:nowrap;
  margin-bottom:clamp(8px,1.4vh,18px); opacity:0; visibility:hidden; text-shadow:0 0 16px rgba(0,0,0,.95), 0 2px 6px rgba(0,0,0,.9);}
.asc-coinbox{display:flex; flex-direction:column; align-items:center; opacity:0; visibility:hidden;}
.asc-coinwrap{position:relative; width:clamp(92px,9.5vw,150px); aspect-ratio:1; will-change:transform;}
.asc-coin{width:100%; height:100%; filter:drop-shadow(0 0 26px rgba(255,200,110,.4)) drop-shadow(-6px 9px 12px rgba(0,0,0,.8));}
.asc-ring{position:absolute; inset:-14%; border-radius:50%; border:3px solid #fff0c0; opacity:0; pointer-events:none;
  box-shadow:0 0 22px rgba(255,220,140,.7), inset 0 0 18px rgba(255,220,140,.5);}
.asc-count{font-family:'Cinzel',serif; font-weight:900; font-size:clamp(30px,3.5vw,56px); line-height:1; margin-top:.28em;
  background:linear-gradient(180deg,#fff3c4 0%,#e8c860 55%,#9c7a2a 100%); -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.85)); font-variant-numeric:lining-nums tabular-nums;}
.asc-coinlabel{font-family:'Cinzel',serif; font-weight:700; font-size:clamp(12px,1.05vw,17px); letter-spacing:.22em; text-indent:.22em;
  color:var(--gold); margin-top:.5em; text-shadow:0 2px 6px rgba(0,0,0,.9);}
.asc-ledger{margin-top:clamp(12px,2vh,22px); width:100%;}
/* No leaders and no rule, as on the death screen (owner, 2026-10-09): ESCAPED is one tally among
   the rest, not a total, so it shares their size and pitch. line-height in em for the same reason
   as .dth-row: inherited as a length, so the caps label cannot shorten its row. */
.asc-row{display:flex; align-items:baseline; gap:.5em; opacity:0; visibility:hidden; line-height:1.4em;
  font-size:clamp(15px,1.35vw,21px); color:var(--bone); padding:.18em 0; text-shadow:0 0 12px rgba(0,0,0,.95), 0 2px 4px rgba(0,0,0,.9);}
.asc-row span{font-style:italic; white-space:nowrap;}
.asc-row span em{font-style:normal; color:var(--bone-hi);}
.asc-row i{flex:1;}
.asc-row b{font-family:'Cinzel',serif; font-weight:700; color:var(--gold); font-variant-numeric:tabular-nums;}
.asc-row-big{color:var(--bone-hi);}
/* set as the death screen sets FALLEN, its counterpart (.dth-row-fallen) */
.asc-row-big span{font-style:normal; font-family:'Cinzel',serif; letter-spacing:.12em; font-size:.86em;}

.asc-exit, .asc-exit:hover, .asc-exit:active, .asc-exit:focus, .asc-exit:focus-visible{
  position:relative; margin-top:clamp(16px,2.6vh,30px); opacity:0; pointer-events:none; overflow:hidden;
  display:flex; align-items:center; gap:.9em; padding:clamp(14px,1.6vh,20px) clamp(28px,2.6vw,44px);
  font-family:'Cinzel',serif; font-weight:700; font-size:clamp(17px,1.35vw,22px); letter-spacing:.14em; color:var(--leaf-hi); white-space:nowrap;
  background:linear-gradient(180deg,var(--iron-hi) 0%,var(--iron-lo) 100%);
  border:1px solid var(--leaf); border-radius:0; outline:none;
  box-shadow:-5px 7px 12px rgba(0,0,0,.7), inset 0 1px 0 rgba(247,230,176,.16), inset 0 0 0 3px rgba(11,10,9,.9), inset 0 0 0 4px rgba(201,169,78,.35);}
/* Tracking adds its gap AFTER the last letter too, so a lone tracked label sits .14em left of
   center in a symmetric button. Pulled back by exactly that. */
.asc-exit-t{margin-right:-.14em}
.asc-armed .asc-exit{pointer-events:auto; animation:ascGlow 2.6s ease-in-out .9s infinite;}
.asc-armed .asc-exit::after{content:""; position:absolute; top:-20%; bottom:-20%; left:-40%; width:30%;
  background:linear-gradient(90deg,transparent,rgba(255,240,190,.45),transparent); transform:skewX(-18deg);
  animation:ascSweep .9s ease-out .05s 1 both;}
.asc-exit:hover, .asc-exit:focus-visible{border-color:#f0d870; color:#fff6dc;}
@keyframes ascSweep{from{left:-40%} to{left:120%}}
@keyframes ascGlow{0%,100%{box-shadow:-5px 7px 12px rgba(0,0,0,.7), inset 0 1px 0 rgba(247,230,176,.16), inset 0 0 0 3px rgba(11,10,9,.9), inset 0 0 0 4px rgba(201,169,78,.35), 0 0 0 rgba(232,200,96,0)}
  50%{box-shadow:-5px 7px 12px rgba(0,0,0,.7), inset 0 1px 0 rgba(247,230,176,.16), inset 0 0 0 3px rgba(11,10,9,.9), inset 0 0 0 4px rgba(201,169,78,.35), 0 0 22px rgba(232,200,96,.32)}}
@media (prefers-reduced-motion:reduce){ .asc-armed .asc-exit, .asc-armed .asc-exit::after{animation:none;} }

.asc-skip{position:absolute; right:2.2%; bottom:3.2%; display:flex; align-items:center; gap:.6em; opacity:0; transition:opacity .25s ease;
  font-family:'Cinzel',serif; font-weight:700; font-size:12px; letter-spacing:.18em; color:var(--ink-dim); pointer-events:none;}
.asc-skip svg{width:22px; height:22px; transform:rotate(-90deg);}
.asc-skip-bg{fill:none; stroke:rgba(207,199,184,.18); stroke-width:3;}
.asc-skip-fill{fill:none; stroke:var(--gold); stroke-width:3; stroke-dasharray:100; stroke-dashoffset:100;}

/* A narrow screen: the payout and the stats draw in toward the edges and shrink a step. */
@media (max-aspect-ratio: 3/2){
  .asc-pay{left:85.5%; top:12%; width:clamp(200px,24vw,300px); transform:translateX(-50%) scale(.86); transform-origin:50% 0;}
  /* Every state, as the base rule names them: it sets margin-top on :hover and :focus too, and a
     class-plus-pseudo outranks this bare class, so on hover the wide margin came back and the
     button dropped 7.8px under the pointer (owner, 2026-10-20). */
  .asc-exit, .asc-exit:hover, .asc-exit:active, .asc-exit:focus, .asc-exit:focus-visible{margin-top:clamp(10px,1.6vh,18px);}
  .asc-stats{left:14.5%; max-width:26vw;}
  .asc-coinwrap{width:clamp(80px,8.5vw,120px);}
  .asc-kicker{white-space:normal; text-align:center;}
}

/* ============================== THE RELIQUARY ==============================
   js/ui_reliquary.jsx. The hero's boons, mid-run, opened from the sidebar's identity panel. The
   full map's metal and rim (.rx-map), top-aligned with the minimap, over the room only. */
#rq-mount{ position:absolute; inset:0; z-index:40; pointer-events:none }
#rq-mount:empty{ display:none }
#rq-mount > *{ pointer-events:auto }
.rq-backdrop{ position:absolute; inset:0; display:flex; background:rgba(4,3,8,.62); border-radius:10px;
  animation:rqFade 180ms ease-out both }
@keyframes rqFade{ from{ background:rgba(4,3,8,0) } to{ background:rgba(4,3,8,.62) } }
.rq{
  position:relative; top:calc(100% * 8 / 416); align-self:flex-start; margin:0 auto;
  width:calc(100% - 20px); height:calc(100% * 408 / 416 - 10px);
  display:flex; flex-direction:column; min-height:0; overflow:hidden; padding:12px 18px 12px;
  background:linear-gradient(180deg, var(--iron-hi) 0%, #100e0c 48%, var(--iron-lo) 100%);
  border-radius:3px; font-family:'EB Garamond',Georgia,serif; color:var(--ink);
  /* the map's own drop: transform only, so an interrupted entrance still leaves it legible */
  animation:rxMapDrop 220ms cubic-bezier(.2,.8,.25,1) both;
}
.rq::before{ content:''; position:absolute; inset:0; margin:-2px; border:2px solid rgba(0,0,0,.85); border-radius:5px; pointer-events:none; z-index:2 }
.rq::after{ content:''; position:absolute; inset:0; border:1px solid rgba(201,169,78,.72); border-radius:3px;
  box-shadow:inset 0 1px 0 rgba(255,246,214,.20); pointer-events:none; z-index:2 }
.rq > .rx-grain,.rq > .rx-wear,.rq > .rx-ember,.rq > .rx-ember-slow{ border-radius:3px }
.rq .t-lesser{ --tc:#e8c860; --tc-soft:rgba(232,200,96,.55) }
.rq .t-greater{ --tc:#c79be6; --tc-soft:rgba(199,155,230,.55) }
.rq .t-cardinal{ --tc:#ff9e96; --tc-soft:rgba(232,115,107,.6) }

.rq-head{ position:relative; z-index:4; display:flex; align-items:center; justify-content:space-between; gap:20px;
  padding:2px 6px 10px; border-bottom:1px solid rgba(201,169,78,.16); flex:0 0 auto }
.rq-title{ font-family:'Cinzel',serif; font-size:var(--f-maptitle); color:var(--gold); letter-spacing:.08em; line-height:1.1 }

.rq-body{ position:relative; z-index:3; flex:1 1 auto; min-height:0; display:flex; gap:22px; padding:6px 6px 0 }
.rq-main{ flex:1 1 auto; min-width:0; min-height:0; display:flex; flex-direction:column; justify-content:space-evenly }
.rq-main.is-compact{ justify-content:space-evenly; gap:10px }
.rq-main.is-scroll{ justify-content:flex-start; gap:14px; padding:6px 4px 10px 0; overflow-y:auto; scrollbar-width:thin;
  scrollbar-color:rgba(201,169,78,.35) transparent;
  -webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 22px), transparent); mask-image:linear-gradient(180deg, #000 calc(100% - 22px), transparent) }
.rq-band-k{ display:flex; align-items:baseline; gap:10px; font-family:'Cinzel',serif; font-weight:700; font-size:11.5px;
  letter-spacing:.24em; text-transform:uppercase; color:var(--tc) }
.rq-band-k em{ font-style:normal; font-weight:400; color:#8f8775; letter-spacing:.1em }
.rq-band-k i{ flex:1; height:1px; align-self:center; opacity:.6; background:linear-gradient(90deg, var(--tc-soft), rgba(201,169,78,.08) 40%, transparent) }
.rq-band-none{ margin:6px 0 0 2px; font-style:italic; font-size:15px; color:#8f8775 }
.rq-tiles{ display:flex; flex-wrap:wrap; gap:4px; margin-top:6px }
.rq-tile{ position:relative; width:104px; min-height:92px; padding:4px 2px 6px; display:flex; flex-direction:column; align-items:center;
  border-radius:3px; cursor:default }
.rq-main.is-compact .rq-tile,.rq-main.is-scroll .rq-tile{ width:88px; min-height:0; padding:2px 2px 4px }
.rq-tile.on{ background:radial-gradient(70% 70% at 50% 40%, rgba(255,178,92,.11), transparent 70%) }
.rq-tname{ font-family:'Cinzel',serif; font-size:12.5px; letter-spacing:.03em; line-height:1.2; text-align:center; color:#d9cfba;
  margin-top:2px; min-height:30px }
/* COMPACT KEEPS THE WHOLE NAME, on up to two smaller lines. It was one line with an ellipsis,
   and "Hammerfal..." is not a name: a tile has to be readable without being selected. */
.rq-main.is-compact .rq-tname,.rq-main.is-scroll .rq-tname{ font-size:11px; line-height:1.15; min-height:0; max-width:100%; margin-top:0 }
.rq-tile.on .rq-tname{ color:#fff3d6 }
.rq-tile .rq-pips{ position:absolute; right:12px; top:5px; margin:0 }
.rq-none{ margin:auto; text-align:center }
.rq-none-k{ font-family:'Cinzel',serif; font-size:15px; letter-spacing:.2em; text-transform:uppercase; color:#a89f8c }
.rq-none-l{ margin-top:6px; font-size:16px; color:#8f8775; font-style:italic }

/* the wisp: the level-up screen's own sprite (assets/wisp.png), rarity owning colour */
.rq-wisp{ position:relative; display:inline-block; width:52px; height:52px; flex:0 0 auto }
.rq-main.is-compact .rq-wisp,.rq-main.is-scroll .rq-wisp{ height:40px }
.rq-wisp .dx-mote-core{ left:50%; top:50% }
.rq-halo{ position:absolute; left:50%; top:50%; width:58px; height:58px; border-radius:50%;
  transform:translate(-50%,-50%) scale(var(--wisp-s,1)) }
.rq-wisp.t-lesser .rq-halo{ background:radial-gradient(circle, rgba(255,224,150,.30) 0%, rgba(232,200,96,.10) 42%, rgba(232,200,96,0) 70%) }
.rq-wisp.t-lesser .dx-mote-core{ background-position-y:0; filter:drop-shadow(0 0 6px rgba(240,212,122,.55)) }
.rq-wisp.t-greater .rq-halo{ background:radial-gradient(circle, rgba(216,168,255,.34) 0%, rgba(168,110,226,.13) 42%, rgba(168,110,226,0) 70%) }
.rq-wisp.t-greater .dx-mote-core{ background-position-y:-48px; filter:drop-shadow(0 0 7px rgba(200,150,240,.6)) }
/* Cardinal borrows the violet body and rotates it to scarlet, exactly as the level-up wisp does */
.rq-wisp.t-cardinal .rq-halo{ background:radial-gradient(circle, rgba(255,168,158,.48) 0%, rgba(232,115,107,.2) 44%, rgba(232,115,107,0) 72%) }
.rq-wisp.t-cardinal .dx-mote-core{ background-position-y:-48px; filter:hue-rotate(88deg) saturate(1.3) drop-shadow(0 0 9px rgba(255,150,140,.8)) }
.rq-wisp.on{ filter:brightness(1.25) }
.rq-wisp.on .rq-halo{ width:84px; height:84px }
@media (prefers-reduced-motion: reduce){ .rq-wisp .dx-mote-core{ animation:none } .rq,.rq-backdrop{ animation:none } }

.rq-pips{ margin-left:6px; font-size:8px; letter-spacing:2px; color:var(--gold); vertical-align:2px; text-shadow:0 0 6px rgba(232,200,96,.5) }

/* the right column: everything else the hero carries */
.rq-side{ flex:0 0 268px; min-height:0; overflow-y:auto; padding:0 4px 8px 20px; border-left:1px solid rgba(201,169,78,.14);
  scrollbar-width:thin; scrollbar-color:rgba(201,169,78,.35) transparent }
.rq-side-k{ font-family:'Cinzel',serif; font-size:11px; letter-spacing:.24em; text-transform:uppercase; color:#8f8775;
  margin:14px 0 7px; display:flex; align-items:center; gap:8px }
.rq-side-k:first-child{ margin-top:6px }
.rq-side-k::after{ content:''; flex:1; height:1px; background:rgba(201,169,78,.16) }
.rq-line{ display:flex; align-items:flex-start; gap:10px; margin:0 0 9px }
.rq-line > span:last-child{ display:flex; flex-direction:column; min-width:0 }
.rq-line b{ font-family:'Cinzel',serif; font-weight:400; font-size:14px; letter-spacing:.04em; color:#efe2c4 }
.rq-line b u{ text-decoration:none; color:#a89f8c; letter-spacing:.02em }
.rq-line em{ font-style:normal; font-size:14.5px; line-height:1.3; color:#a89f8c }
.rq-line.none b{ color:#7d7565 } .rq-line.none em{ color:#6d6659 }
.rq-empty{ font-style:italic; font-size:14.5px; color:#6d6659; margin:0 0 6px }
.rq-dia{ flex:0 0 8px; width:8px; height:8px; margin:6px 3px 0; transform:rotate(45deg); background:var(--tc); box-shadow:0 0 7px var(--tc-soft) }
/* the bound Sigil's seal: the fight's seal chip, the phase numeral in a gold ring */
.rq-seal{ flex:0 0 28px; width:28px; height:28px; border-radius:50%; border:1px solid #e8c860; display:flex; align-items:center; justify-content:center;
  box-shadow:inset 0 0 0 2.5px rgba(10,9,16,.92), inset 0 0 0 3.6px rgba(232,200,96,.5), 0 0 10px rgba(232,200,96,.25) }
.rq-seal i{ font:normal 700 10px/1 'Cinzel',serif; color:#e8c860; letter-spacing:.02em }
.rq-seal.dim{ border-color:rgba(201,169,78,.3); box-shadow:inset 0 0 0 2.5px rgba(10,9,16,.92), inset 0 0 0 3.6px rgba(201,169,78,.15) }
.rq-pact{ flex:0 0 28px; width:28px; height:28px; display:flex; align-items:center; justify-content:center }
.rq-pact::before{ content:''; width:14px; height:14px; transform:rotate(45deg); border:1px solid #c79be6;
  box-shadow:inset 0 0 0 2px rgba(10,9,16,.92), 0 0 9px rgba(199,155,230,.35); background:rgba(199,155,230,.25) }

/* the selected boon, in full */
.rq-detail{ position:relative; z-index:3; flex:0 0 auto; display:flex; align-items:center; gap:14px; margin:8px 6px 0; padding:10px 14px 2px;
  border-top:1px solid rgba(201,169,78,.16) }
.rq-dtext{ display:flex; flex-direction:column; min-width:0 }
.rq-kick{ font-family:'Cinzel',serif; font-weight:700; font-size:11px; letter-spacing:.22em; text-transform:uppercase; color:var(--tc) }
.rq-kick b{ color:#6d6659; font-weight:400 }
.rq-dname{ font-family:'Cinzel',serif; font-size:21px; letter-spacing:.05em; color:#f6ead0; margin-top:3px }
.rq-dline{ font-size:16.5px; line-height:1.35; color:var(--ink); margin-top:2px }

/* narrower windows: the side column gives way first */
@media (max-width: 1180px){ .rq-side{ flex-basis:232px; padding-left:16px } .rq-body{ gap:16px } }

/* THE TRIGGER: the sidebar's identity panel, all of it (portrait, class, title, level, the pill).
   Hover and focus lift the rim and light the pill; while the Reliquary is up the pill stays lit. */
.rxs-id.is-trigger{ cursor:pointer; outline:none; transition:box-shadow .16s ease }
.rxs-id.is-trigger:hover,.rxs-id.is-trigger:focus-visible{ box-shadow:0 0 0 1px rgba(232,200,96,.55), 0 0 18px rgba(232,200,96,.14) }
.rxs-id-badges{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:7px }
.rxs-id-badges .rxs-level{ margin-top:0 }
.rxs-boons{ display:inline-flex; align-items:center; gap:6px; padding:3px 10px 3px 8px; border-radius:10px;
  font-family:'Cinzel',serif; font-size:12px; letter-spacing:.08em; color:var(--ink);
  border:1px solid rgba(201,169,78,.45); background:rgba(0,0,0,.28); transition:color .16s ease, border-color .16s ease, background .16s ease }
.rxs-boons i{ width:7px; height:7px; transform:rotate(45deg); background:var(--gold); box-shadow:0 0 6px rgba(232,200,96,.7) }
.rxs-id.is-trigger:hover .rxs-boons,.rxs-id.is-trigger:focus-visible .rxs-boons,html.rq-up .rxs-boons{
  color:#fff3d6; border-color:rgba(232,200,96,.9); background:rgba(232,200,96,.12) }

/* ---- THE RELIQUARY FLIES: out of the hero panel and home again (js/ui_reliquary.jsx, THE PLATE
   FLIES), the map's Lens on the map's clock. While .is-lens is on the backdrop the real plate's
   layers are driven by custom properties the flight sets every frame; each has a fallback, and
   removing the one class is the whole cleanup, so no exit path can strand it half-drawn. */
.rq-backdrop.is-lens{ animation:none; background:rgba(4,3,8,var(--rq-dim,0)) }
.rq-backdrop.is-lens .rq{ animation:none; visibility:var(--rq-vis,hidden) }
.rq-backdrop.was-lens .rq{ animation:none }      /* landed: the flight was its entrance */
/* ...and the backdrop's too. Its own fade-in (rqFade) was held off by .is-lens; when the flight took
   that class off at the landing, the animation started over from transparent, so the dim fell from
   .62 to .18 and climbed back: the room flashed as the plate settled (owner; measured). */
.rq-backdrop.was-lens{ animation:none }
.rq-backdrop.is-lens .rq-body,.rq-backdrop.is-lens .rq-detail{ opacity:var(--rq-ink,0); filter:blur(var(--rq-blur,0px)) }
.rq-backdrop.is-lens .rq-head{ opacity:var(--rq-head,0); transform:translateY(var(--rq-rise,0px)) }
/* filter, not opacity: the ember layers flicker BY animating opacity, which would beat a declared one */
.rq-backdrop.is-lens .rq > .rx-ember,.rq-backdrop.is-lens .rq > .rx-ember-slow,
.rq-backdrop.is-lens .rx-map-bolt{ filter:opacity(var(--rq-light,0)) }
/* the survey hatch the contents develop out of, and dissolve back into */
.rq-hatch,.rq-g-hatch{ position:absolute; pointer-events:none;
  background-image:repeating-linear-gradient(128deg, rgba(122,113,92,.20) 0 1px, transparent 1px 9px) }
.rq-hatch{ display:none; inset:12px; z-index:2; border-radius:2px }
.rq-backdrop.is-lens .rq-hatch{ display:block; opacity:var(--rq-hatch,1) }

/* the plate in flight: the panel's iron, lifted off the rail */
.rq-ghost{ position:fixed; z-index:9000; pointer-events:none; box-sizing:border-box; overflow:hidden;
  background:linear-gradient(180deg, var(--iron-hi) 0%, #100e0c 55%, var(--iron-lo) 100%) }     /* the panel's own ramp */
.rq-ghost > .rx-grain,.rq-ghost > .rx-wear{ border-radius:inherit }
/* it leaves wearing the panel's gold side rails and lands wearing the plate's gold rim */
.rq-g-rails,.rq-g-rim{ position:absolute; inset:0; pointer-events:none; z-index:3; border-radius:inherit }
.rq-g-rails{ opacity:var(--rq-g-rails,1);
  background:
    linear-gradient(90deg, var(--leaf-dk) 0 1px, var(--leaf) 1px 2px, rgba(247,230,176,.22) 2px 3px) left 3px / 3px calc(100% - 6px) no-repeat,
    linear-gradient(90deg, rgba(255,226,170,.5) 0 1px, var(--leaf) 1px 2px, var(--leaf-dk) 2px 3px) right 3px / 3px calc(100% - 6px) no-repeat }
.rq-g-rim{ opacity:var(--rq-g-rim,0); border:1px solid rgba(201,169,78,.72); box-shadow:inset 0 1px 0 rgba(255,246,214,.20), 0 0 0 2px rgba(0,0,0,.85) }
.rq-g-field{ position:absolute; z-index:2; border-radius:2px; overflow:hidden }
.rq-g-hatch{ inset:0 }

/* ══════════════════════════ THE PHONE LAYOUT (js/phone.js; owner, 2026-10-22, layout A) ══
   html.is-phone: a touch screen held sideways and too short for the desktop page. The page becomes
   the screen. The room stands at full height against the left edge; the sidebar is a rail on the
   right, cut to what a run needs at a glance: the hero, the bars, gold and the draughts. Attributes
   and equipment are in the Reliquary (tap the hero). The hero panel is COMPACT here, one row, which
   is what buys the rail room for a third draught row on top of the class's bars.
   Heights are dvh: Safari's bars come and go in landscape and vh would put the room under them.
   The safe-area insets are 0 unless the page opts into viewport-fit=cover; they cost nothing now
   and are right if it ever does. */
html.is-phone, html.is-phone body{ height:100%; overflow:hidden }
html.is-phone #app{ max-width:none; padding:0; margin:0; height:100vh; height:100dvh }
html.is-phone #app > .screen{ height:100% }
html.is-phone .explore-row{ margin:0; height:100%; box-sizing:border-box; flex-wrap:nowrap; justify-content:flex-start;
  align-items:stretch; gap:8px; padding:0 max(6px, env(safe-area-inset-right)) 0 env(safe-area-inset-left) }
/* As tall as the screen, unless that would leave the rail under 228px: then as wide as it can be.
   228 is what "Health Draught" needs beside its Drink button without being cut (667x375 measured). */
html.is-phone .game-window-col{ flex:0 0 auto; min-width:0; max-width:none; align-self:center;
  width:min(calc(100dvh * 544 / 416), calc(100vw - 242px - env(safe-area-inset-left) - env(safe-area-inset-right))) }
html.is-phone #explore-canvas{ border-radius:0; border-width:0 1px 0 0 }
html.is-phone .dir-layer{ border-radius:0 }
html.is-phone .sidebar-mount{ order:2; flex:1 1 auto; width:auto; min-width:0; padding:6px 0 }
html.is-phone #explore-below:empty{ display:none }
/* centered on the hero panel's right end: the rail's 6px top, plus half of (its 53px less the stud's 32) */
html.is-phone #mute-btn{ top:16.5px; right:max(8px, calc(env(safe-area-inset-right) + 6px)); width:32px; height:32px }

html.is-phone .rxs-rail{ gap:5px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:none;
  --f-eyebrow:9px; --f-barlab:9px; --f-barval:11.5px; --f-gold:14px;
  --f-flaskname:11.5px; --f-flaskcount:10px; --f-drink:10px;
  --rxs-pad:6px 16px; --rxs-icon:26px; --rxs-iconfs:13px; --rxs-rowgap:5px }
html.is-phone .rxs-rail::-webkit-scrollbar{ display:none }
html.is-phone .rxs-panel.grow{ flex:0 0 auto }
/* the draughts take what is left, so the rail ends flush with the room as it does on a desk */
html.is-phone .rxs-panel.rxs-draughts{ flex:1 0 auto }
html.is-phone .rxs-gear{ display:none }
/* attributes go to the Reliquary's Hero tab and gold into the bars' panel (.rxs-res-gold) */
html.is-phone .rxs-attrs{ display:none }
.rxs-res-gold{ display:none }
html.is-phone .rxs-res-gold{ display:flex; margin-top:6px; padding-top:5px; align-items:center }
html.is-phone .rxs-draughts .rxs-eyebrow{ display:none }
html.is-phone .rxs-draughts .rxs-flask{ padding:2px 2px 2px 0; gap:8px }
html.is-phone .rxs-drink{ padding:6px 10px; min-height:34px }   /* a thumb, not a pointer */
html.is-phone .rxs-bar-lab{ margin-bottom:2px }
html.is-phone .rxs-bar-track{ height:6px }
/* the hero, in one row: a smaller alcove, the name, and the two pills beside it. The mute stud
   sits over its right end. */
html.is-phone .rxs-id .rxs-panel-inner{ padding:6px 48px 6px 14px }
html.is-phone .rxs-id-row{ gap:9px }
html.is-phone .rxs-alcove{ width:34px; height:41px }
html.is-phone .rxs-alcove i{ display:none }
html.is-phone .rxs-class{ font-size:15px }
html.is-phone .rxs-epithet{ display:none }
/* the pills take a second line on a narrow rail rather than running under the mute stud */
html.is-phone .rxs-id-badges{ margin-top:4px; gap:4px 5px; flex-wrap:wrap }
html.is-phone .rxs-level, html.is-phone .rxs-boons{ font-size:9.5px; padding:1px 7px; letter-spacing:.06em; white-space:nowrap }
html.is-phone .rxs-boons{ gap:5px; padding-left:6px }
html.is-phone .rxs-boons i{ width:5px; height:5px }
/* no hover on glass: a tooltip would only ever open by accident */
html.is-phone .rxs-tip{ display:none !important }

/* THE RELIQUARY ON A PHONE: two tabs in the title's place, Virtues and Hero (ui_reliquary.jsx
   HeroSheet), and a narrower side column so the boons keep two tiles a row */
.rq-tabs{ display:flex; gap:4px }
.rq-tab{ font-family:'Cinzel',serif; font-size:15px; letter-spacing:.08em; color:#8f8775; background:none; border:0;
  border-bottom:1px solid transparent; border-radius:0; padding:4px 10px 5px; box-shadow:none; min-height:34px }
.rq-tab.on{ color:var(--gold); border-bottom-color:rgba(232,200,96,.75) }
/* the global button hover draws a box; on glass a tapped tab keeps its hover, so it must not */
.rq-tab:hover{ box-shadow:none; color:#d9cfba } .rq-tab:not(.on):hover{ border-bottom-color:transparent } .rq-tab.on:hover{ color:var(--gold) }
.rq-body[hidden]{ display:none }
.rq-sheet{ gap:26px; padding:4px 8px 0; overflow-y:auto }
.rq-attrs{ flex:0 0 150px }
.rq-gear{ flex:1 1 auto; min-width:0 }
.rq-attr{ display:flex; justify-content:space-between; align-items:baseline; padding:5px 0; border-bottom:1px solid rgba(201,169,78,.08) }
.rq-attr span{ font-family:'Cinzel',serif; font-size:12px; letter-spacing:.12em; color:#a89f8c }
.rq-attr b{ font-weight:400; font-size:18px; color:#efe2c4; font-variant-numeric:tabular-nums }
.rq-slot{ margin-bottom:8px }
.rq-slot-k{ font-family:'Cinzel',serif; font-style:normal; font-size:9.5px; letter-spacing:.16em; text-transform:uppercase; color:#8f8775 }
.rq-slot-k em{ font-size:inherit; color:inherit }
.rq-slot-k .rxs-rung.is-uncommon{ color:#9fd4b3 } .rq-slot-k .rxs-rung.is-rare{ color:#d3b2ee } .rq-slot-k .rxs-rung.is-epic{ color:#f0d98c }
/* THE SLOT'S ICON, as the rail draws it (owner, 2026-10-29): the same well, gold-rimmed when the
   slot holds a piece and faded when it is empty, so the tab and the rail read as one list. Sits
   level with the slot name and the piece's name, the two lines it labels. */
.rq-slot{ gap:11px }
.rq-slot-icon{ flex:0 0 32px; width:32px; height:32px; margin-top:2px; border-radius:4px; font-size:16px;
  display:flex; align-items:center; justify-content:center;
  background:#07070b; border:1px solid rgba(201,169,78,.18); box-shadow:inset 0 1px 3px rgba(0,0,0,.8) }
.rq-slot.filled .rq-slot-icon{ border-color:rgba(201,169,78,.5); box-shadow:inset 0 1px 3px rgba(0,0,0,.8), 0 0 7px rgba(201,169,78,.14) }
.rq-slot.none .rq-slot-icon{ opacity:.34 }
html.is-phone .rq-slot{ gap:9px }
html.is-phone .rq-slot-icon{ flex-basis:28px; width:28px; height:28px; font-size:14px }
/* a narrow phone's gear column is ~176px; a full well would leave its text ~136 */
@media (max-width:700px){ html.is-phone .rq-slot{ gap:7px } html.is-phone .rq-slot-icon{ flex-basis:22px; width:22px; height:22px; font-size:11px } }
html.is-phone .rq{ padding:8px 12px 8px }
html.is-phone .rq-head{ padding:0 4px 4px }
html.is-phone .rq-head .rx-map-close{ font-size:12px; padding:6px 14px; min-height:34px }
/* 150: what leaves the boon area the 272px three compact tiles need, side by side */
html.is-phone .rq-side{ flex-basis:150px; padding-left:12px }
html.is-phone .rq-body{ gap:12px }
html.is-phone .rq-line b{ font-size:12.5px }
html.is-phone .rq-line em{ font-size:13px }
html.is-phone .rq-side-k{ font-size:9.5px; margin:10px 0 5px }
html.is-phone .rq-detail{ margin-top:4px; padding:6px 8px 0; gap:10px }
html.is-phone .rq-dname{ font-size:16px }
html.is-phone .rq-dline{ font-size:14px }
/* THE ASCENT ON A PHONE: the field needs every pixel of the 390 the screen has, so the legend goes
   (it explains the marks; a phone's map is for finding the way) and the plate takes the screen.
   The mute stud would sit on its Close, so it steps out while the map is up. */
html.is-phone .rx-map-legend{ display:none }
html.is-phone .rx-map{ padding:8px 12px 10px; top:6px; max-height:calc(100% - 12px); width:calc(100% - 12px) }
html.is-phone .rx-map-head{ padding-bottom:6px; gap:12px }
html.is-phone .rx-map-id{ min-width:0 }
html.is-phone .rx-map-close{ min-height:34px }
html.is-phone:has(#map-mount:not(:empty)) #mute-btn{ display:none }
/* a zone band is ~170px wide here, and "Choir of the Threshold" ran into the Threshold's own label:
   long names take two lines instead */
html.is-phone .rx-map-zlabel{ white-space:normal; max-width:140px; width:max-content; text-align:center; line-height:1.25; letter-spacing:.13em }
/* A FIGHT'S SMALL TYPE, ON A PHONE. Everything in the fight is sized in canvas units, and a 510px
   room makes the smallest of them 5.6-7.5px (measured: the turn order's label 6, its names 7.1, a
   foe's health number 7, Resolve 7.5, a status chip's turns 5.6). These are raised by about 1.4 so
   the floor is ~8.5px. The intent word over a foe is NOT: its size is what the rank's spacing
   (READOUT_W, explore.js) was measured against, and a bigger one would run into its neighbour's. */
html.is-phone .dxc-order-t{ font-size:calc(9 * var(--cu)) }
html.is-phone .dxc-pip{ font-size:calc(10.4 * var(--cu)) }
html.is-phone .dxc-hpnum{ font-size:calc(10.5 * var(--cu)) }
html.is-phone .dxc-res-k{ font-size:calc(10.5 * var(--cu)) }
html.is-phone .dxc-chip-t{ font-size:calc(7.6 * var(--cu)) }
html.is-phone .dxc-chip-d{ font-size:calc(9.6 * var(--cu)) }

/* ---- THE TURN CARD (js/phone.js; owner, 2026-10-23: upright is not played) ----
   Over everything on a touch screen held upright. The plate is the game's iron with the gold
   rim; the device in it turns from upright to sideways on a slow loop, so the instruction is a
   picture before it is a sentence. The button shows only where the browser can lock the screen. */
#turn-card{ position:fixed; inset:0; z-index:100000; display:flex; align-items:center; justify-content:center;
  padding:max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background:radial-gradient(120% 80% at 50% 40%, #16131a 0%, #08070b 70%); touch-action:none }
html.is-upright, html.is-upright body{ overflow:hidden }
.tc-plate{ position:relative; width:min(340px, 100%); box-sizing:border-box; padding:30px 26px 26px; text-align:center;
  background:linear-gradient(180deg, var(--iron-hi) 0%, #100e0c 48%, var(--iron-lo) 100%); border-radius:3px;
  box-shadow:0 0 0 1px rgba(201,169,78,.72), 0 0 0 3px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,246,214,.20), 0 18px 40px rgba(0,0,0,.7) }
.tc-device{ width:104px; height:104px; overflow:visible; margin:0 auto 14px; display:block }
.tc-phone{ animation:tcTurn 3.2s cubic-bezier(.6,0,.25,1) infinite }
.tc-phone rect{ fill:#0b0a0d; stroke:#e8c860; stroke-width:2.2 }
.tc-phone line{ stroke:rgba(232,200,96,.6); stroke-width:2; stroke-linecap:round }
.tc-arc{ fill:none; stroke:rgba(232,200,96,.55); stroke-width:1.8; stroke-linecap:round; animation:tcArc 3.2s ease-in-out infinite }
.tc-tip{ fill:none; stroke:rgba(232,200,96,.55); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; animation:tcArc 3.2s ease-in-out infinite }
@keyframes tcTurn{ 0%,22%{ transform:rotate(0deg) } 48%,82%{ transform:rotate(-90deg) } 100%{ transform:rotate(0deg) } }
@keyframes tcArc{ 0%,10%{ opacity:0 } 22%,42%{ opacity:1 } 56%,100%{ opacity:0 } }
.tc-title{ font-family:'Cinzel',serif; font-size:21px; letter-spacing:.06em; color:var(--gold); line-height:1.2 }
.tc-line{ margin-top:8px; font-family:'EB Garamond',Georgia,serif; font-size:17px; color:var(--ink); line-height:1.35 }
.tc-go{ margin-top:20px; min-height:44px; padding:10px 22px; font-family:'Cinzel',serif; font-size:14px; letter-spacing:.12em;
  color:var(--leaf); background:linear-gradient(180deg,#332913,#211a0b); border:1px solid rgba(201,169,78,.6); border-radius:4px }
.tc-go[hidden]{ display:none }
.tc-hint{ margin-top:16px; font-family:'EB Garamond',Georgia,serif; font-style:italic; font-size:14.5px; color:#8f8775; line-height:1.35 }
@media (prefers-reduced-motion: reduce){ .tc-phone{ animation:none; transform:rotate(-90deg) } .tc-arc,.tc-tip{ animation:none; opacity:1 } }
/* A SHORT PHONE (Safari's bars showing: 340px of an iPhone's 390). Four bars and three draughts
   overflowed by 13px, so each draught becomes one line: its count moves onto the vial as a badge
   and "×N held" goes. */
.rxs-flask-n{ display:none }
@media (max-height: 380px){
  html.is-phone .rxs-flask-count{ display:none }
  html.is-phone .rxs-flask-icon{ position:relative; overflow:visible }
  html.is-phone .rxs-flask-n{ display:block; position:absolute; right:-6px; bottom:-5px; min-width:15px; height:15px; padding:0 3px;
    box-sizing:border-box; border-radius:8px; font:normal 10px/15px 'Cinzel',serif; text-align:center;
    color:#f3e6c4; background:#1a1612; box-shadow:0 0 0 1px rgba(201,169,78,.6) }
  html.is-phone .rxs-flask.none .rxs-flask-n{ color:#8f8775; box-shadow:0 0 0 1px rgba(201,169,78,.25) }
  html.is-phone .rxs-drink{ min-height:30px; padding:4px 10px }
  html.is-phone .rxs-draughts .rxs-flask{ padding:3px 2px 3px 0 }
  /* and every gap a step tighter: measured 7px over at 844x340 and 5px at 640x360 without it */
  html.is-phone .sidebar-mount{ padding:4px 0 }
  html.is-phone .rxs-rail{ gap:4px; --rxs-pad:5px 16px; --rxs-rowgap:3px }
  html.is-phone .rxs-res-gold{ margin-top:4px; padding-top:4px }
  html.is-phone #mute-btn{ top:14.5px }      /* the rail's top is 4px here, not 6 */
}

/* ══════════════════════════ THE TITLE ON A PHONE (html.is-phone; owner, 2026-10-23) ══
   The plaque is a vertical object and a phone held sideways is 340-430px tall: at its desktop
   minimum (300px wide) it stood ~520px and ran off both ends. Same plaque, same art direction,
   smaller: 250px wide, the lockup and menu set down a step, and the whole thing centred in the
   screen's height on the art's dark left third. Four rows ("Continue" up) still fit 360px; under
   that the plaque is zoomed (zoom, not transform, so a tap lands where the row is drawn). Rows stay
   ~34px tall across the plaque's full width, which is the thumb's target. */
html.is-phone .rx-title-screen{ margin:0; min-height:0; height:100vh; height:100dvh; box-sizing:border-box;
  padding:0 0 0 max(66px, calc(env(safe-area-inset-left) + 56px)); --plaque-w:250px }
html.is-phone .rx-inner{ padding:2px 16px 4px }
html.is-phone .rx-title-l1{ font-size:36px }
html.is-phone .rx-title-l2{ font-size:20.2px }
html.is-phone .rx-title-l3{ font-size:39.6px }
/* rail to rail, as on the desk: the phone's plaque pads 16px, not 26, so the desk's -26px pull let
   every row's wash and focus box run 10px past the gold on both sides */
html.is-phone .rx-menu{ margin-top:10px; margin-left:-16px; margin-right:-16px }
html.is-phone .rx-menu-item{ font-size:13.5px; padding:9px 12px }
html.is-phone .rx-strap{ height:12px; margin:8px -34px 8px }
html.is-phone .rx-meta{ font-size:10.5px; gap:5px; letter-spacing:.08em; flex-wrap:nowrap }
/* "Continue" makes four rows: each gives up 4px so the plaque is 377px, not 393 */
html.is-phone .rx-menu:has(> :nth-child(4)) .rx-menu-item{ padding-top:7px; padding-bottom:7px }
/* Zoom steps from the plaque as DRAWN, crown finial and scythes included (measured: 356px with
   three rows, 377 with four), so it clears both edges by 6px or more at every height */
@media (max-height: 389px){ html.is-phone .rx-plaque{ zoom:.94 } }
@media (max-height: 369px){ html.is-phone .rx-plaque{ zoom:.89 } }
@media (max-height: 349px){ html.is-phone .rx-plaque{ zoom:.84 } }
@media (max-height: 329px){ html.is-phone .rx-plaque{ zoom:.78 } }
/* The desk's narrow-window rule (max-width:720px) is for a portrait browser: it centres the plaque
   and darkens the whole art. A phone held sideways keeps the desk's composition instead. */
/* the crown's finial draws ~22px above the plaque's box: centring the box left the tip at -5px */
html.is-phone .rx-title-screen{ justify-content:flex-start; padding-top:22px }
html.is-phone .menu-backdrop::before{ background:linear-gradient(to right,
    rgba(12,10,9,.74) 0%, rgba(12,10,9,.66) 24%, rgba(12,10,9,.34) 40%, rgba(12,10,9,0) 56%) }

/* ══════════════════════════ PURGATORY ON A PHONE (html.is-phone; owner, 2026-10-23) ══
   The ledger was built to "nothing scrolls" at a 1280x800 floor; a phone has 390px of height, so
   here the ROWS scroll inside the plate and everything else holds still. The head band is one line
   (Back at left, the coin at right, the flavour line dropped: the page names say what this is);
   the rail is a narrow column of the six pages; the plate takes the rest, title and epigraph a
   step down. Row heights were authored inline per page for the desk; here a row is as tall as its
   words. The pad legend goes on any touch screen. */
html.is-phone .pg-flavour, html.is-phone .pg-legend, html.is-tablet .pg-legend{ display:none }
html.is-phone .pg-headscrim{ height:52px }
html.is-phone .pg-back{ top:10px; left:max(6px, env(safe-area-inset-left)); font-size:15px; padding:8px 8px; min-height:34px }
html.is-phone .pg-coin{ top:10px; right:max(52px, calc(env(safe-area-inset-right) + 46px)); width:auto;
  display:flex; align-items:baseline; gap:9px }
html.is-phone .pg-coin-eyebrow{ font-size:9.5px; letter-spacing:.14em }
html.is-phone .pg-coin-value{ font-size:21px; line-height:1 }
html.is-phone .pg-band{ top:48px; bottom:6px; left:max(8px, env(safe-area-inset-left)); right:max(8px, env(safe-area-inset-right));
  gap:10px; align-items:stretch }
html.is-phone .pg-rail{ flex:0 0 148px; width:148px; gap:0; justify-content:center }
html.is-phone .pg-rail-item{ height:auto; min-height:42px }
html.is-phone .pg-rail-gut{ flex:0 0 20px; width:20px; font-size:9px }
html.is-phone .pg-rail-body{ gap:1px }
html.is-phone .pg-rail-name{ font-size:12.5px; letter-spacing:.11em }
html.is-phone .pg-rail-item.on .pg-rail-name{ letter-spacing:.13em }
html.is-phone .pg-rail-status{ font-size:9.5px; letter-spacing:.07em }
html.is-phone .pg-rail-dot{ margin-right:4px }
html.is-phone .pg-plate{ height:auto; min-height:0; max-height:none; align-self:stretch }
html.is-phone .pg-plate-in{ padding:22px 14px 0 }
html.is-phone .pg-title{ font-size:19px }
html.is-phone .pg-epigraph{ font-size:12.5px; margin-top:1px; line-height:1.25 }
html.is-phone .pg-rule{ margin-top:6px }
html.is-phone .pg-rows{ overflow-y:auto; overscroll-behavior:contain; justify-content:flex-start; scrollbar-width:none;
  -webkit-mask-image:linear-gradient(180deg, transparent 0, #000 6px, #000 calc(100% - 12px), transparent);
  mask-image:linear-gradient(180deg, transparent 0, #000 6px, #000 calc(100% - 12px), transparent) }
html.is-phone .pg-rows::-webkit-scrollbar{ display:none }
html.is-phone .pg-row{ height:auto !important; flex:0 0 auto; padding:10px 2px; column-gap:8px;
  grid-template-columns:18px minmax(0,1fr) 74px 120px }
html.is-phone .pg-row.wide{ grid-template-columns:18px minmax(0,1fr) 128px }
html.is-phone .pg-row.has-kicker{ padding-top:24px }
html.is-phone .pg-row-caret{ width:18px }
html.is-phone .pg-row-kicker{ font-size:8.5px; margin-bottom:3px }
html.is-phone .pg-row-name{ font-size:13.5px; letter-spacing:.05em }
html.is-phone .pg-row-name.big{ font-size:15px }
/* Relics and Pacts set their rows a size up on the desk (22/17px); here a step over the ledger's */
html.is-phone .pg-row.wide .pg-row-name{ font-size:15px }
html.is-phone .pg-row.wide .pg-row-desc{ font-size:13.5px }
html.is-phone .pg-row.wide .pg-row-caret, html.is-phone .pg-row.tall .pg-row-caret{ margin-top:1px }
html.is-phone .pg-row-desc{ font-size:13px; line-height:1.3; margin-top:2px }
html.is-phone .pg-pips{ gap:5px }
html.is-phone .pg-pip{ width:9px; height:9px }
html.is-phone .pg-pip-cap{ font-size:9px; letter-spacing:.04em; margin-top:4px }
html.is-phone .pg-pip-cap + .pg-pip-cap{ font-size:8.5px }
html.is-phone{ --pg-act-w:120px }
html.is-phone .pg-buy{ font-size:11px; letter-spacing:.1em; padding:9px 6px; min-height:34px }
html.is-phone .pg-worn{ font-size:12px; gap:3px }
html.is-phone .pg-quiet{ font-size:13px; min-height:30px }
html.is-phone .pg-equip{ font-size:11px; padding:7px 9px; min-height:32px }
html.is-phone .pg-maxed, html.is-phone .pg-sealed{ font-size:10.5px }
html.is-phone .pg-locked-note{ font-size:12px }
html.is-phone .pg-well{ flex:0 0 30px; font-size:12px; line-height:1.25 }
/* the Bequest: its two columns share the plate's width rather than one being 470px */
html.is-phone .pg-beq{ padding-top:6px; overflow-y:auto; scrollbar-width:none }
html.is-phone .pg-beq-heir{ font-size:13.5px; margin-bottom:6px }
html.is-phone .pg-beq-heirs{ gap:16px; margin:0 0 6px }
html.is-phone button.pg-beq-heirtab{ font-size:11px; min-height:30px }
html.is-phone .pg-beq-cols{ grid-template-columns:minmax(0,1.1fr) 12px minmax(0,1fr) }
html.is-phone .pg-beq-row{ height:36px }
html.is-phone .pg-beq-name{ font-size:13px }
html.is-phone .pg-beq-tier{ font-size:9px }
html.is-phone .pg-beq-carry{ margin-left:8px; font-size:8.5px }
html.is-phone .pg-socket{ min-height:52px; margin-bottom:8px; padding:7px 9px }
html.is-phone .pg-socket-name{ font-size:13px }
html.is-phone .pg-socket-desc{ font-size:12.5px }
html.is-phone .pg-beq-offer{ max-width:none; padding:0 6px }
html.is-phone .pg-beq-copy{ font-size:13.5px; margin:4px 0 10px }
html.is-phone .pg-beq-preview{ gap:8px; margin-top:12px }
html.is-phone .pg-beq-preview .pg-socket{ width:120px; min-height:44px }
html.is-phone .pg-beq-note{ font-size:12px; margin-top:6px }
html.is-phone .pg-beq-state{ font-size:13.5px }

/* ══════════════════════════ PURGATORY ON A TABLET (html.is-tablet) ══
   At 1024x768 the plate is 608px wide and the description column came to 138px, so a ranked row's
   words ran out of its fixed height and over the next row. The rail and the margins give up width
   to it, and a row may grow past its authored height rather than spill. */
html.is-tablet .pg-band{ left:max(28px, 2.5vw); right:max(28px, 2.5vw); gap:16px }
html.is-tablet .pg-rail{ flex-basis:206px; width:206px }
html.is-tablet .pg-rail-name{ font-size:15.5px; letter-spacing:.12em }
html.is-tablet .pg-row{ height:auto !important; min-height:72px; padding:8px 2px; grid-template-columns:26px minmax(0,1fr) 116px 176px }
html.is-tablet .pg-row.wide{ grid-template-columns:26px minmax(0,1fr) 196px }
html.is-tablet .pg-coin{ right:max(64px, 4.5vw) }
/* AND A DESK WINDOW AS NARROW (2026-11-05). The repair was keyed to the tablet, so a desktop browser
   under 1280 wide kept the full-width columns and the same spill: at 1024x768 Second Wind ran 84px
   into the row under it and the Sigil of the Toll 174px, and the Sigils still spilled at 1240.
   Measured (cotd_probe/pg_rows.js): every desk width from 1280 up already fits, so the same rules
   apply below it. The pad and key legend stays on a desk, which is where its keys are. */
@media (max-width: 1279px){
  html:not(.is-phone) .pg-band{ left:max(28px, 2.5vw); right:max(28px, 2.5vw); gap:16px }
  html:not(.is-phone) .pg-rail{ flex-basis:206px; width:206px }
  html:not(.is-phone) .pg-rail-name{ font-size:15.5px; letter-spacing:.12em }
  html:not(.is-phone) .pg-row{ height:auto !important; min-height:72px; padding:8px 2px; grid-template-columns:26px minmax(0,1fr) 116px 176px }
  html:not(.is-phone) .pg-row.wide{ grid-template-columns:26px minmax(0,1fr) 196px }
  html:not(.is-phone) .pg-coin{ right:max(64px, 4.5vw) }
}

/* ══════════════════════════ TITLES ON A PHONE (html.is-phone; owner, 2026-10-23) ══
   Purgatory's head band and plate (above) carry over; this is the walls. Fifteen niches cannot
   stand in 390px of height, so here, as Purgatory's rows do, the WALLS scroll inside the plate,
   and a niche is as tall as its words rather than a third of a measured plate. The desk's
   arrangement is kept where the width allows it (Deeds on the left, Heroes, Ascension and the
   nameplate on the right); under 760px wide the right side drops below the Deeds. The nameplate
   is the sidebar's identity panel, so the phone rail's compact rules for that panel are undone
   inside it: here the Title IS the point. */
html.is-phone .tt-band{ top:48px; bottom:6px; left:max(8px, env(safe-area-inset-left)); right:max(8px, env(safe-area-inset-right)) }
html.is-phone .pg-plate.tt-plate{ height:100%; max-width:none }
/* 30 at the foot: the walls end above the plate's bottom rivets (drawn at h - 18), not over them */
html.is-phone .pg-plate-in.tt-plate-in{ padding:22px 14px 30px }
html.is-phone .tt-walls{ flex:1 1 auto; height:auto; min-height:0; margin:6px 0 0; padding:2px 2px 10px; column-gap:14px;
  align-items:start; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:none;
  -webkit-mask-image:linear-gradient(180deg, transparent 0, #000 6px, #000 calc(100% - 14px), transparent);
  mask-image:linear-gradient(180deg, transparent 0, #000 6px, #000 calc(100% - 14px), transparent) }
html.is-phone .tt-walls::-webkit-scrollbar{ display:none }
html.is-phone .tt-right{ gap:10px }
html.is-phone .tt-gname{ font-size:9.5px; padding-bottom:5px }
html.is-phone .tt-grid{ gap:6px }
html.is-phone .tt-niche{ height:auto; min-height:112px; padding:7px 6px 7px }
html.is-phone .tt-k{ width:7px; height:7px }
html.is-phone .tt-state{ height:14px }
html.is-phone .tt-state .pg-sealed, html.is-phone .tt-earned{ font-size:9px }
html.is-phone .tt-equipped{ font-size:9.5px }
html.is-phone .tt-new{ font-size:8.5px; padding:1px 5px 0 }
html.is-phone .tt-name{ margin-top:4px; min-height:18px; font-size:13.5px }
html.is-phone .tt-blank{ width:84px }
html.is-phone .tt-how{ margin-top:2px; font-size:11.5px; line-height:1.2 }
html.is-phone .tt-foot{ margin-top:4px; min-height:26px }
html.is-phone .tt-foot .pg-equip{ padding:6px 12px; font-size:10.5px; min-height:28px }
html.is-phone .tt-meter{ gap:5px }
html.is-phone .tt-meter-track{ width:40px; height:4px }
html.is-phone .tt-meter-n{ font-size:11px }
html.is-phone .tt-preview{ margin-top:4px }
html.is-phone .tt-preview .pg-eyebrow{ font-size:9px; margin-bottom:5px }
html.is-phone .tt-idwrap{ width:236px }
html.is-phone .tt-idwrap .rxs-panel-inner{ padding:7px 14px }
html.is-phone .tt-idwrap .rxs-alcove{ width:40px; height:48px }
html.is-phone .tt-idwrap .rxs-alcove i{ display:block }
html.is-phone .tt-idwrap .rxs-class{ font-size:17px }
html.is-phone .tt-idwrap .rxs-epithet{ display:block; font-size:13.5px }
@media (max-width: 759px){
  html.is-phone .tt-walls{ grid-template-columns:minmax(0,1fr); row-gap:12px }
  html.is-phone .tt-right{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); column-gap:14px; row-gap:10px }
  html.is-phone .tt-preview{ grid-column:1 / -1 }
}

/* ══════════════════════════ TITLES ON A TABLET (html.is-tablet) ══
   At 1024x768 the plate came to 614px tall, the niches' 148px floor overran it, and the longest
   name ("the Ferryman's Pupil", 19px and unbreakable) ran out of a 130px niche. The band takes the
   height the pad legend gave back, and a name is set a step smaller so it clears its rim. */
html.is-tablet .tt-band{ left:max(28px, 2.5vw); right:max(28px, 2.5vw); top:84px; bottom:16px }
html.is-tablet .tt-name{ font-size:16.5px }
html.is-tablet .tt-how{ font-size:13.5px }

/* ══════════════════════════ CLASS SELECT ON A PHONE (html.is-phone; owner, 2026-10-23) ══
   The desk stacks a 748px lancet plate beside a 692px column. Here the screen is the stage: the
   plate on the left at full height (the hero's niche cut down, the description scrolling inside
   the plate as it already may, the three classes at its foot), and the right column with the
   Ascension tag and its terms at the top, the attributes and the opening hand scrolling between,
   and BEGIN pinned at the bottom where the thumb is. Back sits in the top-left corner the lancet's
   point leaves empty; the coin goes to the top right beside the mute stud; the pad legend goes. */
html.is-phone .hs-screen{ padding:0 !important }
html.is-phone .hs-stage{ position:absolute; inset:0; margin:0; max-width:none; box-sizing:border-box; height:100%;
  padding:6px max(10px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left));
  display:grid; grid-template-columns:236px minmax(0,1fr); grid-template-rows:minmax(0,1fr); column-gap:14px;
  align-items:stretch; justify-content:stretch }
html.is-phone .hs-hang{ grid-column:1; grid-row:1; width:236px; max-width:none; max-height:none; height:100%; margin:0 }
html.is-phone .hs-plate{ height:100% }
html.is-phone .hs-body{ padding:8px 14px 0; height:100%; box-sizing:border-box; overflow:hidden }
html.is-phone .hs-niche{ aspect-ratio:auto; height:74px; flex:0 0 74px }
html.is-phone .hs-vessel-wrap{ height:80%; --hero-scale:5 }
html.is-phone .hs-body > .rx-strap{ margin:4px -10px 4px; height:10px }
/* !important: a desk rule sets overflow:visible !important, and the description then ran behind the class list */
html.is-phone .hs-detail{ margin-top:0; flex:1 1 auto; min-height:0; overflow:hidden auto !important; scrollbar-width:none;
  -webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 12px), transparent); mask-image:linear-gradient(180deg, #000 calc(100% - 12px), transparent) }
html.is-phone .hs-detail::-webkit-scrollbar{ display:none }
html.is-phone .hs-name{ font-size:19px }
html.is-phone .hs-role{ font-size:12.5px; line-height:1.3; margin-top:2px }
html.is-phone .hs-fights{ margin:6px 0 4px }
html.is-phone .hs-fights li{ font-size:11.5px; line-height:1.35; margin-bottom:3px }
html.is-phone .hs-rank{ gap:0; flex:0 0 auto }
html.is-phone .hs-body{ --pad:14px }
html.is-phone .hs-rank-item{ padding:3px calc(var(--pad) + 10px) 3px calc(var(--pad) + 26px); min-height:32px }
html.is-phone .hs-rank-name{ font-size:12px }
html.is-phone .hs-rank-verbs{ font-size:8.5px }
html.is-phone .hs-rank-lock{ font-size:11px }
html.is-phone .hs-right{ grid-column:2; grid-row:1; align-self:stretch; height:100%; min-height:0; padding:0; gap:0;
  display:flex; flex-direction:column }
html.is-phone .hs-asc{ margin:0 !important; flex:0 0 auto; padding-right:44px }
html.is-phone .hs-tag.hs-tag-top{ height:auto }
html.is-phone .hs-tag .hs-eyebrow{ font-size:9.5px; margin-bottom:1px }
html.is-phone .hs-tag .hs-tag-val{ font-size:17px }
html.is-phone .hs-tag-mid{ padding:3px 0 }
html.is-phone .hs-tag-step{ width:28px; height:28px }
html.is-phone .hs-terms-well{ height:auto; min-height:0 }
html.is-phone .hs-asc .hs-terms{ font-size:12px; line-height:1.3; margin-top:3px; max-width:none }
html.is-phone .hs-right > .hs-evidence{ flex:1 1 auto; min-height:0; overflow-y:auto; margin:4px 0 0; padding-top:4px; scrollbar-width:none;
  -webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 12px), transparent); mask-image:linear-gradient(180deg, #000 calc(100% - 12px), transparent) }
html.is-phone .hs-evidence::-webkit-scrollbar{ display:none }
html.is-phone .hs-evidence .dx-etch-aura{ display:none }
html.is-phone .hs-tracks{ margin:0 0 6px }
html.is-phone .hs-track-row{ grid-template-columns:96px 34px minmax(0,1fr) 30px; gap:8px; margin-bottom:2px }
html.is-phone .hs-track-k, html.is-phone .hs-evidence .hs-track-k{ font-size:10.5px }
html.is-phone .hs-track-v{ font-size:15px }
html.is-phone .hs-track{ height:11px }
html.is-phone .hs-key-item{ font-size:10.5px }
html.is-phone .hs-evidence .hs-kit{ height:auto; margin-bottom:4px }
html.is-phone .hs-kit .hs-eyebrow{ font-size:9px }
html.is-phone .hs-kit-row{ column-gap:6px }
html.is-phone .hs-kit-name{ font-size:13px }
html.is-phone .hs-kit-desc{ font-size:11.5px; line-height:1.3 }
html.is-phone .hs-right > .hs-commit{ flex:0 0 auto; margin-top:6px }
html.is-phone .hs-begin{ min-width:0; width:100%; max-width:320px; padding:10px 20px; font-size:18px; min-height:44px }
html.is-phone .hs-back{ position:absolute; left:max(6px, env(safe-area-inset-left)); top:6px; margin:0; z-index:8;
  font-size:14px; padding:8px 8px; min-height:34px }
/* bottom right, beside BEGIN, on two lines; BEGIN gives up the width it needs */
html.is-phone .hs-coin{ bottom:10px; right:max(10px, env(safe-area-inset-right)); font-size:11px; line-height:1.25; text-align:right; z-index:8 }
html.is-phone .hs-coin b{ display:block; font-size:16px }
html.is-phone .hs-begin{ max-width:min(320px, calc(100% - 180px)) }
html.is-phone .hs-legend, html.is-tablet .hs-legend{ display:none }
/* CLASS SELECT ON A TABLET (html.is-tablet). At 1024x768 the plate is 672px of body asked to hold a
   260px niche, a 285px description and the 148px class list: the list ran 105px out of the bottom
   of the plate. The niche is cut lower, the description takes what is left (and scrolls if it must),
   and the coin, which sat across BEGIN's right end, stands on two lines at the corner. */
html.is-tablet .hs-niche{ aspect-ratio:400/230 }
html.is-tablet .hs-detail{ height:auto; flex:1 1 0; min-height:0; overflow:hidden auto !important; scrollbar-width:none;
  -webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 14px), transparent); mask-image:linear-gradient(180deg, #000 calc(100% - 14px), transparent) }
/* the plate is content-sized on the desk; a definite height is what lets the description give way */
html.is-tablet .hs-hang{ height:calc(100vh - 52px); height:calc(100dvh - 52px) }
html.is-tablet .hs-plate{ height:100% }
html.is-tablet .hs-body{ height:100%; box-sizing:border-box }
html.is-tablet .hs-body{ overflow:hidden }
html.is-tablet .hs-coin{ right:max(24px, env(safe-area-inset-right)); bottom:24px; text-align:right; line-height:1.25 }
html.is-tablet .hs-coin b{ display:block; font-size:20px }

/* ══════════════════════════ THE ENDINGS ON A PHONE (html.is-phone; owner, 2026-10-23) ══
   The death screen and the victory overlay are one centred column built for 800px of height: on a
   390px phone the column overran, flexbox squeezed the coin's box to 22px, and the coin, its label
   and the button landed on top of each other. Same column, same order, every step down a size,
   and the coin held at its size (flex:none) so it can never be squeezed again. The coin is the
   coin as drawn, only smaller. YOU ESCAPED keeps its mountain; its payout column moves in from the
   right edge, which it ran past. */
html.is-phone .dth-overlay, html.is-phone .vic-overlay{ padding:8px 16px 6px; justify-content:center }
html.is-phone .dth-overlay > *, html.is-phone .vic-overlay > *{ flex:none }
html.is-phone .dth-h1{ font-size:30px }
html.is-phone .dth-h1last{ margin-bottom:6px }
html.is-phone .vic-h1{ font-size:24px }
html.is-phone .vic-h1last{ font-size:22px; margin-bottom:8px }
html.is-phone .dth-headrow, html.is-phone .vic-headrow{ margin-bottom:2px }
html.is-phone .dth-epithet, html.is-phone .vic-flavour{ font-size:13.5px; margin-bottom:8px }
html.is-phone .vic-unlock{ font-size:12.5px; margin-bottom:8px }
html.is-phone .dth-kicker, html.is-phone .vic-kicker{ font-size:12.5px; margin-bottom:6px }
html.is-phone .dth-coinwrap, html.is-phone .vic-coinwrap{ width:84px; height:84px; margin-bottom:6px }
html.is-phone .dth-coin, html.is-phone .vic-coin{ width:84px; height:84px }
html.is-phone .dth-mint, html.is-phone .vic-mint{ font-size:34px }
html.is-phone .dth-strike, html.is-phone .vic-strike{ width:84px; height:84px; margin:-42px 0 0 -42px }
html.is-phone .dth-glow, html.is-phone .vic-glow{ width:300px; height:300px }
html.is-phone .dth-coinlabel, html.is-phone .vic-coinlabel{ font-size:12.5px; margin-bottom:10px }
html.is-phone .dth-has-ledger .dth-coinlabel{ margin-bottom:6px }
html.is-phone .dth-ledger{ width:min(320px, 80vw); margin-bottom:10px; font-size:13px }
html.is-phone .dth-exit, html.is-phone .vic-exit{ padding:9px 24px; font-size:12px; min-height:36px }
/* YOU ESCAPED */
html.is-phone .asc-title{ font-size:30px; top:5%}
html.is-phone .asc-pay{ left:auto; right:max(14px, env(safe-area-inset-right)); top:17%; transform:none; width:196px }
html.is-phone .asc-kicker{ font-size:13px; margin-bottom:4px }
html.is-phone .asc-coinwrap{ width:64px }
html.is-phone .asc-count{ font-size:24px }
html.is-phone .asc-coinlabel{ font-size:10px }
html.is-phone .asc-ledger{ margin-top:6px }
html.is-phone .asc-row{ font-size:12px; padding:.08em 0 }
html.is-phone .asc-exit, html.is-phone .asc-exit:hover, html.is-phone .asc-exit:active,
html.is-phone .asc-exit:focus, html.is-phone .asc-exit:focus-visible{ margin-top:8px; padding:9px 20px; font-size:13px; min-height:38px }
html.is-phone .asc-stats{ left:15%; top:24%; max-width:30vw }
html.is-phone .asc-stat{ font-size:14px }
html.is-phone .asc-stat-who{ font-size:15px }
html.is-phone .asc-stat-tally{ font-size:12px }
html.is-phone .asc-unlock{ font-size:13px }html.is-phone .asc-skip{ font-size:10px }
/* the death screen WITH its ledger on a short phone (640x360, or Safari's bars at 340): 40px over */
@media (max-height: 380px){
  html.is-phone .dth-has-ledger .dth-h1{ font-size:25px }
  html.is-phone .dth-has-ledger .dth-epithet{ margin-bottom:4px }
  html.is-phone .dth-has-ledger .dth-kicker{ margin-bottom:3px }
  html.is-phone .dth-has-ledger .dth-coinwrap,
  html.is-phone .dth-has-ledger .dth-coin{ width:64px; height:64px }
  html.is-phone .dth-has-ledger .dth-mint{ font-size:22px }
  html.is-phone .dth-has-ledger .dth-strike{ width:64px; height:64px; margin:-32px 0 0 -32px }
  html.is-phone .dth-has-ledger .dth-row{ padding:0 }
  html.is-phone .dth-has-ledger .dth-ledger{ margin-bottom:6px }
}

/* CLASS SELECT, A SHORT DESK WINDOW (owner, 2026-10-23: "only if the desktop view is in that
   resolution"). At 800px tall and under, the plate's last class row ran out of the plate: 19px at
   1280x800, 51 at 1280x768, 69 at 1366x768, 99 at 720. The description is exactly full, so the
   niche gives the height back, 1px for every 1px the window is short of 840, down to 140px. A fine
   pointer only: phones and tablets have their own rules above. From 850px up nothing changes. */
@media (pointer: fine) and (max-height: 820px){
  /* 613, not 568: the foot strap must also clear the plate's base, which it sat on by 45px at every
     one of these sizes (owner, 2026-10-23: the point under the class list was hidden) */
  html:not(.is-phone):not(.is-tablet) .hs-niche{ aspect-ratio:auto; height:clamp(128px, calc(100vh - 613px), 272px) }
}
/* Under 760px tall the niche is at its floor and the plate is still 39px over at 720, so the
   straps, the description's top margin, the body's foot and the class rows each give a little. */
@media (pointer: fine) and (max-height: 760px){
  html:not(.is-phone):not(.is-tablet) .hs-body > .rx-strap{ margin-top:8px; margin-bottom:6px }
  html:not(.is-phone):not(.is-tablet) .hs-body{ padding-bottom:4px }
  html:not(.is-phone):not(.is-tablet) .hs-detail{ margin-top:4px }
  html:not(.is-phone):not(.is-tablet) .hs-rank-item{ padding-top:3px; padding-bottom:3px }
  html:not(.is-phone):not(.is-tablet) .hs-name{ font-size:28px }
}
/* BEGIN AND THE PAD LEGEND. Under 780px tall BEGIN's right end ran over the legend (54px of it at
   1280x720, 8 at 768): the legend wraps to two lines, right-aligned, in the space beside BEGIN,
   and the coin steps up above it. */
@media (pointer: fine) and (max-height: 780px){
  html:not(.is-phone):not(.is-tablet) .hs-legend{ white-space:normal; max-width:300px; text-align:right; line-height:1.6; text-wrap:balance }
  html:not(.is-phone):not(.is-tablet) .hs-coin{ bottom:84px }
}

/* THE RUN ON A SHORT DESK WINDOW (owner, 2026-10-30: itch's 1280x720 embed; a laptop browser with
   its bars showing is the same). Two things ran off the bottom.
   THE DUNGEON VIEW is sized by its WIDTH (544:416), so under ~860px tall it ended below the window:
   8px at 1280x720, 25 at 1366x768, 50 at 1440x800, 120 at 1536x730 (1080p at 125%). It may now be
   no taller than the window less the 24px above it and 8 below; from 860px up the cap never binds.
   The 8 below is #app's foot during a run (it is 60 elsewhere): with 60 the page still scrolled
   52px under a capped view, and 10px at 1600x900, so the wheel nudged the whole run up the page.
   THE RAIL is a fixed height. A hero with Mana AND Skill Points and all three draughts ran 19px
   past a 720 window, and the wide type scale is ~90px taller again. So the rail goes COMPACT, but
   only when it would not fit (owner, 2026-10-30: a Knight with no Mana and two draughts had gone
   compact at 720 and left the space empty): Sidebar lays itself out full size, compares that with
   the dungeon view and sets .is-tight. Compact is the small type at any width, each draught on
   one line with its count on the vial as a badge (the short phone's answer), and every gap, pad
   and well a step tighter. Measured with that fullest rail: it ends inside the view from 1280x660
   to 1536x730. Phones and tablets have their own rules and never measure. */
html:not(.is-phone):not(.is-tablet) .game-window-col{ max-width:min(1080px, calc((100vh - 32px) * 544 / 416)) }
html:not(.is-phone):not(.is-tablet) #app:has(> .screen > .explore-row){ padding-bottom:8px }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight{
  gap:5px;
  --f-eyebrow:10px;   --f-barlab:10px;    --f-barval:12.5px;
  --f-statk:11px;     --f-statv:14.5px;   --f-gold:15.5px;
  --f-slottype:9px;   --f-slotname:12.5px;
  --f-flaskname:12.5px; --f-flaskcount:11px; --f-drink:11px;
  --f-tipname:14px;   --f-tipdetail:13.5px;
  --rxs-pad:6px 12px; --rxs-icon:25px; --rxs-iconfs:13px; --rxs-rowgap:5px;
}
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-alcove{ width:48px; height:56px }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-class{ font-size:20px }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-level{ font-size:11px; padding:2px 9px; margin-top:4px }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-bar-lab{ margin-bottom:2px }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-stat-pair + .rxs-stat-pair{ margin-top:4px }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-gold-row{ margin-top:6px; padding-top:5px }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-slot{ padding:3px 6px }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-flask{ padding:2px 6px }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-flask + .rxs-flask{ margin-top:2px }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-flask-count{ display:none }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-flask-icon{ position:relative; overflow:visible }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-flask-n{ display:block; position:absolute; right:-6px; bottom:-5px; min-width:15px; height:15px; padding:0 3px;
  box-sizing:border-box; border-radius:8px; font:normal 10px/15px 'Cinzel',serif; text-align:center;
  color:#f3e6c4; background:#1a1612; box-shadow:0 0 0 1px rgba(201,169,78,.6) }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-flask.none .rxs-flask-n{ color:#8f8775; box-shadow:0 0 0 1px rgba(201,169,78,.25) }
html:not(.is-phone):not(.is-tablet) .rxs-rail.is-tight .rxs-drink{ padding:3px 10px }
/* While Sidebar measures, the panels that grow sit at their natural height, so the rail's height
   is what its content needs. */
.rxs-rail.is-measuring .rxs-panel.grow{ flex:0 0 auto !important }
/* THE ROOM LEFT OVER (owner, 2026-10-30: "Equipment has loads of room"). Equipment and Draughts
   both grow, so the height the rail has to spare collected under their last rows as two blank
   pockets. Their rows now spread through it: each row is a band that may grow by about 25px with
   its content centered, and anything past that is even space above and below the rows. */
html:not(.is-phone):not(.is-tablet) .rxs-panel.grow{ display:flex; flex-direction:column }
html:not(.is-phone):not(.is-tablet) .rxs-panel.grow > .rxs-panel-inner{ flex:1 1 auto; display:flex; flex-direction:column; justify-content:space-evenly }
html:not(.is-phone):not(.is-tablet) .rxs-panel.grow > .rxs-panel-inner > .rxs-eyebrow{ flex:0 0 auto }
html:not(.is-phone):not(.is-tablet) .rxs-gear .rxs-slot{ flex:1 1 auto; max-height:calc(var(--rxs-icon) + 30px) }
html:not(.is-phone):not(.is-tablet) .rxs-draughts .rxs-flask{ flex:1 1 auto; max-height:calc(var(--rxs-icon) + 26px) }

/* ══════════════════════════ FULL SCREEN (js/fullscreen.js; owner, 2026-10-23) ══
   The stud is the mute stud's twin: same metal, same size, gold corners for a glyph, the rim lit
   while the game has the screen. html.fs-ok is set only where a page can go full screen on a touch
   device (iPad, Android), so the desk never sees any of this.
   WHERE IT STANDS. Beside the mute stud on a desk-sized layout would put it on the room's minimap,
   so on a tablet it stacks UNDER the mute stud and the room keeps a strip on the right for the
   pair (it also stops the mute stud sitting on the room's corner). On a phone it stands LEFT of the
   mute stud, and the three things in that corner give way: the hero panel, Purgatory's coin and the
   Ascension tag. Hidden while a phone's map is up, as the mute stud is. */
#fs-btn{ display:none }
html.fs-ok #fs-btn, html.fs-app #fs-btn{
  display:flex; align-items:center; justify-content:center; position:fixed; z-index:60; top:65px; right:16px;
  width:43px; height:43px; padding:0; border-radius:50%; opacity:.72;
  background:radial-gradient(120% 120% at 32% 26%, #2a241d 0%, #141110 62%, #0a0807 100%);
  border:1px solid #4e4336; box-shadow:inset 0 1px 0 rgba(255,238,206,.16), 0 2px 6px rgba(0,0,0,.6);
  transition:opacity .18s, border-color .18s, box-shadow .18s }
html.fs-ok #fs-btn svg, html.fs-app #fs-btn svg{ width:44%; height:44%; fill:none; stroke:#e8c860; stroke-width:2.1; stroke-linecap:round; stroke-linejoin:round;
  filter:drop-shadow(0 1px 0 #000) }
html.fs-ok #fs-btn:hover, html.fs-ok #fs-btn:focus-visible, html.fs-app #fs-btn:hover, html.fs-app #fs-btn:focus-visible{ opacity:1; border-color:var(--leaf, #c9a94e);
  box-shadow:inset 0 1px 0 rgba(255,238,206,.22), 0 0 10px rgba(232,200,96,.28) }
html.fs-ok #fs-btn:focus-visible, html.fs-app #fs-btn:focus-visible{ outline:1.5px solid #e8c860; outline-offset:2px }
html.fs-ok #fs-btn.is-on{ opacity:1; border-color:var(--leaf, #c9a94e) }
html.fs-ok.is-tablet .explore-row{ padding-right:68px }
html.fs-ok.is-phone #fs-btn, html.fs-app.is-phone #fs-btn{ top:16.5px; right:calc(max(8px, calc(env(safe-area-inset-right) + 6px)) + 40px); width:32px; height:32px }
@media (max-height: 380px){ html.fs-ok.is-phone #fs-btn, html.fs-app.is-phone #fs-btn{ top:14.5px } }
html.fs-ok.is-phone:has(#map-mount:not(:empty)) #fs-btn{ display:none }
/* on an iPhone or iPad the stud opens the app card, and is there on the main menu only */
html.fs-app:not(:has(.rx-title-screen)) #fs-btn{ display:none }
html.fs-ok.is-phone .rxs-id .rxs-panel-inner{ padding-right:88px }
html.fs-ok.is-phone .pg-coin{ right:max(92px, calc(env(safe-area-inset-right) + 86px)) }
html.fs-ok.is-phone .hs-asc{ padding-right:84px }

/* THE APP CARD (js/fullscreen.js appCard; owner, 2026-10-28): "Play it as an app", once, on a touch
   device's first visit, over a veil. It replaced the full-screen card. On a phone the three steps
   stand side by side so the card fits a 390px screen. */
.ac-veil{ position:fixed; inset:0; z-index:90; background:rgba(4,3,6,.55); animation:acIn .3s ease both }
.ac{ position:fixed; z-index:91; left:50%; top:50%; transform:translate(-50%,-50%); width:min(440px, calc(100vw - 32px));
  box-sizing:border-box; padding:20px 22px 18px; border-radius:3px; font-family:'EB Garamond',Georgia,serif; color:#e6dfcf;
  background:linear-gradient(180deg,#1c1814,#100e0c 55%,#0b0a09);
  box-shadow:0 0 0 1px rgba(201,169,78,.72), 0 0 0 3px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,246,214,.16), 0 18px 40px rgba(0,0,0,.7);
  animation:acCardIn .45s cubic-bezier(.2,.8,.3,1) both }
@keyframes acIn{ from{ opacity:0 } to{ opacity:1 } }
@keyframes acCardIn{ from{ opacity:0; translate:0 12px } to{ opacity:1; translate:0 0 } }
.ac-head{ display:flex; gap:16px; align-items:center }
.ac-icon{ flex:none; width:64px; height:64px; border-radius:14px; background:#120f0d center/cover no-repeat;
  box-shadow:0 0 0 1px rgba(201,169,78,.6), 0 4px 10px rgba(0,0,0,.6) }
.ac-t{ font-family:'Cinzel',serif; font-size:19px; letter-spacing:.06em; color:#e8c860 }
.ac-l{ font-size:15.5px; line-height:1.35; color:#cfc6b2; margin-top:3px }
.ac-steps{ list-style:none; margin:16px 0 4px; padding:12px 0 0; border-top:1px solid rgba(201,169,78,.22); display:flex; flex-direction:column; gap:10px }
.ac-steps li{ display:flex; align-items:center; gap:12px; font-size:16px; color:#e6dfcf }
.ac-steps b{ font-weight:600; color:#f3e6c4 }
.ac-n{ flex:none; width:20px; font-family:'Cinzel',serif; font-size:13px; color:#8f8775; text-align:center }
.ac-g{ flex:none; width:34px; height:34px; border-radius:8px; display:grid; place-items:center; background:#211c16;
  box-shadow:inset 0 0 0 1px rgba(201,169,78,.35) }
/* OFF-WHITE, NOT SAFARI BLUE (owner, 2026-10-28). Safari draws its buttons light on a dark bar, and
   ours is dark: the page's theme-color is near-black, and dark mode does the same. It is the
   SHAPE the player looks for, so the glyph takes the card's own ink. */
.ac-g svg{ width:20px; height:20px; fill:none; stroke:#ece4d2; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round }
.ac-mini{ background:#120f0d center/cover no-repeat; box-shadow:0 0 0 1px rgba(201,169,78,.6) }
.ac-btns{ display:flex; gap:10px; margin-top:16px }
.ac-btns button{ flex:1 1 0; min-height:44px; font-family:'Cinzel',serif; font-size:13px; letter-spacing:.12em; border-radius:2px; padding:10px 14px }
.ac-go{ color:#1a1510; border:0; background:linear-gradient(180deg,#f0d98a,#e8c860 48%,#a8862f); box-shadow:0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.45) }
.ac-no{ color:#a89f8c; background:none; border:1px solid rgba(201,169,78,.3); box-shadow:none }
.ac-no:hover{ color:#e6dfcf; box-shadow:none }
@media (max-height: 540px){
  .ac{ width:min(560px, calc(100vw - 32px)); padding:14px 18px 14px }
  .ac-steps{ flex-direction:row; gap:8px; margin-top:12px }
  .ac-steps li{ flex:1 1 0; flex-direction:column; text-align:center; gap:6px; font-size:14px }
  .ac-n{ display:none }
  .ac-btns{ margin-top:12px }
}
@media (prefers-reduced-motion: reduce){ .ac, .ac-veil{ animation:none } }
/* on the narrowest rail (228px, a 667px phone) the stud's 40px cut "Occultist" to "Occulti…" */
@media (max-width: 700px){ html.fs-ok.is-phone .rxs-class{ font-size:13.5px } }
/* THE FIGHT'S INSPECT LINE ON A PHONE takes two lines. One line is what keeps the deck still on a
   desk, and every ability fits it there; at a phone's 350-450px it cut 8 of 84 abilities to "…"
   even before the 2026-10-26 wording pass, which made several descriptions longer. The row holds
   two lines' height whatever it shows, so the deck below still never moves. */
html.is-phone .dxc-inspect{ white-space:normal; text-overflow:clip; line-height:1.22; min-height:2.44em; max-height:2.44em;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; text-wrap:balance }
/* The fight tip shares that slot (ui_diegetic.jsx), so on a phone it is the same two-line box: the
   deck holds still when the two swap, and a longer tip wraps inside it instead of running wide */
html.is-phone .dxc-coach{ line-height:1.22; min-height:2.44em; max-height:2.44em; white-space:normal }
html.is-phone .dxc-coach-t{ text-align:center; text-wrap:balance }
/* wrapped onto two lines, the hairlines are left at the box's far edges, attached to nothing */
html.is-phone .dxc-coach-rule{ display:none }

/* A phone's action column is 120px and "NEEDS ASCENSION I" is ~150: what it needs takes a line of
   its own, so the label stays in its column instead of crowding the rank beside it */
html.is-phone .pg-needs em{ white-space:normal; line-height:1.35 }
html.is-phone .pg-needs-what{ display:block; white-space:nowrap }
/* What a draught does, on its own line's tail: a line beneath each would push Press on out of the room */
.fd-ask-x{margin-left:.7em; font-size:.8em; color:#958c78}
.fd-ask-x::before{content:"\00B7"; margin-right:.7em}
.fd-lead-mi{white-space:pre}   /* unbroken, and its double spaces kept, as the one-line tag always had */

/* THE FERRYMAN ON A PHONE (owner 2026-10-27, layout A "everything in the room"). The desk's type
   sizes are clamped to floors set for a desk, so on a 510x390 room his bubble ran off the top, the
   tag ran past the right wall and Press on fell under the floor: no way out of the room by touch.
   Same screen and same behavior, set for a phone: his opening line (flavor) gives way and the pitch
   gets the width short of the minimap; the lesson, the draughts and Press on sit under him. The tag
   breaks only between its items (ui_diegetic.jsx wraps each in a nowrap span). */
html.is-phone .fd-bubble{ max-width:calc(73% - var(--bl) - 10px); padding:7px 11px 8px }
html.is-phone .fd-say-lead{ display:none }
html.is-phone .fd-say{ font-size:13.5px; line-height:1.28 }
html.is-phone .fd-tag{ font-size:10px; top:-1.5em }
html.is-phone .fd-replies{ left:5%; top:51%; width:90cqw; gap:0 }
html.is-phone .fd-replies::before{ left:-6%; right:-4%; top:-8%; bottom:-6% }
html.is-phone .fd-reply{ padding:0 6px 0 20px; gap:9px }
html.is-phone .fd-reply::before{ left:4px; font-size:9px }
html.is-phone .fd-lead{ margin-bottom:5px }
html.is-phone .fd-mark{ width:36px; font-size:17px; margin-top:1px }
html.is-phone .fd-lead-name{ font-size:17px }
html.is-phone .fd-price{ font-size:15px }
html.is-phone .fd-lead-d{ font-size:14px; margin-top:0; line-height:1.2 }
html.is-phone .fd-lead-m{ font-size:9.5px; margin-top:1px; white-space:normal; line-height:1.35 }
html.is-phone .fd-vial{ width:36px }
html.is-phone .fd-vial .rxs-vial{ width:17px; height:17px }
html.is-phone .fd-ask-n{ font-size:14px; line-height:1.45 }
html.is-phone .fd-ask-x{ font-size:.76em; margin-left:.5em }
html.is-phone .fd-ask-x::before{ margin-right:.5em }
html.is-phone .fd-ask .fx-rule{ display:none }
html.is-phone .fd-bye{ margin-top:5px }
html.is-phone .fd-bye-b{ font-size:11.5px; padding:5px 14px }
@media (max-height: 380px){
  html.is-phone .fd-say{ font-size:13px; line-height:1.25 }
  html.is-phone .fd-replies{ top:47% }
  html.is-phone .fd-lead-name{ font-size:16px }
  html.is-phone .fd-lead-d{ font-size:13px }
  html.is-phone .fd-mark{ width:32px; font-size:15px }
  html.is-phone .fd-vial{ width:32px }
  html.is-phone .fd-ask-n{ font-size:13px; line-height:1.4 }
  html.is-phone .fd-bye{ margin-top:3px }
  html.is-phone .fd-bye-b{ padding:4px 12px }
}
/* THE FERRYMAN ON A SMALLER iPAD. Up to 1200px wide (a 1024x768 to 1180x820 iPad) the room is only
   616-772px wide and his narrow bubble stood seven lines tall, off the top of the room; the tag ran
   past the right wall and the third draught pushed Press on under the floor. The bubble takes the
   width short of the minimap, the tag breaks between items, and the asks start a little higher. */
@media (max-width: 1200px){
  html.is-tablet .fd-lead-m{ white-space:normal }
  html.is-tablet .fd-bubble{ max-width:calc(73% - var(--bl) - 10px) }
  html.is-tablet .fd-replies{ top:53%; gap:0 }
  html.is-tablet .fd-lead{ margin-bottom:6px }
  html.is-tablet .fd-bye{ margin-top:4px }
  html.is-tablet .fd-say{ font-size:15.5px }
}
/* a 1024px iPad has no height for his opening line as well: the pitch stays, the flavor gives way */
@media (max-width: 1060px){ html.is-tablet .fd-say-lead{ display:none } html.is-tablet .fd-replies{ top:50% }
  html.is-tablet .fd-ask .fx-rule{ display:none } }

/* THE CHOICE SCREENS ON PHONES AND TABLETS (owner 2026-10-28: Spoils, Level Up, the chest, the
   Holy Chalice and the Radiant Pool, "only on the phone/ipad versions"). Laid out for a desk,
   in a 400-510px room they overran: a long boon name ran into the next column, a four-card hand
   printed over itself, a 640px phone's descriptions ran off the floor, the chest's plate rose off
   the top (over the Elite's banner, too), "The Holy Chalice" was cut at both edges, and the
   minimap sat over the Pool's banner. ui_diegetic.jsx measures and fits what is laid out
   (fitWidth, useRowFit, the chest's --dx-drop) only under is-phone / is-tablet; explore.js hides
   the minimap on the Pool for the same two. Everything below is scoped the same way. */
/* the lift useRowFit sets, and the risen item the chest's plate covers */
html.is-phone .dx-mote, html.is-tablet .dx-mote{ translate:0 calc(-1 * var(--dx-fit, 0px)) }
/* THE DRIFT WITHOUT THE LAYOUT (owner, 2026-11-01: an iPad's battery). dxDriftA/B move margins,
   which is a layout every frame for as long as a choice is on screen. Here the same paths, periods
   and phases run on .dx-mote-drift, on `translate` and `transform` so that two periods can share
   one element and neither touches layout. Touch screens only: a transform is not snapped to the
   pixel grid, which at a desktop's 1x would soften the type as it drifts. The button keeps its
   three-entry animation list so .is-focused's play-state list still lines up. Committing, a mote
   drops its drift outright, as replacing the button's animation always did. */
@media (prefers-reduced-motion:no-preference){
  html.is-phone .dx-mote:not(.is-committing):not(.is-rejected),
  html.is-tablet .dx-mote:not(.is-committing):not(.is-rejected){ animation-name:none, none, dxMoteIn }
  html.is-phone .dx-mote-drift, html.is-tablet .dx-mote-drift{
    animation:dxDriftX var(--dx-driftA,6s) ease-in-out infinite alternate,
              dxDriftY var(--dx-driftB,8s) ease-in-out infinite alternate;
    animation-delay:var(--dx-delay,0s);
  }
  html.is-phone .dx-mote.is-focused .dx-mote-drift,
  html.is-tablet .dx-mote.is-focused .dx-mote-drift{ animation-play-state:paused }
  html.is-phone .dx-mote.is-committing .dx-mote-drift, html.is-tablet .dx-mote.is-committing .dx-mote-drift,
  html.is-phone .dx-mote.is-rejected .dx-mote-drift, html.is-tablet .dx-mote.is-rejected .dx-mote-drift{ animation:none }
}
@keyframes dxDriftX{from{translate:-5px 0}to{translate:5px 0}}
@keyframes dxDriftY{from{transform:translateY(-6px)}to{transform:translateY(4px)}}
html.is-phone .dx-loot[data-covered], html.is-tablet .dx-loot[data-covered]{ visibility:hidden }
html.is-phone .dx-loot[data-fit], html.is-tablet .dx-loot[data-fit]{ scale:var(--dx-ls,1); translate:0 var(--dx-lt,0px) }
/* the Pool's verbs, stepped clear of its banner */
html.is-phone .dx-act, html.is-tablet .dx-act{ translate:0 var(--dx-push, 0px) }

/* the banners: a step smaller, so the cards have the room's height to use */
html.is-phone .dx-lvl-text{ font-size:clamp(26px,7.2cqw,40px) }
html.is-phone .dx-lvl-sub{ font-size:14px; margin-top:0 }
html.is-phone .dx-lvl-rule{ flex-basis:9cqw }
html.is-phone .dx-sp-word{ font-size:clamp(20px,6cqw,30px) }
html.is-phone .dx-sp.is-long .dx-sp-word{ font-size:clamp(17px,5cqw,26px) }
html.is-phone .dx-sp-rule{ margin-top:3px }
html.is-phone .dx-sp-sub{ font-size:14px; margin-top:2px }

/* the cards: columns as wide as their pitch allows (0.30 of the room for three, 0.247 for the
   phone's row of four), type sized for a phone, and a label's padding no longer reaching into
   its neighbour's, since each label is a tap target */
html.is-phone .dx-etch-boon .dx-etch-title{ font-size:clamp(15px,3.6cqw,19px); width:28cqw }
html.is-phone .dx-etch-boon .dx-etch-body{ font-size:clamp(13px,2.9cqw,15px); width:28cqw; line-height:1.28 }
html.is-phone .is-four .dx-etch-boon .dx-etch-title, html.is-phone .is-four .dx-etch-boon .dx-etch-body{ width:22cqw }
html.is-phone .is-cramped .dx-etch-boon .dx-etch-body{ font-size:12.5px; line-height:1.22 }
html.is-phone .dx-mote-label .dx-etch{ padding:5px 4px }

/* the chest: a tighter plate, a wider measure for it, and verbs that may wrap their trade line */
html.is-phone .dx-spoil{ max-width:92% }
html.is-phone .dx-item.is-uncommon, html.is-phone .dx-item.is-rare, html.is-phone .dx-item.is-epic{ padding:4px 12px 6px }
html.is-phone .dx-item .dx-etch{ padding:2px 6px }
html.is-phone .dx-item .dx-etch-md .dx-etch-title{ font-size:16px }
html.is-phone .dx-rarity{ font-size:9.5px; margin-bottom:2px }
html.is-phone .dx-mods{ font-size:11.5px; margin-top:2px }
html.is-phone .dx-sig{ font-size:12px; margin-top:2px; text-wrap:balance }
html.is-phone .dx-act{ max-width:42cqw; padding:5px 10px 6px }
html.is-phone .dx-act-label{ font-size:16px }
html.is-phone .dx-act-note{ font-size:13.5px }
html.is-phone .dx-act-sub{ font-size:12px }

/* the Holy Chalice: its title sized to the room, its line given the width to balance in */
html.is-phone .dx-etch-chalice .dx-etch-title{ font-size:clamp(24px,7.3cqw,40px) }
html.is-phone .dx-etch-chalice .dx-etch-body{ font-size:clamp(15px,3.6cqw,18px); width:70cqw }

/* TAP TO READ, TAP AGAIN TO ACT (ui_diegetic.jsx `armed`; set only by a finger's tap, so a desk
   never shows it). The selected card wears a gold rim that breathes, which says "waiting on
   you" where the hover cursor only says "here"; a selected Flee reads "Flee?" and breathes red. */
.dxc-ab.armed{ background:rgba(232,200,96,.16); box-shadow:inset 0 0 0 1px rgba(232,200,96,.85); border-radius:3px;
  animation:dxcArmed 1.1s ease-in-out infinite }
.dxc-verb.armed{ animation:dxcArmed 1.1s ease-in-out infinite }
.dxc-verb.danger.armed{ color:#ffc9c0; text-shadow:0 0 10px rgba(224,110,100,.75) }
@keyframes dxcArmed{ 50%{ filter:brightness(1.35) } }
@media (prefers-reduced-motion: reduce){ .dxc-ab.armed, .dxc-verb.armed{ animation:none } }

/* Controller legends show only while a controller is connected (main.js padSync, html.pad-on).
   Hidden, not removed: each was tuned into its footer, so the footer keeps its shape. */
html:not(.pad-on) .hs-legend, html:not(.pad-on) .pg-legend{ visibility:hidden }

/* ══════════════════════════ THE RUN ON AN iPAD (html.is-tablet; owner, 2026-10-28) ══
   The desk's 300px rail on the left left a 1024x768 iPad's room at 616x471 with a third of the
   screen empty beneath it: the room is held by its WIDTH, not its height. So on a tablet the run
   takes the phone's arrangement: the room on the left as wide as it can be, a 236px rail on the
   right, the two one block centred on the screen, the rail ending flush with the room's top and
   bottom. 758x580 at 1024x768 (from 616x471), 904x691 at 1180x820.
   THE RAIL keeps the desk's type and the desk's order: the hero, the bars, the attributes with
   Gold under them (as on the desk), and the draughts. Equipment moves to the Reliquary's Hero tab
   (tap the hero), except where there is room for it: measured against the fullest rail a run can
   reach (Mana and Skill Points, all three draughts), the gear fits from 1170px wide (1180x820 and
   up) and is 52px short at 1024x768. Only the run's own screen changes: the title, Purgatory,
   the Titles and the class select keep their tablet layouts (each rule here needs .explore-row).
   The studs stand in the band above the rail; the tips open to the left, since the rail is now at
   the right-hand edge. */
html.is-tablet{
  --tr-rail:236px; --tr-gap:10px; --tr-side:10px;
  /* and never past 1080px, the room's own cap on a desk (#explore-canvas), or the rail outgrows it */
  --tr-room-w:min(calc(100vw - 2 * var(--tr-side) - var(--tr-gap) - var(--tr-rail)), calc((100dvh - 24px) * 544 / 416), 1080px);
  --tr-room-h:calc(var(--tr-room-w) * 416 / 544) }
html.is-tablet:has(.explore-row), html.is-tablet:has(.explore-row) body{ height:100%; overflow:hidden }
html.is-tablet #app:has(.explore-row){ max-width:none; padding:0; margin:0; height:100vh; height:100dvh }
html.is-tablet #app:has(.explore-row) > .screen{ height:100% }
html.is-tablet .explore-row, html.fs-ok.is-tablet .explore-row{ margin:0; height:100%; box-sizing:border-box; flex-wrap:nowrap;
  justify-content:center; align-items:center; gap:var(--tr-gap); padding:0 var(--tr-side) }
html.is-tablet .game-window-col{ flex:0 0 auto; width:var(--tr-room-w); min-width:0; max-width:none; align-self:center }
html.is-tablet .sidebar-mount{ order:2; flex:0 0 var(--tr-rail); width:var(--tr-rail); height:var(--tr-room-h); align-self:center; padding:0 }
html.is-tablet #explore-below:empty{ display:none }
/* the studs, in the band above the rail: 36px, centred in it, never above the screen's top */
html.is-tablet:has(.explore-row) #mute-btn,
html.fs-ok.is-tablet:has(.explore-row) #fs-btn{ width:36px; height:36px;
  top:max(2px, calc((100dvh - var(--tr-room-h)) / 4 - 18px)); right:var(--tr-side) }
html.fs-ok.is-tablet:has(.explore-row) #fs-btn{ right:calc(var(--tr-side) + 44px) }
html.is-tablet:has(#map-mount:not(:empty)) #mute-btn, html.fs-ok.is-tablet:has(#map-mount:not(:empty)) #fs-btn{ display:none }

/* NOT a scroll box (the phone's rail is): overflow would clip the tips, which open out over the
   room. Nothing needs it: the fullest rail fits at every iPad size (measured, tablet_run.js). */
html.is-tablet .rxs-rail{ height:100%; gap:8px;
  --f-eyebrow:10px; --f-barlab:10.5px; --f-barval:13px; --f-gold:17px;
  --f-flaskname:13px; --f-flaskcount:11px; --f-drink:11px;
  --rxs-pad:9px 16px; --rxs-icon:26px; --rxs-iconfs:13px; --rxs-rowgap:7px }
html.is-tablet .rxs-panel.grow{ flex:0 0 auto }
/* the draughts take what is left, so the rail ends flush with the room */
html.is-tablet .rxs-panel.rxs-draughts{ flex:1 0 auto }
html.is-tablet .rxs-gear{ display:none }
html.is-tablet .rxs-draughts .rxs-eyebrow{ display:none }
html.is-tablet .rxs-draughts .rxs-flask{ padding:2px 2px 2px 0; gap:8px }
html.is-tablet .rxs-drink{ padding:6px 10px; min-height:38px }      /* a thumb, not a pointer */
html.is-tablet .rxs-bar-lab{ margin-bottom:2px }
html.is-tablet .rxs-bar-track{ height:7px }
/* the hero: the alcove and the name, the two pills under the name */
html.is-tablet .rxs-id .rxs-panel-inner{ padding:8px 14px }
html.is-tablet .rxs-id-row{ gap:10px }
html.is-tablet .rxs-alcove{ width:44px; height:52px }
html.is-tablet .rxs-alcove i{ display:none }
html.is-tablet .rxs-class{ font-size:19px }
html.is-tablet .rxs-epithet{ display:none }
html.is-tablet .rxs-id-badges{ margin-top:4px; gap:4px 5px; flex-wrap:wrap }
html.is-tablet .rxs-level, html.is-tablet .rxs-boons{ font-size:10.5px; padding:1px 8px; letter-spacing:.06em; white-space:nowrap }
/* tips open to the LEFT: the rail is at the screen's right edge here */
html.is-tablet .rxs-tip{ left:auto; right:calc(100% + 12px) }
/* 1170px and wider (1180x820, 1194x834, 1366x1024): room for the gear as well */
@media (min-width: 1170px){
  html.is-tablet .rxs-gear{ display:block }
}
