:root {
  --cream: #fbf1dc;
  --cream-deep: #f2dfbf;
  --kraft: #d9c4a3;
  --kraft-dark: #b59165;
  --rose: #e8a0a0;
  --rose-dark: #bd6f77;
  --lavender: #b9a8d8;
  --lavender-dark: #7d72ad;
  --night: #2b3050;
  --night-ink: #1d213a;
  --ink: #242741;
  --fox: #d96f46;
  --fox-dark: #9e4d34;
  --gold: #f6d57b;
  --moss: #6d866f;
  --pine: #526f72;
  --river: #7fa3bd;
  --sky-top: #f6dcae;
  --sky-mid: #f1beb3;
  --sky-low: #e8a0a0;
  --paper-speck: rgba(86, 59, 44, 0.1);
  --paper-edge: rgba(82, 57, 42, 0.16);
  --shadow: rgba(39, 31, 30, 0.28);
  --soft-shadow: rgba(43, 48, 80, 0.2);
  --display: "Young Serif", Georgia, serif;
  --ui: "Baloo 2", "Trebuchet MS", sans-serif;
  --topbar-h: 74px;
}

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

html {
  min-width: 0;
  overflow-x: clip;
  background: var(--night);
  color-scheme: light;
  scroll-padding-top: calc(var(--topbar-h) + 24px);
  scroll-behavior: smooth;
  scrollbar-color: var(--rose) var(--night);
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 24px 18px, var(--paper-speck) 0 1px, transparent 1.4px) 0 0 / 54px 48px,
    radial-gradient(circle at 12px 34px, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.3px) 0 0 / 38px 42px,
    radial-gradient(circle at 10% 12%, rgba(255, 240, 203, 0.28), transparent 24rem),
    linear-gradient(180deg, var(--sky-top), var(--night) 74%);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 18px;
  line-height: 1.5;
  font-kerning: normal;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

::selection,
body::selection {
  background: var(--gold);
  color: var(--night-ink);
}

::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background: var(--night-ink);
}

::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg, var(--rose), var(--gold));
  border: 3px solid var(--night-ink);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, #f0b2ae, #ffe38e);
}

a,
button {
  color: inherit;
  font: inherit;
  touch-action: manipulation;
}

a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.skiplink {
  position: fixed;
  z-index: 100;
  top: 14px;
  left: 14px;
  padding: 10px 14px;
  color: var(--night-ink);
  background: var(--gold);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skiplink:focus-visible {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

.topbar {
  position: fixed;
  z-index: 40;
  top: clamp(10px, 2vw, 20px);
  left: clamp(10px, 2.2vw, 28px);
  right: clamp(10px, 2.2vw, 28px);
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(8px, 1.2vw, 18px);
  padding: 8px 10px 8px 12px;
  color: var(--night-ink);
  background:
    linear-gradient(135deg, rgba(251, 241, 220, 0.93), rgba(242, 223, 191, 0.82)),
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.55), transparent 40%);
  border: 1px solid rgba(72, 55, 45, 0.17);
  border-radius: 8px;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.7) inset,
    0 12px 28px rgba(34, 29, 37, 0.18),
    4px 5px 0 rgba(79, 55, 42, 0.14);
  backdrop-filter: blur(10px);
  clip-path: polygon(0.6% 6%, 99.2% 0, 100% 91%, 1.2% 100%);
  transition: opacity 260ms ease, transform 340ms ease;
}

.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 44%),
    rgba(221, 184, 139, 0.58);
  border: 1px solid rgba(79, 55, 42, 0.08);
  box-shadow: 2px 3px 0 rgba(53, 39, 45, 0.08);
  clip-path: polygon(5% 0, 100% 8%, 94% 100%, 0 88%);
}

.topbar::before {
  top: -12px;
  left: min(34vw, 430px);
  width: 72px;
  height: 25px;
  transform: rotate(-4deg);
}

.topbar::after {
  right: 116px;
  bottom: -11px;
  width: 64px;
  height: 22px;
  opacity: 0.75;
  transform: rotate(5deg);
}

.topbar.is-tucked {
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(-100% - 44px)) rotate(0.8deg);
}

.guide-body .topbar {
  position: absolute;
}

.brand,
.topbar__guide {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  text-decoration: none;
}

.brand {
  min-width: 0;
  gap: 8px;
  padding: 4px 8px;
}

.brand__fox {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  color: var(--fox);
  filter: drop-shadow(2px 3px 0 rgba(43, 48, 80, 0.18));
  transition: transform 220ms cubic-bezier(0.18, 0.9, 0.2, 1);
}

.brand__name {
  min-width: 0;
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenenav {
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: center;
}

.dot {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.dot span {
  width: 14px;
  height: 14px;
  display: block;
  border-radius: 50% 48% 52% 49%;
  background: var(--kraft-dark);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.4) inset,
    1px 2px 0 rgba(43, 48, 80, 0.16);
  transition: transform 180ms ease, background 180ms ease;
}

.dot:is(:hover, .is-active) span,
.dot:focus-visible span,
.dot[aria-current="true"] span {
  background: var(--fox);
  transform: scale(1.28) rotate(-8deg);
}

.dot[aria-current="true"] span {
  box-shadow:
    0 0 0 5px rgba(246, 213, 123, 0.24),
    0 2px 0 rgba(255, 255, 255, 0.4) inset,
    1px 2px 0 rgba(43, 48, 80, 0.16);
}

.topbar__guide {
  flex: 0 0 auto;
  justify-self: end;
  padding: 4px 12px;
  background: var(--night);
  color: var(--cream);
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 3px 4px 0 rgba(43, 48, 80, 0.2);
  clip-path: polygon(5% 0, 100% 7%, 94% 100%, 0 91%);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.brand:is(:hover, :focus-visible) .brand__fox {
  transform: translateY(-1px) rotate(-9deg);
}

.topbar__guide:is(:hover, :focus-visible) {
  background: #343a61;
  box-shadow: 5px 6px 0 rgba(43, 48, 80, 0.24);
  transform: translateY(-2px) rotate(1.2deg);
}

.guide-toplinks {
  grid-column: 2 / 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.track {
  position: relative;
  height: 820svh;
  min-height: 5200px;
}

.stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  z-index: 6;
  pointer-events: none;
}

.stage::before {
  inset: auto -8vw 0;
  height: 20svh;
  background: linear-gradient(180deg, transparent, rgba(43, 48, 80, 0.16));
}

.stage::after {
  right: clamp(18px, 4vw, 80px);
  bottom: clamp(18px, 4vw, 56px);
  width: clamp(78px, 9vw, 132px);
  height: clamp(28px, 3vw, 42px);
  background: rgba(251, 241, 220, 0.28);
  filter: blur(18px);
  border-radius: 50%;
}

.sky,
.skybits,
.scenery,
.moonrig,
.foxrig,
.glowcanvas,
.ribbonline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sky {
  z-index: 0;
  background:
    radial-gradient(circle at var(--sun-x, 18%) var(--sun-y, 22%), rgba(255, 232, 169, var(--sun-alpha, 0.62)) 0 5.2rem, transparent 5.35rem),
    radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.26), transparent 18rem),
    linear-gradient(180deg, var(--sky-top), var(--sky-mid) 46%, var(--sky-low));
  transition: background 500ms ease;
}

.sky::before,
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sky::before {
  opacity: 0.34;
  mix-blend-mode: multiply;
  background:
    linear-gradient(90deg, rgba(91, 63, 47, 0.08) 1px, transparent 1px) 0 0 / 44px 44px,
    radial-gradient(circle at 18px 16px, rgba(79, 55, 42, 0.18) 0 1px, transparent 1.5px) 0 0 / 36px 39px;
}

.sky::after {
  background:
    radial-gradient(ellipse at 50% 115%, rgba(29, 33, 58, 0.2), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 28%, rgba(29, 33, 58, 0.08));
}

.skybits {
  z-index: 1;
}

.scenery {
  z-index: 3;
}

.moonrig {
  z-index: 5;
}

.foxrig {
  z-index: 8;
}

.glowcanvas {
  z-index: 7;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 260ms ease;
}

.ribbonline {
  z-index: 6;
  overflow: visible;
}

.scene-counter {
  position: absolute;
  z-index: 20;
  right: clamp(18px, 3vw, 46px);
  bottom: clamp(18px, 3vw, 42px);
  max-width: min(56vw, 310px);
  padding: 6px 13px 7px;
  color: var(--cream);
  background: rgba(29, 33, 58, 0.88);
  border: 1px solid rgba(251, 241, 220, 0.18);
  font-size: clamp(0.82rem, 1vw, 0.98rem);
  font-weight: 800;
  line-height: 1;
  box-shadow:
    4px 5px 0 rgba(8, 10, 18, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
  clip-path: polygon(3% 0, 100% 7%, 94% 100%, 0 90%);
  transform: rotate(-1.5deg);
  transition: opacity 220ms ease, transform 220ms ease;
}

.stage[data-scene="0"] .scene-counter {
  opacity: 0;
  transform: translateY(8px) rotate(-1.5deg);
}

.scene-svg,
.sky-svg,
.ribbonline {
  display: block;
  width: 100%;
  height: 100%;
}

.scene-layer,
.sky-layer {
  opacity: 0;
  transition: opacity 420ms ease;
  will-change: opacity;
}

.paper {
  stroke: rgba(37, 31, 36, 0.12);
  stroke-width: 2;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
  filter:
    drop-shadow(2px 3px 0 rgba(255, 255, 255, 0.22))
    drop-shadow(6px 9px 0 rgba(53, 39, 45, 0.12))
    drop-shadow(0 18px 18px rgba(38, 31, 42, 0.13));
}

.paper-patch {
  stroke: rgba(82, 57, 42, 0.08);
}

.moon-hole {
  filter:
    drop-shadow(0 0 0 rgba(0, 0, 0, 0))
    drop-shadow(3px 4px 0 rgba(43, 48, 80, 0.08));
}

.moon-hole-stitch,
.whisper-line,
.lantern-trail,
.constellation-line,
.homeward-thread {
  stroke-width: 3;
}

.whisper-line {
  stroke: rgba(251, 241, 220, 0.28);
  stroke-dasharray: 7 14;
}

.lantern-trail {
  stroke: rgba(246, 213, 123, 0.34);
  stroke-dasharray: 4 16;
}

.constellation-line {
  stroke: rgba(246, 213, 123, 0.32);
  stroke-dasharray: 3 13;
}

.homeward-thread {
  stroke: rgba(248, 231, 172, 0.42);
  stroke-dasharray: 10 12;
}

.lantern-dot,
.spark-cutout,
.home-glow {
  filter:
    drop-shadow(0 0 14px rgba(246, 213, 123, 0.7))
    drop-shadow(3px 4px 0 rgba(6, 8, 15, 0.14));
}

.lantern-dot {
  stroke: rgba(255, 241, 164, 0.46);
}

.paper--thin {
  filter:
    drop-shadow(2px 3px 0 rgba(255, 255, 255, 0.18))
    drop-shadow(4px 6px 0 rgba(53, 39, 45, 0.12));
}

.paper--dark {
  stroke: rgba(251, 241, 220, 0.08);
}

.paper--light {
  stroke: rgba(43, 48, 80, 0.1);
}

.cut-line {
  fill: none;
  stroke: rgba(43, 48, 80, 0.36);
  stroke-dasharray: 10 12;
  stroke-linecap: round;
  stroke-width: 2.5;
}

.cover,
.scrap {
  position: absolute;
  z-index: 18;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 380ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 380ms ease;
  will-change: opacity, transform;
}

.cover.is-active,
.scrap.is-active {
  opacity: 1;
  pointer-events: auto;
}

.cover {
  top: 54%;
  left: 50%;
  width: min(92vw, 820px);
  text-align: center;
  transform: translate3d(-50%, calc(-50% + 28px), 0) rotate(-0.8deg) scale(0.96);
  filter: drop-shadow(0 20px 30px rgba(35, 28, 35, 0.18));
}

.preload .topbar {
  opacity: 0;
  transform: translateY(-18px) rotate(-0.6deg);
}

.preload .cover__kicker,
.preload .cover__sub,
.preload .cover__by,
.preload .cover__hint {
  opacity: 0;
  transform: translateY(14px);
}

.preload .tile {
  opacity: 0;
  transform: translateY(18px) rotate(-4deg) scale(0.9);
}

.cover__kicker,
.cover__sub,
.cover__by,
.cover__hint,
.tile {
  transition:
    opacity 520ms ease,
    transform 720ms cubic-bezier(0.18, 0.9, 0.2, 1);
}

.cover__row:nth-child(1) .tile {
  transition-delay: 70ms;
}

.cover__row:nth-child(2) .tile:nth-child(1) {
  transition-delay: 120ms;
}

.cover__row:nth-child(2) .tile:nth-child(2) {
  transition-delay: 170ms;
}

.cover__row:nth-child(2) .tile:nth-child(3) {
  transition-delay: 220ms;
}

.cover__row:nth-child(2) .tile:nth-child(4) {
  transition-delay: 270ms;
}

.cover__row:nth-child(2) .tile:nth-child(5) {
  transition-delay: 320ms;
}

.cover__row:nth-child(3) .tile {
  transition-delay: 390ms;
}

.cover.is-active {
  transform: translate3d(-50%, -50%, 0) rotate(-0.8deg) scale(1);
}

.cover__kicker,
.cover__sub,
.cover__by,
.cover__hint {
  margin: 0;
}

.cover__kicker {
  display: inline-block;
  padding: 5px 14px 7px;
  color: var(--night);
  background: rgba(251, 241, 220, 0.74);
  font-weight: 800;
  line-height: 1;
  clip-path: polygon(2% 5%, 100% 0, 98% 92%, 0 100%);
  box-shadow: 4px 5px 0 rgba(82, 54, 38, 0.12);
}

.cover__title {
  display: grid;
  gap: clamp(7px, 1vw, 13px);
  justify-content: center;
  margin: clamp(16px, 2.4vw, 30px) 0 clamp(12px, 1.8vw, 24px);
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 8.6rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  text-wrap: balance;
}

.cover__row {
  display: flex;
  gap: clamp(5px, 0.8vw, 12px);
  justify-content: center;
}

.cover__row--small {
  font-size: 0.45em;
}

.tile {
  position: relative;
  min-width: 0.82em;
  min-height: 0.86em;
  display: grid;
  place-items: center;
  padding: 0.04em 0.12em 0.12em;
  color: var(--night-ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.22);
  box-shadow:
    4px 4px 0 rgba(80, 58, 44, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.55) inset;
  clip-path: polygon(4% 7%, 94% 0, 100% 85%, 82% 100%, 6% 92%, 0 16%);
  animation: tileWaver 5s ease-in-out infinite;
}

.tile::after {
  content: "";
  position: absolute;
  top: 9%;
  right: 11%;
  left: 12%;
  height: 2px;
  background: rgba(255, 255, 255, 0.32);
  transform: rotate(-2deg);
}

.tile:nth-child(even) {
  animation-delay: -2.1s;
  transform: rotate(1.3deg);
}

.tile:nth-child(odd) {
  transform: rotate(-1.4deg);
}

.t-c1 {
  background: var(--kraft);
}

.t-c2 {
  background: var(--rose);
}

.t-c3 {
  background: var(--lavender);
}

.t-c4 {
  background: var(--gold);
}

.cover__sub {
  color: var(--night);
  font-size: clamp(1.1rem, 2.2vw, 1.85rem);
  font-weight: 800;
  text-wrap: balance;
}

.cover__by {
  margin-top: 4px;
  color: rgba(36, 39, 65, 0.78);
  font-weight: 700;
}

.cover__hint {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(16px, 3vh, 34px);
  padding: 7px 14px 8px;
  color: var(--cream);
  background: var(--night);
  font-weight: 800;
  box-shadow: 4px 5px 0 rgba(62, 40, 34, 0.18);
  clip-path: polygon(2% 0, 98% 7%, 100% 88%, 0 100%);
}

.cover__hint svg {
  width: 18px;
  height: 22px;
  animation: hintBounce 1.4s ease-in-out infinite;
}

.scrap {
  width: min(38vw, 430px);
  min-height: 164px;
  padding: clamp(18px, 2.2vw, 28px) clamp(18px, 2.7vw, 32px) clamp(19px, 2.6vw, 30px);
  color: var(--night-ink);
  background:
    radial-gradient(circle at 20px 18px, rgba(83, 60, 43, 0.07) 0 1px, transparent 1.3px) 0 0 / 38px 42px,
    linear-gradient(128deg, rgba(255, 255, 255, 0.25), transparent 30%),
    linear-gradient(180deg, var(--cream), var(--cream-deep));
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.7) inset,
    7px 9px 0 rgba(88, 62, 43, 0.14),
    0 22px 44px rgba(34, 28, 38, 0.22);
  clip-path: polygon(3% 3%, 95% 0, 100% 91%, 86% 100%, 4% 96%, 0 16%);
  transform: translate3d(0, 28px, 0) rotate(calc(var(--rot, 0deg) - 2deg)) scale(0.97);
  scrollbar-color: var(--kraft-dark) transparent;
  scrollbar-width: thin;
}

.scrap::before,
.scrap::after {
  content: "";
  position: absolute;
  z-index: 1;
  height: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 42%),
    rgba(221, 184, 139, 0.72);
  border: 1px solid rgba(79, 55, 42, 0.08);
  box-shadow: 2px 3px 0 rgba(53, 39, 45, 0.09);
  transform: rotate(var(--tape-rot, -6deg));
  clip-path: polygon(4% 6%, 96% 0, 100% 86%, 0 100%);
}

.scrap::before {
  top: -11px;
  left: clamp(22px, 24%, 115px);
  width: 86px;
}

.scrap::after {
  right: clamp(12px, 12%, 48px);
  bottom: -10px;
  width: 70px;
  transform: rotate(calc(var(--tape-rot, -6deg) * -0.8));
  opacity: 0.68;
}

.scrap.is-active {
  transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)) scale(1);
}

.scrap__cap {
  position: relative;
  z-index: 2;
  margin: 0 0 10px;
  color: var(--rose-dark);
  font-size: clamp(0.88rem, 1vw, 1rem);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

.scrap__txt {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.5vw, 1.38rem);
  line-height: 1.48;
  hanging-punctuation: first allow-end;
  text-wrap: pretty;
}

.scrap--1 {
  top: 18%;
  left: 8%;
  --rot: -2.2deg;
  --tape-rot: 7deg;
}

.scrap--2 {
  top: 20%;
  right: 7%;
  --rot: 2.1deg;
  --tape-rot: -9deg;
}

.scrap--3 {
  top: 17%;
  left: 9%;
  --rot: 1.4deg;
  --tape-rot: 5deg;
}

.scrap--4 {
  top: 16%;
  right: 8%;
  --rot: -1.5deg;
  --tape-rot: 11deg;
}

.scrap--5 {
  top: 18%;
  left: 7%;
  width: min(39vw, 470px);
  --rot: -2.7deg;
  --tape-rot: -6deg;
}

.scrap--6 {
  top: 18%;
  right: 8%;
  width: min(37vw, 450px);
  --rot: 2.6deg;
  --tape-rot: 7deg;
}

.scrap--7 {
  top: 14%;
  left: 12%;
  width: min(44vw, 520px);
  --rot: -0.8deg;
  --tape-rot: -5deg;
}

.scrap--7.is-active {
  transform: translate3d(0, 0, 0) rotate(var(--rot)) scale(1);
}

.paperfox-svg {
  position: absolute;
  top: var(--fox-y, 74%);
  left: var(--fox-x, 20%);
  width: clamp(98px, 13vw, 184px);
  height: auto;
  overflow: visible;
  opacity: var(--fox-opacity, 1);
  transform: translate(-50%, -50%) scaleX(var(--fox-flip, 1)) scale(var(--fox-scale, 1));
  transform-origin: 50% 74%;
  filter:
    drop-shadow(2px 3px 0 rgba(255, 255, 255, 0.24))
    drop-shadow(6px 8px 0 rgba(43, 48, 80, 0.18))
    drop-shadow(0 18px 18px rgba(26, 24, 35, 0.18));
  transition: opacity 180ms ease;
}

.paperfox-svg .fox-paper {
  stroke: rgba(43, 48, 80, 0.16);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.paperfox-svg .fox-body {
  animation: foxBreathe 3.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center bottom;
}

.paperfox-svg .fox-tail {
  animation: tailSway 3.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 22% 72%;
}

.paperfox-svg .fox-ear {
  animation: earTwitch 4.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center bottom;
}

.paperfox-svg .fox-ear--right {
  animation-delay: 0.18s;
}

.moon-paper {
  position: absolute;
  top: calc(var(--moon-y, 18%) + var(--moon-y-offset, 0px));
  left: var(--moon-x, 76%);
  width: clamp(118px, 21vw, 330px);
  aspect-ratio: 1;
  opacity: var(--moon-opacity, 0);
  overflow: hidden;
  border-radius: 48% 52% 51% 49% / 51% 48% 52% 50%;
  background:
    radial-gradient(circle at 31% 34%, rgba(207, 177, 114, 0.38) 0 6%, transparent 6.8%),
    radial-gradient(circle at 63% 61%, rgba(207, 177, 114, 0.28) 0 8%, transparent 8.8%),
    radial-gradient(circle at 67% 30%, rgba(255, 255, 255, 0.55) 0 12%, transparent 12.5%),
    linear-gradient(145deg, #fff5ca, #f4d982 72%, #d8aa58);
  box-shadow:
    0 3px 0 rgba(255, 255, 255, 0.76) inset,
    8px 10px 0 rgba(33, 28, 42, 0.16),
    0 0 54px rgba(246, 213, 123, 0.45),
    0 0 0 16px rgba(246, 213, 123, 0.05);
  transform: translate(-50%, -50%) scale(var(--moon-scale, 1)) rotate(var(--moon-rot, -4deg));
  transition: opacity 300ms ease;
  will-change: opacity, transform;
}

.moon-paper::before,
.moon-paper::after {
  content: "";
  position: absolute;
  z-index: 0;
  background: rgba(181, 145, 101, 0.2);
  border-radius: 50%;
  box-shadow: inset 2px 2px 0 rgba(106, 78, 63, 0.1);
}

.moon-paper::before {
  top: 23%;
  left: 24%;
  width: 22%;
  height: 20%;
}

.moon-paper::after {
  right: 20%;
  bottom: 27%;
  width: 17%;
  height: 16%;
}

.moon-paper.is-found {
  animation: moonFloat 4s ease-in-out infinite;
}

.moon-eye,
.moon-smile {
  position: absolute;
  z-index: 1;
  display: block;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 520ms ease,
    transform 700ms cubic-bezier(0.18, 0.9, 0.2, 1);
}

.moon-eye {
  top: 38%;
  width: 15%;
  height: 9%;
  border-top: 4px solid rgba(43, 48, 80, 0.34);
  border-radius: 50%;
}

.moon-eye--left {
  left: 31%;
}

.moon-eye--right {
  right: 29%;
}

.moon-smile {
  left: 43%;
  top: 54%;
  width: 17%;
  height: 10%;
  border-bottom: 4px solid rgba(43, 48, 80, 0.3);
  border-radius: 50%;
}

.moon-paper.is-final .moon-eye,
.moon-paper.is-final .moon-smile {
  opacity: 1;
  transform: translateY(0);
}

.moon-paper.is-final {
  box-shadow:
    0 3px 0 rgba(255, 255, 255, 0.76) inset,
    12px 15px 0 rgba(8, 10, 18, 0.22),
    0 0 82px rgba(246, 213, 123, 0.62),
    0 0 0 28px rgba(246, 213, 123, 0.08);
}

.moon-string {
  position: absolute;
  top: calc(var(--string-y, 14%) + var(--string-y-offset, 0px));
  left: var(--string-x, 61%);
  width: clamp(140px, 24vw, 370px);
  height: clamp(160px, 28vw, 390px);
  opacity: var(--moon-opacity, 0);
  overflow: visible;
  transform: translate(-50%, -10%) rotate(var(--string-rot, 0deg));
  will-change: opacity, transform;
}

.moon-string path {
  fill: none;
  stroke: rgba(248, 231, 172, 0.8);
  stroke-linecap: round;
  stroke-width: 8;
  stroke-dasharray: 13 11;
  filter: drop-shadow(4px 5px 0 rgba(43, 48, 80, 0.16));
}

.pull-ribbon {
  fill: none;
  stroke: rgba(248, 231, 172, 0.88);
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-dasharray: 2.8 1.9;
  filter:
    drop-shadow(0.5px 0.8px 0 rgba(255, 255, 255, 0.2))
    drop-shadow(1.5px 2px 0 rgba(10, 12, 24, 0.2));
  opacity: 0;
}

.endcard {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(90px, 12vh, 150px) 20px clamp(80px, 12vh, 140px);
  color: var(--cream);
  text-align: center;
  background:
    radial-gradient(circle at 50% 24%, rgba(246, 213, 123, 0.22), transparent 22rem),
    linear-gradient(180deg, #232845, var(--night-ink));
}

.endcard::before {
  content: "";
  position: absolute;
  right: -9vw;
  bottom: -12vw;
  width: min(56vw, 700px);
  aspect-ratio: 1;
  border-radius: 48% 52% 51% 49%;
  background: rgba(246, 213, 123, 0.12);
  box-shadow: 0 0 80px rgba(246, 213, 123, 0.1);
}

.endcard__stars {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, #f8df8b 0 2px, transparent 2.5px),
    radial-gradient(circle at 78% 18%, #f8df8b 0 2px, transparent 2.5px),
    radial-gradient(circle at 62% 35%, #fbf1dc 0 1.5px, transparent 2px),
    radial-gradient(circle at 28% 62%, #fbf1dc 0 1.5px, transparent 2px),
    radial-gradient(circle at 84% 68%, #f8df8b 0 2px, transparent 2.5px);
  opacity: 0.9;
}

.endcard__fox {
  position: absolute;
  left: 50%;
  bottom: clamp(48px, 10vh, 96px);
  width: clamp(150px, 18vw, 260px);
  height: clamp(74px, 9vw, 126px);
  transform: translateX(-50%);
  background: var(--fox);
  border-radius: 58% 42% 50% 48% / 64% 58% 42% 36%;
  box-shadow:
    8px 10px 0 rgba(0, 0, 0, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.32) inset;
  clip-path: polygon(5% 43%, 21% 12%, 42% 18%, 68% 8%, 96% 40%, 88% 72%, 55% 92%, 17% 85%);
}

.endcard__fox::before {
  content: "";
  position: absolute;
  right: -20%;
  bottom: 20%;
  width: 56%;
  height: 62%;
  background: var(--fox-dark);
  border-radius: 50%;
  clip-path: polygon(0 42%, 78% 0, 100% 47%, 70% 100%, 13% 88%);
}

.endcard__fox::after {
  content: "";
  position: absolute;
  left: 18%;
  top: 30%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--night-ink);
  box-shadow: 22px 8px 0 rgba(251, 241, 220, 0.84);
}

.endcard__title,
.endcard__sub,
.endcard__copy,
.moonpull,
.ribbonbtn {
  position: relative;
  z-index: 1;
}

.moonpull {
  width: clamp(150px, 15vw, 230px);
  height: clamp(104px, 12vw, 154px);
  display: block;
  margin: 0 auto clamp(4px, 1vw, 14px);
  padding: 0;
  border: 0;
  color: var(--cream);
  background: transparent;
}

.moonpull__string {
  position: absolute;
  top: 1%;
  left: 50%;
  width: 10px;
  height: 62%;
  transform: translateX(-50%);
  background:
    repeating-linear-gradient(180deg, rgba(248, 231, 172, 0.88) 0 10px, transparent 10px 18px);
  border-radius: 999px;
  filter: drop-shadow(2px 3px 0 rgba(6, 8, 15, 0.28));
  transform-origin: 50% 0;
  transition: transform 420ms cubic-bezier(0.18, 0.9, 0.2, 1);
}

.moonpull__moon {
  position: absolute;
  top: 38%;
  left: 50%;
  width: clamp(72px, 7vw, 116px);
  aspect-ratio: 1;
  border-radius: 48% 52% 50% 51%;
  background:
    radial-gradient(circle at 34% 35%, rgba(181, 145, 101, 0.28) 0 11%, transparent 11.8%),
    radial-gradient(circle at 67% 58%, rgba(181, 145, 101, 0.22) 0 9%, transparent 9.8%),
    linear-gradient(145deg, #fff3bf, var(--gold));
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.62) inset,
    7px 9px 0 rgba(6, 8, 15, 0.24),
    0 0 44px rgba(246, 213, 123, 0.42);
  transform: translate(-50%, -50%) rotate(-5deg);
  transition: transform 520ms cubic-bezier(0.18, 0.9, 0.2, 1), box-shadow 520ms ease;
}

.moonpull__label {
  position: absolute;
  right: 50%;
  bottom: 0;
  width: max-content;
  max-width: min(76vw, 230px);
  padding: 5px 12px 7px;
  color: var(--night-ink);
  background: rgba(251, 241, 220, 0.92);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    3px 4px 0 rgba(6, 8, 15, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.56) inset;
  clip-path: polygon(4% 0, 100% 8%, 95% 100%, 0 92%);
  transform: translateX(50%) rotate(-1deg);
  transition: transform 220ms ease, background 220ms ease;
}

.moonpull:is(:hover, :focus-visible) .moonpull__moon {
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.62) inset,
    9px 11px 0 rgba(6, 8, 15, 0.27),
    0 0 58px rgba(246, 213, 123, 0.56);
  transform: translate(-50%, -54%) rotate(3deg) scale(1.04);
}

.moonpull:is(:hover, :focus-visible) .moonpull__label {
  background: #fff5ca;
  transform: translateX(50%) rotate(1deg) translateY(-2px);
}

.endcard.is-moon-tucked .moonpull__string {
  animation: stringWobble 820ms cubic-bezier(0.18, 0.9, 0.2, 1);
}

.endcard.is-moon-tucked .moonpull__moon {
  animation: tugMoon 1200ms cubic-bezier(0.18, 0.9, 0.2, 1);
}

.endcard.is-moon-tucked .endcard__stars {
  animation: starWink 1200ms ease;
}

.endcard__title {
  margin: 0;
  color: var(--gold);
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 12rem);
  font-weight: 400;
  line-height: 0.9;
  text-shadow: 7px 9px 0 rgba(8, 10, 18, 0.26);
}

.endcard__sub {
  margin: 10px 0 clamp(26px, 4vh, 42px);
  color: rgba(251, 241, 220, 0.86);
  font-size: clamp(1.15rem, 2.4vw, 2rem);
  font-weight: 800;
}

.endcard__copy {
  max-width: 470px;
  margin: calc(clamp(26px, 4vh, 42px) * -0.55) auto clamp(24px, 4vh, 38px);
  color: rgba(251, 241, 220, 0.82);
  font-family: var(--display);
  font-size: clamp(1rem, 1.45vw, 1.32rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.ribbonbtn {
  min-height: 58px;
  min-width: min(84vw, 320px);
  padding: 11px 34px 14px;
  border: 0;
  color: var(--night-ink);
  background: var(--rose);
  box-shadow:
    6px 7px 0 rgba(6, 8, 15, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.42) inset;
  clip-path: polygon(0 8%, 9% 0, 100% 3%, 93% 50%, 100% 96%, 8% 100%, 0 91%);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ribbonbtn:is(:hover, :focus-visible) {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow:
    8px 10px 0 rgba(6, 8, 15, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.42) inset;
}

.ribbonbtn__big,
.ribbonbtn__small {
  display: block;
}

.ribbonbtn__big {
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1;
}

.ribbonbtn__small {
  color: rgba(36, 39, 65, 0.78);
  font-size: 0.92rem;
  font-weight: 800;
}

.colophon {
  position: relative;
  overflow: hidden;
  color: var(--night-ink);
  background:
    linear-gradient(90deg, rgba(43, 48, 80, 0.04) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(180deg, var(--cream), #ead4b1);
  padding: clamp(72px, 10vw, 136px) clamp(18px, 5vw, 70px);
}

.colophon::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(232, 160, 160, 0.36), transparent 22rem),
    radial-gradient(circle at 86% 24%, rgba(185, 168, 216, 0.35), transparent 28rem);
  pointer-events: none;
}

.colophon__inner {
  position: relative;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.colophon__kicker,
.colophon__tag,
.cast__title {
  font-weight: 800;
}

.colophon__kicker {
  width: max-content;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 5px 12px;
  color: var(--cream);
  background: var(--night);
  clip-path: polygon(2% 0, 100% 8%, 94% 100%, 0 91%);
}

.colophon__title {
  max-width: 760px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 0.95;
}

.colophon__tag {
  max-width: 660px;
  margin: 16px 0 34px;
  color: rgba(36, 39, 65, 0.76);
  font-size: clamp(1rem, 1.5vw, 1.24rem);
}

.statrow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 clamp(44px, 7vw, 78px);
}

.stat,
.castcard,
.note,
.guide-panel,
.guide-token {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 34%),
    var(--cream);
  border: 1px solid rgba(82, 57, 42, 0.12);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.62) inset,
    5px 6px 0 rgba(88, 62, 43, 0.13),
    0 20px 36px rgba(64, 44, 39, 0.12);
  clip-path: polygon(2% 3%, 98% 0, 100% 91%, 88% 100%, 1% 96%, 0 12%);
}

.stat {
  min-height: 126px;
  display: grid;
  align-content: center;
  padding: 22px;
}

.stat strong {
  display: block;
  color: var(--fox-dark);
  font-family: var(--display);
  font-size: clamp(2.5rem, 4vw, 4.8rem);
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 0.9;
}

.stat span {
  color: rgba(36, 39, 65, 0.76);
  font-weight: 800;
}

.cast__title {
  margin: 0 0 18px;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.cast {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.castcard {
  min-height: 210px;
  padding: 22px 22px 24px;
}

.castcard__chip {
  width: 56px;
  height: 44px;
  display: block;
  margin-bottom: 16px;
  filter: drop-shadow(4px 5px 0 rgba(43, 48, 80, 0.14));
}

.chip--fox {
  background: var(--fox);
  clip-path: polygon(0 88%, 18% 8%, 43% 48%, 68% 6%, 100% 86%, 48% 100%);
}

.chip--moon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold);
}

.chip--pine {
  background: var(--pine);
  clip-path: polygon(52% 0, 78% 36%, 68% 34%, 96% 78%, 73% 74%, 78% 100%, 29% 100%, 34% 73%, 8% 78%, 36% 36%, 25% 37%);
}

.chip--heron {
  background: var(--river);
  clip-path: polygon(6% 48%, 45% 16%, 79% 31%, 100% 11%, 83% 47%, 57% 46%, 74% 100%, 49% 100%, 40% 58%);
}

.chip--fly {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6bd 0 26%, var(--gold) 27% 52%, transparent 54%);
}

.chip--star {
  background: var(--lavender);
  clip-path: polygon(50% 0, 61% 35%, 100% 36%, 69% 58%, 81% 100%, 50% 75%, 18% 100%, 31% 58%, 0 36%, 38% 35%);
}

.castcard strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 400;
}

.castcard p {
  margin: 0;
  color: rgba(36, 39, 65, 0.78);
  font-weight: 650;
}

.note {
  max-width: 760px;
  margin: clamp(42px, 6vw, 70px) auto 0;
  padding: clamp(24px, 4vw, 38px);
  transform: rotate(-0.8deg);
}

.note__cap,
.note__sig {
  font-weight: 800;
}

.note__cap {
  margin: 0 0 10px;
  color: var(--rose-dark);
  text-transform: uppercase;
}

.note p {
  margin: 0;
}

.note p + p {
  margin-top: 13px;
}

.note__sig {
  color: rgba(36, 39, 65, 0.7);
}

.footer {
  position: relative;
  z-index: 2;
  color: var(--cream);
  background:
    radial-gradient(circle at 18% 0%, rgba(232, 160, 160, 0.15), transparent 18rem),
    linear-gradient(180deg, var(--night), var(--night-ink));
  padding: 28px clamp(18px, 5vw, 70px) 34px;
}

.footer__inner {
  width: min(1120px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
}

.footer__made {
  margin: 0;
  font-weight: 800;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.footer a {
  color: var(--gold);
  transition: color 160ms ease, text-decoration-thickness 160ms ease;
}

.footer a:is(:hover, :focus-visible) {
  color: #fff1a4;
  text-decoration-thickness: 0.14em;
}

.grain,
.vignette,
.pageflip {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grain {
  z-index: 80;
  opacity: 0.2;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(31, 27, 26, 0.16) 0 1px, transparent 1.4px),
    radial-gradient(circle at 62% 82%, rgba(31, 27, 26, 0.12) 0 1px, transparent 1.3px),
    radial-gradient(circle at 35% 44%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.3px);
  background-size: 42px 46px, 38px 34px, 29px 31px;
}

.vignette {
  z-index: 79;
  box-shadow: inset 0 0 90px rgba(15, 17, 31, 0.28);
}

.pageflip {
  z-index: 90;
  visibility: hidden;
  perspective: 1200px;
}

.pageflip::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(251, 241, 220, 0.98), rgba(232, 160, 160, 0.7) 48%, rgba(43, 48, 80, 0.35));
  transform: rotateY(-110deg);
  transform-origin: left center;
  box-shadow: 24px 0 50px rgba(16, 13, 20, 0.24);
}

.pageflip.is-turning {
  visibility: visible;
}

.pageflip.is-turning::before {
  animation: pageTurn 900ms cubic-bezier(0.2, 0.82, 0.22, 1);
}

.guide-body {
  min-height: 100svh;
  background:
    radial-gradient(circle at 18px 22px, rgba(86, 59, 44, 0.08) 0 1px, transparent 1.4px) 0 0 / 46px 42px,
    radial-gradient(circle at 18% 12%, rgba(232, 160, 160, 0.32), transparent 22rem),
    radial-gradient(circle at 88% 22%, rgba(185, 168, 216, 0.32), transparent 28rem),
    linear-gradient(180deg, var(--cream), #e4cfad 70%, var(--night));
}

.guide-main {
  position: relative;
  overflow: hidden;
}

.guide-hero {
  position: relative;
  min-height: 76svh;
  display: grid;
  place-items: end start;
  padding: clamp(96px, 13vw, 150px) clamp(18px, 6vw, 84px) clamp(52px, 8vw, 88px);
  color: var(--night-ink);
}

.guide-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 22%, rgba(246, 213, 123, 0.8) 0 8vw, transparent calc(8vw + 2px)),
    linear-gradient(180deg, rgba(185, 168, 216, 0.45), transparent 44%);
}

.guide-hero::after {
  content: "";
  position: absolute;
  right: clamp(-70px, 4vw, 70px);
  bottom: 9%;
  width: min(52vw, 610px);
  height: min(25vw, 300px);
  background:
    linear-gradient(112deg, rgba(251, 241, 220, 0.2) 0 12%, transparent 12.5%),
    linear-gradient(135deg, var(--fox), #c96743);
  clip-path: polygon(0 70%, 14% 40%, 31% 54%, 43% 22%, 61% 49%, 78% 28%, 100% 66%, 93% 86%, 70% 100%, 42% 90%, 21% 95%);
  filter:
    drop-shadow(8px 10px 0 rgba(43, 48, 80, 0.16))
    drop-shadow(0 28px 40px rgba(43, 48, 80, 0.18));
  opacity: 0.92;
}

.guide-hero__copy {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.guide-fox {
  position: absolute;
  z-index: 1;
  right: clamp(34px, 8vw, 150px);
  top: 41%;
  width: min(30vw, 380px);
  min-width: 260px;
  aspect-ratio: 1.7;
  transform: rotate(-3deg);
  filter:
    drop-shadow(8px 10px 0 rgba(43, 48, 80, 0.14))
    drop-shadow(0 26px 34px rgba(43, 48, 80, 0.14));
}

.guide-fox span {
  position: absolute;
  display: block;
  background: var(--fox);
}

.guide-fox__tail {
  left: 0;
  top: 42%;
  width: 37%;
  height: 34%;
  background: linear-gradient(115deg, #fbf1dc 0 32%, var(--fox-dark) 33% 100%) !important;
  clip-path: polygon(0 56%, 74% 0, 100% 50%, 70% 100%, 20% 90%);
}

.guide-fox__body {
  left: 27%;
  top: 36%;
  width: 45%;
  height: 39%;
  clip-path: polygon(6% 18%, 70% 0, 100% 46%, 78% 98%, 22% 90%, 0 52%);
}

.guide-fox__head {
  right: 4%;
  top: 22%;
  width: 34%;
  height: 46%;
  clip-path: polygon(0 40%, 28% 2%, 94% 26%, 100% 66%, 52% 100%, 12% 82%);
}

.guide-fox__ear {
  top: 6%;
  width: 15%;
  height: 28%;
  clip-path: polygon(50% 0, 100% 100%, 0 82%);
}

.guide-fox__ear--left {
  right: 26%;
  transform: rotate(-14deg);
}

.guide-fox__ear--right {
  right: 7%;
  transform: rotate(12deg);
}

.guide-fox__eye {
  right: 17%;
  top: 42%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--night-ink) !important;
}

.guide-fox__leg {
  bottom: 8%;
  width: 9%;
  height: 25%;
  background: var(--fox-dark) !important;
  clip-path: polygon(25% 0, 100% 0, 82% 100%, 0 100%);
}

.guide-fox__leg--front {
  right: 31%;
}

.guide-fox__leg--back {
  left: 42%;
}

.guide-kicker {
  width: max-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 5px 13px;
  color: var(--cream);
  background: var(--night);
  font-weight: 800;
  clip-path: polygon(2% 0, 100% 9%, 94% 100%, 0 91%);
}

.guide-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.4rem, 10vw, 9.4rem);
  font-weight: 400;
  line-height: 0.92;
  max-width: 880px;
  text-wrap: balance;
}

.guide-sub {
  max-width: 580px;
  margin: 18px 0 0;
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
  font-weight: 800;
  text-wrap: pretty;
}

.guide-strip {
  position: absolute;
  z-index: 3;
  right: clamp(22px, 8vw, 150px);
  bottom: clamp(18px, 5vw, 54px);
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 12px 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent 34%),
    rgba(251, 241, 220, 0.74);
  box-shadow:
    5px 6px 0 rgba(82, 57, 42, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.52) inset;
  clip-path: polygon(2% 8%, 100% 0, 96% 100%, 0 90%);
  transform: rotate(1.2deg);
}

.guide-strip span {
  display: block;
  width: 50px;
  height: 48px;
  filter: drop-shadow(3px 4px 0 rgba(43, 48, 80, 0.16));
}

.strip-moon {
  border-radius: 50%;
  background: var(--gold);
}

.strip-river {
  background: var(--river);
  clip-path: polygon(0 62%, 22% 40%, 48% 54%, 72% 32%, 100% 48%, 100% 100%, 0 100%);
}

.strip-pine {
  background: var(--pine);
  clip-path: polygon(50% 0, 76% 36%, 65% 34%, 92% 76%, 70% 72%, 78% 100%, 26% 100%, 34% 72%, 9% 76%, 36% 34%, 25% 35%);
}

.strip-star {
  background: var(--lavender);
  clip-path: polygon(50% 0, 61% 35%, 100% 36%, 69% 58%, 81% 100%, 50% 75%, 18% 100%, 31% 58%, 0 36%, 38% 35%);
}

.guide-content {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
  gap: clamp(18px, 3vw, 34px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 70px) 0 clamp(70px, 10vw, 120px);
}

.guide-panel {
  padding: clamp(24px, 4vw, 44px);
}

.guide-panel code,
.guide-panel strong {
  color: var(--night-ink);
}

.guide-panel code {
  padding: 0.05em 0.24em 0.12em;
  background: rgba(185, 168, 216, 0.22);
  border-radius: 5px;
  font-family: var(--ui);
  font-weight: 800;
}

.guide-panel h2,
.guide-panel h3,
.guide-token h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
}

.guide-panel h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.guide-panel h3,
.guide-token h2 {
  margin-top: 26px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.guide-panel p,
.guide-panel li,
.guide-token p,
.guide-token li {
  color: rgba(36, 39, 65, 0.82);
  font-weight: 620;
  line-height: 1.58;
  text-wrap: pretty;
}

.guide-panel p {
  margin: 0 0 16px;
}

.guide-panel ul,
.guide-token ul {
  padding-left: 1.1rem;
  margin: 0;
}

.guide-token {
  align-self: start;
  position: sticky;
  top: 24px;
  padding: 24px;
  transform: rotate(1deg);
}

.guide-token h2:first-child {
  margin-top: 0;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 0;
  margin: 16px 0 24px;
  list-style: none;
}

.swatches li {
  min-height: 70px;
  display: grid;
  align-content: end;
  padding: 9px;
  color: var(--night-ink);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.05;
  box-shadow: 3px 4px 0 rgba(43, 48, 80, 0.13);
  clip-path: polygon(4% 6%, 98% 0, 100% 89%, 0 100%);
}

.sw-kraft {
  background: #d9c4a3;
}

.sw-cream {
  background: #fbf1dc;
}

.sw-rose {
  background: #e8a0a0;
}

.sw-lav {
  background: #b9a8d8;
}

.sw-night {
  background: #2b3050;
  color: var(--cream) !important;
}

.type-sample {
  display: grid;
  gap: 10px;
}

.type-sample span {
  display: block;
  padding: 10px 12px;
  background: rgba(43, 48, 80, 0.08);
  clip-path: polygon(2% 0, 100% 6%, 96% 100%, 0 92%);
}

.type-display {
  font-family: var(--display);
  font-size: 1.7rem;
}

.type-ui {
  font-family: var(--ui);
  font-weight: 800;
}

@keyframes tileWaver {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -3px;
  }
}

@keyframes hintBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

@keyframes tailSway {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

@keyframes earTwitch {
  0%,
  88%,
  100% {
    transform: rotate(0);
  }
  92% {
    transform: rotate(-7deg);
  }
  96% {
    transform: rotate(5deg);
  }
}

@keyframes foxBreathe {
  0%,
  100% {
    transform: translateY(0) scaleY(1);
  }
  50% {
    transform: translateY(1px) scaleY(0.985);
  }
}

@keyframes moonFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes pageTurn {
  0% {
    transform: rotateY(-108deg);
  }
  44% {
    transform: rotateY(-12deg);
  }
  100% {
    transform: rotateY(104deg);
  }
}

@keyframes tugMoon {
  0% {
    transform: translate(-50%, -50%) rotate(-5deg);
  }
  44% {
    transform: translate(-50%, -30%) rotate(9deg) scale(1.06);
  }
  72% {
    transform: translate(-50%, -40%) rotate(-4deg) scale(1.02);
  }
  100% {
    transform: translate(-50%, -50%) rotate(-5deg);
  }
}

@keyframes stringWobble {
  0%,
  100% {
    transform: translateX(-50%) rotate(0);
  }
  38% {
    transform: translateX(-50%) rotate(6deg) scaleY(1.08);
  }
  68% {
    transform: translateX(-50%) rotate(-4deg) scaleY(0.98);
  }
}

@keyframes starWink {
  0%,
  100% {
    opacity: 0.9;
  }
  42% {
    opacity: 1;
    filter: drop-shadow(0 0 18px rgba(246, 213, 123, 0.46));
  }
}

@media (max-width: 700px) {
  :root {
    --topbar-h: 104px;
  }

  .stage {
    --moon-y-offset: 76px;
    --string-y-offset: 58px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    padding: 8px 10px 10px;
  }

  .scenenav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .topbar > .topbar__guide {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .guide-toplinks {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .dot {
    width: 44px;
    height: 44px;
  }

  .dot span {
    width: 12px;
    height: 12px;
  }

  .stage {
    min-height: 620px;
  }

  .scene-counter {
    right: auto;
    left: 14px;
    bottom: auto;
    top: calc(var(--topbar-h) + 16px);
    max-width: calc(100% - 28px);
    font-size: 0.76rem;
    opacity: 0.92;
  }

  .scrap {
    top: auto;
    right: 16px;
    bottom: clamp(14px, 3.5svh, 34px);
    left: 16px;
    width: auto;
    min-height: 0;
    max-height: min(34svh, 265px);
    overflow: auto;
    padding: 15px 17px 17px;
  }

  .scrap--7,
  .scrap--7.is-active {
    left: 16px;
    width: auto;
    transform: translate3d(0, 0, 0) rotate(var(--rot)) scale(1);
  }

  .scrap__cap {
    margin-bottom: 6px;
  }

  .scrap__txt {
    font-size: clamp(0.96rem, 3.7vw, 1.08rem);
    line-height: 1.34;
  }

  .statrow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-content {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 680px);
  }

  .guide-hero::after {
    right: -48px;
    bottom: 15%;
    width: 72vw;
    height: 34vw;
    opacity: 0.22;
  }

  .guide-fox {
    right: -54px;
    top: 42%;
    min-width: 230px;
    opacity: 0.18;
  }

  .guide-strip {
    right: 18px;
    bottom: 18px;
    gap: 8px;
    padding: 9px 10px;
    opacity: 0.8;
  }

  .guide-strip span {
    width: 36px;
    height: 34px;
  }

  .guide-token {
    position: relative;
    top: auto;
    transform: rotate(-0.6deg);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .topbar {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .brand__name {
    max-width: 160px;
  }

  .topbar__guide {
    padding-inline: 10px;
  }

  .cover {
    top: 48%;
    width: min(94vw, 440px);
  }

  .cover__title {
    font-size: clamp(2.7rem, 17vw, 4.4rem);
    gap: 7px;
  }

  .cover__row {
    gap: 5px;
  }

  .cover__kicker,
  .cover__by {
    font-size: 0.92rem;
  }

  .cover__sub {
    font-size: 1.08rem;
  }

  .cover__hint {
    margin-top: 14px;
  }

  .paperfox-svg {
    width: clamp(82px, 28vw, 126px);
  }

  .moon-paper {
    width: clamp(102px, 36vw, 204px);
  }

  .moon-string {
    width: 220px;
    height: 250px;
  }

  .statrow,
  .cast {
    grid-template-columns: 1fr;
  }

  .stat {
    min-height: 106px;
  }

  .castcard {
    min-height: 0;
  }

  .footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer__links {
    justify-content: flex-start;
  }

  .guide-hero {
    min-height: 68svh;
    padding-top: 112px;
    padding-bottom: 88px;
  }

  .guide-title {
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  .swatches {
    grid-template-columns: 1fr;
  }
}
