/* Word Biome site. The page background is the selected biome, as on the
   game's main page: its render from the top (surface, canopy, cave roof) down
   to the floor, and the floor carries on for as long as the page runs. */

/* The game's fonts, self-hosted (tools/sync-assets.sh --web-art): Latin
   subsets as WOFF2; Grandstander is variable, weights 500-800 */
@font-face { font-family: "Chewy"; src: url(/assets/art/fonts/chewy.woff2?v=c30bddfd59) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Grandstander"; src: url(/assets/art/fonts/grandstander.woff2?v=241b473fbd) format("woff2"); font-weight: 500 800; font-display: swap; }

:root {
  --cream: #FFF4DC;
  --cream-shade: #B08A5A;
  --ink: #2A1E14;
  --ink-soft: #6B5440;
  --red: #B8322A;
  --red-shade: #7E1F19;
  --gold: #E3B341;
  --gold-shade: #A77D1E;
  --teal: #1F7A74;
  --teal-shade: #13524E;
  --orange: #D9701C;
  --orange-shade: #9A4C10;
  --burlap: #A9825A;
  --burlap-shade: #7A5A38;

  /* the game's fonts: Chewy for titles, Grandstander for text */
  --display: "Chewy", "Trebuchet MS", sans-serif;
  --body: "Grandstander", "Trebuchet MS", sans-serif;
}

/* ---------- Backdrop ----------
   Art from tools/sync-assets.sh --web-art: per biome, scene-*.webp is the top
   2400 rows of the game's 1560-wide main page render, and floor.webp a tile
   that continues it. Both are drawn 100vw wide (so 1 source px = 100vw/1560).
   --bd-top lifts the scene so its floor line (about source row 1970) ends
   near the bottom of the first screen on wide windows, cropping at most the
   plain sky above row 760; phones show it from the top, as the game does. */
[data-biome] {
  --bd-top: clamp(-48.7vw, calc(100vh - 126vw), 0px);
  --bd-top: clamp(-48.7vw, calc(100svh - 126vw), 0px);
}
[data-biome="ocean"] {
  --bd-scene: url(/assets/art/ocean/scene-1560.webp?v=1f97498a7f);
  --bd-floor: url(/assets/art/ocean/floor.webp?v=77065c41d7);
  --bd-color: #F1E6C5;
  --on-floor: #5A4122;
}
[data-biome="forest"] {
  --bd-scene: url(/assets/art/forest/scene-1560.webp?v=aed4ae1a8e);
  --bd-floor: url(/assets/art/forest/floor.webp?v=2a512db3d6);
  --bd-color: #9BD27A;
  --on-floor: #23461A;
}
[data-biome="cave"] {
  --bd-scene: url(/assets/art/cave/scene-1560.webp?v=1cc122a16f);
  --bd-floor: url(/assets/art/cave/floor.webp?v=2e7918dffd);
  --bd-color: #343B52;
  --on-floor: #E8E2F2;
}
[data-biome="swamp"] {
  --bd-scene: url(/assets/art/swamp/scene-1560.webp?v=fc4dd6e3b2);
  --bd-floor: url(/assets/art/swamp/floor.webp?v=a8a902078f);
  --bd-color: #647560;
  --on-floor: #F2F0DC;
}
[data-biome="northpole"] {
  --bd-scene: url(/assets/art/northpole/scene-1560.webp?v=2940268145);
  --bd-floor: url(/assets/art/northpole/floor.webp?v=0d94521da3);
  --bd-color: #B3A9C0;
  --on-floor: #2A2547;
}
@media (max-width: 700px) {
  [data-biome="ocean"]  { --bd-scene: url(/assets/art/ocean/scene-1170.webp?v=0b23f76b12); }
  [data-biome="forest"] { --bd-scene: url(/assets/art/forest/scene-1170.webp?v=03928ef54b); }
  [data-biome="cave"]   { --bd-scene: url(/assets/art/cave/scene-1170.webp?v=b2bed755fc); }
  [data-biome="swamp"]  { --bd-scene: url(/assets/art/swamp/scene-1170.webp?v=a80cd0546b); }
  [data-biome="northpole"] { --bd-scene: url(/assets/art/northpole/scene-1170.webp?v=664d7e3706); }
}
/* AVIF where the browser takes it: about half the size of the WebP */
@supports (background-image: image-set(url("x.avif") type("image/avif"))) {
  [data-biome="ocean"]  { --bd-scene: image-set(url(/assets/art/ocean/scene-1560.avif?v=222bfeb5f2) type("image/avif"), url(/assets/art/ocean/scene-1560.webp?v=1f97498a7f) type("image/webp")); }
  [data-biome="forest"] { --bd-scene: image-set(url(/assets/art/forest/scene-1560.avif?v=edab231b26) type("image/avif"), url(/assets/art/forest/scene-1560.webp?v=aed4ae1a8e) type("image/webp")); }
  [data-biome="cave"]   { --bd-scene: image-set(url(/assets/art/cave/scene-1560.avif?v=68e348ece9) type("image/avif"), url(/assets/art/cave/scene-1560.webp?v=1cc122a16f) type("image/webp")); }
  [data-biome="swamp"]  { --bd-scene: image-set(url(/assets/art/swamp/scene-1560.avif?v=40a13688fb) type("image/avif"), url(/assets/art/swamp/scene-1560.webp?v=fc4dd6e3b2) type("image/webp")); }
  [data-biome="northpole"] { --bd-scene: image-set(url(/assets/art/northpole/scene-1560.avif?v=ab11fe7b8c) type("image/avif"), url(/assets/art/northpole/scene-1560.webp?v=2940268145) type("image/webp")); }
  @media (max-width: 700px) {
    [data-biome="ocean"]  { --bd-scene: image-set(url(/assets/art/ocean/scene-1170.avif?v=3a2fa5891e) type("image/avif"), url(/assets/art/ocean/scene-1170.webp?v=0b23f76b12) type("image/webp")); }
    [data-biome="forest"] { --bd-scene: image-set(url(/assets/art/forest/scene-1170.avif?v=d892f389d4) type("image/avif"), url(/assets/art/forest/scene-1170.webp?v=03928ef54b) type("image/webp")); }
    [data-biome="cave"]   { --bd-scene: image-set(url(/assets/art/cave/scene-1170.avif?v=6fdffd4a82) type("image/avif"), url(/assets/art/cave/scene-1170.webp?v=b2bed755fc) type("image/webp")); }
    [data-biome="swamp"]  { --bd-scene: image-set(url(/assets/art/swamp/scene-1170.avif?v=3ed6bea92e) type("image/avif"), url(/assets/art/swamp/scene-1170.webp?v=a80cd0546b) type("image/webp")); }
    [data-biome="northpole"] { --bd-scene: image-set(url(/assets/art/northpole/scene-1170.avif?v=34b7a9d22b) type("image/avif"), url(/assets/art/northpole/scene-1170.webp?v=664d7e3706) type("image/webp")); }
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bd-color, #F1E6C5); }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 600;
  color: var(--cream);
  background: var(--bd-color, #F1E6C5);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Scene ---------- */
.biome-scene, .bd-fade {
  background:
    var(--bd-scene) 50% var(--bd-top) / 100vw auto no-repeat,
    var(--bd-floor) 50% calc(var(--bd-top) + 153.846vw) / 100vw auto repeat-y,
    var(--bd-color);
}
.biome-scene {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}
/* switching biomes: the old one fades out over the new (main.js) */
.bd-fade { position: absolute; inset: 0; z-index: 0; pointer-events: none; transition: opacity .6s ease; }
/* ambient effects, in the scene's own 400-unit space (main.js) */
.bd-fx {
  position: absolute; left: 0; width: 100%; z-index: 0; overflow: hidden; pointer-events: none;
  top: var(--bd-top); height: 153.846vw;
}
.bd-fx > * { position: absolute; }
.bd-ray {
  top: 0; transform-origin: 50% 0;
  background: linear-gradient(90deg, transparent, var(--ray) 50%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 0, #000 55%, transparent);
  mix-blend-mode: screen;
  animation: bd-sway var(--dur) ease-in-out var(--delay) infinite alternate;
}
@keyframes bd-sway {
  from { transform: rotate(calc(var(--rot) - 1.4deg)); opacity: 1; }
  to   { transform: rotate(calc(var(--rot) + 1.4deg)); opacity: .45; }
}
.bd-dot {
  border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, var(--c) 0, var(--c) 30%, transparent 70%);
  animation: bd-drift var(--dur) linear var(--delay) infinite;
}
.bd-bubble {
  border-radius: 50%; opacity: 0;
  border: 1px solid rgba(240, 252, 255, .75);
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.8) 0, rgba(255,255,255,.8) 12%, rgba(255,255,255,.08) 20%);
  animation: bd-drift var(--dur) linear var(--delay) infinite;
}
@keyframes bd-drift {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: var(--o, 1); }
  80% { opacity: var(--o, 1); }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}
.bd-fly {
  border-radius: 50%;
  background: radial-gradient(circle, #FFF6B0 0, #FFF6B0 14%, rgba(255,246,160,.55) 22%, transparent 70%);
  animation: bd-fly var(--dur) ease-in-out var(--delay) infinite alternate;
}
@keyframes bd-fly {
  from { transform: translate(0, 0); opacity: .2; }
  to   { transform: translate(var(--dx), var(--dy)); opacity: 1; }
}
.bd-fx.paused > * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .bd-fx > * { animation: none; }
  .bd-dot, .bd-bubble, .bd-fly { display: none; }
}

/* ---------- Felt ---------- */
/* The game's felt (ui/tex_feltwhite), multiplied into each piece's colour */
.felt, .btn, .pill, .chip, .round-btn, .hero-tag, .field-tag {
  background-image: url(/assets/art/ui/felt.webp?v=6795780d2b);
  background-size: 160px;
  background-blend-mode: multiply;
}
.stitch { outline: 2px dashed rgba(176,138,90,.7); outline-offset: -10px; }
.stitch-light { outline: 2px dashed rgba(255,244,220,.55); outline-offset: -10px; }
.stitch-gold { outline: 2px dashed rgba(227,179,65,.85); outline-offset: -6px; }
.panel-cream { background-color: var(--cream); color: var(--ink); box-shadow: 0 6px 0 var(--cream-shade); }

/* ---------- Layout ---------- */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 200px;
  display: flex;
  flex-direction: column;
  gap: 112px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; }
p { margin: 0; }
.section { display: flex; flex-direction: column; gap: 28px; scroll-margin-top: 24px; }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.section-head h2 { font-size: clamp(36px, 4.6vw, 54px); line-height: 1.05; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.section > .section-head {
  align-self: flex-start;
  padding: 26px 30px 28px; border-radius: 28px;
  background-color: var(--cream); color: var(--ink);
  box-shadow: 0 7px 0 var(--cream-shade), 0 18px 34px rgba(0,0,0,.22);
  outline: 2px dashed rgba(176,138,90,.7); outline-offset: -10px;
}
.section > .section-head h2 { color: var(--red); text-shadow: none; }
.faq > .section-head, .get > .section-head { align-self: center; }
.section-head p { font-size: 18px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px;
  border: 0; border-radius: 16px;
  font: 700 16px/1 var(--body);
  text-decoration: none; cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:active { transform: translateY(3px); }
.btn-dark { background-color: var(--ink); color: var(--cream); box-shadow: 0 5px 0 #000; }
.btn-gold { background-color: var(--gold); color: var(--ink); box-shadow: 0 5px 0 var(--gold-shade); }
.btn-cream { background-color: var(--cream); color: var(--ink); box-shadow: 0 5px 0 var(--cream-shade); }
.pill {
  min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 999px;
  font: 700 15px/1 var(--body); color: var(--ink);
  background-color: #EADBB9; box-shadow: 0 4px 0 var(--cream-shade);
  cursor: pointer;
}
.pill[aria-pressed="true"] { background-color: var(--gold); box-shadow: 0 4px 0 var(--gold-shade); }

/* ---------- Nav ---------- */
.nav {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 10px 12px 10px 280px;
  background-color: var(--cream); color: var(--ink);
  border-radius: 999px;
  box-shadow: 0 5px 0 var(--cream-shade), 0 14px 28px rgba(0,0,0,.22);
  outline: 2px dashed rgba(176,138,90,.7); outline-offset: -7px;
}
/* The title patch, as on the game's main page: rendered red felt (ui/patch_title,
   its shadow in a 14/368 margin), tilted 2 degrees, larger than the nav bar
   and sewn on over its left end */
.logo {
  --logo-w: 290px;
  position: absolute; left: -16px; top: 50%; z-index: 2;
  width: var(--logo-w); aspect-ratio: 368 / 140;
  translate: 0 -50%; rotate: -2deg;
  display: flex; align-items: center; justify-content: center; padding-bottom: 4px;
  background: url(/assets/art/ui/patch.webp?v=1dd868b4dd) center / 100% 100% no-repeat;
  color: #FFF1D6; text-decoration: none;
  font: 400 calc(var(--logo-w) * .145)/1 var(--display); letter-spacing: .5px;
  text-shadow: 0 2.5px 0 rgba(0,0,0,.28);
  transition: rotate .15s ease;
}
.logo:hover { rotate: -3.5deg; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 2px; font-weight: 800; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; padding: 12px; border-radius: 12px; }
.nav-links a:not(.btn):hover { background-color: rgba(176,138,90,.2); }
.nav-links .btn { min-height: 44px; padding: 0 20px; border-radius: 999px; margin-left: 6px; background-color: var(--teal); color: var(--cream); box-shadow: 0 4px 0 var(--teal-shade); }
@media (max-width: 760px) {
  .wrap { padding-top: 56px; }
  .nav { border-radius: 28px; justify-content: center; padding: 0 12px 10px; }
  .logo { --logo-w: 260px; position: relative; left: auto; top: auto; translate: none; margin: -50px auto -6px; }
  .nav-links { justify-content: center; }
  .nav-links a:not(.btn) { padding: 10px 8px; font-size: 14px; }
}

/* ---------- Hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; margin-top: -40px; }
.hero-card {
  flex: 1 1 420px;
  border-radius: 32px; padding: 44px 40px 40px;
  background-color: var(--cream); color: var(--ink);
  box-shadow: 0 8px 0 var(--cream-shade), 0 24px 44px rgba(0,0,0,.3);
  outline: 3px dashed rgba(176,138,90,.65); outline-offset: -14px;
  display: flex; flex-direction: column; gap: 20px;
}
.hero-card h1 { font-size: clamp(44px, 6vw, 72px); line-height: .98; color: var(--red); }
.hero-card .lede { font-size: 19px; max-width: 520px; }
.hero-tag { align-self: flex-start; padding: 6px 14px; background-color: var(--teal); color: var(--cream); border-radius: 999px; font-weight: 800; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.scenery { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0 0; border: 0; margin: 0; min-width: 0; }
.scenery legend { float: left; margin-right: 4px; font-weight: 800; font-size: 14px; color: var(--ink-soft); }
@media (max-width: 520px) { .hero-card { padding: 36px 26px 30px; } }

.board-demo { flex: 0 1 380px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.board-demo .nameplate { margin-top: -4px; }
.board-demo .nameplate:hover { box-shadow: 0 5px 0 var(--red-shade), 0 0 0 3px var(--gold); }
/* The hero's creature, built from the game's layered art (build.mjs). Sizes
   are in the game's design units (a creature's box is --w x --h of them);
   the idle motion is creature_view.gd's: the body bobs (drifts, dangles)
   while each layer runs its own animation about its pivot. */
.hero-creature {
  --unit: 1.3px;
  height: calc(190 * var(--unit)); width: 100%;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none;
}
.hero-creature .cr { display: none; }
.cr { position: relative; width: calc(var(--w) * var(--unit)); height: calc(var(--h) * var(--unit)); margin-bottom: 6px; }
.hero-creature .cr.on { display: block; }
.cr-shadow {
  position: absolute; left: 11%; right: 11%; bottom: calc(-8 * var(--unit)); height: calc(var(--w) * .16 * var(--unit));
  border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.42), transparent);
}
.cr-drift .cr-shadow, .cr-dangle .cr-shadow { opacity: .5; }
.cr-move, .cr-body { position: absolute; inset: 0; }
.cr-body { animation: cr-bob 1.2s ease-in-out infinite alternate; }
.cr-drift .cr-move { animation: cr-drift 1.4s ease-in-out infinite alternate; }
.cr-dangle .cr-move { animation: cr-dangle 1.3s ease-in-out infinite alternate; }
.cr-l {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  transform-origin: var(--px, 50%) var(--py, 50%);
  animation: var(--k, none) var(--dur, 1s) var(--ease, ease-in-out) infinite var(--dir, alternate);
}
@keyframes cr-bob { from { transform: rotate(-2deg); } to { transform: translateY(calc(-6 * var(--unit))) rotate(2deg); } }
@keyframes cr-drift { to { transform: translateY(calc(-6 * var(--unit))); } }
@keyframes cr-dangle { to { transform: translateY(calc(5 * var(--unit))) rotate(2deg); } }
@keyframes cr-rot { to { transform: rotate(var(--a)); } }
@keyframes cr-flap { to { transform: rotate(var(--a)) scaleY(.92); } }
@keyframes cr-scale { to { transform: scale(var(--sx), var(--sy)); } }
@keyframes cr-snooze { to { transform: rotate(-3deg) scale(1.02, .98); } }
@keyframes cr-sway { from { transform: skewX(calc(-1 * var(--a))); } to { transform: skewX(var(--a)); } }
@keyframes cr-smoke {
  from { transform: scale(.8); opacity: .9; }
  to { transform: translateY(calc(-14 * var(--unit))) scale(1.3); opacity: 0; }
}
@keyframes cr-lure { to { transform: rotate(var(--a)); filter: brightness(1.25); } }
@media (max-width: 520px) { .hero-creature { --unit: 1.1px; } }
@media (prefers-reduced-motion: reduce) { .cr-body, .cr-move, .cr-l { animation: none; } }
.nameplate {
  color: var(--cream); text-decoration: none;
  background-color: var(--red); border-radius: 999px; padding: 10px 26px;
  font: 400 22px/1.1 var(--display);
  box-shadow: 0 5px 0 var(--red-shade);
}
.sack {
  width: 100%; max-width: 360px;
  background-color: var(--burlap); border-radius: 26px; padding: 22px;
  box-shadow: 0 7px 0 var(--burlap-shade), 0 20px 36px rgba(0,0,0,.35);
}
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
/* the game's letter tile (tiles/default/n); the word being spelled glows gold */
.tile {
  position: relative; isolation: isolate;
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: url(/assets/art/ui/tile.webp?v=e2665e0226) center / 100% 100% no-repeat;
  color: var(--ink);
  font: 400 32px/1 var(--display); padding-bottom: 4px;
}
.tile.hot::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-color: #F2B53A; mix-blend-mode: multiply;
  -webkit-mask: url(/assets/art/ui/tile.webp?v=e2665e0226) center / 100% 100%;
  mask: url(/assets/art/ui/tile.webp?v=e2665e0226) center / 100% 100%;
}
.board-caption { font-weight: 700; font-size: 15px; padding: 8px 18px; border-radius: 999px; background-color: var(--cream); color: var(--ink); box-shadow: 0 4px 0 var(--cream-shade); }

/* ---------- How to play ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step {
  border-radius: 24px; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 44px; height: 44px; border-radius: 50%;
  background-color: var(--gold); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font: 400 22px/1 var(--display);
}
.step h3 { font-size: 26px; color: var(--red); }

/* ---------- Biomes ---------- */
.biome-card {
  border-radius: 26px; padding: 26px 24px;
  display: flex; flex-direction: column; gap: 12px;
  border: 4px solid transparent;
}
.biome-card[data-card="ocean"]  { background-color: #1D6F9A; box-shadow: 0 7px 0 #0F4A6B, 0 18px 30px rgba(0,0,0,.25); }
.biome-card[data-card="forest"] { background-color: #3E7D3F; box-shadow: 0 7px 0 #24522A, 0 18px 30px rgba(0,0,0,.25); }
.biome-card[data-card="cave"]   { background-color: #4B3A63; box-shadow: 0 7px 0 #2C2140, 0 18px 30px rgba(0,0,0,.25); }
.biome-card[data-card="swamp"]  { background-color: #5F6E33; box-shadow: 0 7px 0 #3B461F, 0 18px 30px rgba(0,0,0,.25); }
.biome-card[data-card="northpole"] { background-color: #A23845; box-shadow: 0 7px 0 #6B1F2A, 0 18px 30px rgba(0,0,0,.25); }
[data-biome="ocean"] .biome-card[data-card="ocean"],
[data-biome="forest"] .biome-card[data-card="forest"],
[data-biome="cave"] .biome-card[data-card="cave"],
[data-biome="northpole"] .biome-card[data-card="northpole"],
[data-biome="swamp"] .biome-card[data-card="swamp"] { border-color: var(--gold); }
.art-slot {
  position: relative; isolation: isolate;
  height: 130px; border-radius: 16px; overflow: hidden;
  border: 2px dashed rgba(255,244,220,.6); background-color: rgba(0,0,0,.15);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.art-slot > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; position: relative; z-index: -1; }
.art-slot:has(> img), .art-scene { border: 0; box-shadow: inset 0 0 0 3px rgba(0,0,0,.18); }
/* a creature in its battle scene: it stands near the bottom, on the floor */
.art-scene { --unit: .65px; background: 50% 88% / cover no-repeat; align-items: flex-end; padding-bottom: 7%; }
.art-scene .cr { display: block; margin-bottom: 0; }
.field-card .art-scene { --unit: .66px; }
.field-card.big .art-scene { --unit: .85px; }
.biome-sub { font-weight: 800; font-size: 15px; opacity: .85; }
.biome-card h3 { font-size: 32px; line-height: 1; }
.biome-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.chip { padding: 6px 12px; border-radius: 999px; background-color: rgba(0,0,0,.22); font-weight: 800; font-size: 13px; }
.biome-card .pill { background-color: var(--cream); box-shadow: 0 4px 0 rgba(0,0,0,.3); }
.biome-card .pill[aria-pressed="true"] { background-color: var(--gold); box-shadow: 0 4px 0 var(--gold-shade); }
.next-card {
  border-radius: 26px; padding: 26px 24px;
  background-color: var(--burlap); box-shadow: 0 7px 0 var(--burlap-shade), 0 18px 30px rgba(0,0,0,.25);
  outline: 3px dashed rgba(255,244,220,.7); outline-offset: -12px;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
}
.next-card .kicker { font-weight: 800; color: var(--gold); }
.next-card h3 { font-size: 32px; }

/* ---------- Creatures ---------- */
.creatures { display: flex; flex-direction: row; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.creatures .section-head { flex: 1 1 380px; }
.roster { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.roster h3 { font: 700 15px/1 var(--body); color: var(--red); }
.roster ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.roster li { padding: 8px 14px; border-radius: 999px; background-color: var(--cream); color: var(--ink); font-weight: 800; font-size: 14px; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.roster li.costume { background-color: var(--gold); }
.roster li.boss { background-color: var(--red); color: var(--cream); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; font-weight: 700; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.legend .l-costume::before { background-color: var(--gold); }
.legend .l-boss::before { background-color: var(--red); }

.field-card {
  flex: 0 1 360px; margin: 0 auto;
  border-radius: 28px; padding: 26px;
  box-shadow: 0 8px 0 var(--cream-shade), 0 22px 40px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 14px;
  transform: rotate(1.5deg);
}
.field-top { display: flex; justify-content: space-between; align-items: center; }
.field-tag { padding: 5px 12px; background-color: var(--teal); color: var(--cream); border-radius: 999px; font-weight: 800; font-size: 13px; }
.field-world { font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.field-card .art-slot { height: 150px; border-color: var(--cream-shade); background-color: #F3E4C2; }
.field-card h3 { font-size: 34px; color: var(--red); }
.field-card dl { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; }
.field-card dt { font-weight: 800; display: inline; }
.field-card dd { margin: 0; display: inline; }
/* bold labels without colons (as in the game): a little extra room after the word */
.field-card dt, .fc-rows strong, .myth strong { margin-right: .3em; }
.field-note { font-weight: 800; font-size: 14px; color: var(--ink-soft); }

/* ---------- Daily ---------- */
.daily {
  background-color: var(--orange); border-radius: 30px; padding: 36px 34px;
  box-shadow: 0 8px 0 var(--orange-shade), 0 22px 40px rgba(0,0,0,.3);
  outline: 3px dashed rgba(255,244,220,.6); outline-offset: -12px;
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between;
}
.daily .section-head { flex: 1 1 380px; }
/* the game's own share card (tools/export-web.sh), as if just sent */
.share-card { flex: 0 1 270px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.share-card img { width: 100%; height: auto; border-radius: 18px; box-shadow: 0 6px 0 rgba(0,0,0,.22), 0 18px 34px rgba(0,0,0,.3); transform: rotate(-2deg); }
.share-card figcaption { font-weight: 800; font-size: 14px; }
/* the leaderboards and the achievements: each a full-width card, as wide as
   the Daily Run's above; the achievements' card holds the whole wall */
.boards-card, .ach-card { border-radius: 26px; padding: 30px 30px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
/* their titles match the Daily Run's above (.section-head h2) */
.boards-card h3, .ach-card > h3 { font-size: clamp(36px, 4.6vw, 54px); line-height: 1.05; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.boards-card { background-color: var(--teal); box-shadow: 0 7px 0 var(--teal-shade); }
.ach-card { background-color: var(--red); box-shadow: 0 7px 0 var(--red-shade); }
.board-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.board-list li { padding: 12px 14px; border-radius: 14px; background-color: rgba(255,244,220,.2); box-shadow: inset 0 0 0 1px rgba(255,244,220,.18); font-weight: 800; }
.board-list li.has-img { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; }
.board-list li img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
/* the achievements wall: the Game Center patches (tools/export-web.sh), in
   the relics' cards, grouped by the patches' colours */
.ach-group { font: 400 24px/1 var(--display); color: var(--cream); display: flex; align-items: center; gap: 10px; margin: 8px 0 -4px; }
.ach-group::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.relic.ach { padding-left: 92px; min-height: 96px; justify-content: center; }
.ach-patch { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 68px; height: 68px; filter: drop-shadow(0 3px 2px rgba(0,0,0,.3)); }
/* the patch is the medallion (radius 1 of a 2.4-wide square render) */
.ach-patch img { width: 100%; height: 100%; clip-path: circle(41.5%); scale: 1.18; }
.ach-hidden { font-weight: 800; color: var(--cream); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; width: 100%; margin: 0 auto; }
.faq .section-head { align-items: center; text-align: center; margin: 0 auto; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq details { border-radius: 20px; outline-offset: -8px; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 44px; padding: 18px 24px;
  font-weight: 800; font-size: 18px; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; transition: transform .2s ease; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { padding: 0 24px 20px; font-size: 16px; }

/* ---------- Get + footer ---------- */
.get { align-items: center; text-align: center; gap: 18px; }
.get h2 { font-size: clamp(34px, 4.4vw, 50px); line-height: 1.05; color: var(--on-floor); }
.store-badge { display: block; border-radius: 10px; }
.store-badge img { display: block; width: 180px; height: auto; }
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 24px; border-top: 2px dashed; font-size: 14px; color: var(--on-floor);
}
.footer-legal { display: flex; flex-direction: column; gap: 2px; }
.footer-legal span + span { font-size: 13px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px; font-weight: 800; }
.footer nav a { padding: 12px 10px; text-decoration: none; }
.footer nav a:hover { text-decoration: underline; }

/* ---------- Simple pages (privacy, terms, support, 404) ---------- */
.page-card {
  border-radius: 32px; padding: 44px 40px;
  background-color: var(--cream); color: var(--ink);
  box-shadow: 0 8px 0 var(--cream-shade), 0 24px 44px rgba(0,0,0,.3);
  outline: 3px dashed rgba(176,138,90,.65); outline-offset: -14px;
  max-width: 760px; width: 100%; margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
}
.page-card h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1; color: var(--red); }
.page-card h2 { font-size: 26px; color: var(--red); margin-top: 12px; }
.page-card a:not(.btn) { color: var(--teal); font-weight: 800; }
.page-card ul { margin: 0; padding-left: 22px; }
.media-video { display: block; width: 100%; max-width: 360px; height: auto; margin: 4px auto; border-radius: 24px; background: #000; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.updated { color: var(--ink-soft); font-weight: 700; }

/* ---------- Press kit (media.html) ---------- */
.press-facts { border-collapse: collapse; width: 100%; font-size: 16px; }
.press-facts th, .press-facts td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px dashed rgba(176,138,90,.5); }
.press-facts th { width: 110px; color: var(--ink-soft); font-weight: 800; white-space: nowrap; }
.press-label { color: var(--ink-soft); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: -8px; }
.press-grid { display: grid; gap: 16px; margin: 0; }
.press-grid figure { margin: 0; text-align: center; }
.press-grid img { display: block; width: 100%; height: auto; }
.press-grid figcaption { font-size: 14px; font-weight: 700; color: var(--ink-soft); margin-top: 6px; }
.press-grid a { display: block; transition: transform .15s ease; }
.press-grid a:hover { transform: translateY(-2px); }
.press-shots { grid-template-columns: repeat(3, 1fr); }
.press-shots img { border-radius: 18px; box-shadow: 0 8px 20px rgba(0,0,0,.22); }
.press-renders { grid-template-columns: repeat(4, 1fr); align-items: end; }
.press-renders img { width: auto; max-height: 180px; margin: 0 auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,.2)); }
.press-brand { grid-template-columns: 2fr 1fr; align-items: center; }
.press-brand img { margin: 0 auto; max-width: 360px; }
.press-brand figure:last-child img { width: 128px; border-radius: 28px; box-shadow: 0 6px 16px rgba(0,0,0,.22); }
@media (max-width: 640px) {
  .press-shots { grid-template-columns: repeat(2, 1fr); }
  .press-renders { grid-template-columns: repeat(2, 1fr); }
  .press-brand { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .page-card { padding: 34px 24px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .biome-scene, .faq summary svg, .btn, .press-grid a { transition: none; }
}
.wrap-main { display: contents; }

/* ---------- Home: links into biome and creature pages ---------- */
.biome-link { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.biome-link:hover { color: var(--gold); }
.roster h3 a { color: inherit; text-decoration: none; }
.roster h3 a:hover { text-decoration: underline; }
.roster li a { color: inherit; text-decoration: none; display: block; }
.roster li:hover { box-shadow: 0 3px 0 rgba(0,0,0,.3), 0 0 0 3px var(--gold); }
a.field-card { text-decoration: none; }
a.field-card:hover { transform: rotate(0deg); }
.field-card > span { display: block; }
.field-card .field-top { display: flex; }
.fc-name { font: 400 34px/1 var(--display); color: var(--red); }
.fc-rows { display: flex !important; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.45; }
.field-note { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Breadcrumbs ---------- */
.crumbs ol {
  display: inline-flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: -60px 0 0; padding: 8px 18px;
  border-radius: 999px; background-color: var(--cream); color: var(--ink); box-shadow: 0 4px 0 var(--cream-shade);
  font-weight: 800; font-size: 15px;
}
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { text-decoration: none; color: var(--teal); }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-soft); }

/* ---------- Biome page ---------- */
.biome-hero { border-radius: 32px; padding: 44px 40px 40px; max-width: 760px; display: flex; flex-direction: column; gap: 16px; margin-top: -72px; }
.biome-hero h1 { font-size: clamp(46px, 6vw, 72px); line-height: .98; color: var(--red); }
.biome-hero p { font-size: 18px; }
.biome-sub-dark { font-weight: 800; color: var(--teal); font-size: 16px; }
.biome-facts { padding-top: 8px; border-top: 2px dashed rgba(176,138,90,.5); }
@media (max-width: 520px) { .biome-hero { padding: 36px 26px 30px; } }

.carousel-head { flex-direction: row; align-items: flex-end; justify-content: space-between; max-width: none; flex-wrap: wrap; }
.carousel-btns { display: flex; gap: 10px; }
.round-btn {
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background-color: var(--cream); color: var(--red); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 0 var(--cream-shade);
}
.round-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cream-shade); }
@media (hover: none) { .carousel-btns { display: none; } }
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 280px); gap: 20px;
  list-style: none; margin: 0 -20px; padding: 6px 20px 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(255,244,220,.5) transparent;
}
.c-card-item { scroll-snap-align: start; display: flex; }
.c-card {
  flex: 1; border-radius: 24px; padding: 22px 20px 20px; text-decoration: none;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .12s ease;
}
.c-card:hover { transform: translateY(-4px); }
.c-card .art-slot { height: 140px; border-color: var(--cream-shade); background-color: #F3E4C2; margin-bottom: 4px; }
.c-name { font: 400 26px/1.05 var(--display); color: var(--red); }
.c-sci { font-style: italic; color: var(--ink-soft); font-weight: 700; font-size: 14px; }
.c-fact { font-size: 15px; line-height: 1.45; flex: 1; }
.c-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-boss { background-color: var(--red); color: var(--cream); }
.chip-costume { background-color: var(--gold); color: var(--ink); }
.biome-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Creature page ---------- */
.creature-page { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: -72px; }
.creature-page .field-card.big { transform: none; margin: 0; max-width: none; position: sticky; top: 24px; }
.field-card.big h1 { font-size: clamp(38px, 5vw, 48px); line-height: 1; color: var(--red); }
.c-sci-big { font-style: italic; font-weight: 700; color: var(--ink-soft); margin-top: -6px; }
.field-card.big .art-slot { height: 200px; }
.creature-body { display: flex; flex-direction: column; gap: 20px; }
.panel-block { border-radius: 26px; padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; }
.panel-block h2 { font-size: 30px; line-height: 1.05; }
.panel-cream h2 { color: var(--red); }
.panel-dark { background-color: #33434A; color: var(--cream); box-shadow: 0 6px 0 #1F2A2F; }
.fact-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 17px; }
.fact-list li::marker { color: var(--red); }
.myth { border-radius: 16px; background-color: #F3E4C2; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.sources { font-size: 14px; padding: 0 6px; color: var(--on-floor); }
.sources h2 { font: 700 15px/1.2 var(--body); margin-bottom: 4px; }
.pager { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 8px; }
.pager .btn { min-height: 48px; font-size: 15px; }
@media (max-width: 820px) {
  .creature-page { grid-template-columns: 1fr; }
  .creature-page .field-card.big { position: static; }
  .pager { justify-content: center; }
}
.nav-links a[aria-current="page"] { background-color: rgba(176,138,90,.25); }
.pager .btn { gap: 8px; }
.field-card > .art-slot { display: flex; }

/* ---------- Know your kit ---------- */
.scenery-inline { padding-top: 4px; }
.kit { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
/* Kids Mode's four cards: two by two, one column on a phone */
.kids { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .kids { grid-template-columns: 1fr; } }
.kit-card { border-radius: 24px; padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; }
.kit-card h3 { font-size: 28px; line-height: 1.05; color: var(--red); }
.kit-card a { color: var(--teal); font-weight: 800; }
.kit-storm { background-color: var(--gold); color: var(--ink); box-shadow: 0 6px 0 var(--gold-shade); }
.kit-storm h3 { color: var(--ink); }
.relics-wrap { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 24px; }
.relics-title { font-size: 34px; color: var(--on-floor); }
.relics { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.relic {
  border-radius: 20px; padding: 18px 18px 18px 76px; position: relative; min-height: 88px;
  display: flex; flex-direction: column; gap: 4px; outline-offset: -7px;
}
.relic-badge {
  position: absolute; left: 16px; top: 18px; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--cream); font: 400 22px/1 var(--display); box-shadow: 0 3px 0 rgba(0,0,0,.3);
}
.relic-patch { position: absolute; left: 8px; top: 12px; width: 64px; height: 64px; }
.relic-name { font: 400 20px/1.1 var(--display); color: var(--red); }
.relic-text { font-size: 15px; line-height: 1.4; }
.chip-elite { background-color: var(--teal); color: var(--cream); }

/* ---------- Biome page: how it plays ---------- */
.kit-table { border-radius: 26px; padding: 28px 28px 24px; max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.kit-table dl { margin: 0; display: grid; gap: 0; }
.kit-table dl > div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 10px 0; border-bottom: 2px dashed rgba(176,138,90,.4); }
.kit-table dl > div:last-child { border-bottom: 0; }
.kit-table dt { font-weight: 800; }
.kit-table dd { margin: 0; }
.kit-more { color: var(--teal); font-weight: 800; }
.finds-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.find-chip { display: inline-flex; align-items: center; gap: 4px; }
.find-chip img { width: 32px; height: 32px; }
@media (max-width: 520px) { .kit-table dl > div { grid-template-columns: 1fr; gap: 2px; } }
