/* Home: intro and the two home views, in the "Map style" from the Portfolio
   Figma file (Research page, 02 · Map style; Town components in the Design
   system page): warm paper, ink, halftone,
   condensed signage, one red. The short names below are aliases for the
   shared tokens in tokens.css, so the town and the inner pages use one set. */

body.home {
  /* aliases for tokens.css (--rule, --f-sign, --f-hand, --ease-out and the
     durations come straight from the tokens) */
  --paper: var(--c-paper);
  --paper-2: var(--c-paper-2);
  --card: var(--c-card);
  --ink: var(--c-ink);
  --ink-2: var(--c-ink-2);
  --red: var(--c-art);
  --on-red: var(--c-on-art);
  --mute: var(--c-muted);
  --ease-io: var(--ease-in-out);
  --lift-1: 0 1px 0 rgba(22, 20, 19, .06), var(--shadow-card);
  --lift-2: 0 1px 0 rgba(22, 20, 19, .06), 6px 14px 26px -12px rgba(22, 20, 19, .55);
  --hdr-h: 72px;
  --title-w: 0px; /* the vertical HELLO, WORLD was removed (11 Nov); overlays now start at the left gutter */
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  overflow: hidden;
}
html, body { height: 100%; }
body.home.is-read { overflow: auto; }
:where(body.home) button { font: inherit; color: inherit; }
body.home a:focus-visible, body.home button:focus-visible, body.home [tabindex]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 12px 14px; background: var(--ink); color: var(--card); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Paper grain over everything */
body.home::after { content: ""; position: fixed; inset: 0; z-index: 150; pointer-events: none; opacity: .5; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .35 0 0 0 0 .3 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ------------------------------------------------------------------ Header
   The black bar and its menu live in nav.css. On the town it floats over the map (fixed) and sits
   under the town's own overlays (sheets, title cards, the intro). */
body.home .nb { z-index: 50; }
body.home .nb-menu { z-index: 49; }
body.home .nb-dim { z-index: 48; }
body.home.is-explore .nb { position: fixed; left: 0; right: 0; }

.hdr { position: sticky; top: 0; z-index: 30; height: var(--hdr-h); padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--paper); }
.is-explore .hdr { position: fixed; left: 0; right: 0; background: transparent; pointer-events: none; }
.is-explore .hdr > * { pointer-events: auto; }
.hdr__brand { display: flex; align-items: center; gap: 18px; text-decoration: none; color: var(--ink); }
.hdr__logo { font-family: var(--f-sign); font-size: 26px; line-height: 1; text-transform: uppercase; }
.hdr__meta { font-family: var(--f-mono); font-size: 12px; line-height: 1.5; }
.is-explore .hdr__brand { visibility: hidden; }
.hdr__right { display: flex; align-items: center; gap: 12px; }
.seg { display: flex; background: var(--card); border: var(--rule); }
.seg > * { white-space: nowrap; height: 42px; padding: 0 18px; display: inline-flex; align-items: center; border: 0; border-left: var(--rule); background: none; font-family: var(--f-mono); font-size: 14px; color: var(--ink); text-decoration: none; cursor: pointer; transition: background-color var(--dur-hover), color var(--dur-hover), scale var(--dur-press) var(--ease-out); }
.seg > :first-child { border-left: 0; }
.seg > [aria-selected="true"], .seg > .is-dark { background: var(--ink); color: var(--card); }
@media (hover: hover) and (pointer: fine) {
  .seg > :hover { background: var(--paper); }
  .seg > [aria-selected="true"]:hover { background: var(--ink); }
  .seg > .is-dark:hover { background: var(--red); color: var(--on-red); }
}
.inv { width: 45px; height: 45px; display: grid; place-items: center; background: var(--card); border: 1.5px dashed var(--ink); }
.inv svg { width: 24px; height: 24px; }
.inv.is-new { animation: invPop .7s var(--ease-out); }
@keyframes invPop { 0% { transform: scale(.3) rotate(-20deg); } 60% { transform: scale(1.2) rotate(6deg); } 100% { transform: none; } }

.view { display: none; }
.is-explore #view-explore, .is-read #view-read { display: block; }
/* switching views: the incoming view fades and rises into place */
.view.is-arriving { animation: arrive var(--dur-ui) var(--ease-out) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(16px); } }

/* ------------------------------------------------------------------ 03 Town Square */
.town { position: relative; height: 100vh; height: 100dvh; overflow: hidden; overflow: clip; background: var(--paper); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.town.is-dragging { cursor: grabbing; }
.town__world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.town__world.is-flying { transition: transform 1.1s var(--ease-in-out); }
.town__svg { position: absolute; left: 0; top: 0; overflow: visible; }

.town__meta { position: absolute; z-index: 3; top: calc(var(--hdr-h) + 20px); left: calc(28px + var(--title-w)); font-family: var(--f-mono); font-size: 13px; line-height: 1.65; pointer-events: none; }
.town__meta b { font-weight: 500; letter-spacing: .04em; }

.feat { cursor: pointer; }
.feat .top { transition: fill var(--dur-hover); }
.feat .lift { transition: transform .25s var(--ease-out); }
.feat.is-near .top, .feat.is-focus .top { fill: var(--hot, #C8463A); }
.feat.is-near .lift, .feat.is-focus .lift { transform: translateY(-6px); }
@media (hover: hover) and (pointer: fine) {
  .feat:hover .top { fill: var(--hot, #C8463A); }
  .feat:hover .lift { transform: translateY(-6px); }
}
/* arrival: a red outline around the building pulses twice */
.feat .flash-ring { opacity: 0; }
.feat.is-flash .flash-ring { animation: ringPulse .7s ease-in-out 4 alternate; }
@keyframes ringPulse { to { opacity: 1; } }

/* Signs on poles */
.sign { position: absolute; z-index: 1; left: 0; top: 0; transform: translate(-50%, -100%) rotate(var(--r, -2deg)); transform-origin: 50% 100%; padding: 10px 16px 9px; min-width: 150px; background: var(--card); border: 1.5px solid var(--ink); box-shadow: var(--lift-1); color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: transform .3s var(--ease-out), box-shadow .3s; }
body.home .sign:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.sign::after { content: ""; position: absolute; left: var(--px, 50%); top: 100%; width: 1.5px; height: var(--pole, 34px); background: var(--ink); }
.sign__t { display: block; font-family: var(--f-sign); font-size: 34px; line-height: 1; text-transform: uppercase; }
.sign__t::after { content: ""; display: block; height: 3px; margin: 7px 0 6px; background: var(--red); }
.sign__s { display: block; font-family: var(--f-mono); font-size: 13px; white-space: nowrap; }
.sign.is-hot, .sign:focus-visible { transform: translate(-50%, -100%) rotate(0deg) translateY(-8px) scale(1.05); box-shadow: var(--lift-2); }
/* unfinished work: a pencilled sign, lighter and dashed, no red rule */
.sign--brand { min-width: 0; padding: 14px 28px 12px; text-align: center; background: var(--red); color: var(--on-red); border-width: 2px; border-style: solid; border-color: var(--ink); box-shadow: var(--lift-1); }
.sign--brand .sign__t { font-size: 40px; }
.sign--brand .sign__t::after { display: none; }
.sign--brand .sign__s { letter-spacing: .14em; }
.sign--brand::after { left: 22%; width: 3px; }
.sign--brand::before { content: ""; position: absolute; right: 22%; top: 100%; width: 3px; height: var(--pole, 34px); background: var(--ink); }

/* Characters */
.npc, .player { position: absolute; width: 30px; height: 58px; transform: translate(-50%, -100%); pointer-events: none; }
.player { left: 0; top: 0; will-change: translate; }
.npc { pointer-events: auto; cursor: pointer; }
.npc svg, .player svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.npc__body { animation: idle 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes idle { 50% { transform: translateY(-2px); } }
.player.is-walking .player__body { animation: walk .3s steps(2) infinite; }
@keyframes walk { 50% { transform: translateY(-3px); } }
.player__ring { position: absolute; left: 50%; bottom: -14px; width: 70px; height: 35px; margin-left: -35px; border: 2.5px solid var(--ink); border-radius: 50%; }
.player__label { position: absolute; left: 100%; top: 14px; margin-left: 22px; padding: 4px 8px 3px; background: var(--ink); color: var(--card); font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; white-space: nowrap; transition: opacity .4s; }
.player__label::before { content: ""; position: absolute; right: 100%; top: 50%; width: 16px; height: 1.5px; background: var(--ink); }
.npc__label { position: absolute; left: 100%; top: 8px; margin-left: 8px; font-family: var(--f-mono); font-size: 12px; white-space: nowrap; }
.dust { position: absolute; width: 90px; height: 44px; transform: translate(-50%, -50%) scale(.3); border-radius: 50%; border: 2px dashed var(--ink); opacity: 0; pointer-events: none; }
.dust.is-on { animation: dust .7s var(--ease-out); }
@keyframes dust { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.3); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.7); } }

.bubble { position: absolute; z-index: 2; transform: translate(-8%, -100%) rotate(-1.5deg); max-width: 250px; padding: 10px 14px; background: var(--card); border: 1.5px solid var(--ink); box-shadow: var(--lift-1); font-size: 14px; font-weight: 500; line-height: 1.35; pointer-events: none; transition: opacity .3s, transform .3s var(--ease-out); }
.bubble::after { content: ""; position: absolute; left: 20px; bottom: -9px; width: 14px; height: 14px; background: var(--card); border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); }
.bubble b { display: block; font-family: var(--f-sign); font-weight: 400; font-size: 15px; letter-spacing: .05em; color: var(--ink); margin-bottom: 2px; }
.bubble.is-hidden { opacity: 0; transform: translate(-8%, -90%) rotate(-1.5deg); }

.door-prompt { position: absolute; z-index: 2; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; background: var(--ink); color: var(--card) !important; border: 0; font-family: var(--f-mono) !important; font-size: 12px !important; white-space: nowrap; cursor: pointer; box-shadow: var(--lift-1); }
.door-prompt svg { width: 24px; height: 24px; transform: rotate(-90deg); }
.door-prompt circle { fill: none; stroke-width: 3; }
.door-prompt .ring-bg { stroke: rgba(247, 243, 235, .25); }
.door-prompt .ring { stroke: var(--red); stroke-dasharray: 57; stroke-dashoffset: 57; }
.door-prompt kbd { font-family: var(--f-mono); font-size: 12px; padding: 0 5px; border: 1px solid rgba(247, 243, 235, .5); }

.hover-card { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; width: 260px; padding: 14px 16px 12px; background: var(--card); border: 1.5px solid var(--ink); box-shadow: var(--lift-1); opacity: 0; transform: scale(.96) rotate(-1deg); transform-origin: 0 0; transition: opacity var(--dur-hover) var(--ease-out), transform var(--dur-hover) var(--ease-out); }
.hover-card.is-on { opacity: 1; transform: rotate(-1deg); }
.hover-card__k { font-family: var(--f-mono); font-size: 12px; color: var(--mute); margin-bottom: 8px; }
.hover-card__t { font-family: var(--f-sign); font-size: 30px; line-height: 1.05; margin: 0 0 4px; text-transform: uppercase; }
.hover-card__d { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.hover-card__cta { margin-top: 10px; padding-top: 9px; border-top: 3px solid var(--red); font-family: var(--f-mono); font-size: 12px; }
.hover-card__cta.is-soon { border-top-color: var(--mute); color: var(--mute); }

/* HUD */
.hud-hint { position: absolute; z-index: 4; left: calc(28px + var(--title-w)); bottom: 84px; display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--card); border: var(--rule); transform: rotate(-1.5deg); font-family: var(--f-mono); font-size: 12px; }
.hud-hint kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border: 1px solid var(--ink); border-bottom-width: 2px; font-family: var(--f-mono); font-size: 12px; background: var(--paper-2); }
.hud-hint .touch { display: none; }
.replay { position: absolute; z-index: 4; right: 28px; top: 88px; height: 44px; padding: 0 12px; border: var(--rule); background: var(--card); font-family: var(--f-mono); font-size: 12px; cursor: pointer; }
.plate { position: absolute; z-index: 4; right: 28px; bottom: 26px; width: 300px; }
.plate__cap { display: flex; gap: 14px; align-items: flex-end; margin-top: 12px; font-family: var(--f-mono); font-size: 12px; line-height: 1.5; }
.plate__cap svg { width: 52px; height: 40px; flex: none; }
.plate__cap p { margin: 0; }
.minimap { background: var(--card); border: var(--rule); padding: 8px 10px 10px; }
.minimap__head { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; margin-bottom: 6px; }
.minimap__zoom { display: flex; gap: 4px; }
.minimap__zoom button { width: 24px; height: 24px; border: 1px solid var(--ink); background: var(--paper-2); cursor: pointer; font-family: var(--f-mono); line-height: 1; }
.minimap__zoom .minimap__plan { width: auto; padding: 0 8px; font-size: 12px; letter-spacing: .08em; margin-right: 4px; }
.plan-fab { display: none; }
.minimap svg { display: block; width: 100%; height: auto; cursor: pointer; }

/* Drop (from the reference: DESCENDING… 48%) */
.descend { position: fixed; z-index: 96; left: 50%; top: calc(var(--hdr-h) + 28px); padding: 10px 18px 8px; background: var(--card); border: var(--rule); transform: translateX(-50%) rotate(-3deg); font-family: var(--f-sign); font-size: 24px; letter-spacing: .02em; opacity: 0; transition: opacity .3s; pointer-events: none; }
.descend.is-on { opacity: 1; }
.sunout { position: fixed; z-index: 95; left: 50%; top: 50%; width: 240vmax; height: 240vmax; margin: -120vmax 0 0 -120vmax; border-radius: 50%; background: var(--red); pointer-events: none; }
.sunout::after { content: ""; position: absolute; inset: -4%; border: 1.5px solid var(--ink); border-radius: 50%; transform: translate(2%, -1%); }
.sunout.is-shrink { transform: scale(0); opacity: .9; transition: transform 1.9s var(--ease-in-out), opacity 1.9s; }
.sunout[hidden] { display: none; }

/* Fast travel */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(22, 20, 19, .45); opacity: 0; pointer-events: none; transition: opacity var(--dur-modal) var(--ease-out); }
.sheet.is-open { opacity: 1; pointer-events: auto; }
.sheet__panel { width: min(900px, 100%); max-height: calc(100dvh - 48px); overflow: auto; background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--lift-1); transform: translateY(16px) rotate(-.5deg); transition: transform var(--dur-modal) var(--ease-drawer); }
.sheet.is-open .sheet__panel { transform: none; }
.sheet__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: var(--rule); }
.sheet__head h2 { margin: 0; font-family: var(--f-sign); font-weight: 400; font-size: 40px; text-transform: uppercase; }
.sheet__head h2 small { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; margin-left: 12px; vertical-align: 10px; color: var(--mute); text-transform: none; }
.sheet__close { width: 42px; height: 42px; border: var(--rule); background: var(--card); cursor: pointer; font-size: 20px; }
.plan { display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; padding: 24px; }
.plan__map { background: var(--card); border: var(--rule); padding: 8px; }
.plan__map svg { width: 100%; height: auto; display: block; }
.plan__map .pin { cursor: pointer; }
.plan__map .pin:focus rect { stroke-width: 3; }
.plan__map .pin:focus { outline: none; }
.plan__map .pin:focus-visible rect { stroke: var(--ink); stroke-width: 3; }
.plan__list { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.plan__list li { border-bottom: 1px solid rgba(22, 20, 19, .2); }
.plan__list button { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; padding: 9px 6px; border: 0; background: none; text-align: left; cursor: pointer; }
.plan__list .n { font-family: var(--f-mono); font-size: 13px; color: var(--mute); }
.plan__list .is-open .n { color: var(--red); }
.plan__list .t { font-family: var(--f-sign); font-size: 20px; text-transform: uppercase; }
.plan__list .is-draft .t { color: var(--mute); }
.plan__list .m { font-family: var(--f-mono); font-size: 12px; color: var(--mute); }
/* the list settles in, one row after another, as the sheet opens */
.sheet.is-open .plan__list li { animation: listIn var(--dur-ui) var(--ease-out) both; animation-delay: calc(60ms + var(--i, 0) * 25ms); }
@keyframes listIn { from { opacity: 0; transform: translateY(6px); } }

/* Title card */
/* Title card. --tc is its whole time on screen: about 1.1s the first time, 0.6s after.
   Hidden from assistive tech (visibility) until it is used. */
.titlecard { --tc: 1100ms; position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; overflow: hidden; background: var(--ink); color: var(--card); clip-path: circle(0% at var(--cx, 50%) var(--cy, 50%)); pointer-events: none; visibility: hidden; }
.titlecard.is-quick { --tc: 600ms; }
.titlecard.is-in { visibility: visible; clip-path: circle(150% at var(--cx, 50%) var(--cy, 50%)); transition: clip-path calc(var(--tc) * .6) var(--ease-in-out); pointer-events: auto; cursor: pointer; }
.titlecard.is-stay { cursor: default; }
.titlecard::before { content: ""; position: absolute; width: 62vmin; height: 62vmin; border-radius: 50%; background: var(--red); right: -10vmin; top: -14vmin; }
.titlecard::after { content: ""; position: absolute; width: 74vmin; height: 74vmin; border-radius: 50%; border: 1.5px solid var(--card); right: -18vmin; top: -18vmin; opacity: .45; }
.titlecard__inner { position: relative; z-index: 1; padding: 24px; max-width: 960px; width: 100%; }
.titlecard__k { margin-top: 18px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .14em; }
.titlecard__skip { margin: 14px 0 0; font-family: var(--f-mono); font-size: 12px; color: #CFC8BB; }
.titlecard.is-stay .titlecard__skip { display: none; }
.titlecard__t { margin: 0; font-family: var(--f-sign); font-weight: 400; font-size: clamp(72px, 14vw, 190px); line-height: .9; text-transform: uppercase; }
.titlecard__t::after { content: ""; display: block; width: 40%; height: 8px; margin-top: 18px; background: var(--red); }
.titlecard__d { margin: 10px 0 0; font-size: 18px; max-width: 520px; color: #CFC8BB; }
.titlecard__actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.titlecard__bar { width: 260px; height: 2px; margin-top: 28px; background: rgba(247, 243, 235, .2); overflow: hidden; }
.titlecard__bar span { display: block; height: 100%; width: 100%; background: var(--card); transform: scaleX(0); transform-origin: left; }
.titlecard.is-in .titlecard__bar span { transform: scaleX(1); transition: transform calc(var(--tc) * .7) calc(var(--tc) * .25) linear; }
.titlecard__inner > * { opacity: 0; transform: translateY(16px); }
.titlecard.is-in .titlecard__inner > * { opacity: 1; transform: none; transition: opacity var(--dur-ui) calc(var(--tc) * .2), transform var(--dur-ui) calc(var(--tc) * .2) var(--ease-out); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 26px; border: var(--rule); background: var(--card); color: var(--ink); font-family: var(--f-mono); font-size: 15px; text-decoration: none; cursor: pointer; box-shadow: var(--lift-1); transition: transform var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out), background-color var(--dur-hover), color var(--dur-hover), scale var(--dur-press) var(--ease-out); }
.btn--ink { background: var(--ink); color: var(--card); box-shadow: var(--lift-1); }
.btn--card { border-color: var(--card); box-shadow: var(--lift-1); }
.btn--ghost { background: transparent; color: var(--card); border-color: var(--card); box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); box-shadow: var(--lift-2); }
  .btn--ink:hover { background: var(--red); border-color: var(--red); color: var(--on-red); }
  .btn--ghost:hover { background: var(--card); color: var(--ink); box-shadow: none; }
  .replay:hover, .pill:hover, .sheet__close:hover, .minimap__zoom button:hover { background: var(--ink); color: var(--card); }
  .plan__list button:hover { background: var(--card); }
}
/* press: a small squeeze, using scale so it never fights a positioning transform */
.btn:active { scale: .97; box-shadow: none; }
.seg > :active, .pill:active, .replay:active, .sheet__close:active, .minimap__zoom button:active, .plan-fab:active, .pull:active, .plan__list button:active { scale: .97; }
.pill, .replay, .sheet__close, .minimap__zoom button, .plan-fab { transition: background-color var(--dur-hover), color var(--dur-hover), scale var(--dur-press) var(--ease-out); }
.plan__list button { transition: background-color var(--dur-hover), scale var(--dur-press) var(--ease-out); }

/* ------------------------------------------------------------------ 04 Contents */
.contents { min-height: calc(100vh - var(--hdr-h)); min-height: calc(100dvh - var(--hdr-h)); padding: 32px 28px 48px; background: var(--paper); }
.contents__inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 340px 1fr; gap: 56px; }
.contents__side { position: sticky; top: calc(var(--hdr-h) + 20px); align-self: start; }
.contents__side h2 { margin: 18px 0 0; font-family: var(--f-sign); font-weight: 400; font-size: 88px; line-height: .9; text-transform: uppercase; }
.contents__main { min-width: 0; }
.vol + .vol { margin-top: 56px; }

.vol__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 12px; border-bottom: 3px solid var(--ink); }
.vol__head h2 { margin: 0; font-family: var(--f-sign); font-weight: 400; font-size: 46px; line-height: 1; text-transform: uppercase; }

.vol__head p { margin: 0; font-family: var(--f-mono); font-size: 12px; text-align: right; line-height: 1.6; }
.issues { list-style: none; margin: 0; padding: 0; }
/* Figma: Town/Issue row */
.issue { border-bottom: 1px solid rgba(22, 20, 19, .25); }
.issue--dashed { border-bottom: 1.5px dashed var(--ink); }
.issue__row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 20px 10px; color: var(--ink); text-decoration: none; transition: background-color var(--dur-hover) var(--ease-out), transform .25s var(--ease-out); }
.issue__n { align-self: start; font-family: var(--f-mono); font-size: 18px; }
.issue__b { display: grid; gap: 4px; min-width: 0; }
.issue__t { font-family: var(--f-sign); font-size: 32px; line-height: 1; text-transform: uppercase; }
.issue__d { font-size: 14px; line-height: 1.4; color: var(--ink); }
.issue__m { margin-top: 12px; font-family: var(--f-mono); font-size: 12px; line-height: 1.5; letter-spacing: .04em; color: var(--mute); }
.issue__soon { font-family: var(--f-mono); font-size: 14px; color: var(--mute); text-transform: uppercase; white-space: nowrap; }
a.issue__row:active { transform: scale(.995); }
@media (hover: hover) and (pointer: fine) { .issue--open a.issue__row:hover, .issue--dashed a.issue__row:hover { background: var(--card); transform: translateX(6px); } }

.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 28px; border-top: var(--rule); font-family: var(--f-mono); font-size: 12px; }
.foot button { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.is-explore .foot { display: none; }

/* ------------------------------------------------------------------ Intro */
.intro { position: fixed; inset: 0; z-index: 100; overflow: hidden; background: var(--paper); color: var(--ink); }
.intro[hidden] { display: none; }
.intro__brand { position: absolute; left: 28px; top: 22px; z-index: 10; font-family: var(--f-sign); font-size: 26px; text-transform: uppercase; }
.intro__chrome { position: absolute; top: 18px; right: 28px; z-index: 10; display: flex; gap: 10px; }
.pill { height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border: var(--rule); background: var(--card); color: var(--ink); font-family: var(--f-mono); font-size: 12px; cursor: pointer; }
.pill b { font-weight: 500; }
.scene { position: absolute; inset: 0; z-index: 1; display: none; }
.scene.is-on { display: flex; }

/* 00a: the sun is the logo mark */
.mark { position: fixed; left: 50%; top: 50%; z-index: 3; width: 240px; height: 240px; margin: -120px 0 0 -120px; transition: transform 1.1s var(--ease-in-out); }
.mark__inner { position: absolute; inset: 0; }
.mark__sun { position: absolute; inset: 16px; border-radius: 50%; background: var(--red); transform: scale(0); animation: sunIn 1.2s .3s var(--ease-out) forwards; overflow: hidden; }
@keyframes sunIn { to { transform: scale(1); } }
.mark__sun img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; opacity: 0; transition: opacity .8s; }
.mark.has-img .mark__sun img { opacity: 1; }
.mark__ring { position: absolute; left: -10px; top: -18px; width: 270px; height: 270px; overflow: visible; }
.mark__ring circle { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease-in-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.mark.is-npc .mark__inner { animation: idle 2.6s ease-in-out infinite; }
.loadline { position: fixed; left: 28px; bottom: 28px; z-index: 4; padding: 10px 18px 8px; background: var(--card); border: var(--rule); transform: rotate(-3deg); font-family: var(--f-sign); font-size: 24px; letter-spacing: .02em; transition: opacity .4s; }
.loadline__bar { display: block; height: 3px; margin-top: 6px; background: rgba(22, 20, 19, .15); }
.loadline__bar span { display: block; height: 100%; width: 100%; background: var(--red); transform: scaleX(var(--k, 0)); transform-origin: left; transition: transform .3s var(--ease-out); }

/* 00b */
.scene--hello { flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center; }
.hello__spacer { width: 84px; height: 84px; flex: none; }
.hello__h { margin: 0; min-height: .9em; font-family: var(--f-sign); font-weight: 400; font-size: clamp(72px, 15vw, 230px); line-height: .9; white-space: nowrap; text-transform: uppercase; }
.hello__h .caret { display: inline-block; width: .3em; height: .09em; margin-left: .04em; background: var(--ink); animation: blink 1s steps(1) infinite; }
.hello__sub { margin: 0; min-height: 1.4em; font-family: var(--f-mono); font-size: clamp(16px, 1.8vw, 22px); }
.hello__sub .cursor { color: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hello__choice { display: grid; grid-template-columns: auto auto; gap: 14px 22px; margin-top: 14px; }
.hello__choice > * { opacity: 0; transform: translateY(16px); }
.hello__choice.is-in > * { opacity: 1; transform: none; transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.hello__choice.is-in > :nth-child(2), .hello__choice.is-in > :nth-child(4) { transition-delay: .12s; }
.hello__choice.is-in > :nth-child(3), .hello__choice.is-in > :nth-child(4) { transition-delay: .25s; }
.hello__choice .btn { height: 62px; padding: 0 30px; font-size: 16px; }
.hello__choice .btn svg { width: 20px; height: 20px; }
.hello__hint { font-family: var(--f-mono); font-size: 12px; color: var(--mute); }
.hello__foot { position: absolute; bottom: 28px; left: 0; right: 0; font-family: var(--f-mono); font-size: 12px; color: var(--mute); opacity: 0; transition: opacity 1s .6s; }
.hello__foot.is-in { opacity: 1; }
.hello__foot svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }

/* 01 Cartridge */
.cart { position: relative; padding: 3.6cqw 3.6cqw 5.6cqw; border-radius: 2.8cqw 2.8cqw 1.4cqw 1.4cqw; background: var(--ink); box-shadow: 0 2px 0 rgba(255,255,255,.06) inset, 1cqw 2.4cqw 4cqw -1.6cqw rgba(22, 20, 19, .6); }
.cart::before { content: ""; position: absolute; left: 50%; bottom: 1.6cqw; width: 36%; height: 2.2cqw; transform: translateX(-50%); background: repeating-linear-gradient(90deg, #2A2725 0 1cqw, #4A4541 1cqw 1.6cqw); }
.cart::after { content: "HW-0001 · HELLO, WORLD ENTERTAINMENT SYSTEM"; position: absolute; left: 3.6cqw; top: 1.1cqw; font-family: var(--f-mono); font-size: 1.1cqw; letter-spacing: .2em; color: #9C958A; }
.cart__arrow { position: absolute; right: 3.6cqw; top: .9cqw; font-family: var(--f-mono); font-size: 1.2cqw; color: #9C958A; }
.cart__label { position: relative; aspect-ratio: 931 / 506; overflow: hidden; background: var(--card); }
.cart__art { position: absolute; left: 0; right: 0; top: 0; height: 87.7%; overflow: hidden; background: var(--paper-2); }
.cart__art img, .cart__art svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.cart__art img { z-index: 1; }
.dialog { position: absolute; left: 2.3cqw; top: 35.6cqw; z-index: 2; min-width: 45cqw; padding: 1.8cqw 2cqw 1.4cqw; background: var(--card); border: .16cqw solid var(--ink); box-shadow: var(--lift-2); transform: rotate(-1deg); }
.dialog__tag { position: absolute; left: 1.9cqw; top: -1.7cqw; padding: .4cqw 1cqw .2cqw; background: var(--ink); color: var(--card); font-family: var(--f-sign); font-size: 1.6cqw; letter-spacing: .08em; }
.dialog__line { margin: 0; font-family: var(--f-sign); font-weight: 400; font-size: 2.9cqw; line-height: 1.1; text-transform: uppercase; min-height: 1.1em; }
.dialog__sub { margin: .6cqw 0 0; font-family: var(--f-mono); font-size: max(12px, 1.5cqw); display: flex; gap: .8cqw; align-items: center; }
@keyframes bob { 50% { transform: translateY(.3cqw); } }
.strip { position: absolute; left: 2.8cqw; right: 2.8cqw; bottom: 1.6cqw; display: flex; align-items: center; gap: 2cqw; }
.strip__id { padding: .6cqw 1cqw; background: var(--ink); color: var(--card); font-family: var(--f-mono); font-size: 1.2cqw; white-space: nowrap; }
.bar { position: relative; flex: 1; height: 2.4cqw; border: .16cqw solid var(--ink); background: var(--card); }
.bar__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transform: scaleX(0); transform-origin: left; background: radial-gradient(circle, var(--ink) .2cqw, transparent .25cqw) 0 0 / .7cqw .7cqw; }
.bar__track { position: absolute; inset: 0; pointer-events: none; }
.bar__avatar { position: absolute; top: 50%; left: 0; width: 1.4cqw; height: 2cqw; transform: translate(-50%, -50%); }
.bar__avatar i { position: absolute; left: 0; top: 0; width: .2cqw; height: .2cqw; box-shadow:
  .4cqw 0 #161413, .6cqw 0 #161413, .8cqw 0 #161413,
  .2cqw .2cqw #161413, .4cqw .2cqw #161413, .6cqw .2cqw #161413, .8cqw .2cqw #161413, 1cqw .2cqw #161413,
  .4cqw .4cqw #EFD9CF, .6cqw .4cqw #EFD9CF, .8cqw .4cqw #EFD9CF, .2cqw .4cqw #161413, 1cqw .4cqw #161413,
  .4cqw .6cqw #EFD9CF, .6cqw .6cqw #EFD9CF, .8cqw .6cqw #EFD9CF, .2cqw .6cqw #161413, 1cqw .6cqw #161413,
  .2cqw .8cqw #AE2D23, .4cqw .8cqw #AE2D23, .6cqw .8cqw #161413, .8cqw .8cqw #AE2D23, 1cqw .8cqw #AE2D23,
  0 1cqw #AE2D23, .2cqw 1cqw #AE2D23, .4cqw 1cqw #AE2D23, .6cqw 1cqw #161413, .8cqw 1cqw #AE2D23, 1cqw 1cqw #AE2D23, 1.2cqw 1cqw #AE2D23,
  .2cqw 1.2cqw #AE2D23, .4cqw 1.2cqw #AE2D23, .6cqw 1.2cqw #161413, .8cqw 1.2cqw #AE2D23, 1cqw 1.2cqw #AE2D23,
  .4cqw 1.4cqw #161413, .8cqw 1.4cqw #161413, .4cqw 1.6cqw #161413, .8cqw 1.6cqw #161413,
  .2cqw 1.8cqw #161413, .4cqw 1.8cqw #161413, .8cqw 1.8cqw #161413, 1cqw 1.8cqw #161413; }
.bar.is-running .bar__avatar { animation: hop .3s steps(2) infinite; }
@keyframes hop { 50% { margin-top: -.3cqw; } }
.strip__status { min-width: 17cqw; font-family: var(--f-mono); font-size: 1.2cqw; white-space: nowrap; }
.strip__status.is-ready { color: var(--ink); animation: blink 1s steps(1) infinite; }
.strip__slot { min-width: 14cqw; padding: .6cqw 1cqw; border: .12cqw dashed var(--ink); background: var(--paper-2); color: var(--mute); font-family: var(--f-mono); font-size: 1.2cqw; text-align: center; white-space: nowrap; cursor: default; }
.strip__slot.is-ready { border-style: solid; background: var(--red); color: var(--on-red); cursor: pointer; }
.flash { position: absolute; inset: 0; z-index: 8; background: var(--card); opacity: 0; pointer-events: none; }
.flash.is-on { animation: flash .7s ease-out; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

/* 02 Comic */
.comic { position: relative; width: min(1360px, 100%, calc((100dvh - 156px) * 1.716)); display: grid; grid-template-columns: 1fr 1fr; gap: 1.5%; transform-origin: 75% 75%; }
.panel { position: relative; margin: 0; aspect-ratio: 670 / 390; overflow: hidden; border: 3px solid var(--ink); background: var(--paper-2); container-type: inline-size; opacity: 0; transform: translateX(-30px) rotate(-.6deg); }
.panel:nth-child(even) { transform: translateX(30px) rotate(.6deg); }
.panel.is-in { opacity: 1; transform: none; transition: opacity .6s var(--ease-out), transform .8s var(--ease-out); }
.get { position: absolute; z-index: 3; left: 50%; bottom: 7%; display: flex; align-items: center; gap: 12px; padding: 8px 18px 6px 10px; background: var(--red); color: var(--on-red); border: 2px solid var(--ink); box-shadow: var(--lift-1); font-family: var(--f-sign); font-size: clamp(16px, 3.4cqw, 26px); letter-spacing: .06em; white-space: nowrap; transform: translate(-50%, 170%) rotate(-2deg); }
.get svg { width: 1.6em; height: 1.6em; flex: none; background: var(--card); padding: 2px; }
.panel.is-in .get { transform: translate(-50%, 0) rotate(-2deg); transition: transform .5s 1s var(--ease-out); }

/* ------------------------------------------------------------------ Smaller screens */
@media (max-width: 1100px) {
  .town__meta { left: 20px; top: calc(var(--hdr-h) + 12px); font-size: 12px; }
  .hud-hint { left: 20px; bottom: 26px; }
}
@media (max-width: 900px) {
  body.home { --hdr-h: 60px; }
  .hdr { padding: 0 12px; gap: 8px; }
  .hdr__meta { display: none; }
  .hdr__logo { font-size: 20px; }
  .seg > * { height: 38px; padding: 0 9px; font-size: 12px; }
  .hdr__right { gap: 6px; }
  .hdr__brand { display: none; }
  .seg--nav .opt { display: none; }
  .inv { width: 40px; height: 40px; }
  /* the town's title column is gone at this width: keep the name and role line visible */
  .town__meta { display: block; left: 14px; top: calc(var(--hdr-h) + 4px); font-size: 12px; line-height: 1.5; padding: 6px 10px; background: rgba(247, 243, 235, .85); border: var(--rule); }
  .town__meta .town__years, .town__meta .loc { display: none; }
  .plate { display: none; }
  .plan-fab { display: inline-flex; align-items: center; position: absolute; z-index: 4; right: 14px; bottom: 120px; height: 38px; padding: 0 12px; border: var(--rule); background: var(--card); color: var(--ink); font-family: var(--f-mono); font-size: 12px; cursor: pointer; }
  .replay { top: auto; bottom: 72px; right: 14px; }
  .hud-hint { left: 14px; right: 14px; bottom: 18px; justify-content: center; transform: none; }
  .hud-hint .desk { display: none; }
  .hud-hint .touch { display: inline; }
  .sign { padding: 7px 10px 6px; min-width: 0; }
  .sign:not(.sign--brand)::before { content: ""; position: absolute; inset: -8px -4px; } /* larger tap area, same look */
  .contents__inner { grid-template-columns: 1fr; gap: 24px; }
  .contents__side { position: static; }
  .contents__inner { display: flex; flex-direction: column; }
  .contents__side, .contents__main { display: contents; }
  .contents__side > * { order: 2; }
  .contents__side h2 { order: 0; }
  #volumes { order: 3; margin-top: 8px; }
  .contents__side h2 { font-size: 72px; }
  .contents { padding: 20px 14px 32px; }
  .issue__row { grid-template-columns: 40px minmax(0, 1fr); gap: 6px 12px; padding: 16px 4px; }
  .issue__soon { grid-column: 2; font-size: 12px; }
  .issue__t { font-size: 28px; }
  .vol__head { flex-direction: column; align-items: flex-start; }
  .vol__head p { text-align: left; }
  .plan { grid-template-columns: 1fr; }
  .foot { padding: 14px; flex-direction: column; align-items: flex-start; }
  .hello__choice { grid-template-columns: 1fr; }
  .hello__choice .btn { width: 100%; }
  .hello__h { white-space: normal; }
  .comic { grid-template-columns: 1fr; gap: 14px; width: 100%; }
  .intro__chrome { top: 14px; right: 14px; }
  .intro__brand { left: 14px; top: 20px; font-size: 20px; }
  .strip__id, .strip__status { display: none; }
  .dialog { left: 3cqw; right: 3cqw; top: auto; bottom: 12cqw; min-width: 0; padding: 3cqw 4cqw; }
  .dialog__tag { font-size: 3cqw; top: -3.4cqw; }
  .dialog__line { font-size: 5.2cqw; }
  .dialog__sub { font-size: 3.2cqw; }
  .strip { bottom: 2.4cqw; }
  .bar { height: 4cqw; }
  .strip__slot { font-size: max(12px, 2.8cqw); min-width: 0; }
  .loadline { left: 14px; bottom: 18px; font-size: 20px; }
  .descend { top: calc(var(--hdr-h) + 72px); font-size: 20px; }
}

@media (max-width: 480px) { .intro__brand { display: none; } }

@media (prefers-reduced-motion: reduce) {
  /* drop movement, keep short fades so it is still clear what changed */
  body.home *, body.home *::before, body.home *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-property: opacity, background-color, color, border-color, fill, stroke, visibility !important; transition-duration: .15s !important; transition-delay: 0s !important; }
  .view.is-arriving { animation: fadeIn .15s linear both !important; }
  .feat.is-flash .flash-ring { animation: none !important; opacity: 1; }
  .sheet.is-open .plan__list li { animation: none !important; }
  @keyframes fadeIn { from { opacity: 0; } }
}

/* ------------------------------------------------------------------ Browser surfaces */
body.home ::selection { background: var(--ink); color: var(--card); }
body.home { caret-color: var(--ink); scrollbar-color: var(--ink) var(--paper); scrollbar-width: thin; }
body.home::-webkit-scrollbar { width: 10px; }
body.home::-webkit-scrollbar-track { background: var(--paper); }
body.home::-webkit-scrollbar-thumb { background: var(--ink); border: 3px solid var(--paper); }
.ico { width: 1em; height: 1em; flex: none; vertical-align: -.12em; }
.pill .ico, .replay .ico { margin: 0 2px; }
.replay { display: inline-flex; align-items: center; gap: 8px; }
.sheet__close { display: grid; place-items: center; }
.sheet__close .ico { width: 18px; height: 18px; }
.cart__arrow { display: inline-flex; align-items: center; gap: .6em; }
.cart__arrow .ico { width: 1.1em; height: 1.1em; }
.dialog__sub .tri { width: 1.4cqw; height: 1.2cqw; color: var(--ink); animation: bob .8s ease-in-out infinite; }

/* ------------------------------------------------------------------ 01–02 The story (scroll-driven) */
/* One scroll carries the cartridge, the comic and the dive into the sun.
   The scroller is invisible; the stage above it is drawn from its progress. */
.scene--story.is-on { display: block; }
.story { position: absolute; inset: 0; z-index: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; outline: none; }
.story::-webkit-scrollbar { display: none; }
.story__track { height: 900vh; }
.stage { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 84px 40px 200px; pointer-events: none; overflow: hidden; }
.stage > .cart-wrap, .stage > .comic { grid-area: 1 / 1; }
.stage .cart-wrap { container-type: inline-size; width: min(1003px, 86vw, calc((100dvh - 300px) * 1.677)); will-change: transform; }
.stage .comic { width: min(1280px, 100%, calc((100dvh - 300px) * 1.716)); opacity: 0; will-change: transform; transform-origin: 50% 50%; }
.stage .panel { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); }
.stage .panel .get { transform: translate(-50%, 170%) rotate(-2deg); transition: transform .5s var(--ease-out); }
.stage .panel.is-got .get { transform: translate(-50%, 0) rotate(-2deg); }
.flash { position: absolute; inset: 0; z-index: 3; background: var(--card); opacity: 0; pointer-events: none; animation: none; }
.redwash { position: absolute; inset: 0; z-index: 4; background: var(--red); opacity: 0; pointer-events: none; }

/* Captions: Asia narrates the story, the way a voiceover would */
.caption { position: absolute; z-index: 5; left: 50%; bottom: 122px; transform: translateX(-50%); width: min(720px, calc(100% - 200px)); margin: 0; display: flex; gap: 14px; align-items: baseline; justify-content: center; text-align: left; pointer-events: none; transition: opacity .3s; }
.caption__who { flex: none; font-family: var(--f-sign); font-size: 15px; letter-spacing: .08em; color: var(--ink); }
.caption__line { font-size: clamp(17px, 1.6vw, 21px); font-weight: 500; line-height: 1.4; text-wrap: balance; }
.caption__line.is-new { animation: captionIn .7s var(--ease-out) both; }
@keyframes captionIn { from { clip-path: inset(0 100% 0 0); opacity: .2; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.caption.is-quiet { opacity: 0; }

/* Hold gates: the story waits here until you hold */
.gate { position: absolute; z-index: 6; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 16px; row-gap: 2px; align-items: center; text-align: left; padding: 8px 18px 8px 8px; border: 0; background: none; cursor: pointer; touch-action: none; -webkit-touch-callout: none; user-select: none; }
.gate[hidden] { display: none; }
.gate.is-on { animation: gateIn .45s var(--ease-out) both; }
@keyframes gateIn { from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(.94); } }
.gate__ring { grid-row: 1 / 3; width: 68px; height: 68px; overflow: visible; transform: rotate(-90deg); transition: transform .15s; }
.gate.is-holding .gate__ring { transform: rotate(-90deg) scale(.94); }
.gate__track { fill: var(--card); stroke: var(--ink); stroke-width: 1.5; }
.gate__fill { fill: none; stroke: var(--red); stroke-width: 5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.gate__icon { fill: none; stroke: var(--ink); stroke-width: 2; transform: rotate(90deg); transform-origin: 48px 48px; }
.gate__label { align-self: end; font-family: var(--f-sign); font-size: 22px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); }
.gate__how { align-self: start; font-family: var(--f-mono); font-size: 12px; color: var(--mute); }
.gate.is-done .gate__ring { animation: gateDone .5s var(--ease-out); }
@keyframes gateDone { 50% { transform: rotate(-90deg) scale(1.12); } }

/* Progress rail, like a film's chapter strip */
.rail { position: absolute; z-index: 5; right: 30px; top: 50%; height: 48vh; width: 2px; transform: translateY(-50%); background: rgba(22, 20, 19, .18); }
.rail__fill { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: var(--ink); transform: scaleY(0); transform-origin: top; }
.rail__mark { position: absolute; right: 12px; top: calc(var(--at) * 100%); transform: translateY(-50%); font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.rail__mark b { font-weight: 400; }
.rail__mark::after { content: ""; position: absolute; left: calc(100% + 6px); top: 50%; width: 8px; height: 1.5px; background: var(--ink); }
.rail__gate { position: absolute; left: 50%; top: calc(var(--at) * 100%); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; background: var(--paper); border: 1.5px solid var(--ink); transform: rotate(45deg); }
.rail__gate.is-passed { background: var(--ink); }
.scrollcue { position: absolute; z-index: 5; left: 50%; bottom: 40px; transform: translateX(-50%); margin: 0; display: grid; justify-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; pointer-events: none; transition: opacity .4s; }
.scrollcue .ico { width: 18px; height: 18px; animation: cue 1.6s var(--ease-out) infinite; }
@keyframes cue { 0% { transform: translateY(-4px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
.scrollcue.is-gone { opacity: 0; }

/* ------------------------------------------------------------------ Town: pull for the index */
.pull { position: absolute; z-index: 4; left: calc(28px + var(--title-w)); bottom: 26px; display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px; border: var(--rule); background: var(--card); font-family: var(--f-mono); font-size: 12px; cursor: pointer; transition: transform .25s var(--ease-out), box-shadow .25s, scale var(--dur-press) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .pull:hover { box-shadow: var(--lift-1); transform: translateY(-2px); } }
.pull__bar { width: 46px; height: 3px; background: rgba(22, 20, 19, .15); }
.pull__bar span { display: block; height: 100%; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.pull .ico { animation: cue 1.6s var(--ease-out) infinite; }

@media (max-width: 1100px) { .pull { display: none; } }
@media (max-width: 900px) {
  .stage { padding: 70px 14px 200px; place-items: start center; }
  .stage .cart-wrap { align-self: center; width: 100%; }
  .stage .comic { width: 100%; }
  .caption { width: calc(100% - 28px); bottom: 106px; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
  .gate { bottom: 18px; }
  .scrollcue { bottom: 30px; }
  .rail { right: 10px; height: 36vh; }
  .rail__mark { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stage .comic { transform: none !important; }
}

@media (max-width: 900px) { .scene--story::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 70px; z-index: 3; background: linear-gradient(var(--paper) 70%, transparent); pointer-events: none; } }
@media (max-width: 900px) {
  .gate { width: calc(100% - 28px); justify-content: center; }
  .gate__label { font-size: 19px; white-space: nowrap; }
  .scene--story:has(.gate:not([hidden])) .caption { opacity: 0; }
}

/* ------------------------------------------------------------------ Story C: "Lost in the Overworld" */
/* Six wide panels play like film frames: each wipes in over the last and drifts slowly. */
.stage .comic { display: block; position: relative; width: min(1400px, 100%, calc((100dvh - 300px) * 2.63)); aspect-ratio: 995 / 378; }
.stage .comic .panel { position: absolute; inset: 0; aspect-ratio: auto; margin: 0; border: 3px solid var(--ink); background: var(--paper-2); }
.stage .comic .panel img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); transform-origin: var(--focus, 50% 50%); will-change: transform; }
.sun-target { position: absolute; left: 27%; top: 44%; width: 1px; height: 1px; }
.stamp { position: absolute; z-index: 3; left: 69%; top: 42%; padding: .3em .6em .15em; border: .18em solid var(--red); color: var(--red); font-family: var(--f-sign); font-size: clamp(16px, 3.4cqw, 44px); letter-spacing: .06em; transform: rotate(-14deg) scale(2.4); opacity: 0; mix-blend-mode: multiply; }
.panel.is-accepted .stamp { opacity: .92; transform: rotate(-14deg) scale(1); transition: transform .35s var(--ease-out), opacity .15s; }
.stage .comic .panel .get { left: 62%; bottom: 9%; }
@media (max-width: 900px) {
  .stage { place-items: center; }
  .stage .comic { width: 100%; aspect-ratio: 4 / 3.4; }
  .stage .comic .panel:nth-child(4) { --focus: 88% 50%; }
  .stamp { left: 46%; top: 40%; }
}

/* arriving from the comic: the black the descent ended in lifts off the town, torn edge first */
.drop-in { display: none; position: fixed; z-index: 200; left: 0; right: 0; top: -12vh; height: 124vh; background: #121214; pointer-events: none; clip-path: polygon(0 0, 100% 0, 100% 97%, 96% 100%, 91% 96%, 85% 99%, 79% 96%, 73% 100%, 67% 97%, 61% 99%, 55% 96%, 49% 100%, 43% 97%, 37% 99%, 31% 96%, 26% 100%, 20% 97%, 14% 99%, 9% 96%, 4% 100%, 0 97%); }
html[data-drop] .drop-in { display: block; }
.drop-in { top: 0; height: 100vh; height: 100dvh; clip-path: none; }
.drop-in.is-out { opacity: 0; transition: opacity .9s var(--ease-out); }

/* The Contents list and the "keep scrolling" pull into it are retired (Work replaces them). */
#pull, .contents, [role="tab"][data-view="read"] { display: none !important; }
