/* Yore: full-screen game UI. Brand: docs/brand-guidelines.md. House rules: .claude/skills/taste-skill */

/* Palette from the subject: the pigments of illuminated manuscripts and old atlases.
   Vellum ground, iron-gall ink, ultramarine (lapis) for actions, vermilion for "close", verdigris for "solved". */
:root {
  --bg: #f1f0ec;
  --tone: #e6e5df;      /* one tone step: surfaces sit on the ground without lines */
  --tone-2: #d9d8d0;
  --surface: #fbfbf9;
  --ink: #15161a;
  --muted: #55565c;
  --accent: #2340c9;    /* ultramarine */
  --accent-ink: #ffffff;
  --hot: #d6401f;       /* vermilion */
  --warm: #c98a12;      /* ochre */
  --cool: #6b8aa8;
  --cold: #a3a8ae;
  --win: #237a63;       /* verdigris */
  --lose: #7c7d82;
  --sea: #dfe3e3;
  --land: #f8f8f5;
  --border: #b6b8b3;
  --float: 0 18px 50px -18px rgba(10, 14, 30, .38);   /* only for things that truly float */
  --display: Fraunces, Georgia, serif;
  --ui: Inter, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.5, .5, 1);
  --bar-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f14; --tone: #161922; --tone-2: #20242f; --surface: #1a1d26; --ink: #ecebe6; --muted: #a2a4ab;
    --accent: #6d86ff; --accent-ink: #0d0f14; --hot: #f0623c; --warm: #e7a933; --cool: #7f9fc2; --cold: #5d636d;
    --win: #43b393; --lose: #868891; --sea: #0a0c10; --land: #1e2129; --border: #3c414d;
    --float: 0 24px 60px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f14; --tone: #161922; --tone-2: #20242f; --surface: #1a1d26; --ink: #ecebe6; --muted: #a2a4ab;
  --accent: #6d86ff; --accent-ink: #0d0f14; --hot: #f0623c; --warm: #e7a933; --cool: #7f9fc2; --cold: #5d636d;
  --win: #43b393; --lose: #868891; --sea: #0a0c10; --land: #1e2129; --border: #3c414d;
  --float: 0 24px 60px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); overflow: hidden;
  font: 17px/1.5 var(--ui); -webkit-font-smoothing: antialiased; touch-action: manipulation;
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- frame ---------- */
.app { position: relative; height: 100dvh; overflow: hidden; }

.bar {
  position: absolute; inset: 0 0 auto; height: var(--bar-h); z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 10px;
  background: var(--bg);
}
.bar .left { justify-self: start; display: flex; }
.bar .right { justify-self: end; display: flex; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand svg { width: 30px; height: 30px; }
.wordmark { font: 800 32px/1 var(--display); font-variation-settings: "opsz" 144, "SOFT" 100; letter-spacing: -.03em; margin: 0; }
.icon {
  width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; transition: background-color .2s, transform .12s var(--ease);
}
.icon:hover { background: var(--tone); }
.icon:active { transform: scale(.92); }
.icon svg { width: 23px; height: 23px; }

/* ---------- map layer (always mounted; ambient behind "When") ---------- */
.map-layer { position: absolute; inset: var(--bar-h) 0 0; z-index: 1; transition: opacity .9s var(--ease); }
#map { position: absolute; inset: 0; background: var(--sea); cursor: crosshair; }
body.stage-when .map-layer { opacity: .13; pointer-events: none; }

/* ---------- WHEN stage ---------- */
.when {
  position: absolute; inset: var(--bar-h) 0 0; z-index: 10; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 20px 28px; transition: opacity .45s var(--ease), transform .6s var(--ease);
}
body:not(.stage-when) .when {
  opacity: 0; transform: translateY(-28px); pointer-events: none; visibility: hidden;
  transition: opacity .45s var(--ease), transform .6s var(--ease), visibility 0s .6s;
}
.when-inner { width: 100%; max-width: 600px; margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 20px; }

.dateline { margin: 0; font: 500 15px var(--ui); color: var(--muted); text-align: center; }
.dateline b { color: var(--ink); font-weight: 600; }
.prompt {
  margin: 0; text-align: center; text-wrap: balance; max-width: 26ch;
  font: 500 clamp(24px, 5.8vw, 34px)/1.24 var(--display); font-variation-settings: "opsz" 72, "SOFT" 50; letter-spacing: -.015em;
}
.prompt .w { display: inline-block; animation: wordIn .55s var(--ease) both; animation-delay: calc(var(--i) * 26ms); }

/* the year dial */
.dial { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.numeral-row { display: flex; align-items: center; gap: 4px; }
.stepper {
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--tone);
  display: grid; place-items: center; user-select: none; touch-action: none;
  transition: background-color .2s, transform .12s var(--ease);
}
.stepper svg { width: 22px; height: 22px; }
.stepper:hover { background: var(--tone-2); }
.stepper:active { transform: scale(.88); }
.numeral {
  width: 4.3ch; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: center;
  font: 900 clamp(76px, 22vw, 128px)/.95 var(--display); font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  letter-spacing: -.05em; font-variant-numeric: lining-nums tabular-nums; caret-color: var(--accent);
}
.numeral:focus { outline: none; }
.numeral.tick { animation: numTick .18s var(--ease); }
.era { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--tone); }
.era button {
  border: 0; background: transparent; padding: 0 20px; border-radius: 999px; min-height: 40px;
  font: 600 15px var(--ui); color: var(--muted); transition: background-color .25s, color .25s;
}
.era button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* the time ribbon: a ruler that narrows to the years still possible */
.ribbon { position: relative; width: 100%; height: 92px; user-select: none; }
.ribbon .track { position: absolute; left: 16px; right: 16px; top: 0; bottom: 0; }
.ribbon .bed { position: absolute; left: -16px; right: -16px; top: 22px; height: 40px; border-radius: 999px; background: var(--tone); }
.ribbon .zone {
  /* ruled-out years are cut away from the bed, so the ruler visibly shrinks to what is still possible */
  position: absolute; top: 20px; height: 44px; background: var(--bg); opacity: .82;
  transition: left .7s var(--ease), width .7s var(--ease);
}
.ribbon .zone.l { left: -16px; border-radius: 999px 0 0 999px; }
.ribbon .zone.r { border-radius: 0 999px 999px 0; }
.ribbon .tick { animation: fadeIn .45s var(--ease) both; }
.ribbon .tick { position: absolute; top: 36px; width: 2px; height: 12px; margin-left: -1px; border-radius: 1px; background: var(--border); transition: left .7s var(--ease), opacity .4s; }
.ribbon .tick span {
  position: absolute; top: 34px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font: 500 13px var(--ui); color: var(--muted); font-variant-numeric: tabular-nums;
}
.ribbon .flag {
  position: absolute; top: 31px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%;
  background: var(--c); transition: left .7s var(--ease);
}
.ribbon .flag.enter { animation: flagIn .55s var(--spring) both; }
.ribbon .flag.answer { border-radius: 4px; transform: rotate(45deg); background: var(--win); }
.ribbon .flag.answer.enter { animation: fadeIn .5s var(--ease) both; }
.ribbon .needle {
  position: absolute; top: 10px; height: 64px; width: 4px; margin-left: -2px; background: var(--accent); border-radius: 2px;
  pointer-events: none; transition: left .14s var(--ease);
}
.ribbon .needle::before {
  content: ""; position: absolute; top: -6px; left: 50%; width: 16px; height: 16px; margin-left: -8px;
  border-radius: 50%; background: var(--accent);
}
.ribbon.dragging .needle { transition: none; }
.ribbon input[type=range] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y;
}
.ribbon:focus-within .needle::before { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--accent); }

/* verdict: what the last guess said */
.verdict {
  min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 20px; border-radius: 999px; text-align: left; font: 600 19px/1.2 var(--ui);
}
.verdict.show { background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--ink); }
.verdict .dir { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; flex: none; }
.verdict .dir svg { width: 20px; height: 20px; transform: rotate(var(--r, 0deg)); }
.verdict small { font: 500 16px var(--ui); color: var(--muted); margin-left: 2px; }
.verdict.enter { animation: verdictIn .5s var(--spring) both; }
.verdict.enter .dir svg { animation: dirIn .8s .1s var(--spring) both; }
.verdict .hint { font: 500 16px var(--ui); color: var(--muted); }

/* guess history */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: 999px;
  background: var(--tone); font: 600 15px var(--ui); font-variant-numeric: tabular-nums;
}
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.chip em { font-style: normal; color: var(--muted); font-weight: 500; }
.chip.enter { animation: chipIn .45s var(--spring) both; }

/* tries as pips */
.pips { display: flex; gap: 6px; justify-content: center; align-items: center; }
.pips i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone-2); transition: background-color .3s, transform .45s var(--spring); }
.pips i.used { background: var(--ink); }
.pips i.used.win { background: var(--win); }
.pips i.just { transform: scale(1.7); }

/* actions: flat, fully round, one fill */
.cta {
  min-height: 58px; padding: 0 32px; border: 0; border-radius: 999px; width: 100%; max-width: 360px;
  background: var(--accent); color: var(--accent-ink); font: 600 18px var(--ui);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .12s var(--ease), background-color .25s, opacity .25s;
}
.cta:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.cta:active:not(:disabled) { transform: scale(.97); }
.cta:disabled { opacity: .35; cursor: default; }
.ghost {
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--tone);
  font: 600 15px var(--ui); transition: background-color .2s, transform .12s var(--ease);
}
.ghost:hover { background: var(--tone-2); }
.ghost:active { transform: scale(.97); }
.err { margin: -8px 0 0; min-height: 1.3em; font-size: 15px; color: var(--hot); text-align: center; }

/* ---------- WHERE stage ---------- */
.where-top {
  position: absolute; z-index: 12; top: calc(var(--bar-h) + 10px); left: 50%; width: min(600px, calc(100% - 20px));
  transform: translate(-50%, -16px); opacity: 0; pointer-events: none;
  transition: opacity .5s .35s var(--ease), transform .6s .35s var(--ease);
}
body.stage-where .where-top { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.mini {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; width: 100%;
  padding: 10px 16px 10px 10px; border: 0; border-radius: 22px; text-align: left;
  background: var(--surface); box-shadow: var(--float);
}
.year-badge {
  font: 900 30px/1 var(--display); font-variation-settings: "opsz" 144; letter-spacing: -.04em;
  padding: 10px 14px; border-radius: 14px; background: var(--ink); color: var(--bg);
}
.mini p { margin: 0; font: 400 16px/1.38 var(--display); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mini[aria-expanded="true"] p { -webkit-line-clamp: unset; }
.typing::after { content: "▍"; color: var(--accent); animation: caret .8s steps(1) infinite; }

.sheet {
  position: absolute; z-index: 12; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); width: min(600px, calc(100% - 20px));
  display: grid; gap: 12px; padding: 14px; border-radius: 28px;
  background: var(--surface); box-shadow: var(--float);
  transform: translate(-50%, calc(100% + 40px)); transition: transform .7s .25s var(--spring);
}
body.stage-where .sheet { transform: translate(-50%, 0); }
.sheet .row { display: flex; align-items: center; gap: 12px; }
.sheet .row .cta { flex: 1; max-width: none; }
.sheet .verdict { min-height: 50px; padding: 8px 16px; justify-content: flex-start; }
.sheet .verdict:not(.show) { justify-content: center; }
.sheet .chips { justify-content: flex-start; }
.sheet .chips:empty { display: none; }
.sheet .pips { padding: 0 6px 0 8px; }

/* map pins & trails */
.leaflet-container { background: var(--sea); font: inherit; }
.leaflet-container:focus { outline: none; }
/* keyboard players aim with a centre crosshair */
#map:focus-visible::after {
  content: ""; position: absolute; z-index: 500; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border-radius: 50%; border: 3px solid var(--accent); box-shadow: 0 0 0 3px var(--surface); pointer-events: none;
}
.leaflet-tooltip { font: 600 13px var(--ui); border: 0; border-radius: 999px; padding: 4px 10px; background: var(--ink); color: var(--bg); box-shadow: none; }
.leaflet-tooltip-top::before { border-top-color: var(--ink); }
.leaflet-bar { border: 0 !important; border-radius: 999px !important; overflow: hidden; box-shadow: var(--float) !important; }
.leaflet-bar a { background: var(--surface); color: var(--ink); border: 0 !important; width: 40px; height: 40px; line-height: 40px; }
.leaflet-top { top: 120px; }
body.stage-when .leaflet-control-container { display: none; }
.pin-wrap { background: none; border: 0; display: grid; place-items: center; }
.pin { position: relative; display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.pin.enter { animation: drop .55s var(--ease) both; }
.pin.enter::after, .pin.answer::before, .pin.answer::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--c); pointer-events: none;
}
.pin.enter::after { animation: sonar .9s .35s ease-out both; }
.pin.pending { width: 24px; height: 24px; animation: drop .45s var(--ease) both, breathe 1.6s .5s ease-in-out infinite; }
.pin.answer { width: 24px; height: 24px; }
.pin.answer::before { animation: sonar 2s ease-out infinite; }
.pin.answer::after { animation: sonar 2s 1s ease-out infinite; }
.trail { animation: march 1.2s linear infinite; }

/* ---------- RESULT plate ---------- */
.plate-wrap {
  position: absolute; inset: var(--bar-h) 0 0; z-index: 20; overflow-y: auto;
  display: grid; place-items: center; padding: 16px 12px 24px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
}
.plate-wrap[hidden] { display: none; }
.plate {
  position: relative; width: min(480px, 100%); border-radius: 28px; overflow: hidden;
  background: var(--surface); box-shadow: var(--float); animation: plateIn .7s var(--spring) both;
}
.plate figure { margin: 0; position: relative; background: var(--tone); aspect-ratio: 16 / 10; overflow: hidden; }
.plate figure img { width: 100%; height: 100%; object-fit: cover; display: block; animation: kenburns 14s ease-out both; }
.plate figure[hidden] { display: none; }
.plate figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 14px 8px; font: 500 12px/1.3 var(--ui); color: #fff; background: rgba(0,0,0,.45); }
.plate figcaption a { color: inherit; }
.plate .body { padding: 22px 24px 22px; }
.plate .dateline { text-align: left; }
.plate h2 {
  margin: 6px 0 2px; font: 800 clamp(32px, 8.5vw, 44px)/1 var(--display);
  font-variation-settings: "opsz" 144, "SOFT" 100; letter-spacing: -.03em; text-wrap: balance;
}
.plate .where-when { margin: 6px 0 0; font: 600 17px var(--ui); color: var(--accent); }
.plate .summary { margin: 12px 0 0; font: 400 18px/1.45 var(--display); }
.stamp {
  position: absolute; z-index: 2; top: 16px; right: 16px; padding: 8px 14px; border-radius: 999px;
  background: var(--sc); color: #fff; font: 700 15px var(--ui);
  transform: rotate(6deg); animation: stampIn .6s .45s var(--spring) both;
}
.grid-share {
  margin: 18px 0; padding: 14px 16px; border-radius: 18px; background: var(--tone);
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px 14px; align-items: center;
  font: 600 15px var(--ui);
}
.grid-share .sqs { display: flex; gap: 5px; flex-wrap: wrap; }
.grid-share .sq { width: 20px; height: 20px; border-radius: 6px; background: var(--c); animation: sqIn .45s var(--spring) both; animation-delay: calc(.6s + var(--i) * 80ms); }
.grid-share b { font-variant-numeric: tabular-nums; }
.plate-actions { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.plate-actions .cta { max-width: none; }
.next { text-align: right; font: 500 13px var(--ui); color: var(--muted); }
.next b { display: block; font: 700 22px var(--ui); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.plate-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.reopen { position: absolute; z-index: 15; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: auto; box-shadow: var(--float); }
.reopen[hidden] { display: none; }

/* ---------- dialogs ---------- */
dialog {
  width: min(460px, calc(100vw - 20px)); max-height: calc(100dvh - 32px); padding: 22px 24px 26px;
  border: 0; border-radius: 28px; background: var(--surface); color: var(--ink); box-shadow: var(--float);
}
dialog[open] { animation: dlgIn .32s var(--ease) both; }
dialog::backdrop { background: rgba(10, 12, 18, .45); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin: -8px -12px 8px 0; }
.dlg-head h3 { margin: 0; font: 800 30px var(--display); font-variation-settings: "opsz" 144, "SOFT" 100; letter-spacing: -.025em; }
.lede { margin: 0 0 20px; font: 400 20px/1.4 var(--display); }
.how { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.how li { display: grid; gap: 8px; }
.how b { font-weight: 700; }
.demo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dlg-cta { margin-top: 24px; max-width: none; }
.sub { margin: 24px 0 10px; font: 700 17px var(--ui); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.stat b { display: block; font: 800 36px/1.05 var(--display); font-variation-settings: "opsz" 144; letter-spacing: -.02em; }
.stat span { font: 500 13px/1.3 var(--ui); color: var(--muted); }
.dist { display: grid; gap: 5px; }
.dist .row { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; font: 600 14px var(--ui); font-variant-numeric: tabular-nums; }
.dist .fill { width: var(--w); min-width: 30px; padding: 3px 10px; border-radius: 999px; background: var(--tone-2); text-align: right; transform-origin: left; }
dialog[open] .dist .fill { animation: fill .6s var(--ease) both; animation-delay: calc(.15s + var(--i) * 45ms); }
.dist .row.mine .fill { background: var(--accent); color: var(--accent-ink); }
.empty { color: var(--muted); margin: 0; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days button { font: 600 14px var(--ui); min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--tone); color: var(--ink); }
.days button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.days button.done::after { content: " ✓"; }
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 18px; }
.settings label { display: grid; gap: 6px; font: 500 14px var(--ui); color: var(--muted); }
select { font: 15px var(--ui); min-height: 44px; padding: 6px 10px; border-radius: 12px; border: 0; background: var(--tone); color: var(--ink); }
details.log { margin-top: 22px; }
details.log summary { cursor: pointer; font: 600 15px var(--ui); color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; margin-top: 10px; }
th, td { text-align: left; padding: 6px; border-bottom: 1px solid var(--tone-2); }
th { color: var(--muted); font-weight: 500; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- motion ---------- */
@keyframes wordIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes numTick { from { transform: translateY(-4px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes flagIn { 0% { transform: translateY(-30px) scale(.4); opacity: 0; } 60% { transform: translateY(2px) scale(1.15); opacity: 1; } 100% { transform: none; } }
@keyframes verdictIn { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes dirIn { from { transform: rotate(calc(var(--r, 0deg) - 360deg)) scale(.4); opacity: 0; } to { transform: rotate(var(--r, 0deg)); opacity: 1; } }
@keyframes chipIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes drop { 0% { transform: translateY(-30px); opacity: 0; } 55% { transform: translateY(2px); opacity: 1; } 75% { transform: translateY(-4px); } 100% { transform: none; } }
@keyframes sonar { from { transform: scale(.5); opacity: .9; } to { transform: scale(3); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.15); } }
@keyframes march { to { stroke-dashoffset: -20; } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes plateIn { from { opacity: 0; transform: translateY(48px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes stampIn { 0% { opacity: 0; transform: rotate(6deg) scale(2.2); } 60% { opacity: 1; transform: rotate(6deg) scale(.92); } 100% { transform: rotate(6deg) scale(1); } }
@keyframes sqIn { from { transform: scale(0) rotate(-25deg); } 70% { transform: scale(1.3); } to { transform: none; } }
@keyframes dlgIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sealIn { 0% { transform: translate(6px, -10px) scale(0); } 60% { transform: scale(1.25); } 100% { transform: none; } }
@keyframes sealPulse { 30% { transform: scale(1.5); } }

.bar { animation: fadeUp .5s var(--ease) both; }
.brand .seal { transform-box: fill-box; transform-origin: center; animation: sealIn .7s .35s var(--spring) both; }
.brand.pulse .seal { animation: sealPulse .6s var(--spring); }
.when-inner > * { animation: fadeUp .7s var(--ease) both; }
.when-inner > :nth-child(3) { animation-delay: .3s; }
.when-inner > :nth-child(4) { animation-delay: .38s; }
.when-inner > :nth-child(5) { animation-delay: .46s; }
.when-inner > :nth-child(n+6) { animation-delay: .54s; }

@media (max-width: 380px) { .stepper { width: 44px; height: 44px; } .wordmark { font-size: 28px; } .prompt { font-size: 22px; } }
@media (max-height: 700px) { .when-inner { gap: 14px; } .numeral { font-size: clamp(64px, 18vw, 96px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
