:root {
  --ink: #1f3b2c;
  --muted: #5d7a68;
  --cream: #f4fbe8;
  --paper: #fffef8;
  --leaf: #6fbf4b;
  --leaf-dark: #3f8a2f;
  --sun: #f6c84c;
  --sky: #9ad7ff;
  --soil: #c48a4a;
  --coral: #ef7a55;
  --line: #d7e6cb;
  --shadow: 0 18px 50px rgba(40, 80, 50, .14);
  --tap: 44px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, #dff8b8 0 14%, transparent 30%),
    radial-gradient(circle at 90% 12%, #ffe9a8 0 12%, transparent 28%),
    linear-gradient(180deg, #f7ffe9, #eef8ff 48%, #fff8e8);
  font-family: "Nunito", Inter, ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}
button, input, select, .button { font: inherit; touch-action: manipulation; }
.skip-link { position: fixed; left: 10px; top: -80px; z-index: 100; padding: 12px 16px; background: #fff; border-radius: 12px; }
.skip-link:focus { top: 10px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 72px;
  padding: 10px max(16px, calc((100vw - 1100px) / 2));
  background: rgba(255, 254, 248, .94);
  border-bottom: 1px solid rgba(60, 100, 70, .12);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.logo-mark {
  width: 46px; height: 46px; border-radius: 14px;
  background:
    linear-gradient(135deg, var(--leaf), #b6e86a 55%, var(--sun));
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.08);
  position: relative;
}
.logo-mark::after {
  content: ""; position: absolute; inset: 12px 10px auto auto;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff8; border: 2px solid #fff;
}
.brand strong { display: block; font-size: 22px; line-height: 1; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .04em; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.privacy-pill { padding: 9px 12px; border-radius: 999px; background: #e8f8ef; color: #27674e; font-size: 12px; font-weight: 800; }

main { width: min(1100px, calc(100% - 28px)); margin: 0 auto; }
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(20px, 5vw, 56px);
  align-items: center; padding: 48px 8px 24px;
}
.eyebrow { display: inline-block; color: #4f7a5c; font-size: 12px; font-weight: 900; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { margin: 12px 0 18px; font-size: clamp(40px, 7vw, 72px); line-height: .92; letter-spacing: -.05em; }
.hero h1 em { color: var(--leaf-dark); font-style: normal; }
.hero > div > p { max-width: 560px; color: #4d6b58; font-size: clamp(16px, 2vw, 20px); line-height: 1.55; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-badges span { padding: 10px 13px; border-radius: 999px; background: #fff; box-shadow: 0 8px 24px rgba(40,80,50,.08); font-weight: 850; min-height: var(--tap); display: inline-flex; align-items: center; }

.safari-scene {
  position: relative; min-height: 280px; border-radius: 36px; overflow: hidden;
  background: linear-gradient(160deg, #b9ecff, #d9f7a8 45%, #ffe7a0);
  border: 3px solid #fff; box-shadow: var(--shadow);
}
.geo { position: absolute; }
.geo.sun { right: 18%; top: 14%; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff7c2, var(--sun)); box-shadow: 0 0 0 10px rgba(246,200,76,.25); }
.geo.giraffe {
  left: 18%; bottom: 18%; width: 70px; height: 120px;
  background:
    linear-gradient(#f0c36a,#e0a84a) 20px 0 / 28px 70px no-repeat,
    linear-gradient(#e8b35a,#d99840) 0 70px / 70px 50px no-repeat;
  border-radius: 18px;
  filter: drop-shadow(0 8px 0 rgba(0,0,0,.08));
}
.geo.giraffe::before {
  content: ""; position: absolute; left: 28px; top: -18px; width: 34px; height: 28px;
  background: #e8b35a; border-radius: 40% 40% 30% 30%;
}
.geo.leaf { right: 12%; bottom: 22%; width: 54px; height: 54px; background: var(--leaf); border-radius: 0 70% 0 70%; transform: rotate(25deg); }
.bubble { position: absolute; left: 12%; top: 18%; padding: 10px 14px; border-radius: 16px; background: #fff; font-weight: 800; font-size: 13px; box-shadow: 0 10px 24px rgba(0,0,0,.08); }

.play, .parent { padding: 8px 0 40px; }
.hud {
  display: grid; grid-template-columns: 1.2fr 1.2fr .7fr .7fr; gap: 12px; align-items: end; margin-bottom: 16px;
}
.hud h2 { margin: 4px 0 0; font-size: clamp(24px, 4vw, 36px); }
.trail-picker { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 850; }
.trail-picker select, input, select {
  min-height: var(--tap); padding: 10px 13px; color: var(--ink); background: #fff;
  border: 1px solid #c9dbc0; border-radius: 14px;
}
.score-card {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 18px;
  background: #fff; box-shadow: 0 10px 28px rgba(40,80,50,.08); min-height: 64px;
}
.score-card span { font-size: 24px; }
.score-card strong { display: block; font-size: 22px; line-height: 1; }
.score-card small { color: var(--muted); font-weight: 750; }

.round-card {
  padding: 22px; border-radius: 28px; background: var(--paper);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.animal-art {
  width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 28px;
  background: linear-gradient(145deg, #dff8b8, #ffe9a8);
  position: relative;
}
.animal-art::before, .animal-art::after { content: ""; position: absolute; }
.animal-art[data-animal="leaf"]::before { inset: 28px; background: var(--leaf); border-radius: 0 70% 0 70%; transform: rotate(20deg); }
.animal-art[data-animal="cat"]::before { left: 22px; top: 28px; width: 52px; height: 40px; background: #f0b35a; border-radius: 40%; }
.animal-art[data-animal="cat"]::after { left: 30px; top: 18px; width: 14px; height: 18px; background: #f0b35a; border-radius: 40% 40% 0 0; box-shadow: 22px 0 #f0b35a; }
.animal-art[data-animal="dog"]::before { left: 20px; top: 30px; width: 56px; height: 42px; background: #d2a06a; border-radius: 42% 42% 36% 36%; }
.animal-art[data-animal="sun"]::before { inset: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff7c2, var(--sun)); }
.animal-art[data-animal="map"]::before { inset: 22px; background: #f7e2b0; border-radius: 8px; box-shadow: inset 0 0 0 3px #c48a4a; }
.animal-art[data-animal="hat"]::before { left: 18px; top: 38px; width: 60px; height: 18px; background: #ef7a55; border-radius: 8px; }
.animal-art[data-animal="hat"]::after { left: 30px; top: 18px; width: 36px; height: 28px; background: #ef7a55; border-radius: 8px 8px 0 0; }
.animal-art[data-animal="elephant"]::before { left: 18px; top: 28px; width: 60px; height: 48px; background: #9aa7b8; border-radius: 40%; }
.animal-art[data-animal="cheetah"]::before { left: 16px; top: 34px; width: 64px; height: 36px; background: #e2b45a; border-radius: 40%; }
.animal-art[data-animal="boat"]::before { left: 16px; top: 48px; width: 64px; height: 22px; background: #6aa7d8; clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); }
.animal-art[data-animal="fish"]::before { left: 22px; top: 34px; width: 52px; height: 28px; background: #5ec4c0; border-radius: 50% 40% 50% 40%; }
.animal-art[data-animal="parrot"]::before { left: 28px; top: 22px; width: 40px; height: 52px; background: #ef7a55; border-radius: 40% 40% 30% 30%; }
.animal-art[data-animal="snake"]::before { left: 16px; top: 44px; width: 64px; height: 12px; background: #6fbf4b; border-radius: 999px; }
.animal-art[data-animal="frog"]::before { left: 22px; top: 34px; width: 52px; height: 36px; background: #57b84a; border-radius: 45%; }
.animal-art[data-animal="tent"]::before { left: 22px; top: 28px; width: 52px; height: 48px; background: #ef7a55; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.animal-art[data-animal="cloud"]::before { left: 18px; top: 34px; width: 60px; height: 34px; background: #fff; border-radius: 999px; box-shadow: 16px -10px 0 #fff; }
.animal-art[data-animal="tree"]::before { left: 40px; top: 48px; width: 16px; height: 30px; background: #8b5a2b; }
.animal-art[data-animal="tree"]::after { left: 22px; top: 16px; width: 52px; height: 42px; background: var(--leaf-dark); border-radius: 50%; }
.animal-art[data-animal="moon"]::before { left: 28px; top: 22px; width: 44px; height: 44px; border-radius: 50%; background: #f4efc8; box-shadow: inset -10px -4px 0 #d9d2a0; }
.animal-art[data-animal="jeep"]::before { left: 14px; top: 42px; width: 68px; height: 28px; background: #3f8a2f; border-radius: 8px; }
.animal-art[data-animal="lion"]::before { left: 22px; top: 26px; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle, #e2a84a 40%, #c47a2e 41%); }
.animal-art[data-animal="butterfly"]::before { left: 18px; top: 28px; width: 28px; height: 40px; background: #9b7dff; border-radius: 50% 10%; transform: rotate(-18deg); }
.animal-art[data-animal="butterfly"]::after { right: 18px; top: 28px; width: 28px; height: 40px; background: #ef7a55; border-radius: 10% 50%; transform: rotate(18deg); }
.animal-art[data-animal="tunnel"]::before { left: 22px; top: 28px; width: 52px; height: 48px; border: 10px solid #8b5a2b; border-bottom: 0; border-radius: 52px 52px 0 0; }
.animal-art[data-animal="camera"]::before { left: 20px; top: 34px; width: 56px; height: 36px; background: #445; border-radius: 8px; }
.animal-art[data-animal="camera"]::after { left: 38px; top: 40px; width: 20px; height: 20px; border-radius: 50%; background: #9ad7ff; border: 3px solid #222; }
.animal-art[data-animal="giraffe"]::before { left: 36px; top: 10px; width: 18px; height: 50px; background: #e8b35a; border-radius: 8px; }
.animal-art[data-animal="giraffe"]::after { left: 22px; top: 54px; width: 52px; height: 28px; background: #e0a84a; border-radius: 12px; }

.clue { text-align: center; font-size: clamp(18px, 3vw, 24px); font-weight: 800; margin: 0 0 8px; }
.built-label { text-align: center; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.built-word {
  min-height: 52px; text-align: center; font-size: clamp(28px, 6vw, 40px); font-weight: 900;
  letter-spacing: .12em; margin: 4px 0 14px; color: var(--leaf-dark);
}
.tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 14px; }
.tile {
  min-width: var(--tap); min-height: var(--tap); padding: 10px 14px; border-radius: 16px;
  border: 0; background: #fff; box-shadow: 0 8px 0 #c9dbc0; font-weight: 900; font-size: 20px; cursor: pointer;
}
.tile:active { transform: translateY(2px); box-shadow: 0 4px 0 #c9dbc0; }
.tile.used { opacity: .35; }
.feedback { min-height: 28px; text-align: center; font-weight: 800; }
.feedback.ok { color: var(--leaf-dark); }
.feedback.warn { color: #b85a2f; }
.feedback.info { color: #3f6f8a; }
.row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.button, button.button, button.button-primary, button.button-soft {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 12px 18px; border-radius: 999px; border: 0;
  background: #fff; color: var(--ink); font-weight: 850; text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(40,80,50,.1);
}
.button-primary { background: linear-gradient(135deg, var(--leaf), #8fd65a); color: #16331c; }
.button-soft { background: #eef6e4; }
.button[aria-disabled="true"] { opacity: .55; pointer-events: none; }

.family-note {
  display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start;
  margin: 10px 0 28px; padding: 18px; border-radius: 24px; background: #fff; border: 1px solid var(--line);
}
.note-icon { font-size: 34px; }
.family-note h2 { margin-bottom: 6px; font-size: 22px; }
.family-note p, .muted { color: var(--muted); line-height: 1.55; }

.parent-summary, .parent-words {
  padding: 16px; border-radius: 20px; background: #fff; border: 1px solid var(--line); margin-bottom: 12px;
}
.parent-words table { width: 100%; border-collapse: collapse; font-size: 14px; }
.parent-words th, .parent-words td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; justify-content: space-between; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 12px; }

.buy {
  max-width: 720px; margin: 24px auto 48px; padding: 28px 22px; border-radius: 24px;
  border: 1px solid rgba(127,127,127,.28); text-align: center; background: #fff;
}
.buy-kicker { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.buy-price { margin: 0 0 8px; font-size: 30px; font-weight: 900; }
.buy-copy { margin: 0 0 14px; color: var(--muted); }
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.buy-note { margin: 12px 0 0; font-size: 12px; opacity: .75; }
.buy .buy-stripe { background: #635bff; color: #fff; }
.buy .buy-shopify { background: #008060; color: #fff; }

.modal {
  border: 0; border-radius: 24px; padding: 0; width: min(420px, calc(100vw - 24px));
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(20, 40, 28, .45); }
.modal form, .setup-buy { padding: 22px; display: grid; gap: 10px; }
.setup-buy { border-bottom: 1px solid var(--line); text-align: center; }
.form-error { color: #b85a2f; min-height: 1.2em; margin: 0; font-weight: 750; }
.foot { text-align: center; padding: 18px; color: var(--muted); font-size: 13px; }

@media (max-width: 820px) {
  .hero, .hud { grid-template-columns: 1fr; }
  .safari-scene { min-height: 220px; }
  .privacy-pill { display: none; }
}
