/* Hallmark · shape: Showreel · genre: atmospheric · theme: Lumen (deal 3/3, seed weave-dark-fantasy-pixel-art-idle-acb5·94f771b8·2026-12-04·r0) · job: sign up, the action in the hero and at the end
 * hero: key art bleed, head bottom-left over a paper scrim · nav: edge-aligned, mark, two links, language, one action · footer: logo over the year · imagery: real gameplay recordings + the game's own splash art · signature: the 528 × 92 battle strip played big
 * axes: dark/roman-serif/warm · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R3 V4 · weakest: R, the bosses band repeats the strip composition */
/* waive 47c: no blueprint grid, the pixel art is the texture */
/* waive 38iii: Lumen names the rose verb as its signature, once, in the hero */
@import url("./tokens.css");
@import url("./base.css");

body { font-variant-numeric: tabular-nums; }
h1, h2, h3, nav, label, figcaption, .btn, .lang { text-transform: lowercase; }
h2 { font-size: var(--text-display-s); line-height: 0.98; }
.verb { display: inline-block; color: var(--color-accent-2); }
.verb::after { content: ""; display: block; height: var(--rule-hair); background: currentColor; transform-origin: left; animation: draw var(--dur-long) var(--ease-out) both; }
@keyframes draw { from { transform: scaleX(0); } }

.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-lg); border: 0; border-radius: var(--radius-pill); font: 500 var(--text-md)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn--primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: color-mix(in oklch, var(--color-accent) 88%, var(--color-ink)); }
.btn--secondary { background: transparent; box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2); color: var(--color-ink); }
.btn--secondary:hover { background: var(--color-paper-2); }
.btn--quiet { min-height: 32px; padding: 0 var(--space-sm); background: transparent; color: var(--color-muted); font-size: var(--text-sm); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule); }
.btn--quiet:hover { background: var(--color-paper-2); color: var(--color-ink); }
html:not(.js) [data-loop-toggle], html:not(.js) .lang { display: none; }
@media (prefers-reduced-motion: reduce) { .btn { transition: background-color var(--dur-short) linear; } }

/* nav */
.nav { position: relative; z-index: var(--z-sticky-nav); display: flex; align-items: center; gap: var(--space-lg); padding-block: var(--space-md); }
.nav__mark { margin-right: auto; }
.nav__mark img { width: auto; height: 64px; }
.nav nav { display: flex; gap: var(--space-lg); }
.nav nav a { text-decoration: none; color: var(--color-ink-2); }
.nav nav a:hover { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); }
.lang { min-height: 32px; padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-muted); font: 400 var(--text-xs)/1 var(--font-outlier); cursor: pointer; box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule); }
.lang:hover { color: var(--color-ink); background: var(--color-paper-2); }
@media (max-width: 40rem) { .nav nav { display: none; } .nav .btn--secondary { padding: 0 var(--space-md); } }

/* hero */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-start; min-height: min(100svh, 860px); margin-top: calc(-1 * var(--space-3xl)); padding-top: calc(var(--space-3xl) + var(--space-lg)); }
.hero__art { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; image-rendering: pixelated; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to right, color-mix(in oklch, var(--color-paper) 72%, transparent), transparent 60%), linear-gradient(to top, var(--color-paper), transparent 9%); }
.hero__inner { display: grid; gap: var(--space-md); }
.hero h1 { font-size: var(--text-display); line-height: 0.98; max-width: 22ch; }
.hero .lead { color: var(--color-ink-2); }

.signup { display: grid; gap: var(--space-2xs); max-width: 36rem; margin-top: var(--space-xs); }
.signup__row { display: flex; gap: var(--space-xs); }
.signup input[type=email] { flex: 1; min-width: 0; min-height: 48px; padding: 0 var(--space-lg); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-pill); background: var(--color-paper); color: var(--color-ink); outline: 2px solid transparent; outline-offset: 2px; }
.signup input[type=email]::placeholder { color: var(--color-muted); }
.signup input[type=email]:focus-visible { outline-color: var(--color-focus); }
.signup input[aria-invalid] { border-color: var(--color-error); }
.signup__help { min-height: 1lh; font-size: var(--text-sm); color: var(--color-muted); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 40rem) { .signup__row { flex-direction: column; } }

/* the strip */
section + section { margin-top: var(--section-gap-s); }
.strip, .skills { display: grid; gap: var(--space-xl); }
.box { margin: 0; display: grid; gap: var(--space-sm); }
.box video { width: 100%; height: auto; border-radius: var(--radius-card); border: var(--rule-hair) solid var(--color-rule); background: var(--color-paper-2); image-rendering: pixelated; }
.box figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); text-transform: none; }
.box figcaption .btn { margin-left: auto; }
.readout { font: 400 0.8125rem/1.5 var(--font-outlier); color: var(--color-accent); }
.strip .box { max-width: 56rem; }
.pair { display: grid; gap: var(--space-xl); }
@media (min-width: 64rem) { .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sub { color: var(--color-ink-2); max-width: 52ch; margin-top: var(--space-sm); }

/* lore teaser on the home page */
.lore { display: grid; gap: var(--space-md); }
.lore .sub { margin-top: 0; }
.lore .btn { justify-self: start; }

/* lore page */
.hero--lore { min-height: min(70svh, 620px); }
.chapters { display: grid; gap: var(--section-gap-s); margin-top: var(--section-gap-s); }
.chapter { display: grid; gap: var(--space-xl); align-items: start; }
@media (min-width: 64rem) { .chapter--figure { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.prose { display: grid; gap: var(--space-sm); max-width: 62ch; }
.prose p { color: var(--color-ink-2); }
.terms { margin: 0; display: grid; gap: var(--space-lg) var(--gap-columns); }
@media (min-width: 48rem) { .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 80rem) { .terms { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.terms div { padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule-2); }
.terms dt { font: 400 var(--text-title)/1.1 var(--font-display); color: var(--color-ink); text-transform: lowercase; }
.terms dd { margin: var(--space-xs) 0 0; color: var(--color-ink-2); font-size: var(--text-sm); }
.pantheon { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xl) var(--gap-columns); }
@media (min-width: 48rem) { .pantheon { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 80rem) { .pantheon { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pantheon li { display: grid; gap: var(--space-xs); align-content: start; padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule-2); }
.pantheon h3 { font-size: var(--text-title); text-transform: none; }
.pantheon__tag { color: var(--color-accent); font-size: var(--text-sm); }
.pantheon li > p:not(.pantheon__tag) { color: var(--color-ink-2); font-size: var(--text-sm); }
.pantheon__heroes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); margin-top: var(--space-xs); }
.pantheon__heroes img, .shadowborn img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; border-radius: var(--radius-card); border: var(--rule-hair) solid var(--color-rule); }
.shadowborn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.shadowborn figure { margin: 0; display: grid; gap: var(--space-xs); }
.shadowborn figcaption { font-size: var(--text-sm); color: var(--color-muted); }

/* heroes rail */
.heroes h2 { max-width: 20ch; }
.rail { list-style: none; margin: var(--space-xl) 0 0; padding-block: 0 var(--space-md); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(14rem, 19%); gap: var(--gap-columns); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--gutter), (100% - var(--container)) / 2 + var(--gutter)); padding-inline: max(var(--gutter), (100% - var(--container)) / 2 + var(--gutter)); overscroll-behavior-x: contain; }
.rail { scrollbar-width: none; }
.rail.is-drifting { overflow: hidden; scroll-snap-type: none; grid-auto-columns: 15rem; width: max-content; padding-inline: 0; animation: drift 70s linear infinite; animation-play-state: paused; will-change: transform; }
.rail.is-drifting.is-running { animation-play-state: running; }
.rail.is-drifting > li { margin-right: 0; }
.heroes { overflow: clip; }
@keyframes drift { to { transform: translateX(calc(-50% - var(--gap-columns) / 2)); } }
.rail::-webkit-scrollbar { display: none; }
.rail__ctl { display: flex; justify-content: flex-end; margin-top: var(--space-sm); }
html:not(.js) .rail__ctl { display: none; }
.rail > li { scroll-snap-align: start; min-width: 0; }
.rail:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.rail img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; border-radius: var(--radius-card); border: var(--rule-hair) solid var(--color-rule); }
.rail h3 { margin-top: var(--space-sm); font-size: var(--text-title); text-transform: none; }
.rail p { font-size: var(--text-sm); color: var(--color-muted); }

/* bosses */
.bosses { display: grid; gap: var(--space-xl); }

/* beta band */
.beta { background: var(--color-paper-2); border-block: var(--rule-hair) solid var(--color-rule); padding-block: var(--section-gap-s); margin-top: var(--section-gap); }
.beta__inner { display: grid; justify-items: start; gap: var(--space-sm); }

.foot { display: flex; align-items: end; justify-content: space-between; gap: var(--space-lg); padding-block: var(--space-2xl); color: var(--color-muted); font-size: var(--text-sm); }
.foot img { width: 140px; height: auto; }

/* the weave behind the page: threads drift across, the paper glows warm in places */
body { background:
  radial-gradient(60rem 40rem at 85% 18%, color-mix(in oklch, var(--color-accent) 9%, transparent), transparent 70%),
  radial-gradient(50rem 36rem at 8% 62%, color-mix(in oklch, var(--color-accent-2) 8%, transparent), transparent 70%),
  radial-gradient(70rem 40rem at 60% 100%, color-mix(in oklch, var(--color-live) 6%, transparent), transparent 70%),
  var(--color-paper); background-attachment: fixed; }
.threads { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 220 60 40 60; animation: weave 38s linear infinite; }
.threads path { vector-effect: non-scaling-stroke; }
.threads .t1 { stroke: color-mix(in oklch, var(--color-accent) 45%, transparent); }
.threads .t2 { stroke: color-mix(in oklch, var(--color-accent-2) 40%, transparent); animation: weave 52s linear infinite reverse; }
.threads .t3 { stroke: color-mix(in oklch, var(--color-live) 30%, transparent); }
.threads .t4 { stroke: color-mix(in oklch, var(--color-ink) 16%, transparent); stroke-dasharray: 4 14; }
.threads path { animation: inherit; }
@keyframes weave { to { stroke-dashoffset: -1520; } }
@media (prefers-reduced-motion: reduce) { .threads, .threads path, .parade__row, .god { animation: none; } }

/* lore page: maps from the game, a parade of Frays, the gods in pixels */
.chapters { position: relative; }
.chapter + .chapter { padding-top: var(--section-gap-s); border-top: var(--rule-hair) dashed color-mix(in oklch, var(--color-accent) 35%, transparent); }
.map { margin: 0; display: grid; gap: var(--space-xs); }
.map img { width: 100%; height: auto; border-radius: var(--radius-card); box-shadow: var(--shadow-card), 0 0 0 var(--rule-hair) color-mix(in oklch, var(--color-accent) 30%, transparent); transform: rotate(-0.6deg); }
.chapter--figure:nth-of-type(even) .map img { transform: rotate(0.6deg); }
.map figcaption { font-size: var(--text-sm); color: var(--color-muted); }
.map--inline { margin-top: var(--space-md); max-width: 36rem; }
.parade { grid-column: 1 / -1; overflow: clip; padding-block: var(--space-md); border-block: var(--rule-hair) solid var(--color-rule); background: linear-gradient(to top, color-mix(in oklch, var(--color-accent) 7%, transparent), transparent); }
.parade__row { display: flex; align-items: flex-end; gap: var(--space-xl); width: max-content; animation: parade 60s linear infinite; }
.parade img { height: 72px; width: auto; image-rendering: pixelated; }
@keyframes parade { to { transform: translateX(-50%); } }
.god { display: block; width: 128px; height: 128px; margin-bottom: var(--space-xs); background: var(--god) 0 0 / 3072px 128px no-repeat; image-rendering: pixelated; animation: god 2.4s steps(24) infinite; }
@keyframes god { to { background-position: -3072px 0; } }
/* chapters zigzag: the picture swaps sides every other chapter; one gap between chapters, not two */
.chapters { gap: 0; }
.chapter + .chapter { margin-top: var(--section-gap-s); }
@media (min-width: 64rem) {
  .chapter--figure:nth-of-type(even) { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .chapter--figure:nth-of-type(even) > figure { order: -1; }
}
/* torn parchment maps are cut out: shadow follows the paper, no card box around it */
.map img { border-radius: 0; box-shadow: none; filter: drop-shadow(0 10px 18px color-mix(in oklch, black 55%, transparent)); }

/* inside the box: HUD shot + one item in all eight rarities (colours = the game's RARITY_UI_COLORS) */
.inside { display: grid; gap: var(--space-xl); align-items: center; margin-top: var(--section-gap); }
@media (min-width: 64rem) { .inside { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.inside__text { display: grid; gap: var(--space-md); }
.hud { margin: 0; display: grid; justify-items: center; gap: 0; }
.hud img { width: min(100%, 26rem); height: auto; image-rendering: pixelated; filter: drop-shadow(0 18px 30px color-mix(in oklch, black 60%, transparent)); }
.hud img + img { width: min(100%, 27rem); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm); }
.tile { --r: #94a3b8; display: grid; justify-items: center; gap: var(--space-2xs); font-size: var(--text-sm); color: var(--r); }
.tile img { width: 64px; height: 64px; padding: 6px; box-sizing: content-box; image-rendering: pixelated; border-radius: 6px;
  background: color-mix(in oklch, var(--r) 22%, var(--color-paper-2)); border: 2px solid var(--r); }
.tile--1 { --r: #22c55e; } .tile--2 { --r: #3b82f6; } .tile--3 { --r: #a855f7; } .tile--4 { --r: #f97316; }
.tile--5 { --r: #ef4444; } .tile--6 { --r: #fff1a8; } .tile--7 { --r: #22d3ee; }
.tile--4 img, .tile--5 img, .tile--6 img, .tile--7 img { animation: rarity-glow 2.4s ease-in-out infinite; }
.tile--6 img, .tile--7 img { animation-duration: 1.6s; }
@keyframes rarity-glow { 0%, 100% { box-shadow: 0 0 6px 0 color-mix(in oklch, var(--r) 45%, transparent); }
  50% { box-shadow: 0 0 18px 3px color-mix(in oklch, var(--r) 75%, transparent); } }

/* the loom counter: signups weave a cloth across six goals */
.beta__inner { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); align-items: start; }
@media (min-width: 64rem) { .beta__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.beta__copy { display: grid; justify-items: start; gap: var(--space-sm); }
.loom { display: grid; gap: var(--space-md); }
.loom__count { margin: 0; font-family: var(--font-display); font-size: var(--text-2xl); }
.loom__n { font-size: var(--text-display-s); color: var(--color-accent); font-variant-numeric: tabular-nums; }
.loom__sub { margin: 0; color: var(--color-muted); max-width: 40ch; }
.loom__track { --p: 0; position: relative; height: 28px; border-radius: 4px; overflow: clip;
  background: repeating-linear-gradient(90deg, color-mix(in oklch, var(--color-ink) 22%, transparent) 0 1px, transparent 1px 7px), var(--color-paper-3); }
.loom__cloth { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p)); transition: transform 1.6s var(--ease-out);
  background: repeating-linear-gradient(90deg, transparent 0 3px, color-mix(in oklch, black 25%, transparent) 3px 4px),
    repeating-linear-gradient(0deg, var(--color-accent) 0 3px, var(--color-accent-2) 3px 4px, var(--color-accent) 4px 7px); }
.loom__shuttle { position: absolute; top: 50%; left: calc(var(--p) * 100%); width: 18px; height: 8px; margin: -4px 0 0 -9px; border-radius: 50%;
  background: var(--color-ink); box-shadow: 0 0 10px var(--color-accent); animation: shuttle 1.4s var(--ease-in-out) infinite alternate; transition: left 1.6s var(--ease-out); }
@keyframes shuttle { from { transform: translateY(-6px); } to { transform: translateY(6px); } }
.goals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm) var(--space-lg); }
@media (min-width: 40rem) { .goals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.goal { display: grid; gap: var(--space-3xs); padding-left: var(--space-sm); border-left: 2px dashed var(--color-rule-2); color: var(--color-muted); font-size: var(--text-sm); }
.goal__n { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-ink-2); }
.goal.is-done { border-left: 2px solid var(--color-accent); color: var(--color-ink); }
.goal.is-done .goal__n { color: var(--color-accent); }
.goal.is-next { border-left-color: var(--color-accent-2); }

/* the celebration: six threads fly in and tie the knot */
.beta { position: relative; }
.weave-burst { position: fixed; inset: 0; z-index: var(--z-toast); display: grid; place-items: center; pointer-events: none; visibility: hidden; }
.weave-burst svg { position: absolute; width: min(90vw, 900px); height: min(90vh, 900px); overflow: visible; }
.weave-burst path { fill: none; stroke: var(--color-accent); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; }
.weave-burst path:nth-child(even) { stroke: var(--color-accent-2); }
.weave-burst img { width: 96px; height: 96px; opacity: 0; transform: scale(0.2); filter: drop-shadow(0 0 24px var(--color-accent)); }
.weave-burst.is-on { visibility: visible; }
.weave-burst.is-on path { animation: thread-in 1.1s var(--ease-out) forwards, fade-out 0.6s 2.2s forwards; }
.weave-burst.is-on path:nth-child(2) { animation-delay: 0.08s, 2.2s; } .weave-burst.is-on path:nth-child(3) { animation-delay: 0.16s, 2.2s; }
.weave-burst.is-on path:nth-child(4) { animation-delay: 0.24s, 2.2s; } .weave-burst.is-on path:nth-child(5) { animation-delay: 0.32s, 2.2s; }
.weave-burst.is-on path:nth-child(6) { animation-delay: 0.4s, 2.2s; }
.weave-burst.is-on img { animation: knot-pop 0.7s 1s var(--ease-out) forwards, fade-out 0.6s 2.4s forwards; }
@keyframes thread-in { to { stroke-dashoffset: 0; } }
@keyframes knot-pop { 60% { opacity: 1; transform: scale(1.25) rotate(20deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .tile img, .loom__shuttle, .weave-burst.is-on path, .weave-burst.is-on img { animation: none; }
  .loom__cloth, .loom__shuttle { transition: none; }
}

/* loom row spans the whole beta band; goals line up under the track */
.loom__head { align-self: end; }
.loom__row { grid-column: 1 / -1; }
@media (min-width: 64rem) { .goals { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* about: who makes the game, one compact text block before the beta band */
.about { display: grid; gap: var(--space-sm); }
.about h2 { margin-bottom: var(--space-2xs); }
.about .sub { margin-top: 0; }

/* Ilsa thanks a new signup */
.thanks { display: flex; align-items: flex-end; gap: var(--space-sm); margin-top: var(--space-sm); max-width: 36rem; animation: thanks-in .5s var(--ease-out) both; }
.thanks img { width: 168px; height: auto; image-rendering: pixelated; flex: none; animation: thanks-hop .6s .35s var(--ease-out) both; }
.thanks__bubble { position: relative; margin-bottom: var(--space-md); padding: var(--space-sm) var(--space-md); border: var(--rule-hair) solid var(--color-accent); border-radius: 12px; background: var(--color-paper); display: grid; gap: var(--space-3xs); }
.thanks__bubble::before { content: ""; position: absolute; left: -7px; bottom: 18px; width: 12px; height: 12px; background: var(--color-paper); border-left: var(--rule-hair) solid var(--color-accent); border-bottom: var(--rule-hair) solid var(--color-accent); transform: rotate(45deg); }
.thanks__h { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-accent); }
.thanks__p { margin: 0; font-size: var(--text-sm); color: var(--color-ink-2); }
.thanks__mail { color: var(--color-muted); }
@keyframes thanks-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes thanks-hop { 0% { transform: translateY(14px); opacity: 0; } 60% { transform: translateY(-6px); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .thanks, .thanks img { animation: none; } }

.readout a { color: inherit; text-underline-offset: 3px; }
.readout a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* goal previews: one fixed-height picture under each goal, pinned to the bottom so the row lines up */
.goals { --pv: 112px; }
.goal { grid-template-rows: auto 1fr auto; }
.goal__pv { display: flex; align-items: flex-end; height: var(--pv); margin-top: var(--space-xs); }
.goal__pv img { image-rendering: pixelated; }
.pv-skin { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: left bottom; }
.pv-frame { position: relative; padding: 3px; border: 2px solid var(--color-accent); outline: var(--rule-hair) dashed var(--color-accent-2); outline-offset: -5px; background: var(--color-paper-3); }
.pv-frame img { display: block; width: 96px; height: 96px; }
.pv-frame::before { --k: radial-gradient(circle, var(--color-accent-2) 0 2px, var(--color-accent) 2.5px 4.5px, transparent 5px); content: ""; position: absolute; inset: -7px; pointer-events: none;
  background: var(--k) 0 0 / 12px 12px no-repeat, var(--k) 100% 0 / 12px 12px no-repeat, var(--k) 0 100% / 12px 12px no-repeat, var(--k) 100% 100% / 12px 12px no-repeat; }
.pv-pet { position: relative; display: grid; place-items: center; width: 66px; height: 80px; }
.pv-pet__sil { position: absolute; inset: 0; background: var(--color-rule-2); -webkit-mask: url("media/goals/pet_loom.png") center / contain no-repeat; mask: url("media/goals/pet_loom.png") center / contain no-repeat; }
.pv-pet__q { position: relative; font-family: var(--font-display); font-size: var(--text-2xl); color: var(--color-accent); }
.pv-plate { display: grid; justify-items: center; gap: var(--space-3xs); max-width: 100%; margin-bottom: var(--space-md); padding: var(--space-xs); border: var(--rule-hair) solid var(--color-rule-2); border-radius: 4px; background: var(--color-paper); box-shadow: inset 0 -2px 0 var(--color-paper-3); text-align: center; }
.pv-plate__name { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1; color: var(--color-ink); }
.pv-plate__title { padding-top: var(--space-3xs); border-top: var(--rule-hair) solid var(--color-accent-2); font: 500 var(--text-xs)/1.2 var(--font-body); color: var(--color-accent); }
.pv-walk { position: relative; display: flex; align-items: flex-end; width: 100%; max-width: 180px; height: 70px; }
.pv-walk__trail { position: absolute; left: 0; right: 16px; bottom: 1px; width: auto; height: 22px; overflow: visible; -webkit-mask: linear-gradient(to right, transparent, black 70%); mask: linear-gradient(to right, transparent, black 70%); }
.pv-walk__trail path { fill: none; stroke: var(--color-accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 7 5; vector-effect: non-scaling-stroke; animation: trail 0.6s linear infinite; }
.pv-walk__trail path + path { stroke-width: 1.5; stroke-dasharray: 4 8; }
.pv-walk__hero { position: relative; margin-left: auto; width: 57px; height: 70px; background: url("media/goals/walk_ilsa.png") 0 0 / 912px 70px no-repeat; image-rendering: pixelated; animation: walk 1.07s steps(16) infinite; }
@keyframes walk { to { background-position-x: -912px; } }
@keyframes trail { to { stroke-dashoffset: 12; } }
.pv-credits { position: relative; display: grid; justify-items: center; gap: 6px; width: 100%; max-width: 150px; padding-bottom: var(--space-2xs); }
.pv-credits::before { content: ""; position: absolute; top: 1.4em; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: repeating-linear-gradient(to bottom, var(--color-accent) 0 6px, transparent 6px 9px); }
.pv-credits__h { position: relative; font-family: var(--font-display); font-size: var(--text-md); color: var(--color-ink-2); white-space: nowrap; }
.pv-credits__bar { position: relative; width: var(--w); height: 8px; border-radius: 4px; background: var(--color-rule-2); box-shadow: 0 0 0 3px var(--color-paper-2); }
.pv-credits__you { position: relative; padding: 0 var(--space-xs); border: var(--rule-hair) solid var(--color-accent); border-radius: var(--radius-pill); background: var(--color-paper-2); font: 400 var(--text-xs)/1.6 var(--font-outlier); color: var(--color-accent); }
@media (prefers-reduced-motion: reduce) { .pv-walk__hero, .pv-walk__trail path { animation: none; } }

.goal__pv img.pv-splash { height: 100%; width: auto; aspect-ratio: 1; object-fit: cover; image-rendering: auto; border: 1px solid var(--color-accent); border-radius: 4px; }

/* owner 2026-12-04: bigger, centred previews; the skin fills its column */
.goals { --pv: 150px; }
.goal__pv { justify-content: center; }
.pv-frame img { width: 128px; height: 128px; }
.pv-pet { width: 120px; height: 120px; }
.pv-pet__q { font-size: var(--text-3xl, 2.5rem); }
.pv-plate { margin-bottom: var(--space-lg, 2rem); padding: var(--space-sm) var(--space-md); }
.pv-plate__name { font-size: var(--text-xl); }
.pv-plate__title { font-size: var(--text-sm); }
.goal__pv img.pv-splash { width: 100%; height: 100%; aspect-ratio: auto; }

/* owner 2026-12-04: hub tour (one window at a time, same box) beside the rarity tiles */
.inside .hud img { width: min(100%, 726px); height: auto; image-rendering: pixelated; }

/* hero cards open the hero window: per-card crop (--pos keeps the hero centred), the name's button covers the card */
.rail > li { position: relative; }
.rail img { object-position: var(--pos, 50% 22%); transition: border-color var(--dur-short) var(--ease-out); }
.rail > li:hover img { border-color: var(--color-accent); }
.rail__open { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rail__open::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-card); }
.rail__open:focus-visible { outline: none; }
.rail__open:focus-visible::after { outline: 2px solid var(--color-focus); outline-offset: 4px; }

/* the hero window: native dialog, splash on top, story, then the fight clip at full width (pixel art stays crisp) */
.hero-win { width: min(56rem, calc(100% - 2 * var(--space-md))); max-height: calc(100dvh - 2 * var(--space-md)); padding: 0; border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink); box-shadow: var(--shadow-card); overflow: auto; overscroll-behavior: contain; }
.hero-win::backdrop { background: color-mix(in oklch, var(--color-paper) 78%, transparent); backdrop-filter: blur(3px); }
.hero-win[open] { animation: win-in var(--dur-long) var(--ease-out); }
@keyframes win-in { from { opacity: 0; transform: translateY(12px); } }
html:has(.hero-win[open]) { overflow: hidden; }
.hero-win__body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); padding-bottom: var(--space-xl); }
.hero-win__x { position: absolute; top: var(--space-sm); right: var(--space-sm); z-index: var(--z-raised); width: 40px; min-height: 40px; padding: 0; background: var(--color-paper-2); font-size: var(--text-lg); }
.hero-win__splash { width: 100%; height: auto; aspect-ratio: 960 / 536; object-fit: cover; border-bottom: var(--rule-hair) solid var(--color-rule); }
.hero-win__text, .hero-win__clip { padding-inline: var(--space-xl); }
.hero-win__text { display: grid; gap: var(--space-xs); align-content: start; }
.hero-win__text h2 { font-size: var(--text-section); text-transform: none; }
.hero-win__class { color: var(--color-accent); font-size: var(--text-sm); }
.hero-win__story { margin-top: var(--space-xs); color: var(--color-ink-2); max-width: 60ch; }
.hero-win__clip { margin: 0; }
.hero-win__clip[hidden] { display: none; }
.hero-win__clip img { display: block; width: 100%; max-width: 680px; height: auto; image-rendering: pixelated; border-radius: var(--radius-card); border: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); }
@media (max-width: 40rem) { .hero-win__text, .hero-win__clip { padding-inline: var(--space-lg); } }
@media (prefers-reduced-motion: reduce) { .hero-win[open] { animation: none; } .rail img { transition: none; } }
