/* Pip's Tangle Trouble: site design system.
   Colours, type and shapes come from the game's own UI (Game/Assets/Scripts/UI/UIKit.cs):
   navy ink outlines, cream "sticker" panels with thick navy borders, sun yellow highlights, teal accents,
   Luckiest Guy in capitals with a navy outline and drop shadow, Fredoka for everything else.
   build.mjs appends per-world colour classes (.w-1 ... .w-s) and fingerprints url()s. */

@font-face {
  font-family: "Luckiest Guy";
  src: url(/fonts/LuckiestGuy-Regular.latin.woff2?v=46e3e0d40c) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url(/fonts/Fredoka-Variable.latin.woff2?v=dcc85cf613) format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light;

  /* game UI palette (UIKit.Navy / Cream / Teal / Sun / Orange) */
  --navy: #1b2340;
  --navy-2: #2a3561;
  --navy-deep: #10162b;
  --cream: #f7ebcf;
  --cream-hi: #fdf6e6;
  --cream-lo: #ecdcb5;
  --sun: #ffc83d;
  --sun-deep: #f2a81d;
  --teal: #2e9bc0;
  --teal-deep: #17698a;
  --orange: #ff8a3d;
  --tangle: #8a4fe0;         /* the purple filament in the logo */
  /* world 1 sky and meadow */
  --sky: #8fd6ff;
  --sky-hi: #c8ecff;
  --sky-pale: #e6f6ff;
  --grass: #86d35c;
  --grass-deep: #5fb33f;
  --dirt: #6b3f22;

  --ink: var(--navy);
  --ink-soft: #3d4770;
  --page: var(--sky-pale);

  /* type */
  --font-display: "Luckiest Guy", "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: clamp(0.88rem, 0.85rem + 0.12vw, 0.95rem);
  --step-0: clamp(1.03rem, 0.99rem + 0.2vw, 1.15rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.25rem + 0.9vw, 2rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.9vw, 3.1rem);
  --step-4: clamp(2.3rem, 1.6rem + 3.4vw, 4.6rem);

  /* space */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 6rem;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;

  /* shapes: the game's panel is a 30px-radius rounded rect with a 7px navy border at 1080p */
  --bw: 4px;
  --bw-thick: 5px;
  --r-sm: 12px;
  --r: 22px;
  --r-lg: 30px;
  --lift: 6px;
  --shadow-hard: 0 var(--lift) 0 var(--navy);
  --shadow-soft: 0 18px 28px -14px rgba(27, 35, 64, 0.45);
  --shadow: var(--shadow-hard), var(--shadow-soft);

  /* scenery tiles (inline SVG, allowed by the CSP as data: images) */
  --edge-grass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40' viewBox='0 0 120 40'%3E%3Cpath d='M0 40V24C12 8 32 8 42 22C52 6 78 6 86 22C96 10 112 10 120 24V40Z' fill='%2386d35c'/%3E%3Cpath d='M0 24C12 8 32 8 42 22C52 6 78 6 86 22C96 10 112 10 120 24' fill='none' stroke='%231b2340' stroke-width='4'/%3E%3C/svg%3E");
  --edge-clouds: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='48' viewBox='0 0 200 48'%3E%3Cpath d='M0 48V30C10 14 34 12 46 24C56 6 92 4 104 22C114 10 140 10 150 26C160 16 186 14 200 30V48Z' fill='%23e6f6ff'/%3E%3Cpath d='M0 30C10 14 34 12 46 24C56 6 92 4 104 22C114 10 140 10 150 26C160 16 186 14 200 30' fill='none' stroke='%231b2340' stroke-width='4'/%3E%3C/svg%3E");
  --edge-night: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='48' viewBox='0 0 200 48'%3E%3Cpath d='M0 48V30C10 14 34 12 46 24C56 6 92 4 104 22C114 10 140 10 150 26C160 16 186 14 200 30V48Z' fill='%231b2340'/%3E%3C/svg%3E");
  --stars: radial-gradient(circle at 12% 22%, #fff8 0 1.5px, transparent 2.5px),
           radial-gradient(circle at 78% 12%, #fff9 0 2px, transparent 3px),
           radial-gradient(circle at 46% 68%, #ffc83d99 0 1.5px, transparent 2.5px),
           radial-gradient(circle at 88% 74%, #fff7 0 1.5px, transparent 2.5px),
           radial-gradient(circle at 30% 90%, #fff6 0 1px, transparent 2px);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 450;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, picture { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.15; font-weight: 600; }
p, ul, ol, dl, figure { margin: 0; }
p + p { margin-top: var(--s-3); }
a { color: var(--teal-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
strong { font-weight: 650; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(27, 35, 64, 0.08);
  border-radius: 6px;
  padding: 0.08em 0.35em;
  overflow-wrap: anywhere;
}
::selection { background: var(--sun); color: var(--navy); }
[hidden] { display: none !important; }

/* focus: a navy ring on a sun-yellow halo, so it shows on cream, sky and art alike (and beats any box-shadow) */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--cream-hi), 0 0 0 9px var(--sun) !important;
  border-radius: 6px;
}
.site-header :focus-visible, .site-footer :focus-visible, .band--night :focus-visible, .world--dark :focus-visible {
  outline-color: var(--sun);
  box-shadow: 0 0 0 3px var(--navy-deep), 0 0 0 9px var(--sun) !important;
}
main { flex: 1 0 auto; }
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--sun); color: var(--navy); font-weight: 650;
  padding: var(--s-2) var(--s-4); border: var(--bw) solid var(--navy); border-radius: var(--r-sm);
}
.skip-link:focus { top: var(--s-3); }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(820px + 2 * var(--gutter)); }

/* ------------------------------------------------------------------ type: outlined game titles */
.title {
  --o: max(2px, 0.055em);
  --d: max(4px, 0.1em);
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.04;
  color: var(--cream-hi);
  text-shadow:
    var(--o) 0 0 var(--navy), calc(-1 * var(--o)) 0 0 var(--navy),
    0 var(--o) 0 var(--navy), 0 calc(-1 * var(--o)) 0 var(--navy),
    var(--o) var(--o) 0 var(--navy), calc(-1 * var(--o)) var(--o) 0 var(--navy),
    var(--o) calc(-1 * var(--o)) 0 var(--navy), calc(-1 * var(--o)) calc(-1 * var(--o)) 0 var(--navy),
    0 calc(var(--d) * 0.5) 0 var(--teal), 0 var(--d) 0 var(--teal),
    var(--o) calc(var(--d) + var(--o)) 0 var(--navy), calc(-1 * var(--o)) calc(var(--d) + var(--o)) 0 var(--navy),
    0 calc(var(--d) + var(--o) * 1.4) 0 var(--navy);
  padding-bottom: 0.12em;
  overflow-wrap: break-word;
}
.title--xl { font-size: var(--step-4); }
.title--lg { font-size: var(--step-3); }
.title--md { font-size: var(--step-2); }
.title--sun { color: var(--sun); }

/* small display labels used inside panels */
.panel-title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: var(--step-1);
  color: var(--navy);
  margin-bottom: var(--s-3);
  display: flex; align-items: center; gap: var(--s-2);
}
.panel-title__count {
  font-family: var(--font-body); font-weight: 650; font-size: 0.8em;
  background: var(--navy); color: var(--sun); border-radius: 999px; padding: 0 0.6em; line-height: 1.6;
}

/* ------------------------------------------------------------------ stickers, buttons, tags */
.sticker {
  background: var(--cream);
  border: var(--bw) solid var(--navy);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  color: var(--navy);
}
.tilt-l { transform: rotate(-1deg); }
.tilt-r { transform: rotate(0.8deg); }

.btn {
  --btn-bg: var(--cream);
  --btn-ink: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px;
  padding: 0.55em 1.25em 0.45em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-1);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  color: var(--btn-ink);
  background: var(--btn-bg);
  border: var(--bw) solid var(--navy);
  border-radius: 999px;
  box-shadow: 0 5px 0 var(--navy);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn:hover { color: var(--btn-ink); transform: translateY(-2px); box-shadow: 0 7px 0 var(--navy); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--navy); }
.btn--sun { --btn-bg: var(--sun); }
.btn--sun:hover { --btn-bg: #ffd35f; }
.btn--teal { --btn-bg: var(--teal); --btn-ink: var(--navy); }
.btn--teal:hover { --btn-bg: #39acd2; }
.btn--cream { --btn-bg: var(--cream-hi); }
.btn--big { font-size: var(--step-2); padding: 0.55em 1.4em 0.42em; }
.btn--small { font-size: var(--step--1); min-height: 38px; padding: 0.4em 0.9em 0.3em; box-shadow: 0 3px 0 var(--navy); }
.btn--block { display: flex; width: 100%; }

.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  line-height: 1;
  padding: 0.45em 0.7em 0.35em;
  border: 3px solid var(--navy);
  border-radius: 999px;
  background: var(--cream-hi);
  color: var(--navy);
  text-decoration: none;
}
.tag--sun { background: var(--sun); }
.tag--boss { background: var(--orange); color: var(--navy); }
a.tag:hover { background: var(--sun); color: var(--navy); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; padding-top: var(--s-5); }
.chip {
  font-weight: 650; text-decoration: none; color: var(--navy);
  background: var(--cream-hi); border: 3px solid var(--navy); border-radius: 999px;
  padding: 0.3em 0.95em; box-shadow: 0 3px 0 var(--navy);
}
.chip:hover { background: var(--sun); color: var(--navy); }

/* ------------------------------------------------------------------ header and navigation */
.site-header {
  position: relative;
  z-index: 20;
  background: var(--navy);
  border-bottom: var(--bw) solid var(--navy-deep);
}
.site-header::after { /* a line of stitching, like thread from a spool */
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px;
  border-bottom: 3px dashed rgba(255, 200, 61, 0.55);
  pointer-events: none;
}
.site-header__inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 10px var(--gutter) 16px;
  display: flex; align-items: center; gap: var(--s-4);
}
.site-logo { display: block; flex: none; border-radius: 8px; }
.site-logo__img { width: auto; height: 54px; }
.beta-tag {
  flex: none;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 0.95rem; line-height: 1; text-decoration: none;
  color: var(--navy); background: var(--sun);
  border: 3px solid var(--cream); border-radius: 10px;
  padding: 0.45em 0.6em 0.3em;
  transform: rotate(-5deg);
  box-shadow: 0 3px 0 var(--navy-deep);
}
.beta-tag span { font-family: var(--font-body); font-weight: 650; font-size: 0.85em; text-transform: none; }
.beta-tag:hover { color: var(--navy); transform: rotate(-2deg) scale(1.05); }

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 0.2rem; }
.site-nav a {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.12rem;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  padding: 0.7em 0.65em 0.55em;
  border-radius: 10px;
  text-shadow: 2px 0 0 var(--navy-deep), -2px 0 0 var(--navy-deep), 0 2px 0 var(--navy-deep), 0 -2px 0 var(--navy-deep), 0 3px 0 var(--navy-deep);
}
.site-nav a:hover { color: var(--sun); }
/* the selected entry looks like the game's menus: sun yellow between ▶ ◀ */
.site-nav a[aria-current="page"] { color: var(--sun); }
.site-nav a[aria-current="page"]::before { content: "▶" / ""; font-size: 0.7em; margin-right: 0.35em; vertical-align: 0.12em; }
.site-nav a[aria-current="page"]::after { content: "◀" / ""; font-size: 0.7em; margin-left: 0.35em; vertical-align: 0.12em; }
.nav-toggle, .site-nav .nav-close { display: none; }

@media (max-width: 960px) {
  .site-logo__img { height: 46px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.5em; margin-left: auto;
    min-height: 44px; padding: 0.4em 0.9em 0.3em;
    font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.05rem;
    color: var(--navy); background: var(--sun); text-decoration: none;
    border: 3px solid var(--cream); border-radius: 999px;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 18px; height: 3px; background: var(--navy); border-radius: 3px; position: relative;
  }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after { top: 6px; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--navy);
    border-bottom: var(--bw) solid var(--navy-deep);
    padding: var(--s-3) var(--gutter) var(--s-5);
    box-shadow: 0 20px 30px -10px rgba(16, 22, 43, 0.6);
  }
  .site-nav:target, .site-header.is-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { font-size: 1.45rem; padding: 0.6em 0.4em 0.5em; border-bottom: 2px dashed rgba(247, 235, 207, 0.15); }
  .site-nav:target .nav-close { display: inline-block; margin-top: var(--s-3); color: var(--cream); font-weight: 650; }
  .site-header.is-open .site-nav .nav-close { display: none; }
  .beta-tag { font-size: 0.82rem; }
}
@media (max-width: 400px) {
  .site-logo__img { height: 40px; }
  .beta-tag span { display: none; }
  .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ------------------------------------------------------------------ sections and bands */
.section { position: relative; padding-block: var(--s-8); }
.section--tight { padding-block: var(--s-6) var(--s-8); }
.section__title { text-align: center; margin-bottom: var(--s-6); }
.section__lede { text-align: center; max-width: 60ch; margin: calc(-1 * var(--s-4)) auto var(--s-6); font-size: var(--step-1); font-weight: 500; }
.section__more { text-align: center; margin-top: var(--s-6); }

.band--meadow { background: linear-gradient(180deg, var(--grass) 0, #77c94f 100%); margin-top: 40px; padding-bottom: calc(var(--s-8) + 30px); }
.band--meadow .section__lede { color: var(--navy); }
.band__edge { position: absolute; left: 0; right: 0; top: -38px; height: 40px; background: var(--edge-grass) repeat-x left bottom / 120px 40px; }
.band--meadow::after, .band--night::after, .page-head::after, .lost::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 48px;
  background: var(--edge-clouds) repeat-x left bottom / 200px 48px;
  pointer-events: none;
}
.band--night {
  background: var(--stars), var(--navy);
  background-size: 260px 260px, auto;
  color: var(--cream);
  margin-top: 46px;
  padding-bottom: calc(var(--s-8) + 30px);
}
.band--night::before {
  content: ""; position: absolute; left: 0; right: 0; top: -46px; height: 48px;
  background: var(--edge-night) repeat-x left bottom / 200px 48px;
}
.band--night .section__title { color: var(--sun); }
.band--cream {
  background: var(--cream);
  border-block: var(--bw) solid var(--navy);
  box-shadow: inset 0 10px 0 var(--cream-hi), inset 0 -10px 0 var(--cream-lo);
}
.band--cream::before, .band--cream::after {
  content: ""; position: absolute; left: 0; right: 0; border-top: 3px dashed rgba(27, 35, 64, 0.28);
}
.band--cream::before { top: 14px; }
.band--cream::after { bottom: 14px; }

/* page header band: sky, drifting clouds, cloud bank at the bottom */
.page-head {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky) 0, var(--sky-hi) 100%);
  padding: var(--s-7) 0 calc(var(--s-7) + 40px);
  text-align: center;
}
.page-head::before {
  content: ""; position: absolute; inset: 0;
  background:
    url(/ui/cloud.png?v=08045fc583) no-repeat 6% 30% / clamp(110px, 14vw, 200px) auto,
    url(/ui/cloud.png?v=08045fc583) no-repeat 94% 20% / clamp(90px, 11vw, 160px) auto,
    url(/ui/cloud.png?v=08045fc583) no-repeat 72% 88% / clamp(70px, 8vw, 120px) auto;
  background-image: image-set(url(/ui/cloud.avif?v=5f5e0a1dba) type("image/avif"), url(/ui/cloud.png?v=08045fc583) type("image/png")),
    image-set(url(/ui/cloud.avif?v=5f5e0a1dba) type("image/avif"), url(/ui/cloud.png?v=08045fc583) type("image/png")),
    image-set(url(/ui/cloud.avif?v=5f5e0a1dba) type("image/avif"), url(/ui/cloud.png?v=08045fc583) type("image/png"));
  opacity: 0.95;
  pointer-events: none;
}
.page-head .wrap { position: relative; }
.page-head__lede { margin: var(--s-4) auto 0; max-width: 54ch; font-size: var(--step-1); font-weight: 550; }

/* ------------------------------------------------------------------ home: hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--sky);
  height: clamp(400px, min(56vw, 68vh), 820px);
  border-bottom: var(--bw-thick) solid var(--navy);
}
.hero__art, .hero__art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__art img { object-fit: cover; object-position: 50% 62%; }
.hero::after { /* keep the logo readable over the art */
  content: ""; position: absolute; inset: 0 0 auto; height: 45%;
  background: linear-gradient(180deg, rgba(143, 214, 255, 0.55), rgba(143, 214, 255, 0));
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; display: flex; justify-content: center; padding-top: clamp(14px, 2.6vw, 40px); }
.hero__brand { position: relative; width: min(600px, 84vw); }
.hero__logo-img { width: 100%; filter: drop-shadow(0 8px 0 rgba(27, 35, 64, 0.22)); }
.hero__badge {
  position: absolute; right: -2%; top: -4%;
  display: grid; place-items: center; line-height: 1;
  width: clamp(74px, 10vw, 118px); aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  border: var(--bw) solid var(--navy);
  box-shadow: 0 5px 0 var(--navy);
  transform: rotate(12deg);
  font-weight: 650; font-size: clamp(0.72rem, 1vw, 0.95rem);
  text-align: center;
}
.hero__badge-big { font-family: var(--font-display); font-weight: 400; font-size: 2em; text-transform: uppercase; display: block; margin-top: 0.2em; }
.hero__sky { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cloud {
  position: absolute; display: block;
  background: url(/ui/cloud.png?v=08045fc583) no-repeat center / contain;
  background-image: image-set(url(/ui/cloud.avif?v=5f5e0a1dba) type("image/avif"), url(/ui/cloud.png?v=08045fc583) type("image/png"));
  aspect-ratio: 2 / 1;
  animation: drift 60s linear infinite alternate;
}
.cloud--1 { width: clamp(80px, 11vw, 170px); left: 3%; top: 8%; }
.cloud--2 { width: clamp(60px, 8vw, 120px); right: 5%; top: 26%; animation-duration: 75s; animation-direction: alternate-reverse; }
.cloud--3 { width: clamp(50px, 6vw, 90px); left: 34%; top: 2%; animation-duration: 90s; opacity: 0.9; }
@keyframes drift { from { transform: translateX(-20px); } to { transform: translateX(40px); } }

/* intro sticker, overlapping the hero */
.intro { position: relative; z-index: 3; margin-top: clamp(-90px, -6vw, -40px); }
.intro__panel {
  max-width: 900px; margin-inline: auto;
  padding: var(--s-6) clamp(var(--s-4), 4vw, var(--s-7));
  text-align: center;
  border-radius: var(--r-lg);
  border-width: var(--bw-thick);
}
.intro__tagline { font-size: var(--step-3); color: var(--sun); }
.intro__text { margin: var(--s-4) auto 0; max-width: 62ch; font-size: var(--step-1); font-weight: 500; }
.intro__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-4); margin-top: var(--s-5); }
.intro__platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: var(--s-5); }
.platform-chip {
  font-size: var(--step--1); font-weight: 600;
  padding: 0.2em 0.8em; border-radius: 999px;
  border: 2px solid var(--navy); background: var(--cream-hi);
}
.platform-chip.is-yours { background: var(--sun); }

/* ------------------------------------------------------------------ home: story strip */
.story__strip { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-6); }
.story__panel { position: relative; padding: var(--s-3); display: flex; flex-direction: column; }
.story__panel:nth-child(odd) { transform: rotate(-0.8deg); }
.story__panel:nth-child(even) { transform: rotate(0.8deg); }
.story__art { border: 3px solid var(--navy); border-radius: calc(var(--r) - 8px); overflow: hidden; background: var(--sky-hi); }
.story__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.story__text { padding: var(--s-4) var(--s-2) var(--s-2); font-weight: 500; }
.story__num {
  position: absolute; left: -14px; top: -14px; z-index: 1;
  width: 44px; height: 44px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.5rem; padding-top: 0.15em;
  background: var(--sun); border: var(--bw) solid var(--navy); border-radius: 50%;
}

/* ------------------------------------------------------------------ home: features */
.features__grid { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-6) var(--s-5); }
.features__grid > li { flex: 1 1 300px; max-width: 380px; }
.feature { padding: var(--s-3) var(--s-3) var(--s-5); transition: transform 0.2s ease; }
.feature:hover { transform: rotate(0) translateY(-4px); }
.feature__art { border-radius: calc(var(--r) - 8px); overflow: hidden; border: 3px solid var(--navy); background: var(--sky-hi); margin-bottom: var(--s-4); }
.feature__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.feature__title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; font-size: var(--step-1); margin: 0 var(--s-2) var(--s-2); color: var(--teal-deep); }
.feature p { margin-inline: var(--s-2); }

/* ------------------------------------------------------------------ home: numbers + world tiles */
.stats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); margin: calc(-1 * var(--s-3)) 0 var(--s-7); }
.stat {
  display: flex; align-items: baseline; gap: 0.4em;
  background: var(--cream-hi); border: 3px solid var(--navy); border-radius: 999px;
  padding: 0.35em 1em 0.25em; box-shadow: 0 4px 0 var(--navy);
}
.stat__n { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; color: var(--teal-deep); }
.stat__label { font-weight: 600; }

.tiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--s-5); }
.tile__link {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--world, var(--sky)); color: var(--world-ink, var(--navy));
  border: var(--bw) solid var(--navy); border-radius: var(--r);
  box-shadow: var(--shadow-hard);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tile__link:hover { color: var(--world-ink, var(--navy)); transform: translateY(-4px) rotate(-0.8deg); box-shadow: 0 10px 0 var(--navy); }
.tile__art { display: block; padding: var(--s-4) var(--s-3) 0; }
.tile__map { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; filter: drop-shadow(0 5px 0 rgba(16, 22, 43, 0.35)); }
.tile__text { display: block; padding: var(--s-2) var(--s-4) var(--s-4); margin-top: auto; }
.tile__label { display: block; font-size: var(--step--1); font-weight: 650; opacity: 0.85; }
.tile__name { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.25rem; line-height: 1.1; }
.tile__num, .node__num, .world__badge {
  display: grid; place-items: center;
  font-family: var(--font-display); line-height: 1; padding-top: 0.14em;
  background: var(--sun); color: var(--navy);
  border: 3px solid var(--navy); border-radius: 50%;
}
.tile__num { position: absolute; left: 10px; top: 10px; width: 40px; height: 40px; font-size: 1.25rem; z-index: 1; }

/* ------------------------------------------------------------------ home: cast */
.cast__heroes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--s-6); }
.hero-card { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; align-items: center; gap: var(--s-4); padding: var(--s-5); }
.hero-card--widget { transform: rotate(0.8deg); }
.hero-card--pip { transform: rotate(-0.8deg); }
.hero-card__art { background: radial-gradient(circle at 50% 55%, var(--sky-hi) 0 58%, transparent 60%); padding: var(--s-2); }
.hero-card__art img { width: 100%; height: 240px; object-fit: contain; }
.hero-card .title { margin: var(--s-2) 0; }
.cast__sub { text-align: center; color: var(--cream-hi); margin: var(--s-8) 0 var(--s-5); }
.cast__friends { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-4) var(--s-5); }
.friend-chip { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); text-decoration: none; color: var(--cream); width: 112px; }
.friend-chip__art {
  width: 104px; height: 104px; border-radius: 50%;
  background: var(--cream); border: var(--bw) solid var(--sun);
  display: grid; place-items: center; overflow: hidden;
  transition: transform 0.15s ease;
}
.friend-chip__art img { width: 86%; height: 86%; object-fit: contain; }
.friend-chip__name { font-weight: 650; text-align: center; line-height: 1.2; }
.friend-chip:hover { color: var(--sun); }
.friend-chip:hover .friend-chip__art { transform: translateY(-4px) rotate(-4deg); }

/* ------------------------------------------------------------------ home: village */
.village__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--s-7); align-items: start; }
.village__intro { margin-top: var(--s-4); font-size: var(--step-1); font-weight: 500; }
.village__places { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--s-5); }
.place { padding: var(--s-5); }
.place:nth-child(4n + 1) { transform: rotate(-0.6deg); }
.place:nth-child(4n + 2) { transform: rotate(0.7deg); }
.place__name { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: var(--step-1); color: var(--teal-deep); margin-bottom: var(--s-2); }
@media (max-width: 860px) { .village__inner { grid-template-columns: 1fr; gap: var(--s-5); } }

/* ------------------------------------------------------------------ screenshots */
.shots__strip {
  list-style: none; margin: 0;
  display: flex; gap: var(--s-5);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: var(--s-2) max(var(--gutter), calc((100% - var(--max)) / 2)) var(--s-5);
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2));
  scrollbar-color: var(--navy) transparent;
}
.shots__strip > li { flex: 0 0 min(78vw, 460px); scroll-snap-align: start; }
.shot {
  display: block; overflow: hidden;
  border: var(--bw) solid var(--navy); border-radius: var(--r-sm);
  box-shadow: 0 5px 0 var(--navy);
  background: var(--navy);
  transition: transform 0.15s ease;
}
.shot:hover { transform: translateY(-3px); }
.shot__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--s-5); }
.gallery__dl { display: inline-block; margin-top: var(--s-2); font-weight: 600; }

/* ------------------------------------------------------------------ home: finale */
.finale__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s-6); align-items: center; }
.finale__art { overflow: hidden; padding: 0; transform: rotate(-1deg); }
.finale__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.finale__panel { padding: var(--s-6); }
.finale__panel > p { margin-top: var(--s-3); font-size: var(--step-1); font-weight: 500; }
.finale__actions { margin-top: var(--s-5) !important; }
.finale__small { font-size: var(--step--1) !important; }
.mini-req { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-4); }
.mini-req__item { background: var(--cream-hi); border: 3px solid var(--navy); border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); font-size: var(--step--1); }
.mini-req__item.is-yours { background: #fff4cf; border-color: var(--sun-deep); }
.mini-req__os { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.15rem; }
.mini-req__item ul { padding-left: 1.1em; margin-top: var(--s-1); }
@media (max-width: 860px) { .finale__grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .mini-req { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ worlds page */
.world-picker {
  position: sticky; top: 0; z-index: 15;
  background: var(--navy);
  border-block: var(--bw) solid var(--navy-deep);
  box-shadow: 0 10px 20px -12px rgba(16, 22, 43, 0.7);
}
.world-picker__list {
  list-style: none; margin: 0 auto; max-width: calc(var(--max) + 2 * var(--gutter));
  padding: 10px var(--gutter);
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  position: relative;
}
.world-picker__list::-webkit-scrollbar { display: none; }
.world-picker__list > li { flex: none; position: relative; }
.world-picker__list > li + li::before { /* the dotted map path between stops */
  content: ""; position: absolute; right: 100%; top: 50%; width: 6px; border-top: 3px dotted rgba(247, 235, 207, 0.6);
}
.node { display: flex; align-items: center; gap: 0.5em; text-decoration: none; color: var(--cream); border-radius: 999px; padding: 2px; }
.node__num { width: 38px; height: 38px; font-size: 1.15rem; transition: transform 0.15s ease; }
.node:hover .node__num { transform: scale(1.1); }
.node__name {
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; font-size: 1rem; line-height: 1;
  transition: max-width 0.25s ease;
}
.node.is-current .node__num { background: var(--world, var(--sun)); color: var(--world-ink, var(--navy)); border-color: var(--sun); transform: scale(1.12); }
.node.is-current .node__name { max-width: 16em; padding-right: 0.6em; color: var(--sun); }

.world {
  position: relative;
  background: var(--world);
  color: var(--world-ink);
  padding-block: var(--s-8);
  border-top: var(--bw-thick) solid var(--navy);
  scroll-margin-top: 60px;
}
.world::before { /* stitched seam between worlds */
  content: ""; position: absolute; left: 0; right: 0; top: 8px; border-top: 3px dashed color-mix(in srgb, var(--world-ink) 30%, transparent);
}
.world--dark { background-image: var(--stars), none; background-size: 300px 300px; }
.world__top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s-7); align-items: center; }
.world:nth-of-type(even) .world__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.world:nth-of-type(even) .world__map { order: 2; }
.world__map-img { width: 100%; filter: drop-shadow(0 10px 0 rgba(16, 22, 43, 0.3)); }
.world__label { display: flex; align-items: center; gap: var(--s-2); font-weight: 650; font-size: var(--step-1); margin-bottom: var(--s-2); }
.world__badge { width: 46px; height: 46px; font-size: 1.4rem; }
.world__short { font-size: var(--step-1); font-weight: 600; margin: var(--s-4) 0 var(--s-3); }
.world__long { max-width: 60ch; }
.callout {
  position: relative; margin-top: var(--s-5);
  background: var(--cream-hi); color: var(--navy);
  border: 3px dashed var(--navy); border-radius: var(--r);
  padding: var(--s-5) var(--s-5) var(--s-4);
}
.callout__title {
  position: absolute; top: -0.95em; left: var(--s-4);
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; font-size: 1rem;
  background: var(--sun); border: 3px solid var(--navy); border-radius: 999px; padding: 0.4em 0.8em 0.25em; line-height: 1;
}
.world__cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-6); margin-top: var(--s-7); align-items: start; }
.world__levels { padding: var(--s-5); }
.levels { list-style: none; padding: 0; position: relative; }
.level { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3); padding: 7px 0; }
.level + .level::before { /* dotted path from stop to stop */
  content: ""; position: absolute; left: 26px; top: -9px; height: 16px; border-left: 4px dotted var(--navy); opacity: 0.45;
}
.level__id {
  flex: none; min-width: 56px; text-align: center;
  font-family: var(--font-display); font-size: 1.05rem; line-height: 1; letter-spacing: 0.02em;
  background: var(--navy); color: var(--sun); border-radius: 999px; padding: 0.5em 0.6em 0.35em;
  border: 3px solid var(--navy);
}
.level--fort .level__id { background: var(--tangle); color: #fff; }
.level--hidden .level__id { background: var(--cream-hi); color: var(--navy); border-style: dashed; }
.level__name { font-weight: 600; }
.level__flag { display: inline-flex; }
.level__icon { width: 28px; height: 28px; object-fit: contain; }
.level__tag { display: inline-block; font-size: 0.78rem; font-weight: 650; background: var(--teal); color: var(--navy); border-radius: 999px; padding: 0.1em 0.6em; white-space: nowrap; vertical-align: 0.1em; }
.world__who { display: grid; gap: var(--s-5); }
.who { background: var(--cream); color: var(--navy); border: var(--bw) solid var(--navy); border-radius: var(--r); box-shadow: var(--shadow); padding: var(--s-5); }
.who--boss { background: #fde2cf; }
.who__list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-4); }
.who__card { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--navy); font-weight: 650; }
.who__card:hover { color: var(--teal-deep); }
.who__art { width: 84px; height: 84px; flex: none; border-radius: 50%; background: var(--cream-hi); border: 3px solid var(--navy); display: grid; place-items: center; overflow: hidden; }
.who__art img { width: 84%; height: 84%; object-fit: contain; }
.who__name { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.2rem; line-height: 1.1; }
.world__shots { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--s-5); margin-top: var(--s-7); }
@media (max-width: 860px) {
  .world__top, .world:nth-of-type(even) .world__top, .world__cols { grid-template-columns: 1fr; gap: var(--s-5); }
  .world:nth-of-type(even) .world__map { order: 0; }
  .world__map { max-width: 520px; margin-inline: auto; }
}

/* ------------------------------------------------------------------ cards (characters, guide) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--s-6) var(--s-5); }
.cards--heroes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cards--small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr)); gap: var(--s-5); }
.card {
  display: flex; flex-direction: column;
  background: var(--cream); color: var(--navy);
  border: var(--bw) solid var(--navy); border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: var(--s-6);
}
.card__art {
  display: block; flex: none;
  height: 210px; padding: var(--s-3);
  background: radial-gradient(circle at 50% 50%, #fff8e8 0 38%, var(--sky-hi) 39% 100%);
  border-bottom: var(--bw) solid var(--navy);
}
.card__img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 0 rgba(27, 35, 64, 0.2)); }
.card__body { padding: var(--s-4) var(--s-5) var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.card__body .tag { align-self: flex-start; }
.card__name { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; font-size: var(--step-2); line-height: 1.05; }
.card__role { font-weight: 650; color: var(--teal-deep); font-size: var(--step--1); }
.card__blurb { margin: 0; }
.card__tip { margin-top: auto !important; padding: var(--s-3); border: 2px dashed rgba(27, 35, 64, 0.4); border-radius: var(--r-sm); font-size: var(--step--1); background: var(--cream-hi); }
.card__tip-label { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; background: var(--sun); border: 2px solid var(--navy); border-radius: 999px; padding: 0.2em 0.5em 0.05em; margin-right: 0.3em; font-size: 0.85em; }
.cards--heroes .card__art { height: 260px; }
.cards--small .card__art { height: 165px; }
.cards--small .card__name { font-size: var(--step-1); }
.cards--dark .card { background: #232c52; color: var(--cream); border-color: var(--cream); box-shadow: 0 var(--lift) 0 var(--navy-deep), 0 18px 28px -14px rgba(0, 0, 0, 0.6); }
.cards--dark .card__art { background: radial-gradient(circle at 50% 50%, var(--cream-hi) 0 40%, var(--sky-hi) 41% 100%); border-color: var(--cream); }
.cards--dark .card__role { color: var(--sun); }
.cards--dark .card__tip { background: rgba(247, 235, 207, 0.08); border-color: rgba(247, 235, 207, 0.4); }
.cards--dark .card__tip-label { color: var(--navy); }
.enemy-group + .enemy-group { margin-top: var(--s-7); }
.enemy-group__title { margin-bottom: var(--s-5); }
.enemy-group__title span {
  display: inline-block;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.03em; font-size: var(--step-1);
  background: var(--world, var(--sky)); color: var(--world-ink, var(--navy));
  border: 3px solid var(--navy); border-radius: 999px; padding: 0.45em 1em 0.3em; box-shadow: 0 4px 0 var(--navy);
}

/* ------------------------------------------------------------------ download page */
.os-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--s-6); align-items: start; }
.os-card { position: relative; padding: var(--s-6) var(--s-5) var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); transition: transform 0.2s ease; }
.os-card.is-yours { background: #fff4cf; box-shadow: 0 var(--lift) 0 var(--navy), 0 0 0 6px var(--sun), var(--shadow-soft); }
.os-card__yours {
  position: absolute; right: 16px; top: -18px;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1;
  background: var(--teal); color: var(--navy);
  border: 3px solid var(--navy); border-radius: 999px; padding: 0.45em 0.9em 0.3em;
  transform: rotate(4deg);
}
.os-card__head { display: flex; align-items: center; gap: var(--s-4); }
.os-card__icon { flex: none; }
.os-card__title { font-size: var(--step-2); }
.os-card__meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); }
.os-card__meta dt { font-size: var(--step--1); font-weight: 650; color: var(--ink-soft); }
.os-card__meta dd { margin: 0; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; }
.os-card__file { font-size: var(--step--1); text-align: center; margin-top: calc(-1 * var(--s-2)); }
.install { border-top: 3px dashed rgba(27, 35, 64, 0.3); padding-top: var(--s-4); }
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: var(--s-3); }
.steps li { counter-increment: step; position: relative; padding-left: 2.6em; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1em;
  width: 1.9em; height: 1.9em; display: grid; place-items: center;
  font-family: var(--font-display); padding-top: 0.15em;
  background: var(--sun); border: 3px solid var(--navy); border-radius: 50%;
}
.sha { border: 3px solid var(--navy); border-radius: var(--r-sm); background: var(--cream-hi); }
.sha summary { cursor: pointer; padding: var(--s-3) var(--s-4); font-weight: 650; list-style-position: inside; }
.sha__row { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-4); }
.sha__code { flex: 1; min-width: 0; font-size: 0.8rem; line-height: 1.5; padding: var(--s-2); word-break: break-all; }
.sha__help { padding: var(--s-3) var(--s-4) var(--s-4); font-size: var(--step--1); }
.downloads__note { text-align: center; margin-top: var(--s-6); font-weight: 500; }
[data-copy].is-done { --btn-bg: var(--grass); }

/* ------------------------------------------------------------------ tables */
.table-wrap { max-width: 1000px; margin-inline: auto; }
.table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  background: var(--cream-hi); color: var(--navy);
  border: var(--bw) solid var(--navy); border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.table th, .table td { text-align: left; vertical-align: top; padding: var(--s-3) var(--s-4); }
.table thead th {
  background: var(--navy); color: var(--cream);
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.1rem;
  padding-top: var(--s-4);
}
.table tbody th { font-weight: 650; width: 24%; }
.table tbody tr:nth-child(even) { background: var(--cream); }
.table tbody tr + tr > * { border-top: 2px dashed rgba(27, 35, 64, 0.18); }
@media (max-width: 640px) {
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table th, .table td { display: block; width: 100%; }
  .table tbody tr { padding: var(--s-3) 0; }
  .table tbody th { width: auto; padding-bottom: var(--s-1); font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.1rem; }
  .table td { padding-block: var(--s-1); }
  .table td::before { content: attr(data-label) ": "; font-weight: 650; color: var(--teal-deep); }
  .table tbody tr + tr > * { border-top: 0; }
  .table tbody tr + tr { border-top: 2px dashed rgba(27, 35, 64, 0.18); }
}

/* ------------------------------------------------------------------ FAQ */
.faq { display: grid; gap: var(--s-4); }
.faq__item { border-radius: var(--r); box-shadow: 0 4px 0 var(--navy); scroll-margin-top: var(--s-6); }
.faq__q {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  font-weight: 650; font-size: var(--step-1); line-height: 1.3;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+" / ""; flex: none;
  width: 36px; height: 36px; display: grid; place-items: center;
  font-family: var(--font-body); font-weight: 700; font-size: 1.7rem; line-height: 1; padding-bottom: 0.08em;
  background: var(--sun); border: 3px solid var(--navy); border-radius: 50%;
  transition: transform 0.2s ease;
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__item[open] .faq__q { border-bottom: 3px dashed rgba(27, 35, 64, 0.25); }
.faq__a { padding: var(--s-4) var(--s-5) var(--s-5); }

/* ------------------------------------------------------------------ changelog */
.releases { list-style: none; padding: 0 0 0 28px; position: relative; display: grid; gap: var(--s-6); }
.releases::before { /* a thread running down the page */
  content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; border-left: 4px dashed var(--tangle); opacity: 0.6;
}
.release { position: relative; padding: var(--s-5); scroll-margin-top: var(--s-6); }
.release::before {
  content: ""; position: absolute; left: -32px; top: 26px; width: 20px; height: 20px;
  background: var(--sun); border: 3px solid var(--navy); border-radius: 50%;
}
.release__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-2); }
.release__version { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--teal-deep); padding-top: 0.1em; }
.release__date { font-size: var(--step--1); font-weight: 600; color: var(--ink-soft); margin-left: auto; }
.release__title { font-size: var(--step-2); font-weight: 650; margin-bottom: var(--s-3); }

/* ------------------------------------------------------------------ prose (markdown output) */
.prose > * + * { margin-top: var(--s-3); }
.prose h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; font-size: var(--step-2); color: var(--teal-deep); margin-top: var(--s-6); scroll-margin-top: var(--s-6); }
.prose h2:first-child { margin-top: 0; }
.prose h4, .prose h5, .prose h6 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.03em; font-size: 1.1rem; margin-top: var(--s-5); }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose ul { list-style: none; padding-left: 1.6em; }
.prose ul > li { position: relative; }
.prose ul > li::before {
  content: ""; position: absolute; left: -1.25em; top: 0.5em;
  width: 0.62em; height: 0.62em; border-radius: 50%;
  background: var(--sun); border: 2px solid var(--navy);
}
.prose li + li { margin-top: var(--s-2); }
.doc { padding: clamp(var(--s-5), 4vw, var(--s-7)); }
.doc__updated { font-weight: 600; color: var(--ink-soft); }

/* ------------------------------------------------------------------ press */
.press__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--s-7); align-items: start; }
.press__facts { padding: var(--s-5); }
.facts > div { display: grid; grid-template-columns: 9.5em 1fr; gap: var(--s-3); padding: var(--s-2) 0; }
.facts > div + div { border-top: 2px dashed rgba(27, 35, 64, 0.2); }
.facts dt { font-weight: 650; color: var(--teal-deep); }
.facts dd { margin: 0; font-weight: 500; }
.press__about > * + * { margin-top: var(--s-4); }
.press__lead { font-size: var(--step-1); font-weight: 650; }
.ticks { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.ticks li { position: relative; padding-left: 1.8em; font-weight: 500; }
.ticks li::before { content: "★" / ""; position: absolute; left: 0; color: var(--sun-deep); -webkit-text-stroke: 1px var(--navy); }
.press__assets { align-items: start; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--s-6); }
.press__asset { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.press__asset--logo img { background: var(--sky); border-radius: var(--r-sm); padding: var(--s-5); border: 3px solid var(--navy); }
.press__art { border-radius: var(--r-sm); border: 3px solid var(--navy); }
.press__asset figcaption { font-weight: 500; }
.credits > div { display: grid; grid-template-columns: minmax(7em, 0.6fr) 1fr; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 2px dashed rgba(247, 235, 207, 0.2); }
.credits dt { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; color: var(--sun); text-align: right; padding-top: 0.15em; }
.credits dd { margin: 0; }
.credits__note { margin-top: var(--s-5); text-align: center; color: var(--cream-lo); }
@media (max-width: 860px) { .press__grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .facts > div, .credits > div { grid-template-columns: 1fr; gap: 0; }
  .credits dt { text-align: left; }
}

/* ------------------------------------------------------------------ 404 and download-not-ready */
.lost { position: relative; background: linear-gradient(180deg, var(--sky) 0, var(--sky-hi) 100%); padding-block: var(--s-8) calc(var(--s-8) + 40px); }
.lost__grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: var(--s-6); align-items: center; }
.lost__pip { width: min(300px, 70vw); margin-inline: auto; animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 10px 0 rgba(27, 35, 64, 0.2)); }
.lost__text { padding: var(--s-6); }
.lost__text p { margin-top: var(--s-4); font-size: var(--step-1); font-weight: 500; }
.lost__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-2deg); } }
@media (max-width: 760px) { .lost__grid { grid-template-columns: 1fr; text-align: center; } .lost__actions { justify-content: center; } .lost__pip { width: 200px; } }

/* ------------------------------------------------------------------ footer: grass and dirt from World 1 */
.site-footer {
  position: relative;
  margin-top: calc(var(--s-8) + 40px);
  color: var(--cream);
  background:
    linear-gradient(180deg, var(--grass) 0 26px, var(--grass-deep) 26px 32px, transparent 32px),
    linear-gradient(rgba(43, 24, 12, 0.55), rgba(43, 24, 12, 0.72)),
    url(/ui/dirt.jpg?v=63e0059b92) repeat 0 0 / 256px 256px,
    var(--dirt);
  background-image:
    linear-gradient(180deg, var(--grass) 0 26px, var(--grass-deep) 26px 32px, transparent 32px),
    linear-gradient(rgba(43, 24, 12, 0.55), rgba(43, 24, 12, 0.72)),
    image-set(url(/ui/dirt.avif?v=2a0c9c1503) type("image/avif"), url(/ui/dirt.webp?v=395ee6d7a4) type("image/webp"), url(/ui/dirt.jpg?v=63e0059b92) type("image/jpeg"));
}
.footer__ground { position: absolute; left: 0; right: 0; top: -38px; height: 40px; background: var(--edge-grass) repeat-x left bottom / 120px 40px; }
.footer__runner { position: absolute; bottom: 14px; height: auto; pointer-events: none; }
.footer__runner--widget { width: 98px; right: calc(8% + 140px); }
.footer__runner--pip { width: 104px; right: 8%; }
.footer__inner {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto;
  padding: calc(var(--s-7) + 20px) var(--gutter) var(--s-6);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s-6) var(--s-7);
}
.footer__logo { width: 200px; margin-bottom: var(--s-3); filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.3)); }
.footer__brand p { max-width: 38ch; font-weight: 500; }
.footer__nav ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-1) var(--s-5); }
.footer__nav a {
  display: inline-block; padding: 0.35em 0;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.1rem;
  color: var(--cream); text-decoration: none;
}
.footer__nav a:hover { color: var(--sun); }
.footer__small { grid-column: 1 / -1; border-top: 3px dashed rgba(247, 235, 207, 0.3); padding-top: var(--s-4); font-size: var(--step--1); color: var(--cream-lo); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-5); }
.footer__small p { margin: 0; }
.site-footer a:focus-visible { box-shadow: 0 0 0 7px var(--navy-deep); }
@media (max-width: 760px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__runner--widget { width: 70px; right: calc(4% + 92px); }
  .footer__runner--pip { width: 74px; right: 4%; }
}

/* ------------------------------------------------------------------ lightbox (built by site.js) */
.lightbox {
  width: min(1200px, 100vw - 24px); max-width: none; max-height: calc(100vh - 24px);
  padding: 0; border: 0; background: transparent; overflow: visible;
}
.lightbox::backdrop { background: rgba(16, 22, 43, 0.86); }
.lightbox__figure { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.lightbox__img { max-height: calc(100vh - 140px); width: auto; border: var(--bw-thick) solid var(--cream); border-radius: var(--r-sm); background: var(--navy); }
.lightbox__caption { color: var(--cream); font-weight: 600; text-align: center; }
.lightbox__btn {
  position: absolute; width: 52px; height: 52px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.4rem; line-height: 1; padding-top: 0.1em;
  background: var(--sun); color: var(--navy); border: var(--bw) solid var(--navy); border-radius: 50%;
  box-shadow: 0 4px 0 var(--navy); cursor: pointer;
}
.lightbox__btn:hover { background: #ffd35f; }
.lightbox__close { right: 6px; top: 6px; }
.lightbox__prev { left: 6px; top: calc(50% - 46px); }
.lightbox__next { right: 6px; top: calc(50% - 46px); }

/* ------------------------------------------------------------------ small screens and motion */
@media (max-width: 600px) {
  .section { padding-block: var(--s-7); }
  .hero { height: 440px; }
  .hero__art img { object-position: 42% 70%; }
  .intro__panel { padding: var(--s-5) var(--s-4); }
  .btn--big { font-size: var(--step-1); }
  .hero-card { grid-template-columns: 1fr; text-align: center; }
  .hero-card__art img { height: 200px; margin-inline: auto; }
  .hero-card .tag { margin-inline: auto; }
  .tilt-l, .tilt-r, .story__panel:nth-child(n), .place:nth-child(n), .hero-card--pip, .hero-card--widget { transform: none; }
  .releases { padding-left: 22px; }
  .release::before { left: -26px; }
  .story__num { left: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .site-footer, .world-picker, .nav-toggle { display: none; }
  body { background: #fff; }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: var(--s-3); }
  .tile__art { padding: var(--s-5) var(--s-2) 0; }
  .tile__text { padding: var(--s-1) var(--s-3) var(--s-3); }
  .tile__name { font-size: 0.95rem; }
  .tile__num { width: 32px; height: 32px; font-size: 1rem; left: 6px; top: 6px; }
}
.who__list > li { flex: 1 1 240px; }
.who__text { display: flex; flex-direction: column; gap: 2px; }
.who__blurb { font-weight: 500; font-size: var(--step--1); color: var(--ink-soft); line-height: 1.4; }
.who__card:hover .who__blurb { color: var(--ink-soft); }
.world__cols--solo { grid-template-columns: minmax(0, 640px); }
.os-card__meta dd { text-transform: uppercase; }
@media (max-width: 600px) {
  .page-head { padding-top: calc(var(--s-7) + 24px); }
  .page-head::before {
    background:
      url(/ui/cloud.png?v=08045fc583) no-repeat -18px 10px / 84px auto,
      url(/ui/cloud.png?v=08045fc583) no-repeat calc(100% + 16px) 6px / 72px auto;
    background-image: image-set(url(/ui/cloud.avif?v=5f5e0a1dba) type("image/avif"), url(/ui/cloud.png?v=08045fc583) type("image/png")),
      image-set(url(/ui/cloud.avif?v=5f5e0a1dba) type("image/avif"), url(/ui/cloud.png?v=08045fc583) type("image/png"));
  }
  .cards--small { grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-3); }
  .cards--small .card__art { height: 120px; padding: var(--s-2); }
  .cards--small .card__body { padding: var(--s-3); }
  .cards--small .card__name { font-size: 1.05rem; }
  .cards--small .card__blurb, .cards--small .card__tip { font-size: 0.9rem; }
  .cards--small .card__tip { padding: var(--s-2); }
}

/* ================================================================== second pass: layout polish */

/* features: a 3-column board; wide cards (image beside text) fill the first and last rows */
.features__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
.features__grid > li { max-width: none; }
.feature { display: flex; flex-direction: column; }
.feature--wide { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: var(--s-4); padding: var(--s-3); }
.feature--wide .feature__art { margin-bottom: 0; }
.feature--wide .feature__title { font-size: var(--step-2); }
.feature--wide .feature__body { padding: var(--s-2) var(--s-3) var(--s-2) 0; }
.feature--wide .feature__body p { margin-inline: var(--s-2); }
@media (max-width: 960px) {
  .features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature--wide:last-child { grid-column: auto; display: flex; padding: var(--s-3) var(--s-3) var(--s-5); }
  .feature--wide:last-child .feature__art { margin-bottom: var(--s-4); }
  .feature--wide:last-child .feature__body { padding: 0; }
  .feature--wide:last-child .feature__title { font-size: var(--step-1); }
  .feature--wide:last-child .feature__body p { font-size: inherit; }
}
@media (max-width: 640px) {
  .features__grid { grid-template-columns: 1fr; }
  .feature--wide { grid-column: auto; display: flex; padding: var(--s-3) var(--s-3) var(--s-5); }
  .feature--wide .feature__art { margin-bottom: var(--s-4); }
  .feature--wide .feature__body { padding: 0; }
  .feature--wide .feature__title { font-size: var(--step-1); }
  .feature--wide .feature__body p { font-size: inherit; }
}

/* world tiles: 4 across; the secret world is a wide night-sky tile */
.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile--secret { grid-column: span 2; }
.tile--secret .tile__link { flex-direction: row; align-items: center; background-image: var(--stars), none; background-size: 220px 220px; }
.tile--secret .tile__art { flex: 0 0 52%; padding: var(--s-4) var(--s-2) var(--s-4) var(--s-4); }
.tile--secret .tile__text { margin-top: 0; padding: var(--s-4) var(--s-4) var(--s-4) var(--s-2); }
.tile--secret .tile__name { color: var(--sun); font-size: 1.45rem; }
.tile__short { display: block; margin-top: var(--s-2); font-size: var(--step--1); font-weight: 500; line-height: 1.4; }
.tile__num { font-size: 1.25rem; }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: var(--s-3); }
  .tile--secret .tile__link { flex-direction: column; align-items: stretch; }
  .tile--secret .tile__art { flex: none; padding: var(--s-5) var(--s-4) 0; }
  .tile--secret .tile__text { padding: var(--s-2) var(--s-4) var(--s-4); }
}

/* screenshot captions */
.shot-fig { display: flex; flex-direction: column; gap: var(--s-2); }
.shot-fig__cap { font-weight: 650; font-size: var(--step--1); padding-inline: var(--s-1); }
.shot-fig__world {
  display: inline-block; margin-right: 0.3em;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.82rem; line-height: 1;
  background: var(--navy); color: var(--sun); border-radius: 999px; padding: 0.4em 0.65em 0.25em; vertical-align: 0.1em;
}
.world .shot-fig__cap { color: var(--world-ink); }

/* Maker Village: screenshots on every place card */
.village__art { margin-top: var(--s-5); overflow: hidden; padding: 0; transform: rotate(-1deg); }
.village__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.place { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.place__art { border-bottom: var(--bw) solid var(--navy); background: var(--navy); }
.place__img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.place__body { padding: var(--s-4) var(--s-5) var(--s-5); }

/* finale: Pip and Widget cheering in the World 1 meadow */
.finale__art { position: relative; aspect-ratio: 3 / 2; background: var(--sky); }
.finale__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.finale__sprite { position: absolute; bottom: 7%; height: 62%; width: auto; filter: drop-shadow(0 8px 0 rgba(27, 35, 64, 0.18)); }
.finale__sprite--pip { left: 18%; animation: hop 1.6s ease-in-out infinite; }
.finale__sprite--widget { right: 18%; animation: hop 1.6s ease-in-out 0.8s infinite; }
.finale__spool { position: absolute; left: 50%; top: 10%; width: 15%; height: auto; transform: translateX(-50%); animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 6px 0 rgba(27, 35, 64, 0.2)); }
@keyframes hop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-9%); } 60% { transform: translateY(-9%); } }

/* worlds: bigger boss and friend portraits, island map in the page head */
.who__art { width: 112px; height: 112px; }
.who--boss .who__art { background: radial-gradient(circle at 50% 60%, #fff3e6 0 55%, #f6c9a8 56%); }
.who__name { font-size: 1.35rem; }
.page-head__art { max-width: 640px; margin: var(--s-5) auto 0; }
.page-head__img { width: 100%; filter: drop-shadow(0 10px 0 rgba(27, 35, 64, 0.18)); }

/* characters: bosses five across; enemies in world-coloured panels that flow side by side */
.cards--bosses { grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr)); gap: var(--s-5); }
.cards--bosses .card__name { font-size: var(--step-1); }
.cards--bosses .card__art { height: 180px; }
.cards--four { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.enemy-groups { display: flex; flex-wrap: wrap; gap: var(--s-6) var(--s-5); align-items: stretch; }
.enemy-group {
  flex: 1 1 auto;
  background: var(--world); color: var(--world-ink);
  border: var(--bw) solid var(--navy); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: var(--s-5) var(--s-4) var(--s-5);
}
.enemy-group + .enemy-group { margin-top: 0; }
.enemy-group.w-1 { flex-basis: 100%; }
.enemy-group__title { margin: calc(-1 * var(--s-5) - 22px) 0 var(--s-4); }
.enemy-group__title span { background: var(--cream-hi); color: var(--navy); }
.cards--enemies { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.cards--enemies > .card { flex: 1 1 170px; max-width: 240px; }
.enemy-group.w-1 .cards--enemies > .card { max-width: none; flex-basis: 190px; }
@media (max-width: 600px) {
  .enemy-group { flex-basis: 100%; padding: var(--s-5) var(--s-3) var(--s-4); }
  .cards--enemies > .card { flex: 1 1 calc(50% - var(--s-4)); max-width: none; }
}

/* download cards: "Mac" big, "Apple Silicon" small */
.os-card__heading { display: flex; flex-direction: column; gap: 2px; font-weight: 400; }
.os-card__title { font-size: var(--step-3); }
.os-card__sub { font-weight: 650; font-size: var(--step-0); color: var(--teal-deep); }

/* keycaps on the controls card */
kbd {
  display: inline-block; min-width: 1.9em; text-align: center;
  font-family: var(--font-body); font-weight: 650; font-size: 0.86em; line-height: 1.3;
  color: var(--navy); background: #fff;
  border: 2px solid var(--navy); border-radius: 8px; box-shadow: 0 3px 0 var(--navy);
  padding: 0.12em 0.45em 0.08em; margin: 0.12em 0;
  white-space: nowrap;
}
.table--controls td { line-height: 1.9; }

/* footer: Pip runs, Widget hops after him */
.footer__runner--pip { width: 62px; right: 8%; bottom: 10px; }
.footer__runner--widget { width: 68px; right: calc(8% + 96px); bottom: 14px; animation: hop 1.1s ease-in-out infinite; }
@media (max-width: 760px) {
  .footer__runner--pip { width: 50px; right: 6%; }
  .footer__runner--widget { width: 54px; right: calc(6% + 70px); }
}

/* hero badge sits clear of the logo on phones */
@media (max-width: 600px) {
  .hero__badge { width: 64px; right: -4%; top: -14%; font-size: 0.66rem; }
  .hero__brand { width: min(520px, 80vw); }
}

/* the 404 and "not ready" pages fill the window */
.page-lost main { display: flex; flex-direction: column; }
.page-lost .lost { flex: 1 0 auto; display: flex; align-items: center; }
.page-lost .lost > .wrap { flex: 1; }
.village__art { margin: var(--s-5) auto 0; padding: 0; transform: none; overflow: visible; max-width: 340px; }
.village__img { aspect-ratio: auto; object-fit: contain; filter: drop-shadow(0 10px 0 rgba(27, 35, 64, 0.16)); animation: bob 4s ease-in-out infinite; }
@media (max-width: 860px) { .village__art { max-width: 220px; } }
/* enemy panels: build.mjs packs them into rows on a 12-column grid (span-N) */
.enemy-groups { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); }
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-10 { grid-column: span 10; }
.span-11 { grid-column: span 11; }
.span-12 { grid-column: span 12; }
.cards--enemies { gap: var(--s-3); }
.cards--enemies > .card { flex: 1 1 150px; max-width: none; }
.cards--enemies .card__body { padding: var(--s-3) var(--s-4) var(--s-4); }
.enemy-group { padding: var(--s-5) var(--s-3) var(--s-3); }
@media (max-width: 960px) { .enemy-groups > .enemy-group { grid-column: 1 / -1; } }
@media (max-width: 600px) { .cards--enemies > .card { flex: 1 1 calc(50% - var(--s-3)); } }
.enemy-group__title span { font-size: 1.1rem; }
.cards--enemies .card__blurb { font-size: 0.97rem; line-height: 1.45; }
.cards--enemies .card__tip { font-size: 0.85rem; padding: var(--s-2); }
.table__both { text-align: center !important; }
@media (max-width: 640px) { .table__both { text-align: left !important; } }
@media (max-width: 600px) {
  .cast__friends { gap: var(--s-4) var(--s-3); }
  .friend-chip { width: 76px; font-size: 0.9rem; }
  .friend-chip__art { width: 72px; height: 72px; border-width: 3px; }
}
@media (max-width: 600px) {
  .cards:not(.cards--heroes):not(.cards--enemies) { grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-3); }
  .cards:not(.cards--heroes) .card__art { height: 130px; padding: var(--s-2); }
  .cards:not(.cards--heroes) .card__body { padding: var(--s-3); }
  .cards:not(.cards--heroes) .card__name { font-size: 1.1rem; }
  .cards:not(.cards--heroes) .card__blurb, .cards:not(.cards--heroes) .card__tip { font-size: 0.9rem; }
  .cards:not(.cards--heroes) .card__role { font-size: 0.8rem; }
  .cards:not(.cards--heroes) .card__tip { padding: var(--s-2); }
  .cards:not(.cards--heroes) .tag { font-size: 0.7rem; }
  /* world screenshots scroll sideways instead of stacking */
  .world__shots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) var(--s-3); gap: var(--s-3); scrollbar-width: none; }
  .world__shots::-webkit-scrollbar { display: none; }
  .world__shots > li { flex: 0 0 82%; scroll-snap-align: center; }
}
.phone-note { display: none; max-width: 640px; margin: 0 auto var(--s-6); padding: var(--s-4) var(--s-5); text-align: center; font-weight: 600; background: #fff4cf; }
[data-device="phone"] .phone-note { display: block; }
.cards--enemies > .card { min-width: 0; }
@media (max-width: 600px) {
  .enemy-group.enemy-group .cards--enemies > .card { flex: 1 1 calc(50% - var(--s-3)); }
  .cards--enemies .card__art { height: 120px; }
  .cards--enemies .card__name { font-size: 1.05rem; }
  .cards--enemies .card__body { padding: var(--s-3); }
  .enemy-groups { gap: var(--s-7) 0; }
}
.lightbox__close { right: -14px; top: -14px; }

/* ================================================================== third pass: review fixes */

/* home: the header's beta pill would compete with the round sticker on the logo */
.page-home .beta-tag { display: none; }

/* home: tagline and buttons come first in the intro sticker, so "Download the beta" is on the first screen */
.intro__actions { margin-top: var(--s-4); }
.intro__platforms { margin-top: var(--s-4); }
.intro__text { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 3px dashed rgba(27, 35, 64, 0.22); }
@media (max-width: 600px) {
  .hero { height: min(440px, 56vh); min-height: 340px; }
  .intro { margin-top: -36px; }
  .intro__panel { padding-top: var(--s-4); }
  .intro__tagline { font-size: 1.65rem; }
  .intro__actions { gap: var(--s-3); }
}

/* features: one text size, cards in a row line up, at most two tilted per row */
.feature p { font-size: var(--step-0); }
/* cards hug their text and sit ragged on purpose, like a scrapbook page */
.features__grid { align-items: start; }

/* sticker borders on the night band and dark worlds: cream, with a deeper navy lift (navy on navy vanishes) */
.band--night .sticker, .world--dark .sticker, .world--dark .who, .world--dark .world__screen {
  border-color: var(--sun);
  box-shadow: 0 var(--lift) 0 var(--navy-deep), 0 18px 28px -14px rgba(0, 0, 0, 0.6);
}
.band--night .btn, .world--dark .btn { border-color: var(--cream-hi); box-shadow: 0 5px 0 var(--navy-deep); }
.band--night .btn:hover, .world--dark .btn:hover { box-shadow: 0 7px 0 var(--navy-deep); }

/* the Cloud Shelf tile: stars only behind the island, never over the words */
.tile--secret .tile__link { background-image: none; }
.tile--secret .tile__link::before {
  content: ""; position: absolute; inset: 0 46% 0 0; pointer-events: none;
  background: var(--stars); background-size: 220px 220px;
}
.tile--secret .tile__art, .tile--secret .tile__text { position: relative; z-index: 1; }
@media (max-width: 640px) { .tile--secret .tile__link::before { inset: 0 0 42% 0; } }

/* home screenshots: bigger, with arrows and an edge fade so the strip clearly scrolls */
.shots__frame { position: relative; }
.shots__strip > li { flex-basis: min(80vw, 520px); }
.shots__strip > li.shots__first { flex-basis: min(86vw, 640px); }
.shots__frame::after {
  content: ""; position: absolute; top: 0; bottom: var(--s-5); right: 0; width: min(12vw, 120px); pointer-events: none;
  background: linear-gradient(90deg, rgba(230, 246, 255, 0), var(--page));
  transition: opacity 0.2s ease;
}
.shots__frame.is-end::after { opacity: 0; }
.scroll-btn {
  position: absolute; top: calc(50% - 46px); z-index: 2;
  width: 56px; height: 56px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.35rem; line-height: 1; padding-top: 0.1em;
  background: var(--sun); color: var(--navy);
  border: var(--bw) solid var(--navy); border-radius: 50%; box-shadow: 0 4px 0 var(--navy);
  cursor: pointer; transition: transform 0.12s ease, opacity 0.2s ease;
}
.scroll-btn:hover { transform: translateY(-2px); background: #ffd35f; }
.scroll-btn:disabled { opacity: 0; pointer-events: none; }
.scroll-btn--prev { left: max(8px, calc((100% - var(--max)) / 2 - 28px)); }
.scroll-btn--next { right: max(8px, calc((100% - var(--max)) / 2 - 28px)); }
.shots .section__more { margin-top: var(--s-4); }
@media (max-width: 600px) {
  .shots { padding-bottom: var(--s-5); }
  .shots__strip { padding-bottom: var(--s-3); }
  .scroll-btn { width: 46px; height: 46px; font-size: 1.1rem; top: calc(50% - 40px); }
}

/* home finale: one line per computer, golden spool markers */
.mini-req { grid-template-columns: 1fr; gap: var(--s-2); }
.mini-req__item {
  position: relative; display: block;
  padding: var(--s-2) var(--s-3) var(--s-2) 2.6em;
  font-size: var(--step--1); font-weight: 500; line-height: 1.4;
}
.mini-req__item::before {
  content: ""; position: absolute; left: 0.7em; top: 50%; width: 1.35em; height: 1.35em; transform: translateY(-50%);
  background: url(/ui/golden-spool.png?v=57454df1d1) no-repeat center / contain;
  background-image: image-set(url(/ui/golden-spool.avif?v=9942a438fb) type("image/avif"), url(/ui/golden-spool.png?v=57454df1d1) type("image/png"));
}
.mini-req__os { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.03em; font-size: 1.02rem; margin-right: 0.25em; }

/* Maker Village cards: no cut-off banners */
.place__img { aspect-ratio: 16 / 10; object-position: 50% 0; }

/* worlds: the in-game map is the main picture, framed as a sticker; the bare island is a small badge */
.world__map { margin: 0; }
.world__screen {
  display: block; overflow: hidden;
  background: var(--navy);
  border: var(--bw-thick) solid var(--navy); border-radius: var(--r);
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
  transition: transform 0.15s ease;
}
.world:nth-of-type(even) .world__screen { transform: rotate(1deg); }
.world__screen:hover { transform: rotate(0) translateY(-3px); }
.world__screen-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.world__screen-cap { margin-top: var(--s-3); text-align: center; font-size: var(--step--1); font-weight: 600; opacity: 0.85; }
.world__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.world__island { flex: none; width: clamp(96px, 10vw, 140px); }
.world__island-img { width: 100%; filter: drop-shadow(0 6px 0 rgba(16, 22, 43, 0.3)); }
@media (max-width: 860px) { .world__map { max-width: 640px; } }
@media (max-width: 480px) { .world__island { width: 76px; } }

/* worlds: bigger screenshots, one large and two beside it */
.world__shots { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.world__shots > li:first-child { grid-row: span 2; }
@media (max-width: 860px) and (min-width: 601px) {
  .world__shots { grid-template-columns: 1fr 1fr; }
  .world__shots > li:first-child { grid-row: auto; grid-column: 1 / -1; }
}

/* worlds: level names wrap instead of pushing the "Secret path" tag onto its own line */
.level { flex-wrap: nowrap; }
.level__name { min-width: 0; }

/* worlds: the sticky world bar fades at the edge where it scrolls; no stray connectors on phones */
@media (max-width: 760px) {
  .world-picker__list { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
}
@media (max-width: 600px) { .world-picker__list > li + li::before { display: none; } }

/* characters: Baron Spaghetti's spotlight above his bosses; light discs so purple bosses stand out */
.spotlight {
  display: grid; grid-template-columns: minmax(200px, 0.8fr) minmax(0, 1.2fr); gap: var(--s-6); align-items: center;
  max-width: 980px; margin: 0 auto var(--s-7);
  padding: var(--s-6);
  background: #232c52; color: var(--cream);
  border: var(--bw) solid var(--cream); border-radius: var(--r-lg);
  box-shadow: 0 var(--lift) 0 var(--navy-deep), 0 18px 28px -14px rgba(0, 0, 0, 0.6);
  scroll-margin-top: var(--s-6);
}
.spotlight__art {
  aspect-ratio: 1; display: grid; place-items: center; padding: 9%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff6dc 0 60%, var(--sun) 61% 100%);
  border: var(--bw-thick) solid var(--cream);
  box-shadow: 0 var(--lift) 0 var(--navy-deep);
}
.spotlight__img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 0 rgba(16, 22, 43, 0.28)); }
.spotlight__name { color: var(--sun); margin: var(--s-3) 0 var(--s-2); }
.spotlight__role { font-weight: 650; color: var(--sun); }
.spotlight__blurb { margin-top: var(--s-3); font-size: var(--step-1); font-weight: 500; }
.spotlight .card__tip { margin-top: var(--s-4) !important; background: rgba(247, 235, 207, 0.08); border-color: rgba(247, 235, 207, 0.4); }
.spotlight .card__tip-label { color: var(--navy); }
.spotlight__more { margin-top: var(--s-4); }
@media (max-width: 700px) {
  .spotlight { grid-template-columns: 1fr; text-align: center; padding: var(--s-5); }
  .spotlight__art { max-width: 240px; margin-inline: auto; }
  .spotlight .tag { margin-inline: auto; }
  .spotlight .card__tip { text-align: left; }
}

/* download: Pip and Widget pop out of the platform badges; a cheering scene in the page head */
.os-cards { padding-top: var(--s-5); }
.os-card__icon {
  position: relative; flex: none;
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff8e8 0 55%, var(--sky-hi) 56% 100%);
  border: var(--bw) solid var(--navy); box-shadow: 0 4px 0 var(--navy);
  margin-top: -54px;
}
.os-card__sprite {
  position: absolute; left: 50%; bottom: 0; width: auto; height: 132%; max-width: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 0 rgba(27, 35, 64, 0.2));
}
.os-card__head { align-items: flex-end; }
.page-head__scene { max-width: 560px; margin: var(--s-5) auto 0; aspect-ratio: 16 / 7; }
.page-head__scene .finale__sprite { height: 78%; bottom: 6%; }
.page-head__scene .finale__sprite--pip { left: 22%; }
.page-head__scene .finale__sprite--widget { right: 22%; }
.page-head__scene .finale__spool { width: 11%; top: 12%; }

/* requirements: a golden spool in the corner of the table's navy header */
.table__corner { vertical-align: middle !important; }
.table__corner .icon-spool { width: 40px; height: auto; display: block; }
@media (max-width: 640px) { .table__corner { display: none; } }

/* controls: navy keycaps like the game's UI, and the game's own controls card beside the table */
kbd { color: var(--cream-hi); background: var(--navy); border-color: var(--navy); box-shadow: 0 3px 0 var(--navy-deep); }
.controls-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; max-width: 1200px; margin-inline: auto; }
.controls-wrap .table-wrap { max-width: none; }
.controls-card { margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.controls-card__link { transform: rotate(1deg); }
.controls-card__link:hover { transform: rotate(0) translateY(-3px); }
.controls-card .shot__img, .controls-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 960px) {
  .controls-wrap { grid-template-columns: 1fr; }
  .controls-card { max-width: 560px; margin-inline: auto; width: 100%; }
}

/* page hosts from the game: the Nozzle Gnome on the FAQ, Widget on the changelog, Pip on privacy */
.page-head__host {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  width: clamp(110px, 12vw, 170px); text-align: center; z-index: 1;
}
.page-head__host-img { width: 100%; height: auto; filter: drop-shadow(0 8px 0 rgba(27, 35, 64, 0.18)); animation: bob 3.2s ease-in-out infinite; }
.page-head__host-label {
  display: inline-block; margin-top: var(--s-2);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.85rem; line-height: 1.1;
  background: var(--cream-hi); color: var(--navy);
  border: 3px solid var(--navy); border-radius: var(--r-sm); box-shadow: 0 3px 0 var(--navy);
  padding: 0.45em 0.7em 0.3em; transform: rotate(-3deg);
}
@media (max-width: 860px) {
  .page-head__host { position: static; transform: none; width: 104px; margin: 0 auto var(--s-3); }
  .page-head__host-label { font-size: 0.75rem; }
}

/* changelog: the big releases carry a picture of what they brought */
.release--art .release__head, .release--art .release__title { padding-right: 112px; }
.release__art { position: absolute; right: -14px; top: -30px; width: 116px; transform: rotate(6deg); pointer-events: none; }
.release__art--island { width: 150px; right: -26px; top: -22px; }
.release__img { width: 100%; height: auto; filter: drop-shadow(0 6px 0 rgba(27, 35, 64, 0.2)); }
@media (max-width: 600px) {
  .release--art .release__head, .release--art .release__title { padding-right: 70px; }
  .release__art { width: 76px; right: -8px; top: -24px; }
  .release__art--island { width: 96px; }
}

/* press: screenshots grouped by world; the whole thumbnail downloads the full frame */
.press-group + .press-group { margin-top: var(--s-7); }
.world-tab { margin-bottom: var(--s-4); }
.world-tab span {
  display: inline-block;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.03em; font-size: 1.05rem;
  background: var(--world, var(--sky)); color: var(--world-ink, var(--navy));
  border: 3px solid var(--navy); border-radius: 999px; padding: 0.45em 1em 0.3em; box-shadow: 0 4px 0 var(--navy);
}
.gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.gallery .shot-fig__cap { margin-top: var(--s-2); }
.shot--dl { position: relative; }
.shot__dl {
  position: absolute; right: 10px; bottom: 10px;
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--sun); border: 3px solid var(--navy); border-radius: 50%; box-shadow: 0 3px 0 var(--navy);
}
.shot--dl:hover .shot__dl { background: #ffd35f; transform: translateY(-2px); }
.page-head__host { top: auto; bottom: -34px; transform: none; width: auto; }
.page-head__host-img { width: auto; height: clamp(110px, 11vw, 156px); margin-inline: auto; }
@media (min-width: 961px) { .controls-card { position: sticky; top: var(--s-5); } }
@media (max-width: 860px) {
  .page-head__host { position: static; width: auto; margin: 0 auto var(--s-3); }
  .page-head__host-img { height: 96px; }
}

/* ---------------------------------------------------------------- welcome (spoiler gate at /) */
.page-welcome { background: var(--sky); }
.welcome { position: relative; min-height: 100svh; display: grid; overflow: hidden; }
.welcome__art, .welcome__art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.welcome__art img { object-fit: cover; object-position: 50% 62%; }
.welcome::after { /* soften the art so the panel reads */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(230, 246, 255, 0) 35%, rgba(27, 35, 64, 0.35) 100%);
}
.welcome__inner {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  gap: var(--s-5); padding: clamp(16px, 3vw, 40px) 16px clamp(20px, 5vh, 56px);
}
.welcome__brand { position: relative; width: min(600px, 84vw); }
.welcome__logo { margin: 0; }
.welcome__logo-img { width: 100%; filter: drop-shadow(0 8px 0 rgba(27, 35, 64, 0.22)); }
.welcome__panel { width: min(620px, 100%); text-align: center; padding: var(--s-5) var(--s-5) var(--s-6); }
.welcome__title { margin: 0 0 var(--s-3); }
.welcome__text { margin: 0 auto var(--s-5); max-width: 46ch; }
.welcome__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; align-items: center; }
/* keep Pip in view: the panel sits beside him on wide screens, below the art on phones */
@media (min-width: 1200px) {
  .welcome__panel { align-self: flex-end; margin-right: clamp(0px, 3vw, 48px); width: min(560px, 46vw); }
}
@media (max-width: 1199px) {
  .welcome__art { bottom: auto; height: 58svh; }
  .welcome::after { background: linear-gradient(180deg, rgba(230, 246, 255, 0) 40%, rgba(143, 214, 255, 0.9) 58svh, var(--sky) 60svh); }
  .welcome__panel { padding: var(--s-4) var(--s-4) var(--s-5); }
}
/* tablets: the wide art would sit under the big logo, so the logo moves into the panel */
.welcome__panel-logo { display: none; }
@media (min-width: 601px) and (max-width: 1199px) {
  .welcome__brand { display: none; }
  .welcome__art { height: 62svh; }
  .welcome__art img { object-position: 50% 70%; }
  .welcome__inner { justify-content: flex-end; }
  .welcome__panel-logo { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); margin: calc(-1 * var(--s-2)) 0 var(--s-3); }
  .welcome__panel-logo-img { width: min(320px, 60%); }
  .welcome__panel-beta { font-family: var(--font-display); text-transform: uppercase; font-size: var(--step-0); color: var(--navy); background: var(--sun); border: 3px solid var(--navy); border-radius: 999px; padding: 0.15em 0.8em; }
}

/* ---- generated by build.mjs: world colours from the game ---- */
.w-1 { --world: #8fd6ff; --world-ink: var(--navy); }
.w-2 { --world: #9edbfa; --world-ink: var(--navy); }
.w-3 { --world: #78d1f2; --world-ink: var(--navy); }
.w-4 { --world: #2e244c; --world-ink: var(--cream); }
.w-5 { --world: #fae6c2; --world-ink: var(--navy); }
.w-6 { --world: #332147; --world-ink: var(--cream); }
.w-7 { --world: #c7e6ff; --world-ink: var(--navy); }
.w-8 { --world: #1f1a40; --world-ink: var(--cream); }
.w-9 { --world: #8cd19e; --world-ink: var(--navy); }
.w-10 { --world: #291a38; --world-ink: var(--cream); }
.w-s { --world: #1f1f4c; --world-ink: var(--cream); }
