:root {
  color-scheme: dark light;
  --bg-000: #111113;
  --bg-100: #1b1b1f;
  --bg-200: #2b2b2f;
  --bg-300: #39393d;
  --glass-fill: rgba(28,28,30,0.8);
  --glass-stroke: rgba(255,255,255,0.1);
  --scrim: rgba(0,0,0,0.6);
  --ink: #ffffff;
  --ink-muted: #aeaeb2;
  --ink-faint: #98989d;
  --action: #d9a05b;
  --on-action: #1f1609;
  --accent: #e3a65e;
  --on-accent: #1b1b1f;
  --accent-ink: #e8ad66;
  --chip: #d1d1d6;
  --on-chip: #1b1b1f;
  --good: #5ebd72;
  --on-good: #0b1f10;
  --lilac: #b49cf0;
  --on-lilac: #1a1033;
  --rose: #ff7b8a;
  --on-rose: #2e0a14;
  --vigor: #ffffff;
  --flame: #e8ad66;
  --rarity-fine: #d1d1d6;
  --rarity-star: #ffd60a;
  --danger: #ff7066;
  --on-danger: #1b1b1f;
  --focus-ring: #ffffff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-sheet: 34px;
  --radius-pill: 999px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg-000: #e5e5ea;
    --bg-100: #f2f2f7;
    --bg-200: #ffffff;
    --bg-300: #e5e5ea;
    --glass-fill: rgba(255,255,255,0.82);
    --glass-stroke: rgba(0,0,0,0.08);
    --scrim: rgba(0,0,0,0.35);
    --ink: #1b1b1f;
    --ink-muted: #3c3c43;
    --ink-faint: #6c6c70;
    --action: #e6ae66;
    --on-action: #1f1609;
    --accent: #a35f00;
    --on-accent: #ffffff;
    --accent-ink: #8a5000;
    --chip: #39393d;
    --on-chip: #ffffff;
    --good: #1f7a3a;
    --on-good: #ffffff;
    --lilac: #5e3fb8;
    --on-lilac: #ffffff;
    --rose: #b0263f;
    --on-rose: #ffffff;
    --vigor: #1b1b1f;
    --flame: #8a5000;
    --rarity-fine: #55606b;
    --rarity-star: #7a5e00;
    --danger: #c41e14;
    --on-danger: #ffffff;
    --focus-ring: #1b1b1f;
  }
}

@font-face {
  font-family: "IM Fell English";
  src: url("/fonts/im-fell-english.ttf") format("truetype");
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; 
  background: var(--bg-100);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

a { color: var(--accent-ink); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }

h1, h2 { font-family: "IM Fell English", "Iowan Old Style", Georgia, serif; font-weight: 400; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(32px, 6vw, 44px); }
h2 { font-size: clamp(26px, 4.4vw, 32px); }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
p { margin: 0 0 12px; }

.px { image-rendering: pixelated; image-rendering: crisp-edges; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 16px; top: -48px; padding: 8px 12px; background: var(--bg-200); color: var(--ink); border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }

main { flex: 1 0 auto; }
.top, main, .foot { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: "IM Fell English", Georgia, serif; font-size: 20px; }
.brand img { border-radius: 8px; }
.top nav { display: flex; gap: 16px; font-size: 15px; }
.top nav a { color: var(--ink-muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }

.foot { border-top: 1px solid var(--glass-stroke); margin-top: 64px; padding-top: 24px; padding-bottom: 40px; color: var(--ink-faint); font-size: 13px; }
.foot nav { margin-bottom: 12px; font-size: 15px; }
.foot nav a { color: var(--ink-muted); }
.foot p { margin: 0 0 6px; }

.hero { text-align: center; padding: 24px 0 8px; }
.splash { width: min(432px, 88vw); height: auto; display: block; margin: 0 auto 24px; }
.soon span {
  display: inline-block; padding: 10px 18px; border-radius: var(--radius-md);
  border: 1px solid var(--accent-ink); color: var(--accent-ink); font-size: 15px; font-weight: 600;
}

.lane { position: relative; height: 72px; margin: 32px auto 0; max-width: 720px; overflow: hidden; border-bottom: 2px solid var(--bg-300); }
.mover { position: absolute; bottom: 4px; left: 0; animation: cross 9s linear infinite; animation-delay: var(--delay); }
.sprite {
  display: block; width: var(--w); height: 64px;
  background-repeat: no-repeat; background-size: calc(var(--frames) * var(--w)) 64px;
  image-rendering: pixelated;
  animation: frames 0.8s steps(var(--frames)) infinite;
}
.sprite.flip { transform: scaleX(-1); }
@keyframes frames { to { background-position-x: calc(var(--frames) * var(--w) * -1); } }
@keyframes cross { from { transform: translateX(-80px); } to { transform: translateX(min(760px, 100vw)); } }
@media (prefers-reduced-motion: reduce) {
  .mover, .sprite { animation: none; }
  .mover { position: static; }
  .lane { display: flex; justify-content: center; gap: 12px; }
}

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 72px; }
.feature.flip .art { order: 2; }
.feature .words p { color: var(--ink-muted); }
.art { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.well { margin: 0; background: var(--bg-000); border-radius: var(--radius-md); padding: 20px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.well img { width: 96px; height: 96px; } 
.well figcaption { font-size: 13px; color: var(--ink-faint); }

.note { max-width: 520px; margin: 96px auto 0; text-align: center; }
.note h2 { margin-bottom: 8px; }
.note .line { padding: 28px 0 0; }
.note .line img { width: 48px; height: 48px; display: block; margin: 0 auto 10px; }
.note h3 { font-family: "IM Fell English", Georgia, serif; font-weight: 400; font-size: 22px; line-height: 1.25; margin-bottom: 6px; }
.note p { color: var(--ink-muted); margin: 0; }

@media (max-width: 720px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 20px; margin-top: 56px; }
  .feature.flip .art { order: 0; }
  .art { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .well { padding: 14px 4px 8px; }
  .well img { width: 64px; height: 64px; } 
  .well figcaption { font-size: 11px; }
  .top nav { gap: 12px; }
  .brand span { display: none; }
}

.doc { max-width: 680px; margin: 16px auto 0; }
.doc .meta { color: var(--ink-faint); font-size: 13px; }
.doc .lede { font-size: 19px; color: var(--ink-muted); margin: 16px 0 24px; }
.doc section { margin-top: 32px; }
.doc h2 { font-size: 26px; }
.doc section p { color: var(--ink); }
.toc { background: var(--bg-200); border: 1px solid var(--glass-stroke); border-radius: var(--radius-md); padding: 16px 20px; font-size: 15px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
.toc li { margin: 2px 0; break-inside: avoid; }
@media (max-width: 560px) { .toc ol { columns: 1; } }

.lost { text-align: center; padding: 64px 0; }
.lost img { width: 96px; height: 96px; margin-bottom: 16px; }

.countdown { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 18px auto 0; height: 152px; visibility: hidden; }
.cd-row { display: flex; justify-content: center; gap: 14px; height: 64px; }

.cd-smith { height: 80px; background-size: calc(var(--frames) * var(--w)) 80px; animation-duration: 2s; }
.countdown.on { visibility: visible; }
.cd-cell { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 6px 4px;
  border: 1px solid var(--bg-300); border-radius: 10px; }
.cd-cell b { font-size: 26px; line-height: 1.1; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.cd-cell i { font-style: normal; font-size: 12px; color: var(--ink-muted); letter-spacing: .08em; }
