/* v3 story page: antique folios on a deck, one viewport, the scene picture as a full-width footer.
   Type: IM Fell English (display) + EB Garamond (text, real old-style figures and small caps). */
.result-screen {
  position: fixed; inset: 0; z-index: 30; overflow: hidden; height: 100vh; height: 100dvh;
  color: var(--ink); font-family: "EB Garamond", "Libre Baskerville", Georgia, serif;
  font-variant-numeric: oldstyle-nums proportional-nums; font-kerning: normal; font-feature-settings: "kern", "liga", "onum", "pnum";
  --bg: #ebe3d1; --bg-top: #efe8d8; --haze: 240,232,215;
  background: linear-gradient(to bottom, var(--bg-top) 0, var(--bg) calc(100% - var(--foot)), var(--bg) 100%);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 700ms ease;
  --foot: 34vh; --nav: 54px; --top: 64px; --ov: 26px; /* footer, nav row, header, nav overlap into the footer fade */
  --ink: #2b2116; --ink2: #4a3b2a; --mute: #75644d; --sepia: #7a4a26; --slate: #4f6670; --gold: #b28a48; --rule: rgba(90,64,36,.28);
}
body.is-result .result-screen { opacity: 1; visibility: visible; pointer-events: auto; }
/* paper fibre: present up top, gone by the footer so the page colour equals the picture's sky where they meet */
.result-screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .4; mix-blend-mode: multiply;
  background: url("../assets/paper/fibre-1024.webp") 0 0 / 1024px 1024px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 35%, transparent calc(100% - var(--foot) * 1.05));
  mask-image: linear-gradient(to bottom, #000 0, #000 35%, transparent calc(100% - var(--foot) * 1.05)); }
.result-screen .sc, .result-screen abbr.sc { font-variant-caps: all-small-caps; letter-spacing: .06em; text-decoration: none; }

.rs-head { position: absolute; top: 0; left: 0; right: 0; height: var(--top); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 clamp(18px, 3vw, 44px); z-index: 7; }
.rs-mark { font-family: "EB Garamond", serif; font-variant-caps: all-small-caps; font-size: 15px; letter-spacing: .28em; color: var(--ink); opacity: .7; text-decoration: none; }

/* v9: the minimap is the page's logo, top-left, and a button: click for a whole new life */
.result-screen { --logo: clamp(40px, 4.4vh, 58px); }
.minimap { position: absolute; top: calc((var(--top) - var(--logo)) / 2 + 2px); left: clamp(18px, 3vw, 44px); width: var(--logo); height: var(--logo); border-radius: 50%; z-index: 7; cursor: pointer;
  box-shadow: 0 4px 12px rgba(40,28,14,.28); transition: transform 260ms cubic-bezier(.3,1.5,.5,1), box-shadow 260ms ease; outline: none; }
.minimap:hover, .minimap:focus-visible { transform: scale(1.08) rotate(-8deg); box-shadow: 0 0 0 3px rgba(255,248,232,.85), 0 0 18px 4px rgba(195,164,102,.55), 0 6px 14px rgba(40,28,14,.3); }
.minimap.whirl { transform: scale(1.12); }
.rs-head { padding-left: calc(clamp(18px, 3vw, 44px) + var(--logo) + 12px); }
.mm-globe, .mm-globe canvas { width: 100% !important; height: 100% !important; border-radius: 50%; display: block; }
.mm-shade { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; mix-blend-mode: multiply;
  background: radial-gradient(ellipse 105% 100% at 32% 26%, #fff 0%, #f0e8dc 30%, rgba(190,160,120,.85) 60%, rgba(70,48,26,.95) 92%, #1e140a 100%); }
.mm-pin { width: 12px; height: 12px; pointer-events: none; } /* the html layer already centres it on the spot */
.mm-pin i { position: absolute; inset: 3px; border-radius: 50%; background: #7a2e1e; box-shadow: 0 0 0 2px #f2ead9, 0 1px 3px rgba(0,0,0,.5); }
.mm-pin b { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid #7a2e1e; animation: mmPulse 2.2s ease-out infinite; }
@keyframes mmPulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

/* ---- deck ---- */
.deck { position: absolute; left: 0; right: 0; top: var(--top); bottom: calc(var(--foot) + var(--nav)); z-index: 2; perspective: 1800px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.track { position: absolute; inset: 0 0 6px; }
.card2 {
  position: absolute; top: 0; bottom: 0; left: 50%; width: var(--cw, 860px); margin-left: calc(var(--cw, 860px) / -2);
  filter: drop-shadow(0 1px 1px rgba(60,40,18,.18)) drop-shadow(0 14px 22px rgba(60,40,18,.16));
  transform-origin: 50% 50%; transition: transform 700ms cubic-bezier(.22,.8,.24,1), opacity 700ms ease; will-change: transform;
}
.deck.dragging .card2 { transition: none; }
.card2[aria-hidden="true"] { pointer-events: none; }
/* the leaf itself: laid paper, aged edges, deckled outline (clip-path set per card in JS) */
.sheet { position: absolute; inset: 0; overflow: hidden; border-radius: 2px;
  background-color: #f4eddc;
  background-image:
    radial-gradient(120% 95% at 50% 45%, rgba(255,251,240,.55) 0%, rgba(255,251,240,0) 55%, rgba(150,110,60,.10) 85%, rgba(120,80,40,.22) 100%),
    url("../assets/paper/fibre-1024.webp");
  background-size: 100% 100%, 900px 900px; background-blend-mode: normal, multiply; }
.sheet::after { /* faint tide-line and toned edge */ content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(122,81,48,.10), inset 0 0 38px rgba(140,98,52,.16), inset 0 0 6px rgba(120,80,40,.18); }
.card2 .ci { zoom: var(--z, 1); position: absolute; inset: 0; padding: clamp(22px, 3vw, 48px) clamp(24px, 3.6vw, 58px); display: flex; flex-direction: column; overflow: hidden; color: var(--ink); }

/* ---- nav ---- */
.deck-nav { position: absolute; left: 0; right: 0; bottom: var(--foot); height: var(--nav); z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 clamp(16px, 3vw, 44px); }
.pager { display: flex; align-items: center; gap: 14px; grid-column: 2; justify-self: center; }
.chev { appearance: none; border: 0; background: rgba(244,237,220,.9); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 1px rgba(122,81,48,.35), 0 2px 6px rgba(60,40,18,.12); transition: background 200ms ease, color 200ms ease, opacity 200ms ease; }
.chev svg { width: 9px; height: 15px; }
.chev:hover { background: var(--ink); color: #efe9dc; }
.chev:disabled { opacity: .28; cursor: default; background: transparent; color: var(--ink); box-shadow: 0 0 0 1px rgba(122,81,48,.3); }
.dots { display: flex; gap: 0; align-items: center; }
/* each dot is a 32px tap target; the visible mark is drawn inside it */
.dots button { appearance: none; border: 0; padding: 0; background: none; width: 30px; height: 32px; display: grid; place-items: center; cursor: pointer; border-radius: 16px; transition: width 300ms ease; -webkit-tap-highlight-color: transparent; }
.dots button::before { content: ""; width: 10px; height: 10px; border-radius: 5px; background: rgba(43,33,22,.3); box-shadow: 0 0 0 3px rgba(244,237,222,.0); transition: background 250ms ease, width 300ms ease, transform 200ms ease; }
.dots button:hover::before { background: rgba(43,33,22,.55); transform: scale(1.15); }
.dots button:focus-visible { outline: 1.5px solid var(--sepia); outline-offset: -4px; }
.dots button.on { width: 44px; }
.dots button.on::before { background: var(--sepia); width: 30px; transform: none; }
.nav-spacer { justify-self: end; }
/* v18c: Spin again lives in the top header, right side (desktop). Phone already had it top-right. */
#again-btn { margin-left: auto; flex: 0 0 auto; z-index: 8; }
.result-screen.respinning #again-btn { opacity: .18; pointer-events: none; }

/* ---- footer scene ----
   Top: a tall eased fade (~22% of the footer) into the page colour, which is the picture's own sky (scenes/sky.json).
   Ultrawide: the picture is never drawn wider than ~1.1x its native width; it sits centred and its sides dissolve
   (eased masks) into gradients built from its own left/right edge colours, so there is no band and no blow-up. */
.scene-foot { position: absolute; left: 0; right: 0; bottom: 0; height: var(--foot); z-index: 1; pointer-events: none; overflow: hidden;
  --sfm: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.03) 3%, rgba(0,0,0,.1) 6%, rgba(0,0,0,.22) 9%, rgba(0,0,0,.38) 12%, rgba(0,0,0,.56) 15%, rgba(0,0,0,.74) 18%, rgba(0,0,0,.88) 21%, rgba(0,0,0,.97) 24%, #000 27%);
  -webkit-mask-image: var(--sfm); mask-image: var(--sfm); }
.sf-img { position: absolute; top: calc(-1 * var(--sy, 0px)); left: 50%; transform: translateX(-50%); width: var(--iw, 100%); height: auto; max-width: none; display: block; }
.sf-ext { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; object-position: 50% 0; filter: blur(40px) saturate(.85); opacity: 0; transform: scale(1.05); }
/* v22: phone parallax. The picture is left-aligned and moved only by JS translate3d (its own GPU layer). */
.scene-foot.pan .sf-img { left: 0; transform: translate3d(0, 0, 0); will-change: transform; backface-visibility: hidden; }
.scene-foot.wide .sf-ext { opacity: 0; } /* blurred copy tested; the edge-colour fill reads cleaner without it */
.scene-foot.wide .sf-img {
  --sm: linear-gradient(to right, transparent 0, rgba(0,0,0,.05) 2.5%, rgba(0,0,0,.16) 5%, rgba(0,0,0,.34) 8%, rgba(0,0,0,.56) 11%, rgba(0,0,0,.76) 14%, rgba(0,0,0,.9) 17%, #000 21%, #000 79%, rgba(0,0,0,.9) 83%, rgba(0,0,0,.76) 86%, rgba(0,0,0,.56) 89%, rgba(0,0,0,.34) 92%, rgba(0,0,0,.16) 95%, rgba(0,0,0,.05) 97.5%, transparent 100%);
  -webkit-mask-image: var(--sm); mask-image: var(--sm); }

/* ================= card 1: the folio of a life ================= */
.place .ci { display: grid; grid-template-columns: var(--ptc, 34%) 1fr; grid-template-rows: 1fr auto auto; column-gap: clamp(18px, 2.4vw, 40px); padding-left: 0; padding-top: clamp(18px, 2.4vw, 40px); padding-bottom: clamp(16px, 2vw, 30px); }
.place.no-portrait .ci { --ptc: 30%; }
.pt { grid-row: 1 / span 3; grid-column: 1; position: relative; margin: 0; min-height: 0; align-self: stretch; }
/* the portrait is a crisp cut-out: no mask, wash or feathered edge; only a soft contact shadow grounds it */
.pt img { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; max-width: none;
  transform: translateY(14px); opacity: 0; filter: drop-shadow(0 6px 7px rgba(40,26,10,.22));
  transition: opacity 1000ms ease 200ms, transform 1400ms cubic-bezier(.2,.8,.2,1) 200ms; }
.card2.active .pt img.ready { opacity: 1; transform: none; }
.pt-none { grid-row: 1 / span 3; grid-column: 1; position: relative; display: grid; place-items: center; }
.pt-none span { font-family: "IM Fell English", serif; font-size: clamp(120px, 15vw, 230px); line-height: 1; color: rgba(122,74,38,.16); }
.pt-none::before { content: ""; position: absolute; width: 74%; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(122,74,38,.22), inset 0 0 0 7px rgba(244,237,220,0), inset 0 0 0 8px rgba(122,74,38,.14); }
.pc-text { grid-column: 2; min-width: 0; display: flex; flex-direction: column; }
.c-region { margin: 0; font-size: 14px; font-variant-caps: all-small-caps; letter-spacing: .2em; color: var(--mute); display: flex; align-items: center; gap: 12px; }
.c-region::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.c-place { margin: .28em 0 0; font-family: "IM Fell English", serif; font-weight: 400; font-size: clamp(32px, 3.5vw, 56px); line-height: 1.04; letter-spacing: -.012em; white-space: nowrap; }
.c-place > span { display: inline-block; }
.c-place.wrap { white-space: normal; text-wrap: balance; }
.c-place.wrap > span { display: inline; }
/* v10: the year in a small glass pill right under the place */
.glass-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: .3em; width: max-content;
  padding: .32em .95em .34em; border-radius: 999px; font-style: italic; line-height: 1; letter-spacing: .01em; color: var(--sepia);
  background: linear-gradient(180deg, rgba(255,253,246,.62), rgba(255,250,238,.28));
  -webkit-backdrop-filter: blur(10px) saturate(1.25); backdrop-filter: blur(10px) saturate(1.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -1px 0 rgba(122,81,48,.12), inset 0 0 0 1px rgba(255,255,255,.35), 0 0 0 .5px rgba(122,81,48,.28), 0 4px 14px -6px rgba(60,40,18,.35); }
.c-time { margin: .55em 0 0; font-size: clamp(15px, 1.15vw, 18px); }
.c-time abbr.sc { font-style: normal; letter-spacing: .1em; }
/* v12: no "You are a:" kicker; the role (or the real person's name) is the headline, big and heavy, with the tier
   carried by a short metallic rule under it (gold / silver / blue; none for commoners) */
.c-role { position: relative; margin: .5em 0 0; padding-bottom: .16em; font-family: "IM Fell English", serif; font-weight: 400; font-size: clamp(34px, 3.5vw, 58px); line-height: 1; letter-spacing: -.01em;
  color: var(--ink); -webkit-text-stroke: .028em currentColor; paint-order: stroke fill; text-wrap: balance; }
.c-role::after { content: ""; position: absolute; left: 0; bottom: -.05em; width: 1.6em; height: 2px; border-radius: 2px; background: var(--tier-rule, transparent); }
.c-sub { margin: .55em 0 0; font-family: "EB Garamond", serif; font-variant-caps: all-small-caps; letter-spacing: .14em; font-size: 15px; color: var(--tier-ink, var(--mute)); }
.place.tier-gold   { --tier-rule: linear-gradient(90deg, #7d5a1a, #d9b45e 55%, rgba(217,180,94,0)); --tier-ink: #8a6420; }
.place.tier-silver { --tier-rule: linear-gradient(90deg, #6b1b23, #c4646a 55%, rgba(196,100,106,0)); --tier-ink: #7c2730; } /* v31: oxblood, was silver */
.place.tier-blue   { --tier-rule: linear-gradient(90deg, #23557f, #7fb3dc 55%, rgba(127,179,220,0)); --tier-ink: #2f5f88; }
.c-intro { margin: .6em 0 0; font-size: clamp(15.5px, 1.2vw, 18px); line-height: 1.5; max-width: 34em; color: var(--ink2); text-wrap: pretty; hanging-punctuation: first; hyphens: auto; }
.pc-viz { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.2vw, 34px); padding-top: clamp(10px, 1.4vw, 18px); margin-top: clamp(8px, 1.2vw, 14px); }
.lv-k { margin: 0; font-size: 13px; font-weight: 500; font-variant-caps: all-small-caps; letter-spacing: .2em; color: var(--mute); }
.lv-big { margin: .1em 0 0; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.15; color: var(--ink); }
.lv-big b { font-family: "EB Garamond", serif; font-weight: 500; font-size: 1.9em; letter-spacing: -.01em; margin-right: .12em; color: var(--sepia); }
.lv-sub { margin: .15em 0 0; font-style: italic; font-size: 14px; line-height: 1.3; color: var(--mute); }
/* lifespan ruler */
.ruler { position: relative; margin-top: 12px; height: 32px; }
.ruler .rl { position: absolute; left: 0; right: 0; top: 10px; height: 1px; background: rgba(43,33,22,.45); }
.ruler .rt { position: absolute; top: 6px; width: 1px; height: 9px; background: rgba(43,33,22,.45); }
.ruler .rn { position: absolute; top: 18px; transform: translateX(-50%); font-size: 12.5px; color: var(--mute); }
.ruler .bar { position: absolute; left: 0; top: 4px; height: 12px; width: 0; border-radius: 1px;
  background: repeating-linear-gradient(-55deg, var(--sepia) 0 1.6px, transparent 1.6px 4px), rgba(122,74,38,.18); box-shadow: inset 0 0 0 1px rgba(122,74,38,.7);
  transition: width 1500ms cubic-bezier(.2,.8,.2,1) 450ms; }
.card2.active .ruler .bar { width: var(--v); }
.ruler .mk { position: absolute; top: -2px; height: 24px; width: 0; border-left: 1.5px dashed var(--slate); opacity: 0; transition: opacity 600ms ease 1500ms; }
.ruler .mk.avg { border-left-color: var(--gold); }
.card2.active .ruler .mk { opacity: 1; }
.ruler .mk em { position: absolute; bottom: 100%; left: 0; transform: translateX(-50%); white-space: nowrap; font-style: italic; font-size: 12px; color: var(--slate); padding-bottom: 1px; }
.ruler .mk.avg em { color: #8a6a34; }
/* riches: the day's pay as real money. Each denomination is a short column of coins or notes seen edge-on
   (bottom to top, max 10 high), topped by its face, so the whole thing reads as a bar chart. Pieces drop in one by one. */
.pay { display: inline-flex; flex-wrap: nowrap; align-items: flex-end; gap: 14px; margin-top: 10px; padding: 0 6px; position: relative; }
.pay::after { content: ""; position: absolute; left: 0; right: 0; bottom: 15px; height: 1px; background: rgba(90,64,36,.35); } /* the bar chart's baseline */
.pile { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; }
.cols { display: flex; align-items: flex-end; gap: 4px; }
.col { display: flex; flex-direction: column-reverse; align-items: center; }
.lab { font: italic 400 11.5px/1 "EB Garamond", serif; color: var(--mute); white-space: nowrap; }
.pc, .face { position: relative; display: block; flex: none; opacity: 0; transform: translateY(-14px);
  transition: opacity 200ms ease, transform 380ms cubic-bezier(.3,1.35,.5,1); transition-delay: calc(450ms + var(--i) * 80ms); }
.face { transition-delay: calc(500ms + var(--i) * 80ms); }
.card2.active .pc, .card2.active .face { opacity: 1; transform: none; }
/* coins: a reeded silver edge per coin, an elliptical face on top */
.pc.cn { height: 5px; margin-top: -0.5px; border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: repeating-linear-gradient(90deg, rgba(60,52,40,.18) 0 .6px, transparent .6px 2px), linear-gradient(90deg, #858071, #ece8dd 32%, #c2bcae 58%, #7a7467);
  box-shadow: inset 0 -.6px 0 rgba(60,52,40,.45); }
.face.cn { margin-bottom: -2px; border-radius: 50%;
  background: radial-gradient(ellipse at 38% 35%, #f7f4ec, #d8d3c6 45%, #a7a194 100%);
  box-shadow: inset 0 0 0 .8px rgba(74,66,52,.55), inset 0 0 0 2px rgba(255,255,255,.3), inset 0 0 0 2.6px rgba(74,66,52,.22); }
.cn.quarter { width: 21px; } .face.cn.quarter { height: 8px; }
.cn.dollar { width: 27px; } .face.cn.dollar { height: 10px; }
.face.part { width: 18px; height: 18px; margin: 0; border-radius: 50%; background: conic-gradient(#cfc9bb 0 calc(var(--f) * 360deg), transparent 0); box-shadow: inset 0 0 0 1px rgba(74,66,52,.5); }
/* notes: thin layered edges, the top note lies flat with its value; a $1,000 strap is a thick block with a paper band */
.pc.bill, .pc.strap { width: 42px; height: 3px; margin-top: .4px; background: var(--note); box-shadow: inset 0 -.7px 0 rgba(48,58,36,.45), inset 0 .5px 0 rgba(255,255,255,.35); border-radius: .5px; }
.pc.strap { height: 5.5px; background: linear-gradient(90deg, var(--note) 0 41%, #e9dfc3 41% 59%, var(--note) 59%); box-shadow: inset 0 -.8px 0 rgba(48,58,36,.5), inset 0 1.4px 0 rgba(255,255,255,.25), inset 0 2.6px 0 rgba(48,58,36,.2); }
.face.bill, .face.strap { width: 42px; height: 19px; margin-bottom: 0; border-radius: 1.5px;
  background: radial-gradient(ellipse 20% 40% at 50% 52%, rgba(240,236,216,.95) 0 58%, transparent 63%), linear-gradient(180deg, rgba(255,255,255,.2), transparent 50%), var(--note);
  box-shadow: inset 0 0 0 .8px rgba(48,58,36,.6), inset 0 0 0 2.4px rgba(240,236,214,.5), inset 0 0 0 3px rgba(48,58,36,.3); }
.face.bill::before, .face.strap::before { content: ""; position: absolute; left: 50%; top: 52%; width: 5px; height: 7px; transform: translate(-50%,-50%); border-radius: 50%; background: rgba(48,58,36,.35); }
.face.strap::after { content: ""; position: absolute; left: 41%; width: 18%; top: -.5px; bottom: -.5px; background: linear-gradient(90deg, #d6c8a4, #f0e7cd 50%, #cfc19c); box-shadow: 0 0 0 .5px rgba(90,70,40,.4); }
.face em { position: absolute; left: 3.5px; top: 2.5px; font: italic 600 8px/1 "EB Garamond", serif; color: rgba(40,50,30,.85); }
.face.strap em { left: 2.5px; font-size: 7px; }
.bill.b10, .face.b10 { --note: #c7c5a3; } .bill.b20, .face.b20 { --note: #b9c4a4; } .bill.b100, .face.b100, .strap { --note: #afbea7; }

/* ================= story folio ================= */
.c-title { margin: 0; font-family: "IM Fell English", serif; font-weight: 400; font-size: clamp(25px, 2.3vw, 36px); line-height: 1.05; letter-spacing: -.005em; }
.story-text { flex: 1 1 auto; min-height: 0; overflow: hidden; width: 100%; font-size: var(--sfs, 18px); max-width: 64ch; margin-left: auto; margin-right: auto; } /* one column, ~64ch measure */
.story-text p { margin: 0; font-size: var(--sfs, 18px); line-height: 1.52; color: var(--ink); text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; hanging-punctuation: first allow-end; }
/* just the story: open paragraph spacing, a few pivotal openings in bold, and the death set apart under a thin rule */
.story-text { padding-top: .2em; }
.story-text p + p { margin-top: .95em; }
.story-text b { font-weight: 600; color: #3a2a18; }
.story-text p.st-end { break-inside: avoid; margin-top: 1.3em; padding-top: .8em; border-top: 1px solid rgba(90,64,36,.28); max-width: 30em;
  font-family: "IM Fell English", serif; font-style: italic; font-size: calc(var(--sfs, 18px) * 1.1); line-height: 1.42; color: #4a2a1a; text-align: left; }
.story-text.first p:first-child::first-letter { font-family: "IM Fell English", serif; color: var(--st-ox, var(--sepia)); }
.story-text.first.drop-il p:first-child::first-letter { -webkit-initial-letter: 3; initial-letter: 3; margin-right: .1em; }
.story-text.first.drop-m p:first-child::first-letter { font-size: inherit; line-height: inherit; color: inherit; }
.story-text.first .st-drop { float: left; font-family: "IM Fell English", serif; font-style: normal; font-weight: 400;
  font-variant-caps: normal; letter-spacing: 0; color: var(--st-ox, var(--sepia)); line-height: 1; margin: 0 .12em 0 0; }
.story-text.first p:first-child::first-line { font-variant-caps: all-small-caps; letter-spacing: .05em; }
.page-count { margin-top: .6em; text-align: center; font-style: italic; font-size: 13px; color: var(--mute); }

/* ================= data folios ================= */
/* data folio = icon + question + one chart that labels itself */
.vz-top { display: flex; gap: 18px; align-items: center; }
.vz-top img { width: clamp(52px, 4.8vw, 74px); height: clamp(52px, 4.8vw, 74px); flex: none; }
.vz-area { flex: 1 1 auto; min-height: 0; margin-top: 18px; position: relative; }
.vz-area svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vz-grp { font-family: "IM Fell English", serif; font-style: italic; font-size: 19px; fill: var(--ink); }
.vz-txt { font-family: "EB Garamond", serif; font-size: 13px; fill: #5a4936; font-variant-numeric: oldstyle-nums; }
.vz-lbl { font-family: "EB Garamond", serif; font-size: 13.5px; font-weight: 500; font-variant-caps: all-small-caps; letter-spacing: .14em; fill: #6b5a43; }
.vz-num { font-family: "EB Garamond", serif; font-weight: 500; font-size: 17px; fill: var(--ink); font-variant-numeric: oldstyle-nums; }

/* ================= phone ================= */
@media (max-width: 740px) {
  .result-screen { --nav: 50px; --top: 56px; --ov: 18px; }
  .result-screen { --logo: 40px; }
  .minimap { left: 12px; }
  .rs-head { padding-left: calc(12px + var(--logo) + 10px); }
  .rs-head { height: var(--top); }
  .card2 .ci { padding: 18px 18px 16px; }
  .place .ci { display: flex; flex-direction: column; padding: 18px 18px 14px; }
  .pt { position: absolute; right: 2px; top: 5%; bottom: 42%; width: 38%; }
  .pt img { object-position: 100% 100%; }
  .pt-none { position: absolute; right: 6px; top: 6px; width: 38%; height: 38%; }
  .pc-text { position: relative; z-index: 1; }
  .c-region { font-size: 12.5px; }
  .c-role, .c-sub { max-width: 64%; }
  .c-place { max-width: none; position: relative; z-index: 2; }
  .place.has-portrait .pt { top: 15%; }
  .place.no-portrait .c-role { max-width: 70%; }
  .c-place { font-size: clamp(27px, 8.2vw, 36px); }
  .c-role { font-size: clamp(28px, 8.4vw, 36px); }
  .c-intro { max-width: 60%; font-size: 15px; line-height: 1.42; }
  .place.no-portrait .c-intro { max-width: none; }
  .pc-viz { grid-template-columns: 1fr; gap: 10px; margin-top: auto; position: relative; z-index: 1; }
  .lv-big b { font-size: 1.6em; }
  .ruler { margin-top: 8px; }
  .pay { margin-top: 6px; gap: 5px 11px; }
  .story-text p { text-align: left; }
  .seal-btn.small { font-size: 14px; padding: .45em .8em; }
  .deck-nav { grid-template-columns: auto 1fr auto; }
  .pager { justify-self: center; gap: 8px; }
  .chev { width: 32px; height: 32px; }
  .pager { gap: 2px; }
  .dots button { width: 24px; }
  .dots button.on { width: 36px; }
  .dots button.on::before { width: 22px; }
  .dots button::before { width: 9px; height: 9px; }
  #again-btn { margin-right: 0; }
  .result-screen .deck-nav { grid-template-columns: 1fr auto 1fr; padding: 0 8px; }
  .result-screen .pager { grid-column: 2; }
}

/* ================= ?cards=float (default): no leaf, no border, no shadow; the type floats over the scene =================
   The deck reaches down into the picture; a soft paper-tone haze (no edges) and a local glow behind the type keep it readable. */
.result-screen.float { --fo: .5; }
.result-screen.float .deck { bottom: calc(var(--foot) * (1 - var(--fo)) + var(--nav)); }
.result-screen.float .deck-nav { bottom: var(--foot); }
.result-screen.float .card2 { filter: none; }
.result-screen.float .sheet { clip-path: none !important; border-radius: 0; background: radial-gradient(ellipse 62% 58% at 50% 46%, rgba(var(--haze),.86) 0%, rgba(var(--haze),.74) 42%, rgba(var(--haze),.42) 66%, rgba(var(--haze),0) 88%); }
.result-screen.float .sheet::after { display: none; }
.result-screen.float .card2 .ci { text-shadow: 0 0 10px rgba(var(--haze),.95), 0 0 3px rgba(var(--haze),.9); }
.result-screen.float .card2 .ci svg text { paint-order: stroke; stroke: rgba(var(--haze),.85); stroke-width: 3px; stroke-linejoin: round; }
.result-screen.float .pt-none::before { box-shadow: inset 0 0 0 1px rgba(122,74,38,.18); }
.result-screen.float .dots button::before { box-shadow: 0 0 0 3px rgba(var(--haze),.75), 0 0 10px rgba(var(--haze),.9); }
.result-screen.float .dots button.on::before { box-shadow: 0 0 0 3px rgba(var(--haze),.75), 0 0 10px rgba(var(--haze),.9); }
@media (max-width: 740px) { .result-screen.float { --fo: .42; } }

/* ---- card 1 v5: no eyebrows; riches = coins + daily figure with an explaining tooltip; two parchment actions ---- */
.lv-big { white-space: nowrap; }
.lv-rich { position: relative; }
.lv-tip-btn { appearance: none; border: 0; background: none; padding: 0 0 0 .1em; margin: 0; cursor: help; font: italic 400 1em/1 "EB Garamond", serif; color: var(--ink2);
  text-decoration: underline dotted rgba(122,74,38,.55); text-underline-offset: .22em; display: inline-flex; align-items: center; gap: .35em; }
.lv-tip-btn i { display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; border-radius: 50%; font: italic 600 .62em/1 Georgia, serif; color: var(--sepia); box-shadow: inset 0 0 0 1px rgba(122,74,38,.6); text-decoration: none; }

/* 3D parchment buttons with an un-peeling corner (hover lifts it, click peels further and settles) */
@property --pl { syntax: "<length>"; inherits: false; initial-value: 0px; }
.parch { --pl: 0px; position: relative; appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: .6em;
  font-family: "IM Fell DW Pica", "IM Fell English", Georgia, serif; font-style: italic; font-size: 19px; line-height: 1.1; letter-spacing: .01em; color: #2e2418; text-shadow: 0 1px 0 rgba(255,250,236,.6);
  padding: .66em 1.45em .62em 1.4em; border-radius: 2px 3px 2px 3px;
  background-color: #efe3c6;
  background-image: radial-gradient(130% 160% at 28% 18%, rgba(255,251,238,.95), rgba(255,251,238,0) 58%), radial-gradient(90% 120% at 90% 100%, rgba(150,108,56,.22), rgba(150,108,56,0) 60%), url("../assets/paper/fibre-1024.webp");
  background-size: 100% 100%, 100% 100%, 520px 520px; background-blend-mode: normal, normal, multiply;
  box-shadow: inset 0 1px 0 rgba(255,253,244,.95), inset 0 -2px 3px rgba(120,84,40,.22), inset 0 0 0 1px rgba(122,81,48,.32), inset 0 0 14px rgba(150,108,56,.18), 0 1px 1px rgba(60,40,18,.28), 0 8px 16px -6px rgba(60,40,18,.42);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--pl)), calc(100% - var(--pl)) 100%, 0 100%);
  transform: perspective(500px) rotateX(0deg) translateY(0); transform-origin: 50% 100%;
  transition: --pl 260ms cubic-bezier(.3,1.4,.5,1), transform 220ms ease, box-shadow 220ms ease, filter 220ms ease; }
.parch::after { content: ""; position: absolute; right: 0; bottom: 0; width: var(--pl); height: var(--pl); pointer-events: none;
  background: linear-gradient(to bottom right, #cdb588 0%, #f6ecd4 44%, rgba(255,255,255,.0) 50%);
  filter: drop-shadow(-1px -1px 1px rgba(60,40,18,.25)); }
.parch svg { width: 22px; height: 12px; transition: transform 200ms ease; }
.parch:hover { --pl: 11px; transform: perspective(500px) rotateX(4deg) translateY(-1px); filter: brightness(1.02); }
.parch:hover svg { transform: translateX(3px); }
.parch:active { transform: perspective(500px) rotateX(0deg) translateY(1px); }
.parch:focus-visible { outline: 1.5px solid var(--sepia, #7a4a26); outline-offset: 3px; }
.parch.peeling { animation: peel 640ms cubic-bezier(.3,1.2,.4,1); }
@keyframes peel { 0% { --pl: 11px; } 40% { --pl: 30px; } 100% { --pl: 0px; } }
#wheel-respin { font-size: 17px; padding-left: 1.15em; padding-right: 1.25em; }
.result-screen.respinning .deck, .result-screen.respinning .deck-nav { opacity: .18; transition: opacity 400ms ease; }
.result-screen .deck, .result-screen .deck-nav { transition: opacity 500ms ease; }
@media (max-width: 740px) {
  .parch { font-size: 16.5px; padding: .58em 1.1em .55em; }
  #wheel-respin { font-size: 15.5px; }
}

/* neighbour sections show only as their icon at the page's edge (faint; full and a little larger on hover) */
.peek { position: absolute; top: 50vh; z-index: 8; width: calc(64px * var(--z, 1)); height: calc(64px * var(--z, 1)); margin: calc(-32px * var(--z, 1)); padding: 0; border: 0; background: none; cursor: pointer;
  opacity: .55; transform: scale(1); transition: opacity 200ms ease, transform 220ms cubic-bezier(.3,1.4,.5,1); }
.peek img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(60,40,18,.25)); pointer-events: none; }
.peek:hover, .peek:focus-visible { opacity: 1; transform: scale(1.18); outline: none; }
.peek[hidden] { display: none; }
.result-screen.respinning .peek { opacity: 0; pointer-events: none; }
@media (max-width: 740px) { .peek { width: 26px; height: 26px; margin: -13px; opacity: .5; } }
/* float mode: the page runs down into the scene's haze; keep story text above the picture so it stays readable */
.result-screen.float .card2.story .story-text { margin-bottom: max(0px, calc(var(--foot) * var(--fo) / var(--z, 1))); }
/* v22: the folio number ("ii of iii") also stays above the footer band (phone and desktop; it sat on the picture's sky) */
.result-screen.float .card2.story .story-text { margin-bottom: 0; }
.result-screen.float .card2.story .page-count { margin-bottom: max(0px, calc(var(--foot) * var(--fo) / var(--z, 1) + 4px)); }

/* v10: money bar, the same ruler as the years bar; its bar is the day's coins and bills edge to edge, dropping in */
.ruler.money .mbar { position: absolute; left: 0; top: 4px; height: 12px; width: var(--v); display: flex; gap: 1px; align-items: stretch; }
.mp { flex: 1 1 0; min-width: 2px; border-radius: 1.5px; opacity: 0; transform: translateY(-10px);
  transition: opacity 260ms ease calc(300ms + var(--i) * min(70ms, 1400ms / var(--n))), transform 380ms cubic-bezier(.3,1.6,.5,1) calc(300ms + var(--i) * min(70ms, 1400ms / var(--n))); }
.card2.active .mp { opacity: 1; transform: none; }
.mp.cn { background: linear-gradient(90deg, #8e8878 0, #e9e5da 35%, #fbfaf5 50%, #c9c3b4 70%, #8a8474 100%); box-shadow: inset 0 0 0 .6px rgba(60,54,42,.55); border-radius: 3px / 1.5px; }
.mp.cn.quarter { flex-grow: .75; }
.mp.cn.quarter.part { flex: 0 0 6px; opacity: .8; }
.mp.bill, .mp.strap { flex-grow: 2.2; background: linear-gradient(180deg, color-mix(in srgb, var(--note) 82%, #fff) 0, var(--note) 45%, color-mix(in srgb, var(--note) 80%, #263018) 100%);
  box-shadow: inset 0 0 0 .6px rgba(40,50,30,.6), inset 0 0 0 2px rgba(255,255,255,.18); }
.mp.strap { flex-grow: 2.6; background-image: linear-gradient(90deg, transparent 0 40%, #efe5c8 40% 60%, transparent 60%), linear-gradient(180deg, color-mix(in srgb, var(--note) 82%, #fff) 0, var(--note) 45%, color-mix(in srgb, var(--note) 80%, #263018) 100%); }
.mp.b10 { --note: #c7c5a3; } .mp.b20 { --note: #b9c4a4; } .mp.b100, .mp.strap { --note: #afbea7; }

/* ================= v11: the two landing charts are rows of real objects =================
   Hourglasses (one per decade) and coins/notes share one row height, a common baseline and the same drop-in. */
/* v12: photoreal bars. Items sit 1px apart (bills and coins alike) so each row reads as one solid bar; a long row
   squeezes into a slight overlap instead of wrapping. Items drop in one by one. */
.lv-row { --rh: clamp(34px, 3.2vw, 46px); --gap: 1px; position: relative; display: flex; align-items: center; height: var(--rh); margin-top: 12px; width: 100%; min-width: 0; }
.lv-row > span { position: relative; display: block; flex: 0 1 calc(var(--iw) + var(--gap)); min-width: 3px; height: var(--ih); opacity: 0; transform: translate3d(0,-42px,0) scale(.92);
  animation: lv-drop 560ms cubic-bezier(.2,.75,.25,1.12) both; animation-delay: calc(80ms + var(--i) * min(70ms, 1400ms / max(var(--n), 1))); }
.lv-row > span:last-child { flex-shrink: 0; flex-basis: var(--iw); }
/* v44 t167u: drop starts inside the icon area (--drop-from, default -16px), never from above the title. */
@keyframes lv-drop { 0% { opacity: 0; transform: translate3d(0, var(--drop-from, -16px), 0) scale(.96); } 72% { opacity: 1; transform: translate3d(0,2px,0) scale(1.015); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .lv-row > span, .ir-war .lv-row .wf-ic { opacity: 1 !important; transform: none !important; animation: none !important; }
}
.lv-row img { position: absolute; left: 0; top: 0; width: var(--iw); height: var(--ih); max-width: none; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 1px 1px rgba(30,22,12,.38)) drop-shadow(0 3px 4px rgba(40,28,14,.22)); }
.watches > span { --ih: var(--rh); --iw: var(--rh); --gap: calc(var(--iw) * -0.12); z-index: calc(1 + var(--i)); }
.wf.part > img:first-child { opacity: 0; visibility: hidden; }
.coins > span { --ih: var(--rh); --iw: var(--rh); }
.coins > .mc-quarter { --ih: calc(var(--rh) * .8); --iw: calc(var(--rh) * .8); }
.coins > .mc-b1, .coins > .mc-b10, .coins > .mc-b20, .coins > .mc-b100 { --ih: var(--rh); --iw: calc(var(--rh) / 2.05); }  /* notes stand upright */
.coins > .mc-strap { --ih: var(--rh); --iw: calc(var(--rh) / 2.06); }
.lv-cap { margin: 6px 0 0; font-style: italic; font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 740px) { .lv-row { --rh: 32px; margin-top: 8px; } .lv-cap { font-size: 12px; margin-top: 4px; } }


/* ================= v13: the place card is laid out around a big location globe =================
   The old top-left minimap globe moves into the card (about 1.5x the old initial-circle, ~5x the old logo), pinned on
   the life's spot. Desktop: globe | place, year, name, sentence, bars | portrait; the text starts level with the page
   header and everything stays above the footer picture (bottom padding = the part of the deck that overlaps it).
   Phone: place/year/name across the top, then the globe with the sentence under it, the portrait opposite, bars below. */
.rs-head { padding-left: clamp(18px, 3vw, 44px); }
.place { --pb: calc(var(--foot) * var(--fo, 0) / var(--z, 1) + 12px); }
.place .ci { display: grid; grid-template-columns: var(--gs, 260px) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "globe head" "globe intro" "globe viz" ". ."; column-gap: clamp(24px, 2.8vw, 46px);
  padding: 0 clamp(20px, 2.6vw, 44px) var(--pb) clamp(6px, .8vw, 14px); }
.place.has-portrait .ci { grid-template-columns: var(--gs, 240px) minmax(0, 1fr) var(--pw, 22%); grid-template-areas: "globe head pt" "globe intro pt" "globe viz pt" ". . pt"; }
.pc-head { grid-area: head; min-width: 0; display: flex; flex-direction: column; }
.pc-globe { grid-area: globe; position: relative; width: var(--gs, 260px); aspect-ratio: 1; align-self: center; justify-self: center; }
.globe-slot { position: absolute; inset: 0; }
.pc-globe .minimap { position: absolute; inset: 0; top: 0; left: 0; width: 100%; height: 100%; cursor: default; transform: none;
  box-shadow: 0 2px 5px rgba(40,28,14,.22), 0 16px 34px -12px rgba(40,28,14,.5); }
.pc-globe .minimap:hover, .pc-globe .minimap:focus-visible { transform: none; box-shadow: 0 2px 5px rgba(40,28,14,.22), 0 16px 34px -12px rgba(40,28,14,.5); }
.pc-globe .mm-pin { width: 22px; height: 22px; }
.pc-globe .mm-pin i { inset: 6px; box-shadow: 0 0 0 2.5px #f2ead9, 0 1px 4px rgba(0,0,0,.55); }
.pc-globe .mm-pin b { border-width: 2px; }
.place .c-intro { grid-area: intro; }
.place .pt { grid-area: pt; align-self: stretch; min-height: 0; }
.place .pc-viz { grid-area: viz; margin-top: clamp(10px, 1.3vw, 18px); padding-top: 0; }
/* the place name 2pt smaller; the name / role headline matches it exactly (JS copies the fitted size) */
.place .c-place { margin-top: 0; font-size: clamp(29px, calc(3.5vw - 2.67px), 53px); }
.place .c-role { margin-top: .36em; font-size: clamp(29px, calc(3.5vw - 2.67px), 53px); }
/* a famous person's role reads like the year label: same italic Garamond, size and colour, no small caps */
.place .c-sub { margin: .5em 0 0; font-family: "EB Garamond", serif; font-style: italic; font-variant-caps: normal; letter-spacing: .01em;
  font-size: clamp(15px, 1.15vw, 18px); line-height: 1; color: var(--sepia); }
/* bars ~25% smaller, no captions */
.place .lv-row { --rh: clamp(26px, 2.4vw, 35px); margin-top: 8px; }
.place .lv-big { font-size: clamp(14px, 1.08vw, 16.5px); }
.place .lv-big b { font-size: 1.8em; }
@media (min-width: 741px) {
  .result-screen .card2.place { top: calc(10px - var(--top)); }      /* text top level with the page header */
  .pc-globe { margin-top: calc(var(--top) / var(--z, 1)); align-self: start; } /* the globe stays clear of the header row */
}
@media (max-width: 740px) {
  .rs-head { padding-left: 16px; padding-right: 12px; }
  .place .ci { grid-template-columns: minmax(0, 1fr) var(--gs, 150px); grid-template-rows: auto auto auto auto 1fr;
    grid-template-areas: "head head" "intro globe" "intro ." "viz viz" ". ."; column-gap: 14px; padding: 14px 16px var(--pb); }
  .place.has-portrait .ci { grid-template-columns: var(--gs, 150px) minmax(0, 1fr); grid-template-areas: "head head" "globe pt" "intro pt" "viz viz" ". ."; }
  .place .pt { position: relative; right: auto; top: auto; bottom: auto; width: auto; margin-top: 6px; }
  .place.has-portrait .pt { top: auto; }
  .place .pt img { object-position: 100% 100%; }
  .pc-globe { margin-top: 12px; align-self: start; }
  .place .c-place { font-size: clamp(24px, calc(8.2vw - 2.67px), 33px); max-width: none; }
  .place .c-role { font-size: clamp(24px, calc(8.2vw - 2.67px), 33px); max-width: none; }
  .place .c-sub { max-width: none; font-size: 15px; }
  .place .c-intro { max-width: none; margin-top: 12px; font-size: 14.5px; line-height: 1.4; }
  .place.no-portrait .c-intro { align-self: center; }
  .place .pc-viz { margin-top: 10px; gap: 6px; }
  .place .lv-row { --rh: 24px; margin-top: 5px; }
  .place .lv-big { font-size: 14px; }
  .place .lv-big b { font-size: 1.7em; }
}


/* ================= v14: place name on the globe, single-row bars =================
   The place is a small label under the globe's dot (no big heading); the headline is a little smaller than v13.
   Each bar is one row: the numeral large with its unit stacked under it, then the clocks / coins. */
.pc-globe .mm-pin { overflow: visible; }
.mm-label { position: absolute; left: 50%; top: calc(100% + .35em); transform: translateX(-50%); width: max-content; max-width: calc(var(--gs, 260px) * .6);
  padding: .28em .7em .3em; border-radius: 999px; text-align: center; white-space: normal; text-wrap: balance;
  font-family: "EB Garamond", serif; font-weight: 500; font-variant-caps: all-small-caps; letter-spacing: .12em; line-height: 1.08;
  font-size: clamp(10.5px, calc(var(--gs, 260px) * .052), 22px); color: #2b2116;
  background: linear-gradient(180deg, rgba(255,251,240,.86), rgba(246,238,220,.74)); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 0 0 .5px rgba(90,60,30,.35), 0 2px 6px rgba(30,20,10,.3); }
.mm-label.small { font-size: clamp(9px, calc(var(--gs, 260px) * .042), 18px); letter-spacing: .08em; }
.place .c-role { margin-top: .32em; font-size: clamp(25px, calc(2.9vw - 1px), 45px); }
.place .pc-head .c-time { margin-top: 0; }
/* v18b: years and money icon bars share one numeral column so the clocks and coins start at the same x. */
.place .lv { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; min-width: 0; }
.place .lv-big { display: flex; flex-direction: column; align-items: flex-start; margin: 0; line-height: 1;
  min-width: 0; max-width: 7.2em; white-space: normal; }
.place .lv-big b { display: block; margin: 0; font-size: clamp(24px, 2vw, 32px); line-height: .95; }
.place .lv-unit, .place .lv-tip-btn { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .25em;
  margin-top: .22em; padding: 0; font-size: clamp(11.5px, .85vw, 13.5px); font-style: italic; color: var(--ink2);
  white-space: normal; max-width: 100%; line-height: 1.15; text-align: left; }
.place .lv-row { min-width: 0; margin-top: 0; }
@supports not (grid-template-columns: subgrid) {
  .place .lv { display: flex; align-items: center; gap: clamp(8px, .8vw, 14px); }
  .place .lv-big { flex: 0 0 6.8em; width: 6.8em; max-width: 6.8em; }
  .place .lv-row { flex: 1 1 auto; }
}
@media (max-width: 740px) {
  .place .c-role { font-size: clamp(22px, calc(7vw - 2px), 28px); }
  .place .lv-big b { font-size: 24px; }
  .place .lv-unit { font-size: 11.5px; }
  .place .pc-viz { gap: 8px; }
}
.place .lv-unit i { width: 1.25em; height: 1.25em; font-size: .78em; }
@media (min-width: 741px) {  /* the globe spans the spacer row too, so its height never pushes the text rows apart */
  .place .ci { grid-template-areas: "globe head" "globe intro" "globe viz" "globe ."; }
  .place.has-portrait .ci { grid-template-areas: "globe head pt" "globe intro pt" "globe viz pt" "globe . pt"; }
}

/* ================= v15: chosen layouts =================
   Phone ("globe hero"): the globe centred on top with place + year on it; then title, sentence, years row and money row
   in the left column beside the portrait on the right. Desktop / ultrawide: three equal columns, centred as a group:
   globe | narrow column (title, sentence, years row, money row) | portrait; vertically centred above the footer picture. */
.mm-label .p, .mm-label .y { display: block; }
/* v42 t161u: the year lives in the timeline pill, not on the globe */
.mm-label .y { display: none; }
.pc-mid { grid-area: mid; min-width: 0; display: flex; flex-direction: column; }
.place .pc-head .c-role { margin-top: 0; }
.place .pc-viz { display: grid; grid-template-columns: minmax(4.6em, max-content) minmax(0, 1fr);
  column-gap: clamp(8px, .8vw, 14px); row-gap: clamp(8px, .9vw, 14px); align-items: center; }
.place .pt { grid-area: pt; }
@media (min-width: 741px) {
  .place .ci, .place.has-portrait .ci {
    grid-template-columns: repeat(3, var(--col, 300px)); grid-template-rows: auto; grid-template-areas: "globe mid pt";
    justify-content: center; align-content: center; align-items: center; column-gap: calc(var(--col, 300px) * .1);
    padding: 0 0 var(--pb) 0; }
  .place.no-portrait .ci { grid-template-areas: "globe mid ."; }
  .pc-globe { width: var(--col, 300px); margin-top: 0; align-self: center; }
  .place .pt { align-self: center; height: min(calc(var(--col, 300px) * 1.5), 100%); }
  .place .pt img { object-position: 0% 100%; }   /* v42 t161u: figure sits toward the mid column, like the globe */
  .place .c-role { font-size: clamp(30px, calc(var(--col, 300px) * .14), 46px); }
  .place .c-intro { margin-top: .7em; max-width: none; }
  .place .pc-viz { margin-top: clamp(14px, 1.4vw, 22px); }
}
@media (max-width: 740px) {
  .place .ci, .place.has-portrait .ci {
    grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); grid-template-rows: auto auto 1fr;
    grid-template-areas: "globe globe" "mid pt" ". ."; column-gap: 6px; padding: 4px 16px var(--pb); }
  .place.no-portrait .ci { grid-template-columns: minmax(0, 1fr); grid-template-areas: "globe" "mid" "."; }
  .pc-globe { justify-self: center; margin-top: 0; }
  .pc-mid { padding-top: 14px; }
  .place .pt { margin: 10px -10px 0 0; align-self: stretch; min-height: 0; }
  .place .c-role { font-size: clamp(30px, 9.6vw, 38px); }
  .place .c-intro { margin-top: 12px; font-size: 15px; line-height: 1.45; }
  .place .pc-viz { margin-top: 14px; gap: 8px; }
  .place .lv-big b { font-size: 26px; }
  .place .lv-row { --rh: 25px; }
}
@media (min-width: 741px) {
  .place .pt { height: min(calc(var(--col, 300px) * 1.42), calc(100cqh - var(--pb) - 8px)); max-height: calc(var(--col, 300px) * 1.42); }
}

/* ================= v16: data pages as rows of real objects =================
   Same treatment as the landing card's pocket watches: per row a small label, the big numeral with its unit stacked
   under it, then the photo items packed almost touching on one line. JS sets --rh per group so the longest row fits. */
.vz-icons { --ir-max: clamp(46px, 4.6vw, 66px); position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: clamp(14px, 2.2vh, 26px); }
.ir-grp { min-width: 0; }
.ir-name { margin: 0 0 6px; }
.ir { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); column-gap: clamp(14px, 1.6vw, 24px); row-gap: clamp(10px, 1.6vh, 18px); align-items: center; }
.ir-lbl { margin: 0; font-size: 14px; font-weight: 500; font-variant-caps: all-small-caps; letter-spacing: .16em; color: var(--mute); white-space: nowrap; }
.vz-icons .lv-big { display: flex; flex-direction: column; align-items: flex-start; margin: 0; line-height: 1; white-space: nowrap; min-width: 4.2em; }
.vz-icons .lv-big b { display: block; margin: 0; font-size: clamp(28px, 2.4vw, 38px); line-height: .95; }
.vz-icons .lv-big b small { font-size: .5em; letter-spacing: .02em; color: var(--mute); margin-left: .05em; }
.vz-icons .lv-unit { margin-top: .25em; font-size: clamp(12px, .95vw, 14.5px); font-style: italic; color: var(--ink2); }
.vz-icons .lv-row { margin: 0; height: var(--rh); }
.lv-row.icons > span { --ih: var(--rh); --iw: calc(var(--rh) * var(--ar, 1)); }
/* hold the drop until the chart has picked a shared size (war skulls and murder bones) */
.vz-icons:not(.ic-go) .lv-row > span { animation: none; opacity: 0; transform: translate3d(0, var(--drop-from, -16px), 0) scale(.96); }
.vz-icons.ic-go .lv-row > span { animation: lv-drop 560ms cubic-bezier(.2,.75,.25,1.12) both; animation-delay: calc(80ms + var(--i) * min(70ms, 1400ms / max(var(--n), 1))); }
.ic.part > img:first-child { opacity: 0; visibility: hidden; }
.ir-key, .vz-icons .lv-unit { display: none; } /* v18: labels live in the numeral tooltip only */
@media (max-width: 740px) {
  .vz-icons { --ir-max: 40px; gap: 14px; }
  .ir { grid-template-columns: max-content minmax(0, 1fr); column-gap: 12px; row-gap: 4px; }
  .ir-lbl { grid-column: 1 / -1; font-size: 13px; margin-top: 6px; }
  .vz-icons .lv-big { min-width: 3.4em; }
  .vz-icons .lv-big b { font-size: 26px; }
  .vz-icons .lv-unit { font-size: 12px; white-space: normal; max-width: 7.5em; line-height: 1.15; }
  .ir-key { font-size: 12px; margin-top: 6px; }
}
/* v16 safety: up to 50 coffins / daggers wrap onto lines of 15 (13 on phones); the leading "~" marks thin evidence */
.ir-wrap .lv-row { flex-wrap: wrap; height: auto; min-height: var(--rh); row-gap: 3px; align-content: center; }
.ir-wrap .lv-row > span, .ir-wrap .lv-row > span:last-child { flex: 0 0 calc(var(--iw) + var(--gap)); }
.ir-tilde { font-size: .62em; vertical-align: .18em; margin-right: .04em; color: var(--mute); }
.vz-icons:has(.ir-wrap) { --ir-max: clamp(34px, 3.2vw, 48px); gap: clamp(8px, 1.4vh, 16px); }
@media (max-width: 740px) { .vz-icons:has(.ir-wrap) { --ir-max: 30px; } }
@media (max-width: 740px) { .vz-icons { --ir-max: 44px; } .vz-icons:has(.ir-wrap) { --ir-max: 30px; } }
/* v16: two-group pages (food + water, war + murder) sit side by side on desktop; .tight is the fit loop's first step */
@media (min-width: 741px) {
  .vz-icons.multi { flex-direction: row; align-items: center; justify-content: center; gap: clamp(28px, 4vw, 64px); }
  .vz-icons.multi .ir-grp { flex: 1 1 0; }
  /* v18c: food's 10-slot grid needs the full chart width; stack food and water, labels back on the left to save height. */
  .vz-icons.multi:has(.ir-food) { flex-direction: column; align-items: stretch; justify-content: center; gap: clamp(12px, 1.8vh, 20px); }
  .vz-icons.multi:has(.ir-food) .ir-grp { flex: 0 0 auto; width: 100%; max-width: 920px; margin: 0 auto; }
  .vz-icons.multi:has(.ir-food) .ir { grid-template-columns: max-content max-content minmax(0, 1fr); }
  .vz-icons.multi:has(.ir-food) .ir-lbl { grid-column: auto; margin-top: 0; }
  .vz-icons.multi .ir { grid-template-columns: max-content minmax(0, 1fr); column-gap: clamp(10px, 1.1vw, 18px); row-gap: 2px; }
  .vz-icons.multi .ir-lbl { grid-column: 1 / -1; margin-top: 8px; }
  /* t105u: war buildings need the full chart width so larger tiers can stay genuinely bigger */
  .vz-icons.multi:has(.ir-war) { flex-direction: column; align-items: stretch; justify-content: center; gap: clamp(12px, 1.8vh, 20px); }
  .vz-icons.multi:has(.ir-war) .ir-grp { flex: 0 0 auto; width: 100%; max-width: 920px; margin: 0 auto; }
  .vz-icons.multi:has(.ir-war) .ir { grid-template-columns: max-content max-content minmax(0, 1fr); }
  .vz-icons.multi:has(.ir-war) .ir-lbl { grid-column: auto; margin-top: 0; }
}
.vz-icons.tight { gap: 8px; }
.vz-icons.tight .ir { row-gap: 4px; }
.vz-icons.tight .lv-big b { font-size: 24px; }
.vz-icons.tight .ir-key { margin-top: 3px; }
.vz-icons.tight .ir-lbl { margin-top: 2px; }
.vz-icons.multi .ir-lbl { margin-bottom: 3px; }
.vz-icons.tight .ir-name { margin-bottom: 0; font-size: .92em; }
.vz-icons.tight .lv-unit { margin-top: .12em; font-size: 12px; }
.vz-icons.tight .ir-lbl { font-size: 12px; margin-top: 0; }
@media (max-width: 740px) { .vz-icons.tight .lv-big b { font-size: 22px; } .vz-icons.tight .ir-key { font-size: 11.5px; } }
/* the base .lv-row sets its own --rh; on the data pages the group's fitted value must win */
.vz-icons .lv-row { --rh: inherit; }

/* v18: every icon row except the 5 water glasses gently overlaps (~12%), later items on top of
   the one to their left, even when the row is short. Water glasses stay separate. */
.lv-row.icons > span { --gap: calc(var(--iw) * -0.12); z-index: calc(1 + var(--i, 0)); }
/* v18c: water glasses never touch — a fixed positive gap, no shrink. */
.lv-row.icons.wz-row > span, .lv-row.icons.wz-row > span:last-child { --gap: 8px; z-index: 1; flex: 0 0 calc(var(--iw) + 8px) !important; min-width: 0; }
.ir-food .lv-row.icons { overflow: visible; -webkit-mask-image: none; mask-image: none; }
/* Shared slot grid: every food span keeps a full slot, including empty and last; 5/5 and 3/5 share one x-scale. */
.ir-food .lv-row.icons > span, .ir-food .lv-row.icons > span:last-child {
  --gap: calc(var(--iw) * (var(--pf, 0.88) - 1));
  flex: 0 0 calc(var(--iw) + var(--gap)); flex-shrink: 0; min-width: 0; overflow: visible;
  -webkit-mask-image: none; mask-image: none; }
.ir-food .lv-row.icons > span.ic.empty { visibility: hidden; pointer-events: none; animation: none; opacity: 0; }
.ir-food .lv-row.icons > span.part .ic-fill,
.ir-food .lv-row.icons > span:not(.empty):last-child {
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 82%, transparent 100%); }
.ir-food .lv-row > span:not(.empty) {
  animation-duration: 700ms;
  animation-delay: calc(320ms + var(--i) * min(170ms, 2400ms / var(--n))); }
.ic.wz .wz-murk { opacity: 0; transition: opacity var(--wz-fade, 1.7s) ease-in-out; pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(30,22,12,.38)) drop-shadow(0 3px 4px rgba(40,28,14,.22)); }

/* v18b: children who died — one baby per child; a second row only if one row would overflow. */
.ir-stack .lv-row {
  --ih: var(--rh); --iw: calc(var(--rh) * var(--ar, 0.492)); --gap: calc(var(--iw) * (var(--pf, 0.88) - 1));
  display: grid !important; grid-auto-flow: column; grid-template-rows: repeat(var(--stack, 2), var(--ih));
  grid-auto-columns: calc(var(--iw) + var(--gap)); height: auto !important; justify-content: start;
  align-content: start; column-gap: 0; row-gap: 2px; overflow: visible; }
.ir-stack .lv-row > span, .ir-stack .lv-row > span:last-child {
  flex: none; width: var(--iw); height: var(--ih); min-width: 0; }

/* v18: life clocks are a little smaller than the other object rows */
.ir-life { --ir-max: clamp(34px, 3.4vw, 38px); }
.ir-life[data-you] { position: relative; }
/* t98u: bookmark ribbon at this person's age, crossing both watch rows */
.you-ribbon { position: absolute; top: 0; width: 0; z-index: 6; display: flex; flex-direction: column; align-items: center;
  transform: translateX(-50%); pointer-events: none; }
.you-ribbon[data-tipj] > span { pointer-events: auto; cursor: help; }   /* v22: the "You" tag opens the shared tooltip */
.you-ribbon > span { flex: 0 0 auto; margin-bottom: 2px; padding: 0 .28em; font-family: "EB Garamond", serif;
  font-style: italic; font-weight: 600; font-size: 13px; line-height: 1; letter-spacing: .04em; color: #5c2a22;
  background: linear-gradient(180deg, #f4ead3, #e8d5b0); border-radius: 2px;
  box-shadow: 0 0 0 .5px rgba(90,40,28,.35), 0 1px 2px rgba(40,20,12,.2); white-space: nowrap; }
.you-ribbon > img { flex: 1 1 auto; width: 22px; min-height: 12px; object-fit: contain; object-position: top center;
  filter: drop-shadow(1px 1px 2px rgba(40, 22, 14, .35)); pointer-events: none; }
@media (max-width: 740px) {
  .you-ribbon > span { font-size: 12px; }
  .you-ribbon > img { width: 18px; }
}

/* v22 t115u: the one shared tooltip (js/tip.js). Anchors: anything with data-tipj. */
[data-tipj] { cursor: help; -webkit-tap-highlight-color: transparent; }
.vz-icons .lv-big[data-tipj] b, .lv-tip-btn { text-decoration: underline dotted rgba(122,74,38,.5); text-decoration-thickness: 1px; text-underline-offset: .2em; }
[data-tipj]:focus-visible { outline: 2px solid rgba(122,74,38,.55); outline-offset: 3px; border-radius: 3px; }
#ll-tip { position: fixed; inset: auto; left: 0; top: 0; margin: 0; z-index: 2147483647; box-sizing: border-box;
  width: max-content; max-width: min(330px, calc(100vw - 16px)); min-width: 0; padding: 11px 13px 12px; border: 0; border-radius: 6px;
  background: #fbf6ea url("../assets/paper/fibre-1024.webp") 0 0 / 700px; background-blend-mode: multiply; color: var(--ink, #2b2116);
  box-shadow: 0 0 0 1px rgba(122,81,48,.28), 0 14px 32px -10px rgba(50,32,14,.45), 0 2px 6px rgba(50,32,14,.12);
  font: 400 14px/1.38 "EB Garamond", Georgia, serif; text-align: left; white-space: normal; overflow-wrap: anywhere; hyphens: auto;
  opacity: 0; transform: translateY(3px); pointer-events: none; transition: opacity 160ms ease, transform 160ms ease; overflow: visible; }
#ll-tip.on { opacity: 1; transform: none; pointer-events: auto; }
#ll-tip[data-side="down"] { transform-origin: top; }
#ll-tip .llt-arrow { position: absolute; left: calc(var(--ax, 50%) - 6px); width: 12px; height: 12px; background: #f6efdf; transform: rotate(45deg);
  box-shadow: 1px 1px 0 0 rgba(122,81,48,.28); bottom: -6px; }
#ll-tip[data-side="down"] .llt-arrow { bottom: auto; top: -6px; box-shadow: -1px -1px 0 0 rgba(122,81,48,.28); }
#ll-tip .llt-body { position: relative; z-index: 1; }
#ll-tip p, #ll-tip ul { margin: 0; padding: 0; }
.llt-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1em .4em; margin-bottom: 6px !important; }
.llt-h b { font: 600 22px/1.05 "EB Garamond", Georgia, serif; color: var(--sepia, #7a4a26); font-variant-numeric: lining-nums; }
.llt-h span { font-style: italic; color: var(--ink2, #4a3b2a); font-size: 14px; }
.llt-pts { list-style: none; display: grid; gap: 4px; }
.llt-pts li { display: grid; grid-template-columns: 15px 1fr; gap: 7px; align-items: start; }
.llt-i { width: 14px; height: 14px; margin-top: 2px; color: var(--sepia, #7a4a26); flex: none; }
.llt-bars { margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(90,64,36,.18); display: grid; gap: 4px; }
.llt-bar { display: grid; grid-template-columns: 5.7em 1fr auto; gap: 7px; align-items: center; font-size: 12.5px; color: var(--ink2, #4a3b2a); }
.llt-bl { font-variant: small-caps; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.llt-bt { height: 7px; border-radius: 4px; background: rgba(90,64,36,.12); overflow: hidden; min-width: 60px; }
.llt-bt > span { display: block; height: 100%; border-radius: 4px; background: #b9a689; }
.llt-bar.me .llt-bt > span { background: linear-gradient(90deg, #9a6236, #7a4a26); }
.llt-bv { font-variant-numeric: tabular-nums lining-nums; font-weight: 600; color: var(--ink, #2b2116); white-space: nowrap; }
.llt-bcap { font-size: 11.5px; font-style: italic; color: var(--mute, #75644d); }
.llt-key { display: grid; grid-template-columns: 15px 1fr; gap: 7px; margin-top: 8px !important; font-size: 12.5px; color: var(--mute, #75644d); }
.llt-note { margin-top: 6px !important; font-size: 11.5px; font-style: italic; color: var(--mute, #75644d); }
@media (max-width: 740px) { #ll-tip { font-size: 13.5px; padding: 10px 12px 11px; } .llt-h b { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { #ll-tip { transition: none; } }

/* v19b t105u: war deaths as building denominations. Each tier is taller (--hs), all stand on one ground line. */
.ir-war .lv-row.icons { height: calc(var(--rh) * var(--hs-max, 1)); align-items: flex-end; overflow: visible; }
.ir-war .lv-row.icons > span, .ir-war .lv-row.icons > span:last-child {
  --ih: calc(var(--rh) * var(--hs, 1)); --iw: calc(var(--ih) * var(--ar, 1)); --gap: calc(var(--iw) * -0.12);
  flex: 0 0 calc(var(--iw) + var(--gap)); min-width: 0; }
/* v44 t167u: keep the full icon box; the partial is a mask fade, never a hard width clip. */
.ir-war .lv-row.icons > span:last-child { flex-basis: calc(var(--iw) + var(--gap)); }
.ir-war .lv-row.icons > span img { object-fit: contain; object-position: bottom left;
  filter: drop-shadow(0 2px 2px rgba(40,28,14,.28)); }
.ir-war.ir-wrap .lv-row.icons { height: auto; min-height: calc(var(--rh) * var(--hs-max, 1));
  align-content: flex-end; row-gap: 8px; }
.ir-war.ir-wrap .lv-row.icons > span, .ir-war.ir-wrap .lv-row.icons > span:last-child {
  flex: 0 0 calc(var(--iw) + var(--gap)); }
.ir-war.ir-wrap .lv-row.icons > span:last-child { flex-basis: calc(var(--iw) + var(--gap)); }
/* v22 t113u: skulls (1 per death per million). v23: a partial skull fills from the left like every other partial. */
.ir-war .lv-row.icons > span.sk img { filter: drop-shadow(0 1.5px 1.5px rgba(40,28,14,.3)); }
/* past 60 per million: a heap of bone-coloured dots on a canvas, after a 3 s rainfall (viz.js rain()) */
.ir-war .lv-row.icons.rain { height: clamp(80px, 14vh, 140px); min-height: 0; width: 100%; position: relative; overflow: visible; }
@media (max-width: 740px) { .ir-war .lv-row.icons.rain { height: clamp(72px, 13vh, 124px); } }
.war-rain { display: block; }

/* v22 t114u: the one sentence under the children chart (an exception to the no-subtitle rule) */
.vz-icons .vz-note { margin: clamp(8px, 1.4vh, 14px) 0 0; max-width: 34em; font: italic 400 clamp(12.5px, .95vw, 14.5px)/1.35 "EB Garamond", Georgia, serif; color: var(--ink2, #4a3b2a); text-wrap: pretty; }
@media (max-width: 740px) { .vz-icons .vz-note { font-size: 12.5px; } }

/* v22 t116u: living people: a "Still alive" tag and a soft green pulse at their age (no memorial ribbon) */
.you-ribbon.alive > span { color: #2f5d3a; background: linear-gradient(180deg, #eef3e2, #dfe9cf); box-shadow: 0 0 0 .5px rgba(47,93,58,.4), 0 1px 2px rgba(20,40,20,.18); }
.you-ribbon.alive .alive-dot { position: relative; flex: none; margin-top: auto; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9fd39a, #4f9a58 60%, #3b7a45); box-shadow: 0 0 0 2px rgba(251,246,234,.9), 0 1px 3px rgba(20,40,20,.35); }
.you-ribbon.alive .alive-dot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(79,154,88,.55);
  animation: alive-pulse 2.4s ease-out infinite; }
@keyframes alive-pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .you-ribbon.alive .alive-dot::after { animation: none; opacity: .35; transform: scale(1.6); } }

/* v23 t117u: THE one rule for every partial object in every chart (watches, coins and bills, skulls, food, babies,
   books, daggers, glasses...). Like a bar chart it always fills from the LEFT: the visible width is --f of the icon,
   and the right edge is a soft fade over the last ~45% of what shows (at least 8 px), never a hard cut. Add class "soft-cut" to the
   partial image; it needs --f (0-1) on itself or an ancestor. */
.soft-cut { clip-path: none !important; transform: none !important; object-position: left bottom !important;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 max(0px, calc(var(--f, 1) * 100% - max(var(--f, 1) * var(--soft, 45%), 8px))), rgba(0,0,0,.55) calc(var(--f, 1) * 100% - max(var(--f, 1) * var(--soft, 45%) / 2, 4px)), transparent calc(var(--f, 1) * 100%)) !important;
          mask-image: linear-gradient(to right, #000 0, #000 max(0px, calc(var(--f, 1) * 100% - max(var(--f, 1) * var(--soft, 45%), 8px))), rgba(0,0,0,.55) calc(var(--f, 1) * 100% - max(var(--f, 1) * var(--soft, 45%) / 2, 4px)), transparent calc(var(--f, 1) * 100%)) !important;
  -webkit-mask-size: 100% 100% !important; mask-size: 100% 100% !important; -webkit-mask-repeat: no-repeat !important; mask-repeat: no-repeat !important; }
/* the masked partial casts its shadow from its parent, so the shadow fades with it (a shadow drawn inside the mask
   would be clipped to the image box and show a faint hard-edged rectangle) */
.soft-cut { filter: none !important; }
:has(> img.soft-cut) { filter: drop-shadow(0 1px 1px rgba(30,22,12,.38)) drop-shadow(0 3px 4px rgba(40,28,14,.22)); }
/* v24 t118u: the landing card's years-lived watches are big, high-contrast dials, so a 45% fade still read as a cut
   there; they fade over the last 75% of what shows (set --soft on any row that needs a longer fade). */
.lv-row.watches, .ir-life { --soft: 75%; }
.ir-war .lv-row, .ir-wrap .lv-row.icons { --soft: 60%; }

/* v26 t129u: the page dots + arrows sit ~15px above the line where the footer scene finishes fading in (the --sfm
   mask is fully opaque at 27% of the footer's height). In terms of --foot, so it holds on any size / resize. */
.result-screen { --navlift: calc(var(--foot) * .73 + 15px - (var(--nav) - 36px) / 2); }
.deck-nav, .result-screen.float .deck-nav { bottom: var(--navlift); }

/* v26 t130u: the full timeline runs across the top of the story (dark band, css/timeline.css .rs-tl); the cards
   start below it and its big year overlaps the top of the story globe (js/timeline.js places it). */
.result-screen { --tlh: min(calc(10.6vw - 4px), 166px); }
@media (min-width: 741px) {
  .result-screen .card2.place { top: 6px; }                       /* was pulled up level with the header; the band is there now */
  .pc-globe { margin-top: 0; }                                    /* v42: the year is in the timeline pill, no extra gap */
}
.result-screen .deck { top: calc(var(--top) + var(--tlh)); }
@media (max-width: 740px) { .result-screen { --tlh: 86px; } }

/* v26 t134u: a story opened from Explore has no "Spin again"; a bare back arrow at the top right returns to Explore */
body.from-explore #again-btn { display: none !important; }
#ex-return { display: none; }
body.from-explore #ex-return { display: grid; place-items: center; position: absolute; top: calc(var(--top) / 2); right: clamp(10px, 2vw, 28px); translate: 0 -50%;
  width: 48px; height: 48px; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; border-radius: 50%; cursor: pointer; color: #2b2116;
  filter: drop-shadow(0 2px 3px rgba(40,28,14,.35)) drop-shadow(0 0 6px rgba(255,250,238,.7)); }
body.from-explore #ex-return::before, body.from-explore #ex-return::after { display: none; }
body.from-explore #ex-return svg { width: 28px; height: 28px; }
body.from-explore #ex-return:hover { color: #000; } body.from-explore #ex-return:active { translate: -2px -50%; }
body.from-explore #ex-return:focus-visible { outline: 2px solid #b0782a; outline-offset: 2px; }

/* v27 t136u: the war field (viz.js warPlan/warDraw): one canvas per row, height set from the shared mass scale */
.ir-war .lv-row.icons.wf { display: block; width: 100%; position: relative; min-height: 0; overflow: visible; }
.ir-war .lv-row.icons.wf > .wf-cv { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; }
.vz-area { overflow: hidden; } /* v44 t167u: the drop never paints over the title or the nav */
.ir-war .lv-row.wf-dom .wf-ic { position: absolute; display: block; margin: 0; flex: none; height: auto; opacity: 0;
  transform: translate3d(0, var(--drop-from, -16px), 0) scale(.96);
  animation: lv-drop 560ms cubic-bezier(.2,.75,.25,1.12) both;
  animation-delay: calc(80ms + var(--i) * min(70ms, 1400ms / max(var(--n), 1))); }
.ir-war .lv-row.wf-dom .wf-ic img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; display: block; }

/* ================= v32 t143u: story pages that always fit, with a little more colour in the type =================
   js/game.js pins each story page's text between the header timeline and the dots row (--st-pt / --st-pb, local px
   inside the zoomed card) and fits the story on one or two pages; js/story-text.js tags the highlights. */
.result-screen .card2.story.framed .ci { padding-top: var(--st-pt, 0px); padding-bottom: var(--st-pb, 0px); }
.result-screen .card2.story.framed .story-text { margin-bottom: 0; padding-top: 0; }
.result-screen .card2.story.framed .page-count { margin: .5em 0 0; flex: 0 0 auto; }
.result-screen .card2.story.framed.one .page-count { display: none; }
.story-text { --st-ox: #7a2b1f; --st-gb: #86592a; }
.story-text p, .story-text p.st-end { text-wrap: pretty; }
/* drop cap in oxblood, the opening clause in small caps (replaces the old whole-first-line small caps) */
.story-text.first p:first-child::first-line { font-variant-caps: normal; letter-spacing: normal; }
.story-text.first p:first-child::first-letter { color: var(--st-ox); }
.story-text .st-lead { font-variant-caps: all-small-caps; letter-spacing: .055em; font-size: 1.07em; color: #3a2a18; }
.story-text .st-name { font-weight: 600; color: var(--st-ox); }
.story-text .st-year { font-weight: 600; color: var(--st-ox); font-variant-numeric: lining-nums; white-space: nowrap; }
.story-text .st-num { font-weight: 600; color: #3a2a18; font-variant-numeric: lining-nums; }
.story-text .st-place { font-style: italic; color: var(--st-gb); }
.story-text .st-role { font-variant-caps: all-small-caps; letter-spacing: .05em; font-weight: 600; color: var(--st-gb); }
.story-text .st-cause { font-weight: 600; color: var(--st-ox); }
.story-text .st-q { font-style: italic; color: #4a2a1a; }
.story-text b { font-weight: 600; color: #3a2a18; }
.story-text b .st-year, .story-text b .st-name { font-weight: 700; }
/* the one sentence that is mostly someone's own words, set off between two short gold rules */
.story-text p.st-pull { position: relative; margin: .95em auto; max-width: 30em; padding: .5em 1.2em; text-align: center; text-wrap: balance;
  font-family: "IM Fell English", serif; font-style: italic; font-size: calc(var(--sfs, 18px) * 1.1); line-height: 1.4; color: var(--st-ox); }
.story-text p.st-pull::before, .story-text p.st-pull::after { content: ""; position: absolute; left: 50%; width: 5.5em; height: 1px; margin-left: -2.75em;
  background: linear-gradient(90deg, rgba(134,89,42,0), rgba(134,89,42,.65) 30%, rgba(134,89,42,.65) 70%, rgba(134,89,42,0)); }
.story-text p.st-pull::before { top: 0; } .story-text p.st-pull::after { bottom: 0; }
.story-text p.st-pull .st-q { font-style: italic; color: inherit; }
.story-text p.st-end .st-cause { font-style: italic; }
@media (max-width: 740px) { .story-text p.st-pull { padding: .4em .4em; } }
/* the measure is fixed in local px (64ch at the 19px size), so a smaller type size gets more words per line, not a narrower column */
.result-screen .card2.story.framed .story-text { max-width: 620px; }
.result-screen .card2.story.framed .story-text p { line-height: var(--slh, 1.52); }
.result-screen .card2.story.framed .story-text p + p { margin-top: var(--spg, .95em); }
.result-screen .card2.story.framed .story-text p.st-end { margin-top: calc(var(--spg, .95em) + .3em); padding-top: .55em; line-height: calc(var(--slh, 1.52) - .1); }
.result-screen .card2.story.framed .story-text p.st-pull { margin-top: var(--spg, .95em); margin-bottom: 0; padding-top: .45em; padding-bottom: .45em; line-height: calc(var(--slh, 1.52) - .12); }
.result-screen .card2.story.framed .story-text p.st-pull + p { margin-top: var(--spg, .95em); }
/* desktop: the folio number hangs just below the text's right edge (in the gap above the dots row), so it costs no line */
@media (min-width: 741px) {
  .result-screen .card2.story.framed .ci { position: absolute; }
  .result-screen .card2.story.framed .page-count { position: absolute; right: max(clamp(24px, 3.6vw, 58px), calc((100% - 620px) / 2)); bottom: calc(var(--st-pb, 0px) - 1.35em); margin: 0; font-size: 12.5px; }
}
/* two columns on a wide but short window: like a book's facing columns, with a faint gold rule between them */
.result-screen .card2.story.framed .story-text.cols2 { max-width: none; columns: 2; column-gap: 2.6em; column-fill: balance; column-rule: 1px solid rgba(134,89,42,.22); }
.story-text.cols2 p, .story-text.cols2 p.st-end { orphans: 2; widows: 2; }
.story-text.cols2 p.st-pull, .story-text.cols2 p.st-end { break-inside: avoid; }
.story-text.cols2 p.st-end { max-width: none; }
.result-screen .card2.story.framed .story-text.cols2 p:first-child { margin-top: 0; }
@media (min-width: 741px) { .result-screen .card2.story.framed:has(.cols2) .page-count { right: clamp(24px, 3.6vw, 58px); } }
