@font-face {
  font-family: Fredoka;
  src: url("/assets/fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url("/assets/fonts/Nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #fff5df;
  --panel: #ffedca;
  --ink: #3e291f;
  --muted: #674e3c;
  --wood-rim: #a66f48;
  --cocoa-shade: #4c352a52;
  --surface-top: #e8ecc4;
  --surface-picnic: #efdbb6;
  --earth: #2a1f15;
  --heading: Fredoka, system-ui, sans-serif;
  --body: Nunito, system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 650 1rem/1.55 var(--body);
}
.backyard-page {
  background: var(--earth) url("/assets/illustrations/underground-strata.svg") center bottom /
    max(50rem, 100%) clamp(56rem, 76vw, 86rem) no-repeat;
}
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 {
  font-family: var(--heading);
  line-height: 1.04;
  letter-spacing: -.025em;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #34667e; outline-offset: 4px; }
button { cursor: pointer; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
.wrap { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.skip-link {
  position: absolute;
  inset: .5rem auto auto .5rem;
  padding: .75rem 1rem;
  background: var(--paper);
  transform: translateY(-160%);
  z-index: 4;
}
.skip-link:focus { transform: none; }
.site-header {
  background:
    linear-gradient(180deg, #f3edc7ba, #f3edc7b3 70%, #f1e8c3),
    url("/assets/illustrations/garden-biomes.svg") center 94% / max(64rem, 100%) auto,
    #dce7b6;
  color: #2e3826;
}
.nav-row, .footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-row {
  min-height: clamp(5.5rem, 9vw, 7rem);
  padding-block: .75rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: 650 1.5rem/1 var(--heading);
  text-decoration: none;
  white-space: nowrap;
}
.brand-icon { border-radius: 22%; }
.site-header .wordmark { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--ink); }
nav {
  display: flex;
  justify-content: space-between;
  gap: .2rem clamp(.15rem, 1.5vw, .9rem);
  padding-inline: .35rem;
}
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: clamp(.35rem, 1vw, .8rem);
  text-underline-offset: .25em;
  text-decoration-color: transparent;
}
nav a:hover { text-decoration-color: currentColor; }
.site-header nav {
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  padding: 0;
}
.site-header nav a {
  color: var(--ink);
  font: 600 1rem/1.15 var(--heading);
  text-decoration: underline;
}
.site-header nav a:hover { text-decoration-thickness: .14em; }
.hero {
  background:
    linear-gradient(180deg, #f1e8c3, transparent 16%, transparent 69%, var(--surface-top)),
    linear-gradient(90deg, #f9f0d2ed, #fff3d8cf 34%, #f0efcb38 73%),
    url("/assets/illustrations/garden-biomes.svg") center / cover,
    #e6c797;
  color: var(--ink);
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 4fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  padding-block: clamp(2.5rem, 7vw, 6rem);
}
h1 { font-size: clamp(3.2rem, 6.25vw, 6.65rem); font-weight: 680; }
.hero h1 {
  color: #4a2d22;
  font-size: clamp(4.25rem, 8vw, 8.5rem);
  font-weight: 700;
  line-height: .78;
}
.hero h1 span {
  --title-tilt: -2deg;
  display: block;
  width: max-content;
  transform-origin: left center;
  transform: rotate(var(--title-tilt));
}
.hero h1 span + span {
  --title-tilt: 2deg;
  color: #b8442e;
}
@media (prefers-reduced-motion: no-preference) {
  .hero h1 span { animation: title-settle .6s cubic-bezier(.22, .75, .3, 1) backwards; }
  .hero h1 span + span { animation-delay: .08s; }
}
@keyframes title-settle {
  from { transform: translate(-.1em, .15em) rotate(calc(var(--title-tilt) - 5deg)); }
  65% { transform: translate(.02em, -.025em) rotate(calc(var(--title-tilt) + 2deg)); }
  to { transform: rotate(var(--title-tilt)); }
}
.hero-line {
  margin-top: clamp(1.65rem, 3vw, 3rem);
  font: 580 clamp(1.6rem, 2.65vw, 2.8rem)/1.08 var(--heading);
}
.hero-description {
  margin: 1rem 0 1.35rem;
  max-width: 33ch;
  color: #523b2c;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
}
:where(.button, .sound, .archive-tabs button, .archive-pager button, .archive-close, .archive-detail-nav button) {
  --button-face: var(--panel);
  --button-hover: color-mix(in srgb, var(--button-face), white 22%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .5rem .85rem;
  border: 0;
  border-radius: .8rem;
  background-color: var(--button-face);
  box-shadow: 0 3px var(--cocoa-shade);
  color: var(--ink);
  font: 600 1rem/1.15 var(--heading);
  text-decoration: none;
}
.button {
  --button-face: #f2b840;
  --button-pressed-shadow: inset 0 2px #fff0b673, 0 1px #a86d26;
  min-height: 48px;
  padding-inline: 1.1rem;
  border: 2px solid #b77a27;
  border-radius: .45rem;
  box-shadow: inset 0 2px #fff0b673, 0 3px #a86d26;
  font-size: 1.12rem;
}
.nav-signup {
  --button-pressed-shadow: 0 1px var(--cocoa-shade);
  position: relative;
  isolation: isolate;
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-signup .archive-shine {
  --foil-cycle: 6.5s;
  --foil-delay: -.9s;
  z-index: -1;
  border-radius: inherit;
}
.nav-signup .archive-foil { background: #fffbe85c; }
.nav-signup .archive-sparkle {
  inset: .5rem .45rem auto auto;
  width: .65rem;
  translate: none;
  background: #fff1bb;
}
.nav-signup .archive-sparkle:last-child {
  inset: auto auto .45rem .5rem;
  width: .5rem;
  animation-delay: -1.57s;
}
.nav-signup:focus-visible:not(:hover) .archive-shine { visibility: hidden; }
@media (hover: hover) {
  .nav-signup:hover .archive-foil { background: #fffbe82b; }
  :where(.button, .sound, .archive-tabs button, .archive-pager button, .archive-close, .archive-detail-nav button):not(:disabled, [aria-disabled="true"]):hover {
    background-color: var(--button-hover);
  }
}
:where(.button, .sound, .archive-tabs button, .archive-pager button, .archive-close, .archive-detail-nav button):not(:disabled, [aria-disabled="true"]):active {
  transform: translateY(2px);
  box-shadow: var(--button-pressed-shadow, 0 1px var(--cocoa-shade));
}
.hero-gameplay { gap: .55rem; }
.hero-gameplay::before {
  content: "";
  width: .65rem;
  height: .75rem;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.platforms { margin-top: 1.2rem; color: #523b2c; font-size: .92rem; }
.platforms strong { color: var(--ink); }
.platforms span { margin-inline: .2em; }
.launch-signup {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 2px solid var(--wood-rim);
  border-radius: 1rem;
  background: #fff5dfe8;
}
.launch-signup h2 { font-size: clamp(2rem, 4vw, 3.5rem); color: #34482c; }
.signup-copy p { max-width: 38ch; margin-top: .75rem; font-size: 1.05rem; line-height: 1.5; }
.signup-section { padding: 0 0 clamp(3rem, 6vw, 5rem); background: #e6c49b; }
.signup-fields { min-width: 0; }
.launch-signup .emailoctopus-form .main-form { display: flex; flex-direction: column; gap: .7rem; }
.launch-signup .emailoctopus-form [eo-form-fields-container],
.launch-signup .emailoctopus-form .emailoctopus-form-row { width: 100%; }
.launch-signup .emailoctopus-form input[type="email"] {
  width: 100%; min-height: 44px; padding: .5rem .65rem;
  border: 2px solid #8d8055; border-radius: .5rem; background: #fffcf3;
  color: var(--ink); font: 500 1rem var(--body);
}
.nav-signup,
#launch-signup .emailoctopus-form input[type="submit"] {
  min-height: 44px;
  border: 0;
  border-radius: .8rem;
  background: #4e6337;
  color: var(--paper);
  box-shadow: 0 3px var(--cocoa-shade);
  font: 600 1rem/1.15 var(--heading);
  cursor: pointer;
}
#launch-signup .emailoctopus-form input[type="submit"] { width: 100%; }
@media (hover: hover) {
  .nav-signup:hover,
  #launch-signup .emailoctopus-form input[type="submit"]:enabled:hover { background: #596e40; }
}
#launch-signup .emailoctopus-form input[type="submit"]:enabled:active {
  transform: translateY(2px);
  box-shadow: 0 1px var(--cocoa-shade);
}
.launch-signup input:focus-visible { outline: 3px solid #34667e; outline-offset: 3px; }
.signup-privacy { margin-top: .7rem; font-size: .8rem; line-height: 1.4; }
.legal-page { max-width: 46rem; padding-block: clamp(2rem, 6vw, 4rem); }
.legal-page h1 { font-size: clamp(2.25rem, 7vw, 3.75rem); margin-top: 1.5rem; }
.legal-page h2 { font-size: clamp(1.45rem, 4vw, 1.8rem); margin-top: 2rem; }
.legal-page p, .legal-page ul { margin-top: .85rem; }
.legal-page li + li { margin-top: .45rem; }
.legal-page ul { padding-inline-start: 1.4rem; }
.legal-page a { overflow-wrap: anywhere; text-underline-offset: .2em; }
.legal-page [id] { scroll-margin-top: 1.25rem; }
.legal-updated { color: var(--muted); font-size: .9rem; }
.legal-links { justify-content: flex-start; flex-wrap: wrap; gap: 0 1.1rem; padding: 0; }
.legal-links a { padding-inline: 0; text-decoration-color: currentColor; }
.legal-links a:hover { text-decoration-thickness: .14em; }
.legal-links [aria-current="page"] { font-weight: 850; }
.legal-page .legal-links { margin-top: 2rem; padding-top: .65rem; border-top: 1px solid #dcc7a9; }
.garden button:focus-visible { outline-color: #34667e; }

.garden {
  min-width: 0;
  overflow: hidden;
  border: 2px solid var(--wood-rim);
  border-radius: 1rem;
  background: var(--panel);
}
.garden-hud, .garden-controls {
  min-height: 3.4rem;
  padding: .4rem .85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1rem;
}
.garden .garden-hud h2 {
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: .015em;
}
.score {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .55rem;
  border-radius: .5rem;
  background: #ebcf9c;
  color: #593a25;
  font: 600 1.12rem/1 var(--heading);
  white-space: nowrap;
}
.garden-field {
  position: relative;
  isolation: isolate;
  aspect-ratio: 5 / 3;
  margin-inline: .45rem;
  overflow: hidden;
  border-radius: .55rem;
  background: #b98258;
}
.garden-field::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #916646;
  border-radius: inherit;
  box-shadow: inset 0 3px #4c352a40;
  pointer-events: none;
}
.garden-art, .garden-parade { width: 100%; height: 100%; position: absolute; inset: 0; }
.garden-parade { pointer-events: none; }
.has-parade .garden-parade { visibility: hidden; }
.sprite-definitions { position: absolute; }
.crumbs { position: absolute; inset: 0; }
.crumb {
  --bob: 0s;
  display: grid;
  place-items: center;
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.crumb:nth-child(1) { --x: 24%; --y: 29%; }
.crumb:nth-child(2) { --x: 62%; --y: 30%; --bob: -.6s; }
.crumb:nth-child(3) { --x: 79%; --y: 67%; --bob: -1.2s; }
.crumb svg { width: 28px; height: 28px; filter: drop-shadow(0 2px 0 #52312550); animation: bob 2.4s var(--bob) ease-in-out infinite; }
.crumb:hover svg { filter: brightness(1.12) drop-shadow(0 2px 0 #52312550); }
.crumb.collected { pointer-events: none; }
.crumb.collected svg { visibility: hidden; animation: none; }
.crumb.collected::after {
  content: "✦";
  position: absolute;
  color: #fff1aa;
  font-size: 1.8rem;
  opacity: 0;
  animation: pickup .45s ease-out;
}
@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes pickup {
  from { opacity: 1; transform: scale(.65); }
  60% { opacity: 1; }
  to { opacity: 0; transform: translateY(-11px) scale(1.3); }
}
.picnic {
  position: absolute;
  z-index: 1;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: calc(100% - 1.5rem);
  display: grid;
  justify-items: center;
  gap: .5rem;
  padding: clamp(.8rem, 3vw, 1.4rem) clamp(1rem, 4vw, 2.35rem);
  border: 2px solid #8e4234;
  border-radius: .8rem;
  color: #592c26;
  background: repeating-conic-gradient(#f9dbc6 0 25%, #fff0d5 0 50%) 50% / 1.7rem 1.7rem;
  box-shadow: 0 3px var(--cocoa-shade);
  animation: picnic-in .28s ease-out;
}
.picnic p { font: 650 clamp(1.6rem, 3vw, 2.6rem)/1 var(--heading); }
.picnic button:focus-visible { outline-color: #34667e; }
@keyframes picnic-in { from { opacity: 0; transform: translate(-50%, -44%); } }
.garden-controls { flex-wrap: wrap; color: #4f3c2b; font-size: .9rem; }
.sound {
  gap: .4rem;
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 3;
  min-width: 44px;
  border: 1px solid var(--wood-rim);
}
.sound-icon { flex: none; color: #744328; }
.sound-state { color: #744328; }
.sound[aria-pressed="true"] .sound-muted,
.sound[aria-pressed="false"] .sound-waves { display: none; }
.sound:not([hidden]) ~ .site-footer { padding-bottom: max(4.5rem, calc(3.5rem + env(safe-area-inset-bottom))); }
.garden-note { padding: .6rem .85rem; }
#parade {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
h2 { font-size: clamp(2.25rem, 4vw, 3.7rem); font-weight: 650; }
.biomes {
  background: linear-gradient(
    var(--surface-top),
    #e4eac0 20%,
    #ecdabb 43%,
    #dce9cf 64%,
    #d4e4ca 83%,
    var(--surface-picnic)
  );
  color: #2d3928;
}
.biomes-intro {
  padding-top: clamp(2.25rem, 6vw, 5.75rem);
  color: #34482c;
}
.biomes-intro h2 {
  font-size: clamp(2.6rem, 5.6vw, 5.25rem);
  text-wrap: balance;
}
.scene-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 9fr);
  grid-template-areas: "caption image";
  align-items: center;
  gap: clamp(.5rem, 2.5vw, 2.25rem);
}
.scene:nth-child(even) .scene-layout {
  grid-template-columns: minmax(0, 9fr) minmax(0, 4fr);
  grid-template-areas: "image caption";
}
.scene-layout img { grid-area: image; width: 100%; height: auto; }
.scene-layout figcaption { grid-area: caption; }
.scene-layout h3 {
  font-size: clamp(2.1rem, 4.6vw, 4.6rem);
  text-wrap: balance;
}
.scene-layout p {
  max-width: 33ch;
  margin-top: .85rem;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}
.scene--rocks { color: #483326; }
.scene--puddles, .scene--pond { color: #243e35; }
.gameplay {
  background: linear-gradient(180deg, var(--surface-picnic), #624c3a 8%, #292019 25%, #292019 72%, #624c3a 92%, #e6c49b);
  color: var(--paper);
  padding-block: clamp(5rem, 9vw, 9rem);
}
.gameplay-layout {
  width: min(100% - 3rem, 88rem);
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
}
.gameplay-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.gameplay h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  text-wrap: balance;
}
.gameplay-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.gameplay-steps h3 { color: #f4ca90; font-size: 1.1rem; }
.gameplay-steps p { max-width: 40ch; margin-top: .35rem; color: #f0dfc6; font-size: .92rem; }
.gameplay-preview { min-width: 0; }
.gameplay-preview video {
  display: block;
  width: 100%;
  aspect-ratio: 1280 / 832;
  object-fit: contain;
  border: 2px solid #916646;
  border-radius: .5rem;
  background: #17110e;
}
.gameplay-preview figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .2rem 1rem;
  padding-top: .65rem;
  color: #e8cfae;
  font-size: .9rem;
}
.gameplay-preview figcaption a { text-underline-offset: .2em; }
.gameplay-preview figcaption a:hover { color: #fff2ce; }
.story {
  color: var(--paper);
  padding-block: clamp(2.25rem, 6vw, 4.75rem);
}
.story-inner { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: clamp(1rem, 4vw, 2rem); }
.story-ant { transform: rotate(-14deg); }
.story p { max-width: 60ch; margin: .9rem 0 .7rem; }
.text-link { display: inline-block; padding-block: .5rem; font-weight: 850; text-underline-offset: .2em; }
.story .text-link { color: #ffdf9e; }
.story .text-link:hover { color: #fff2ce; }
.gameplay-preview a:focus-visible, .story a:focus-visible, .site-footer a:focus-visible { outline-color: #ffce7f; }
.site-footer {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  color: var(--paper);
}
.footer-row { justify-content: flex-start; align-items: flex-start; flex-direction: column; gap: .65rem; }
.site-footer .wordmark { font-size: clamp(1.65rem, 3.5vw, 2.75rem); }
.site-footer p { color: #f3dbb6; }
.footer-copyright { color: #f3dbb6; font-size: .85rem; }
.lost-trail { display: grid; justify-items: start; gap: 1rem; padding-block: clamp(3rem, 10vw, 8rem); }
.lost-trail h1 { font-size: clamp(2.8rem, 8vw, 5rem); }
@media (max-width: 900px) {
  .nav-row { flex-wrap: wrap; }
  .site-header nav { order: 3; flex-basis: 100%; }
  .nav-signup { margin-left: auto; }
}
@media (max-width: 800px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-copy { max-width: 38rem; }
  .scene-layout, .scene:nth-child(even) .scene-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "image" "caption";
    padding-block: 0 clamp(1.25rem, 4vw, 2.5rem);
  }
  .scene-layout p { max-width: 40ch; margin-top: .5rem; }
  .gameplay-copy { grid-template-columns: 1fr; }
  .gameplay-steps { gap: 1rem; }
}
@media (max-width: 560px) {
  .backyard-page { background-size: 50rem 65rem; }
  .wrap { width: calc(100% - 2rem); }
  .gameplay-layout { width: calc(100% - 2rem); }
  .gameplay-steps { grid-template-columns: 1fr; }
  .site-header { background-position: center, left bottom; }
  .nav-row { gap: .4rem; }
  .nav-signup { padding-inline: .65rem; }
  .launch-signup { grid-template-columns: 1fr; }
  .site-header nav { justify-content: flex-start; gap: .35rem; }
  .site-header nav a { padding-inline: .45rem; font-size: .875rem; }
  nav { font-size: .89rem; }
  nav a { padding-inline: .35rem; }
  h1 { font-size: clamp(3.35rem, 13vw, 5rem); }
  .story-inner { grid-template-columns: 1fr; }
  .story-ant { width: 3.3rem; height: auto; }
}

@media (max-width: 414px) {
  .site-header nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 360px) {
  .site-header .wordmark { font-size: 1.15rem; }
  .site-header .wordmark img { width: 32px; height: 32px; }
  .nav-signup { padding-inline: .6rem; }
  .site-header nav a { padding-inline: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .crumb svg, .crumb.collected::after, .picnic { animation: none; }
}

.scent-cursor, .scent-cursor * { cursor: none !important; }
.scent-cursor .sound, .scent-cursor .sound * { cursor: pointer !important; }
.scent-cursor .archive-detail, .scent-cursor .archive-detail * { cursor: auto !important; }
.scent-cursor .archive-detail button { cursor: pointer !important; }

.earth {
  color: var(--paper);
  padding-top: clamp(4.75rem, 9vw, 9rem);
  background:
    linear-gradient(#e6c49b, #806043 2.75rem, var(--earth) 5.5rem, transparent 12rem);
}
.underground {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(1rem, 4vw, 4rem);
  padding-block: clamp(2.75rem, 6vw, 5.5rem);
}
.underground img {
  width: 100%;
  height: auto;
  mask-image: linear-gradient(90deg, transparent, #000 8% 92%, transparent), linear-gradient(#000 66%, transparent 96%);
  mask-composite: intersect;
}
.world-label {
  margin-bottom: .6rem;
  color: #edb96d;
  font: 650 .86rem/1.2 var(--body);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.underground-copy > p:last-child { margin-top: 1rem; max-width: 33ch; color: #f0d6af; }
@media (max-width: 800px) {
  .underground { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero {
    background:
      linear-gradient(180deg, #f1e8c3, #fff3d8b3 35%, transparent 69%, var(--surface-top)),
      url("/assets/illustrations/garden-biomes.svg") 48% center / cover,
      #e6c797;
  }
}

.archive {
  padding-block: clamp(2rem, 5vw, 5rem);
  background: linear-gradient(#e6c49b, #ead0a9 22%, #ead0a9 78%, #e6c49b);
}
.archive-album {
  padding: clamp(.85rem, 3.2vw, 2.75rem);
  border: 3px solid #a66f48;
  border-radius: clamp(1rem, 3vw, 2rem);
  background: #f4dfb2;
}
.archive-heading { text-align: center; }
.archive-heading h2 { font-size: clamp(2rem, 4.5vw, 3.6rem); }
.archive-heading p {
  max-width: 54ch;
  margin: .75rem auto 0;
  color: var(--muted);
  text-wrap: pretty;
}
.archive-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem;
  margin-block: 1.5rem;
}
.archive-tabs button { --button-face: #ebcf9c; flex: 0 1 12rem; gap: .25rem; }
.archive-tabs button[aria-selected="true"] {
  --button-face: #4e6337;
  --button-hover: #596e40;
  color: var(--paper);
}
.archive-tabs span { font: 800 .78rem var(--body); }
.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.75rem, 1.8vw, 1.35rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.archive-heading + [hidden] + #archive-singles { margin-top: 1.5rem; }
.archive [role="tabpanel"]:focus-visible { outline: 3px solid #34667e; outline-offset: 5px; }
.archive-card, .archive-detail-content {
  --rim: #a66f48;
  --badge: #ebcf9c;
  --badge-ink: #4c352a;
}
.archive--rare { --rim: #5f93b8; --badge: #cfe6f2; --badge-ink: #24465e; }
.archive--epic { --rim: #d99a2b; --badge: #ffe08a; --badge-ink: #6b4110; }
.archive-card {
  position: relative;
  padding: .45rem;
  border: 3px solid var(--rim);
  border-radius: 1.05rem;
  background: #fbf0d8;
  text-align: center;
}
.archive-card--hidden {
  border-color: color-mix(in srgb, var(--rim), #dcc8a4 42%);
  background: #dcc8a4;
}
.archive-art {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: .7rem;
  background:
    radial-gradient(circle closest-side at 47% 55%, #fffbe87a 69%, #fffbe845 70% 97%, transparent 98%),
    var(--art-tint);
}
.archive-art img { width: 100%; height: auto; }
.archive-art--hidden { background: #c4ad86; }
.archive-shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.archive-art--hidden .archive-shine { opacity: .36; }
.archive-sparkle-orbit {
  position: absolute;
  left: 47%;
  top: 55%;
  height: 88%;
  aspect-ratio: 1;
  translate: -50% -50%;
  animation: archive-orbit var(--orbit-cycle) linear var(--orbit-delay) infinite;
}
.archive-sparkle-position { position: absolute; inset: 0; }
.archive-sparkle {
  position: absolute;
  top: 0;
  left: 50%;
  width: .55rem;
  aspect-ratio: 1;
  translate: -50% -50%;
  background: #fffbe899;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: archive-twinkle 3.14s ease-in-out infinite;
}
.archive-foil {
  position: absolute;
  inset: 2% 0;
  background: #fffbe8;
  clip-path: polygon(18% 0, 30% 0, 12% 100%, 0 100%);
  animation: archive-foil var(--foil-cycle) linear var(--foil-delay) infinite;
}
@keyframes archive-orbit { to { transform: rotate(1turn); } }
@keyframes archive-twinkle {
  0%, 100% { transform: scale(.5); }
  50% { transform: scale(1.5); }
}
/* The game's foil sweeps for five sevenths of the cycle and rests for the rest. */
@keyframes archive-foil {
  0% { transform: translateX(-30%); opacity: 0; }
  18% { opacity: .23; }
  36% { opacity: .32; }
  54% { opacity: .23; }
  71.43%, 100% { transform: translateX(109%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .archive-shine { display: none; }
}
.archive-number, .archive-rarity {
  position: absolute;
  top: .38rem;
  border-radius: 2rem;
  padding: .18rem .44rem;
  font-size: .7rem;
  line-height: 1.2;
  font-weight: 900;
}
.archive-number { left: .4rem; color: #fff5df; background: #514032; }
.archive-rarity {
  right: .4rem;
  color: var(--badge-ink);
  background: var(--badge);
  border: 1px solid var(--rim);
  text-transform: uppercase;
}
.archive-card-copy { padding: .75rem .3rem .45rem; }
.archive-card h3 { font-size: clamp(1.2rem, 1.8vw, 1.55rem); }
.archive-card p { margin-top: .45rem; font-size: .9rem; line-height: 1.4; text-wrap: pretty; }
.archive-card .archive-character, .archive-character { color: #a43e2d; font-weight: 900; }
.archive-card .archive-unknown { margin-top: 0; font: 600 1.35rem/1.1 var(--heading); }
.archive-card-button {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
}
.archive-card-button:focus-visible { outline: none; }
.archive-card:has(> .archive-card-button:focus-visible) {
  outline: 3px solid #34667e;
  outline-offset: 4px;
}
@media (hover: hover) {
  .archive-card:has(> .archive-card-button:hover) {
    border-color: color-mix(in srgb, var(--rim), var(--badge-ink) 35%);
  }
}
.archive-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
  text-align: center;
  font-size: .85rem;
}
.archive-pager button { justify-self: start; }
.archive-pager button:last-child { justify-self: end; }
.archive-pager button:disabled { opacity: .55; cursor: default; }
.archive-page-dots {
  display: flex;
  align-items: center;
  gap: clamp(.3rem, 1vw, .55rem);
}
.archive-page-dot {
  display: block;
  width: .75rem;
  height: .75rem;
  border: 2px solid var(--badge-ink);
  border-radius: 50%;
  background: var(--badge);
}
.archive-page-dot.is-current {
  background: radial-gradient(circle at 35% 30%, #fff5df 12%, transparent 19%), var(--rim);
  box-shadow: 0 0 0 2px var(--badge);
  transform: scale(1.18);
}
.archive-detail {
  width: min(55rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: clamp(.8rem, 2vw, 1.75rem);
  border: 3px solid #a66f48;
  border-radius: 1.25rem;
  background: #fff0d0;
  color: var(--ink);
}
.archive-detail::backdrop { background: #24170ed6; }
.archive-detail-controls { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .65rem; }
.archive-close { min-width: 44px; font-size: 1.6rem; }
.archive-detail-content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}
.archive-hero {
  min-width: 0;
  padding: .6rem;
  border: 3px solid var(--rim);
  border-radius: 1rem;
  background: #fbf0d8;
  text-align: center;
}
.archive-hero.archive-card--hidden { background: #dcc8a4; }
.archive-hero-badges {
  display: flex;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.archive-hero-badges :is(.archive-number, .archive-rarity) { position: static; }
.archive-hero > .archive-art {
  aspect-ratio: 1;
}
.archive-ribbon {
  position: relative;
  margin: .65rem -.6rem;
  padding: .5rem .25rem;
  background: var(--badge);
  color: var(--badge-ink);
  font: 650 clamp(1.15rem, 3vw, 1.75rem)/1.1 var(--heading);
}
.archive-ribbon::before, .archive-ribbon::after {
  content: "";
  position: absolute;
  inset: 0 auto -.2rem 100%;
  width: .65rem;
  background: color-mix(in srgb, var(--rim), #3e291f 22%);
  clip-path: polygon(0 0, 100% 8%, 48% 50%, 100% 100%, 0 91%);
}
.archive-ribbon::before { inset: 0 100% -.2rem auto; transform: scaleX(-1); }
.archive-card--hidden .archive-ribbon { background: #bc9f74; color: var(--ink); }
.archive-trait-dots { display: flex; justify-content: center; gap: .35rem; margin-top: .45rem; }
.archive-trait-dots span { width: .65rem; height: .65rem; border: 1px solid #78634c; border-radius: 50%; }
.archive-riddle { margin-top: .8rem; padding: .65rem .85rem; border-radius: .6rem; background: #ead0a1; }
.archive-detail-copy .archive-riddle h4 { margin: 0; }
.archive-detail-nav { display: flex; gap: .5rem; }
.archive-detail-nav button { min-width: 44px; font-size: 1.5rem; }
.archive-detail-nav button[aria-disabled="true"] { opacity: .55; cursor: default; }
.archive-detail-copy h3 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
.archive-detail-copy p { margin-top: .55rem; }
.archive-detail-copy h4 { margin: 1rem 0 .5rem; }
.archive-lore {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin: .8rem 0 0;
}
.archive-lore > div { padding: .55rem .65rem; border-radius: .55rem; background: #ead0a1; }
.archive-lore dt { font-weight: 900; }
.archive-lore dd { margin: 0; }
.archive-traits {
  display: flex;
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.archive-traits li { width: 7rem; text-align: center; font-size: .8rem; font-weight: 900; }
.archive-traits img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: .55rem;
  background: radial-gradient(circle closest-side, #fffbe859 72%, transparent 73%), var(--tile-tint);
  margin-bottom: .2rem;
}
@media (max-width: 850px) {
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-tabs button { flex: 0 1 auto; }
}
@media (max-width: 440px) {
  .archive-grid, .archive-detail-content { grid-template-columns: minmax(0, 1fr); }
  .archive-hero > .archive-art { aspect-ratio: auto; }
  .archive-tabs { gap: .4rem; }
  .archive-tabs button { padding-inline: .52rem; font-size: .91rem; }
}
