/* Unwoven website: one shared stylesheet for every page.
   Tokens mirror the game's src/ui/theme.css (SPEC.md §4.1): Linen, Ember, ink, Nunito. */

/* ───────────────────────── Fonts (self-hosted, latin subset) ───────────────────────── */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/nunito-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/nunito-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('fonts/nunito-latin-900-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ───────────────────────── Tokens ───────────────────────── */

:root {
  color-scheme: light;

  --bg: #f6f1e8;
  --bg-2: #ede5d7;
  --surface: #fffcf6;
  --line: #e4dacb;
  --line-2: #d8ccba;

  --ink: #262033;
  --ink-body: #443d55;
  --ink-2: #6b6378;
  --on-brand: #fffaf3;

  --brand: #ef6a3e;
  /* Text-bearing Ember: white on pure Ember is 2.97:1, so labelled faces sit a touch
     deeper (3.37:1) and carry only large text (19px, weight 800+). SPEC.md §4.1. */
  --brand-face: #e16137;
  --brand-press: #c9502a;
  --brand-soft: #fde3d6;
  --brand-ink: #9a3412;
  --brand-light: #ff9166;

  --teal: #1f7486;
  --plum: #7a4a93;
  --gold: #f2b33d;

  /* The Indigo chapter, for the colour-worlds band. */
  --night: #161a2e;
  --night-2: #1f2440;
  --night-ink: #f3f0fa;
  --night-ink-2: #a7a9c7;

  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(60, 40, 20, 0.06), 0 2px 6px rgba(60, 40, 20, 0.06);
  --shadow-2: 0 2px 4px rgba(60, 40, 20, 0.06), 0 8px 20px rgba(60, 40, 20, 0.1);
  --shadow-3: 0 6px 14px rgba(60, 40, 20, 0.1), 0 20px 48px rgba(60, 40, 20, 0.18);

  --gutter: 16px;
  --wrap: 1120px;
  --section-y: clamp(56px, 9vw, 112px);
  --focus: var(--teal);
}

@media (min-width: 600px) {
  :root {
    --gutter: 24px;
  }
}

@media (min-width: 1000px) {
  :root {
    --gutter: 32px;
  }
}

/* ───────────────────────── Base ───────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink-body);
  /* Linen weave: a faint cross-hatch over the brand background, as in the game. */
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, rgba(237, 229, 215, 0.7) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(237, 229, 215, 0.55) 0 1px, transparent 1px 5px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (min-width: 600px) {
  body {
    font-size: 17px;
  }
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(30px, 2.4vw + 20px, 46px);
}

h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

img,
svg {
  max-width: 100%;
}

img {
  display: block;
  height: auto;
}

a {
  color: var(--brand-ink);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2.5px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.icon {
  display: inline-block;
  flex: none;
  vertical-align: -0.2em;
  overflow: visible;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--on-brand);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

/* ───────────────────────── Header ───────────────────────── */

.site-header {
  position: relative;
  z-index: 5;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 44px;
  min-height: 44px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 3px 6px rgba(201, 80, 42, 0.25));
}

.top-nav ul {
  display: flex;
  gap: 2px;
  list-style: none;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.top-nav a:hover {
  background: var(--bg-2);
}

.top-nav a[aria-current='page'] {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

@media (max-width: 359px) {
  .header-row .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .top-nav a {
    padding: 0 10px;
    font-size: 14px;
  }
}

/* ───────────────────────── Shared pieces ───────────────────────── */

/* Section label with a tiny knot-tailed thread in front, drawn like a board thread. */
.kicker {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 14px;
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.kicker::before {
  content: '';
  flex: none;
  width: 40px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 14'%3E%3Cpath d='M3.5 7H30' stroke='%23EF6A3E' stroke-width='3.4' stroke-linecap='round'/%3E%3Ccircle cx='3.5' cy='7' r='2.6' fill='%23EF6A3E'/%3E%3Cpath d='M37.6 7L29.6 2.4V11.6Z' fill='%23EF6A3E' stroke='%23EF6A3E' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat center / contain;
}

/* A card of the brand's paper with a running stitch just inside its edge. */
.card {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

.card::after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1.5px dashed var(--line-2);
  border-radius: calc(var(--r-xl) - 7px);
  pointer-events: none;
}

.section {
  padding-block: var(--section-y);
}

.section-head {
  max-width: 680px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

/* When a long label wraps, the thread sits centred above it. */
.section-head.center .kicker,
.hero-copy .kicker,
.lost-in .kicker {
  justify-content: center;
}

@media (max-width: 599px) {
  .kicker {
    font-size: 12px;
    letter-spacing: 0.11em;
  }
}

.section-head > p:not(.kicker) {
  margin-top: 16px;
  font-size: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--r-lg);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  transition: transform 120ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 120ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.04) saturate(1.04);
}

.btn:active {
  transform: translateY(4px);
}

/* Pressable Ember button with a 4px lip, like the game's primary buttons. */
.btn-primary {
  background: var(--brand-face);
  color: var(--on-brand);
  text-shadow: 0 1px 0 var(--brand-press);
  box-shadow: 0 4px 0 #b84a26, 0 6px 14px rgba(154, 52, 18, 0.22);
}

.btn-primary:active {
  box-shadow: 0 0 0 #b84a26, 0 1px 3px rgba(154, 52, 18, 0.22);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--line-2), inset 0 0 0 1.5px var(--line);
}

.btn-secondary:active {
  box-shadow: 0 0 0 var(--line-2), inset 0 0 0 1.5px var(--line);
}

/* "Coming soon to Google Play": a status note on the brand's stitched paper, not a store
   badge. It must not look like Google's official badge (dark tile, small caps line over a
   large "Google Play"), so "Coming soon" leads and "to Google Play" is plain body text.
   No store artwork and no link until the game is live. */
.soon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  margin: 0;
  padding: 10px 24px 10px 10px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 4px 0 var(--line-2), inset 0 0 0 1.5px var(--line), var(--shadow-1);
}

.soon::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1.5px dashed var(--line-2);
  border-radius: 15px;
  pointer-events: none;
}

.soon svg {
  width: 44px;
  height: 44px;
  flex: none;
}

.soon-plain {
  padding-left: 24px;
}

.soon-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}

.soon-main {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.005em;
}

.soon-sub {
  color: var(--ink-body);
  font-size: 15px;
  font-weight: 700;
}

/* Phone mockup around a real screenshot (780 x 1688, a 390 x 844 phone at 2x). */
.phone {
  position: relative;
  width: var(--phone-w, min(270px, 74vw));
  margin-inline: auto;
  padding: 9px;
  border-radius: 46px;
  background: linear-gradient(150deg, #3d3653, #262033 45%, #1b1726);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.08),
    0 2px 0 #120f1a,
    var(--shadow-3);
}

.phone img {
  width: 100%;
  border-radius: 37px;
  background: var(--bg);
}

/* Lists with a small Ember check. */
.ticks {
  display: grid;
  gap: 14px;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 36px;
}

.ticks li::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A3412' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.4l3.6 3.6 7.4-7.6'/%3E%3C/svg%3E")
    no-repeat center / 18px;
}

/* Two-column feature layout: copy and a phone. */
.split {
  display: grid;
  gap: 48px;
  align-items: center;
}

.split-copy > h2 {
  margin-bottom: 18px;
}

.split-copy > p + p {
  margin-top: 14px;
}

.split-copy > .lede-sm {
  font-size: 18px;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 64px;
  }
  .split-flip {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
  .split-flip .split-art {
    order: -1;
  }
  .phone {
    --phone-w: 290px;
  }
}

/* ───────────────────────── Hero ───────────────────────── */

.hero {
  padding-top: clamp(8px, 2vw, 24px);
  padding-bottom: var(--section-y);
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  text-align: center;
}

.wordmark {
  margin: 4px auto 0;
  max-width: 460px;
  line-height: 0;
}

.wordmark svg {
  width: 100%;
  height: auto;
}

.tagline {
  margin-top: 18px;
  color: var(--ink);
  font-size: clamp(25px, 1.6vw + 18px, 34px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 560px;
  margin: 18px auto 0;
  font-size: 18px;
}

.hero-actions {
  margin-top: 30px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-top: 26px;
  list-style: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.facts .icon {
  color: var(--brand-ink);
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 28px;
}

.tangle-card {
  position: absolute;
  inset: 0 50% auto auto;
  top: 50%;
  width: min(520px, 100%);
  aspect-ratio: 520 / 600;
  transform: translate(50%, -50%) rotate(-4deg);
  border-radius: 36px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

.tangle-card::after {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1.5px dashed var(--line-2);
  border-radius: 28px;
}

.tangle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 10px;
}

.phone-hero {
  --phone-w: min(272px, 70vw);
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 40px;
  }
  .hero-copy {
    text-align: left;
  }
  .hero-copy .kicker {
    justify-content: flex-start;
  }
  .wordmark {
    margin-left: -6px;
  }
  .lede {
    margin-left: 0;
  }
  .facts {
    justify-content: flex-start;
  }
  .phone-hero {
    --phone-w: 296px;
  }
}

/* ───────────────────────── How it plays ───────────────────────── */

.steps {
  display: grid;
  gap: 20px;
  list-style: none;
  counter-reset: step;
}

.step {
  padding: 22px 24px 28px;
}

.step-art {
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--bg);
}

.board {
  width: 100%;
  max-width: 200px;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(60, 40, 20, 0.1));
}

.step h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-brand);
  font-size: 15px;
  font-weight: 900;
}

.stars-pop {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: flex-end;
  transform: translate(-50%, -56%);
}

.stars-pop svg:nth-child(2) {
  margin-bottom: 12px;
}

/* Step 1: the free thread is tapped, then slides out along its clear lane. */
.tap-ring {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .board-step1 .pull {
    animation: pull 5.2s cubic-bezier(0.5, 0, 0.75, 0.3) infinite;
  }
  .board-step1 .tap-ring {
    animation: tap 5.2s ease-out infinite;
  }
}

@keyframes pull {
  0%,
  34% {
    transform: translateY(0);
    opacity: 1;
  }
  52% {
    transform: translateY(-130px);
    opacity: 1;
  }
  53% {
    transform: translateY(-130px);
    opacity: 0;
  }
  54% {
    transform: translateY(0);
    opacity: 0;
  }
  70%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes tap {
  0%,
  20% {
    opacity: 0;
    transform: scale(0.5);
  }
  26% {
    opacity: 0.9;
    transform: scale(0.8);
  }
  36%,
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ───────────────────────── Pace ───────────────────────── */

.paces {
  display: grid;
  gap: 20px;
  list-style: none;
}

.pace {
  padding: 26px 26px 28px;
}

.pace h3 {
  font-size: 24px;
  font-weight: 900;
}

.pace-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pace-board {
  width: 84px;
  height: 84px;
  flex: none;
  filter: drop-shadow(0 3px 8px rgba(60, 40, 20, 0.12));
}

.hearts {
  display: flex;
  gap: 4px;
  margin: 12px 0 0 -2px;
}

.hearts svg {
  width: 32px;
  height: 32px;
}

.pace-note {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: 3px;
}

.duo {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.fact {
  padding: 26px 26px 28px;
}

.fact h3 {
  margin: 14px 0 8px;
}

.fact-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  list-style: none;
}

/* Tier chips as in the game: a four-bar meter and the label, deepened for 4.5:1. */
.tier {
  --bars: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px 0 10px;
  border-radius: var(--r-pill);
  background: var(--tier-bg);
  color: var(--tier-ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tier::before {
  content: '';
  width: 14px;
  height: 11px;
  background:
    linear-gradient(var(--tier), var(--tier)) 0 100% / 2.6px 40% no-repeat,
    linear-gradient(var(--b2, var(--off)), var(--b2, var(--off))) 3.8px 100% / 2.6px 60% no-repeat,
    linear-gradient(var(--b3, var(--off)), var(--b3, var(--off))) 7.6px 100% / 2.6px 80% no-repeat,
    linear-gradient(var(--b4, var(--off)), var(--b4, var(--off))) 11.4px 100% / 2.6px 100% no-repeat;
}

.tier-easy {
  --tier: #2f9e6b;
  --tier-bg: #dcf2e6;
  --tier-ink: #2c6e56;
  --off: rgba(47, 158, 107, 0.26);
}

.tier-normal {
  --tier: #1f7486;
  --tier-bg: #d8edf0;
  --tier-ink: #225466;
  --off: rgba(31, 116, 134, 0.26);
  --b2: var(--tier);
}

.tier-hard {
  --tier: #c9502a;
  --tier-bg: #fde3d6;
  --tier-ink: #8b3e2d;
  --off: rgba(201, 80, 42, 0.26);
  --b2: var(--tier);
  --b3: var(--tier);
}

.tier-expert {
  --tier: #7a4a93;
  --tier-bg: #ece0f2;
  --tier-ink: #5a3a6e;
  --off: rgba(122, 74, 147, 0.26);
  --b2: var(--tier);
  --b3: var(--tier);
  --b4: var(--tier);
}

@media (min-width: 760px) {
  .paces {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ───────────────────────── Colour worlds (Indigo band) ───────────────────────── */

.band-night {
  --focus: #4fd1c5;
  position: relative;
  background-color: var(--night);
  background-image: radial-gradient(circle, rgba(243, 240, 250, 0.1) 1.3px, transparent 1.8px);
  background-size: 22px 22px;
  background-position: 11px 11px;
  color: var(--night-ink-2);
}

.band-night h2,
.band-night h3 {
  color: var(--night-ink);
}

.band-night .kicker {
  color: var(--brand-light);
}

.band-night .phone {
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.45);
}

.band-night .split-copy > p {
  color: #c9cbe2;
}

.worlds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 32px;
  list-style: none;
}

.world {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 12px 8px 8px;
  border-radius: 18px;
  background: var(--night-2);
  box-shadow: inset 0 0 0 1px rgba(243, 240, 250, 0.07);
  color: var(--night-ink);
  font-size: 15px;
  font-weight: 800;
}

.world-tile {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
}

.world.is-dark .world-tile {
  box-shadow: 0 0 0 1px rgba(243, 240, 250, 0.16);
}

@media (min-width: 520px) {
  .worlds {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .world {
    flex-direction: column;
    gap: 8px;
    padding: 10px 6px 12px;
    text-align: center;
    font-size: 14px;
  }
  .world-tile {
    width: 100%;
    max-width: 76px;
    height: auto;
  }
}

/* ───────────────────────── Daily ───────────────────────── */

.quilt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 32px;
}

.quilt-row svg {
  width: 44px;
  height: 44px;
}

.quilt-row svg:nth-child(odd) {
  transform: rotate(-3deg);
}

.quilt-row svg:nth-child(even) {
  transform: rotate(2deg) translateY(2px);
}

/* ───────────────────────── Boosters ───────────────────────── */

.boosters {
  display: grid;
  gap: 14px;
  list-style: none;
}

.booster {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px 16px 16px;
  border-radius: var(--r-lg);
}

.booster::after {
  border-radius: calc(var(--r-lg) - 7px);
}

.booster-art {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex: none;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 4px 0 var(--line-2), inset 0 0 0 1.5px var(--line), var(--shadow-1);
}

.booster-art svg {
  width: 56px;
  height: 56px;
}

.booster h3 {
  margin-bottom: 2px;
}

.spools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  color: var(--ink);
  font-weight: 800;
}

.spools svg {
  width: 40px;
  height: 40px;
  flex: none;
}

/* ───────────────────────── Play your way ───────────────────────── */

.features {
  display: grid;
  gap: 16px;
  list-style: none;
}

.feature {
  padding: 24px 24px 26px;
}

.feature h3 {
  margin: 14px 0 6px;
  font-size: 19px;
}

@media (min-width: 600px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ───────────────────────── Ads ───────────────────────── */

.ads-card {
  padding: clamp(28px, 5vw, 56px) clamp(22px, 5vw, 56px);
  border-radius: 36px;
}

.ads-card::after {
  inset: 9px;
  border-radius: 28px;
}

.ads-card .phone {
  --phone-w: min(250px, 66vw);
}

@media (min-width: 900px) {
  .ads-card .phone {
    --phone-w: 270px;
  }
}

.ads-card .ticks {
  margin-top: 22px;
}

/* ───────────────────────── Closing ───────────────────────── */

.closing {
  padding-top: 0;
}

.closing-in {
  display: grid;
  justify-items: center;
  gap: 22px;
  max-width: 760px;
  text-align: center;
}

.closing-in > svg {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 10px 18px rgba(201, 80, 42, 0.3));
}

.closing-in h2 {
  font-size: clamp(28px, 2vw + 20px, 40px);
}

.closing-note {
  font-size: 16px;
}

.closing-note a {
  overflow-wrap: anywhere;
}

/* ───────────────────────── Footer ───────────────────────── */

.site-footer {
  margin-top: auto;
  border-top: 1.5px dashed var(--line-2);
  background: rgba(237, 229, 215, 0.6);
  font-size: 15px;
}

.footer-grid {
  display: grid;
  gap: 20px;
  padding-block: 36px 20px;
}

.footer-brand p {
  margin-top: 8px;
  max-width: 420px;
}

.footer-brand .brand svg {
  width: 36px;
  height: 36px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  margin-left: -12px;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  color: var(--ink);
  font-weight: 800;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 4px 28px;
  color: var(--ink-2);
}

.footer-base a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand-ink);
  font-weight: 800;
}

.footer-base p {
  display: flex;
  align-items: center;
  min-height: 44px;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* ───────────────────────── Privacy policy ───────────────────────── */

.doc-page {
  padding-bottom: var(--section-y);
}

.doc-wrap {
  max-width: calc(800px + var(--gutter) * 2);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 4px 0 16px -6px;
  padding: 0 14px 0 8px;
  border-radius: var(--r-pill);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover {
  background: var(--bg-2);
}

.doc {
  padding: clamp(28px, 5vw, 56px) clamp(22px, 5vw, 60px);
  border-radius: 36px;
}

.doc::after {
  inset: 9px;
  border-radius: 28px;
}

.doc-head h1 {
  font-size: clamp(32px, 3vw + 18px, 48px);
}

.doc-meta {
  margin-top: 12px;
  color: var(--ink-2);
  font-weight: 800;
}

.toc {
  margin-top: 28px;
  padding: 18px 22px 20px;
  border-radius: var(--r-lg);
  background: var(--bg);
}

.toc-title {
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 900;
}

.toc ol {
  columns: 2 240px;
  column-gap: 28px;
  padding-left: 22px;
}

.toc li {
  break-inside: avoid;
}

/* Each entry is a full 44px tap target, like every other link on the site. */
.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 4px;
  color: var(--ink-body);
  font-weight: 700;
}

.toc li::marker {
  color: var(--ink-2);
}

.prose {
  margin-top: 8px;
}

.prose h2 {
  margin-top: 44px;
  padding-top: 8px;
  font-size: clamp(24px, 1vw + 20px, 30px);
  scroll-margin-top: 16px;
}

.prose h3 {
  margin-top: 28px;
  font-size: 20px;
  scroll-margin-top: 16px;
}

.prose p,
.prose ul {
  margin-top: 14px;
}

.prose ul {
  padding-left: 24px;
}

.prose li + li {
  margin-top: 8px;
}

.prose li::marker {
  color: var(--brand);
}

.prose a {
  overflow-wrap: anywhere;
}

/* ───────────────────────── 404 ───────────────────────── */

.lost {
  display: grid;
  place-items: center;
  padding-block: clamp(24px, 6vw, 80px) var(--section-y);
}

.lost-in {
  display: grid;
  justify-items: center;
  max-width: 640px;
  text-align: center;
}

.lost-art {
  width: min(320px, 100%);
  margin-bottom: 28px;
}

.lost-art .board {
  max-width: 100%;
}

.lost-in h1 {
  font-size: clamp(34px, 3vw + 22px, 52px);
}

.lost-in > p:not(.lost-actions) {
  margin-top: 16px;
  font-size: 18px;
}

.lost-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 16px;
  margin-top: 32px;
}

@media (prefers-reduced-motion: no-preference) {
  .board-loose .loose {
    animation: drift 6s ease-in-out infinite alternate;
    transform-box: fill-box;
    transform-origin: 5px calc(100% - 5px);
  }
}

@keyframes drift {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-5deg);
  }
}

/* ───────────────────────── Motion and forced colours ───────────────────────── */

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

@media (forced-colors: active) {
  .card::after,
  .soon::after,
  .tangle-card,
  .kicker::before {
    display: none;
  }
  .soon {
    border: 2px solid CanvasText;
  }
}
