/* playfulfilled.app: the game's "Koli ve Bant" look (kraft cardboard, packing tape, cream labels with red dashed
   borders, chunky ink outlines) over the chapter grounds of src/game/palette.gd. */
@font-face {
  font-family: "Baloo 2";
  src: url("/assets/fonts/baloo2.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --ink: #1c1248;
  --ink-7: #2e1f7a;
  --ink-5: #4a36b8;
  --paper: #fffaee;
  --kraft: #ffae57;
  --kraft-5: #f08f3c;
  --kraft-6: #d9742a;
  --gold: #ffc700;
  --red: #e8364e;
  --green: #22a33e;
  --tape: #f4c27a;
  --lift: 0 6px 0 var(--ink), 0 24px 40px -18px rgba(28, 18, 72, .6);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
  scrollbar-color: var(--kraft-6) var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  overflow-x: clip;
  font: 500 18px/1.45 "Baloo 2", ui-rounded, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--ink);
}
img { max-width: 100%; }
picture { display: contents; }
source { display: none; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 4px solid var(--gold); outline-offset: 4px; border-radius: 12px; }
h1, h2, h3, p { margin: 0; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 20; padding: 8px 14px; font-weight: 700;
  color: var(--ink); background: var(--paper); border: 3px solid var(--ink); border-radius: 12px;
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Grounds: the chapter gradients, with the faint dot grid of the game's backdrops */
.ground-blue, .ground-sunset, .ground-violet, .ground-sea {
  --dots: radial-gradient(rgba(255, 255, 255, .09) 2px, transparent 2.6px) 0 0 / 30px 30px;
  color: #fff;
}
.ground-blue { background: var(--dots), radial-gradient(90% 70% at 85% 0%, #3aa6f2 0%, transparent 60%), linear-gradient(165deg, #2a8be0 0%, #2b45b5 72%); }
.ground-sunset { background: var(--dots), linear-gradient(160deg, #e8601e 0%, #b51f55 100%); }
.ground-violet { background: var(--dots), linear-gradient(160deg, #7a35e0 0%, #3d2ab0 100%); }
.ground-sea { background: var(--dots), linear-gradient(160deg, #12a878 0%, #0e6e8c 100%); }
.ground-gold {
  background:
    repeating-conic-gradient(from 0deg at 50% 0%, rgba(255, 255, 255, .16) 0deg 5deg, transparent 5deg 10deg),
    radial-gradient(120% 90% at 50% 0%, #ffe580 0%, #ffc700 45%, #f5a623 100%);
}
.cardboard {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 3px, transparent 3px 15px),
    linear-gradient(180deg, #ffb466 0%, #eb9445 100%);
}

/* Type: cream titles with the ink outline and drop of the game's headings */
.title {
  font-weight: 800;
  font-size: clamp(2.3rem, 1.5rem + 3vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  color: var(--paper);
  -webkit-text-stroke: .13em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 .1em 0 var(--ink);
  text-wrap: balance;
}
.title-xl { font-size: clamp(2.6rem, 1.5rem + 4.2vw, 4.9rem); }
.title-m { font-size: clamp(1.9rem, 1.3rem + 1.9vw, 2.7rem); }
.lede {
  max-width: 34em;
  font-weight: 600;
  font-size: clamp(1.12rem, 1rem + .45vw, 1.38rem);
  line-height: 1.4;
  text-shadow: 0 2px 0 rgba(28, 18, 72, .35);
  text-wrap: pretty;
}
.cardboard .lede { color: var(--ink); text-shadow: none; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 4.5vw, 60px); }
.section-head .lede { margin-top: 20px; }
.center { margin-inline: auto; text-align: center; }
.center .lede { margin-inline: auto; }
section { padding-block: clamp(76px, 9vw, 132px); }

/* Labels, tape and phones */
.label {
  position: relative;
  padding: 22px 26px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--lift);
}
.label::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2.5px dashed var(--red);
  border-radius: 15px;
  pointer-events: none;
}
.label-small { padding: 14px 24px; }
.tape, .slip::after {
  position: absolute;
  width: 112px;
  height: 34px;
  background: linear-gradient(180deg, rgba(255, 244, 214, .9), rgba(240, 210, 150, .88));
  box-shadow: 0 2px 5px rgba(28, 18, 72, .22);
}
.tape-tl { top: -12px; left: -30px; rotate: -36deg; }
.tape-tr { top: -12px; right: -30px; rotate: 36deg; }
.tape-br { bottom: -12px; right: -30px; rotate: -36deg; }
.phone {
  --w: 300px;
  flex: none;
  width: var(--w);
  padding: calc(var(--w) * .03);
  background: var(--kraft);
  border: 3px solid var(--ink);
  border-radius: calc(var(--w) * .11);
  box-shadow: 0 8px 0 var(--ink), 0 34px 56px -20px rgba(28, 18, 72, .65);
}
.phone img { display: block; width: 100%; height: auto; border-radius: calc(var(--w) * .08); }
.phone-tilt-r { rotate: 3deg; }
.phone-tilt-l { rotate: -3deg; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.badge { display: block; border-radius: 10px; transition: translate .2s var(--ease-out); }
.badge:hover { translate: 0 -3px; }
.badge img { display: block; width: auto; height: 48px; }
.soon { margin-top: 18px; }
.soon span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 5px 12px;
  font-weight: 700;
  font-size: .98rem;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--ink);
}
.soon span::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(232, 54, 78, .25);
}

/* Hero */
.hero { position: relative; padding-bottom: clamp(70px, 8vw, 120px); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; }
.brand { display: block; border-radius: 14px; }
.brand-icon { display: block; width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 13px; box-shadow: 0 3px 0 var(--ink); }
.lang, .doc-nav a {
  padding: 6px 16px 5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  transition: translate .2s var(--ease-out);
}
.lang:hover, .doc-nav a:hover { translate: 0 -2px; }
.lang span { opacity: .55; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding-top: clamp(4px, 2vw, 24px);
}
.hero h1 { display: flex; flex-direction: column; gap: 10px; }
.logo { display: block; width: min(460px, 80vw); height: auto; margin-left: -8px; filter: drop-shadow(0 12px 18px rgba(28, 18, 72, .35)); }
.hero .lede { margin: 24px 0 30px; }
.hero-art { position: relative; justify-self: center; width: min(530px, 100%); }
.scene {
  position: relative;
  padding: 10px;
  background: var(--kraft);
  border: 3px solid var(--ink);
  border-radius: 30px;
  rotate: 2.5deg;
  box-shadow: 0 8px 0 var(--ink), 0 44px 64px -24px rgba(28, 18, 72, .7);
}
.scene-img { display: block; width: 100%; height: auto; border-radius: 20px; }
.phone-hero { --w: 196px; position: absolute; left: -64px; bottom: -48px; rotate: -7deg; }

/* The tape band between hero and the first section */
.tapeband {
  position: relative;
  z-index: 2;
  margin: -30px -6vw -24px;
  padding: 11px 0 9px;
  overflow: hidden;
  white-space: nowrap;
  rotate: -2deg;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .07)), var(--tape);
  border-block: 3px solid var(--ink);
  box-shadow: 0 6px 0 rgba(28, 18, 72, .3);
}
.tapeband span { font-weight: 800; font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-7); }

/* How to play + the toy */
.how { padding-top: clamp(100px, 11vw, 160px); }
.how-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: clamp(28px, 4.5vw, 64px); }
.toy {
  --u: clamp(54px, 6.6vw, 86px);
  position: relative;
  padding: 22px clamp(18px, 3vw, 34px) 26px;
  color: #fff;
  background: radial-gradient(rgba(255, 255, 255, .08) 2px, transparent 2.6px) 0 0 / 26px 26px, linear-gradient(165deg, #2a8be0, #2b45b5);
  border: 3px solid var(--ink);
  border-radius: 30px;
  box-shadow: var(--lift);
}
.toy-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.toy-title { font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--paper); -webkit-text-stroke: .13em var(--ink); paint-order: stroke fill; text-shadow: 0 .1em 0 var(--ink); }
.toy-count { padding: 3px 14px 2px; font-weight: 700; font-size: .95rem; color: var(--ink); background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--ink); }
.toy-count:empty { visibility: hidden; }
.box-stage { display: grid; place-items: center; min-height: calc(var(--u) * 2 + 40px); }
.box {
  position: relative;
  padding: 14px;
  background: var(--kraft-5);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: inset 0 0 0 7px var(--kraft), inset 0 12px 0 7px rgba(110, 50, 0, .18), 0 6px 0 var(--ink);
}
.box-grid {
  display: grid;
  grid-template-columns: repeat(4, var(--u));
  grid-template-rows: repeat(2, var(--u));
  background-color: var(--kraft-6);
  background-image: linear-gradient(rgba(28, 18, 72, .14) 2px, transparent 2px), linear-gradient(90deg, rgba(28, 18, 72, .14) 2px, transparent 2px);
  background-size: var(--u) var(--u);
  background-position: -1px -1px;
  border-radius: 6px;
}
.blk {
  --c: #e8303a;
  margin: 3px;
  background: var(--c);
  border: 2.5px solid rgba(28, 18, 72, .9);
  border-radius: 12px;
  box-shadow: inset 0 7px 0 rgba(255, 255, 255, .38), inset 0 -7px 0 rgba(0, 0, 0, .18), 0 3px 0 rgba(28, 18, 72, .5);
}
.box-grid .blk { animation: land .42s var(--ease-out); }
@keyframes land { 0% { scale: .6; } 60% { scale: 1.08; } 100% { scale: 1; } }
.blk.fly { position: fixed; z-index: 30; margin: 0; pointer-events: none; }
.box-tape {
  position: absolute;
  top: 50%;
  left: -10px;
  right: -10px;
  height: 32px;
  translate: 0 -50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), transparent 50%), var(--tape);
  border-block: 3px solid var(--ink);
  scale: 0 1;
  transform-origin: left center;
  transition: scale .45s var(--ease-out);
}
.box-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  rotate: -8deg;
  padding: 4px 20px 2px;
  font-weight: 800;
  font-size: 1.6rem;
  white-space: nowrap;
  color: #fff;
  -webkit-text-stroke: .12em var(--ink);
  paint-order: stroke fill;
  background: var(--green);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink);
  opacity: 0;
  scale: 1.7;
  transition: opacity .15s .3s, scale .4s .3s cubic-bezier(.3, 1.7, .5, 1);
}
.box.packed .box-tape { scale: 1 1; }
.box.packed .box-seal { opacity: 1; scale: 1; }
.box.leave { animation: box-out .45s cubic-bezier(.5, 0, .9, .4) forwards; }
.box.enter { animation: box-in .6s var(--ease-out); }
@keyframes box-out { to { translate: 130% 0; rotate: 8deg; opacity: 0; } }
@keyframes box-in { from { translate: -130% 0; rotate: -8deg; opacity: 0; } }
.belt { position: relative; margin-top: 28px; padding-bottom: 14px; }
.belt-track { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-inline: 4px; }
.belt-rail {
  position: absolute;
  left: -14px;
  right: -14px;
  bottom: 0;
  height: 36px;
  background: repeating-linear-gradient(90deg, #3b2a92 0 18px, #241866 18px 36px);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .15);
}
.belt.moving .belt-rail { animation: belt .5s var(--ease-out); }
@keyframes belt { from { background-position: 72px 0; } to { background-position: 0 0; } }
.card {
  position: relative;
  display: grid;
  place-items: center;
  height: calc(var(--u) * 1.3);
  padding: 0;
  font: inherit;
  cursor: pointer;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--ink);
  transition: translate .15s var(--ease-out), box-shadow .15s;
}
.card::before { content: ""; position: absolute; inset: 5px; border: 2px dashed var(--red); border-radius: 10px; }
.card:hover { translate: 0 -4px; box-shadow: 0 9px 0 var(--ink); }
.card:active { translate: 0 3px; box-shadow: 0 2px 0 var(--ink); }
.card:disabled { cursor: default; background: rgba(255, 250, 238, .25); border-style: dashed; box-shadow: none; translate: none; }
.card:disabled::before { display: none; }
.card .blk { width: calc(var(--u) * .56 * var(--w)); height: calc(var(--u) * .56); margin: 0; }
.card.in { animation: slide-in .5s var(--ease-out); }
@keyframes slide-in { from { translate: calc(100% + 12px) 0; } }
.toy-hint { margin-top: 18px; text-align: center; font-weight: 600; text-shadow: 0 2px 0 rgba(28, 18, 72, .35); }
.slip { margin: 0; padding: 36px 30px 22px; list-style: none; counter-reset: step; rotate: 1.2deg; }
.slip::after { content: ""; top: -18px; left: 50%; translate: -50% 0; rotate: -3deg; width: 140px; }
.slip li { display: grid; grid-template-columns: 52px 1fr; gap: 2px 16px; padding: 16px 4px; counter-increment: step; border-bottom: 2px dashed rgba(28, 18, 72, .2); }
.slip li:last-child { border-bottom: 0; }
.slip li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  font-weight: 800;
  font-size: 1.7rem;
  color: #fff;
  -webkit-text-stroke: .1em var(--ink);
  paint-order: stroke fill;
  background: linear-gradient(180deg, #45c75a, var(--green));
  border: 3px solid var(--ink);
  border-radius: 15px;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35), 0 4px 0 var(--ink);
}
.slip strong { font-weight: 800; font-size: 1.4rem; line-height: 1.1; }
.slip span { font-weight: 500; color: #3d3270; }

/* Item rules */
.rules-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(36px, 5vw, 80px); }
.stickers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 70px 0 0; padding: 0; list-style: none; }
.sticker {
  position: relative;
  padding: 72px 18px 24px;
  text-align: center;
  color: var(--ink);
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .1) 0 3px, transparent 3px 14px), var(--kraft);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--lift);
}
.sticker:nth-child(1) { rotate: -2deg; }
.sticker:nth-child(2) { rotate: 1.5deg; translate: 0 22px; }
.sticker:nth-child(3) { rotate: -1deg; }
.sticker img { position: absolute; top: -58px; left: 50%; width: 118px; height: 118px; translate: -50% 0; rotate: -6deg; filter: drop-shadow(0 5px 0 rgba(28, 18, 72, .4)); }
.sticker:nth-child(2) img { rotate: 5deg; }
.sticker h3 { font-weight: 800; font-size: 1.65rem; line-height: 1; }
.sticker em { display: inline-block; margin: 10px 0 12px; padding: 1px 12px 0; font-style: normal; font-weight: 700; font-size: .9rem; border: 2.5px solid var(--ink); border-radius: 999px; }
.s-glass em { background: #9cf3ff; }
.s-stone em { background: #c3c6d8; }
.s-tape em { background: var(--tape); }
.sticker p { font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.rules .phone { --w: 280px; }

/* Chapters route */
.route { position: relative; max-width: 1060px; margin-inline: auto; }
.route-path { position: absolute; top: -26px; left: 0; width: 100%; height: 100%; }
.route-path path { fill: none; stroke: rgba(255, 250, 238, .6); stroke-width: 7; stroke-dasharray: 1 16; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.route-3 { display: none; }
.route-list { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 24px; margin: 0; padding: 0; list-style: none; }
.route-list li { grid-column: var(--c5); grid-row: var(--r5); display: flex; flex-direction: column; align-items: center; padding: 6px; text-align: center; }
.ch-badge { display: block; width: 112px; height: 112px; filter: drop-shadow(0 6px 0 rgba(28, 18, 72, .55)); transition: rotate .3s var(--ease-out), translate .3s var(--ease-out); }
.route-list li:hover .ch-badge { translate: 0 -5px; rotate: -5deg; }
.route-list strong { margin-top: 10px; font-weight: 800; font-size: 1.18rem; line-height: 1.08; color: #fff; -webkit-text-stroke: .12em var(--ink); paint-order: stroke fill; text-shadow: 0 2px 0 var(--ink); text-wrap: balance; }
.route-list span { margin-top: 2px; font-weight: 600; font-size: .92rem; color: #ece6ff; }
.hard { width: fit-content; max-width: 100%; margin: 48px auto 0; text-align: center; font-weight: 700; }

/* Boosters and lives */
.boost .title { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.5rem); }
.tray {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 30px 26px 26px;
  list-style: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .1) 0 3px, transparent 3px 15px), var(--kraft);
  border: 3px solid var(--ink);
  border-radius: 30px;
  box-shadow: inset 0 -8px 0 rgba(110, 50, 0, .18), var(--lift);
}
.tray li { text-align: center; }
.tile {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 0 auto 14px;
  border: 3px solid var(--ink);
  border-radius: 26px;
  box-shadow: inset 0 6px 0 rgba(255, 255, 255, .45), inset 0 -8px 0 rgba(0, 0, 0, .15), 0 5px 0 var(--ink);
}
.tile-gold { background: linear-gradient(180deg, #ffe066, #ffb300); }
.tile-teal { background: linear-gradient(180deg, #3ad6de, #12a6c4); }
.tile img { width: 82px; height: 82px; }
.tile-teal img { width: 66px; height: 66px; }
.tray h3 { font-weight: 800; font-size: 1.45rem; line-height: 1.1; }
.tray p { margin-top: 4px; font-weight: 600; font-size: 1rem; line-height: 1.35; color: #3a2a12; }
.lives { display: grid; grid-template-columns: 120px minmax(0, 1fr) 120px; align-items: center; gap: 22px; max-width: 780px; margin: 56px auto 0; padding: 20px 28px; }
.lives-art img { display: block; width: 120px; height: 120px; }
.lives-title { font-weight: 800; font-size: 2.1rem; line-height: 1; }
.lives p { margin-top: 6px; font-weight: 600; font-size: 1.08rem; }

/* Unboxing + leaderboard */
.events-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(40px, 6vw, 100px); }
.event { display: flex; flex-direction: column; align-items: center; gap: 34px; text-align: center; }
.event .phone { --w: 272px; }
.event .label { max-width: 430px; font-weight: 600; font-size: 1.1rem; }
.avatars { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin: 14px 0 2px; padding: 0; list-style: none; }
.avatars img { display: block; width: 38px; height: 38px; }

/* The close */
.end-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(36px, 6vw, 96px); }
.postcard {
  position: relative;
  justify-self: center;
  max-width: 480px;
  padding: 12px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px;
  rotate: -3deg;
  box-shadow: 0 8px 0 var(--ink), 0 36px 56px -22px rgba(28, 18, 72, .7);
}
.postcard-img { display: block; width: 100%; height: auto; border-radius: 13px; }
.end-copy .lede { margin: 20px 0 30px; }
.free { max-width: 32em; margin-top: 20px; font-size: .95rem; color: #e3e9ff; }

/* Footer */
.footer { padding: 52px 0 44px; color: #d8d2ff; background: var(--ink); border-top: 8px solid var(--kraft); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px 32px; }
.footer-brand { display: flex; align-items: center; gap: 14px; font-weight: 800; font-size: 1.12rem; color: #fff; }
.footer .brand-icon { width: 40px; height: 40px; border-color: var(--kraft); box-shadow: none; }
.footer-links { display: flex; flex-wrap: wrap; justify-self: end; gap: 8px 26px; }
.footer-links a { font-weight: 700; color: #fff; text-decoration: none; text-underline-offset: 5px; text-decoration-thickness: 3px; }
.footer-links a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.footer-mail a { font-weight: 700; color: var(--gold); text-underline-offset: 4px; }
.footer-copy { justify-self: end; color: #aaa2d9; }

/* Legal pages */
.doc-head { padding: 14px 0 26px; }
.doc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.doc-brand img { display: block; width: 196px; height: auto; filter: drop-shadow(0 8px 12px rgba(28, 18, 72, .35)); }
.doc-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.doc-nav a { font-size: .98rem; }
.doc-main { padding: clamp(32px, 5vw, 64px) 14px clamp(60px, 8vw, 100px); }
.doc {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 60px) clamp(24px, 5.5vw, 68px);
  font: 400 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #2a2155;
  overflow-wrap: break-word;
}
.doc h1, .doc h2, .doc h3 { font-family: "Baloo 2", system-ui, sans-serif; color: var(--ink); text-wrap: balance; }
.doc h1 { margin-bottom: 10px; font-weight: 800; font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem); line-height: 1.04; }
.doc h2 { margin: 2.1em 0 .45em; font-weight: 800; font-size: 1.6rem; line-height: 1.15; }
.doc h3 { margin: 1.6em 0 .35em; font-weight: 700; font-size: 1.25rem; }
.doc p, .doc ul, .doc ol { margin: .8em 0; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li { margin: .3em 0; }
.doc li::marker { color: var(--red); }
.doc a { color: var(--ink-5); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.doc a:hover { color: var(--ink); }
.doc .muted { color: #5d5585; }
.doc table { display: block; width: 100%; margin: 1.2em 0; overflow-x: auto; border-collapse: collapse; font-size: .95rem; }
.doc th, .doc td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 2px dashed rgba(28, 18, 72, .16); }
.doc th { font-family: "Baloo 2", system-ui, sans-serif; font-weight: 700; border-bottom: 3px solid var(--ink); }
.lost { padding: 18px 0; text-align: center; }
.lost p { margin-inline: auto; }
.lost-links { margin-top: 1.6em !important; }
.doc a.button {
  display: inline-block;
  margin: 0 14px 10px 0;
  padding: 9px 26px 7px;
  font: 800 1.25rem/1.2 "Baloo 2", system-ui, sans-serif;
  color: #fff;
  text-decoration: none;
  -webkit-text-stroke: .1em var(--ink);
  paint-order: stroke fill;
  background: linear-gradient(180deg, #45c75a, var(--green));
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35), 0 5px 0 var(--ink);
}

/* Narrow screens */
@media (max-width: 960px) {
  .hero-grid, .how-grid, .rules-grid, .events-grid, .end-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { width: min(500px, 92%); margin-top: 18px; }
  .phone-hero { --w: 150px; left: -6px; bottom: -40px; }
  .slip { rotate: .6deg; }
  .rules .phone { justify-self: center; }
  .stickers { gap: 18px; }
  .end-copy { order: -1; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-links, .footer-copy { justify-self: start; }
}
@media (max-width: 720px) {
  .route-5 { display: none; }
  .route-3 { display: block; }
  .route-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route-list li { grid-column: var(--c3); grid-row: var(--r3); }
  .ch-badge { width: 84px; height: 84px; }
  .route-list strong { font-size: 1.02rem; }
  .route-list span { font-size: .82rem; }
  .route-path { top: -24px; }
  .stickers { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .sticker { display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 16px; padding: 18px 18px 20px; text-align: left; }
  .sticker:nth-child(2) { translate: none; }
  .sticker img { position: static; grid-column: 1; grid-row: 1 / span 3; width: 92px; height: 92px; translate: none; align-self: center; }
  .sticker h3, .sticker em, .sticker p { grid-column: 2; }
  .sticker em { justify-self: start; margin: 8px 0; }
  .tray { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; padding: 24px 16px 20px; }
  .tile { width: 92px; height: 92px; border-radius: 22px; }
  .tile img { width: 66px; height: 66px; }
  .tile-teal img { width: 54px; height: 54px; }
  .tray h3 { font-size: 1.25rem; }
  .tray p { font-size: .95rem; }
  .lives { grid-template-columns: 1fr 1fr; justify-items: center; gap: 6px 12px; padding: 22px 22px 24px; text-align: center; }
  .lives > div { grid-column: 1 / -1; grid-row: 2; }
  .lives-art img { width: 92px; height: 92px; }
  .event .phone { --w: 240px; }
  .toy { --u: clamp(52px, 17.5vw, 70px); }
}
@media (max-width: 420px) {
  .badge img { height: 44px; }
  .soon span { font-size: .86rem; padding-inline: 10px 12px; gap: 8px; }
  .tapeband span { font-size: .92rem; }
  .toy { padding-inline: 14px; }
  .toy-title { font-size: 1.45rem; }
  .belt-track { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
