:root {
  --ink: #2b1d12;
  --bark: #5b3a24;
  --sky-top: #a9dcff;
  --sky-low: #fff3d6;
  --grass: #6dbb47;
  --grass-dark: #4f9a33;
  --soil: #5a3d28;
  --soil-dark: #3d2817;
  --cream: #fffaf0;
  --hand: "Caveat", cursive;
  --display: "Bagel Fat One", system-ui, sans-serif;
  --body: "Patrick Hand", system-ui, sans-serif;
  --intro-w: min(420px, 34vw);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  position: relative;
  font-family: var(--body);
  color: var(--ink);
  background: var(--soil);
  overflow-x: hidden;
}
[hidden] { display: none !important; }

/* ---------- sky ---------- */
.sky {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, #d7efff 45%, var(--sky-low) 100%);
}
.sun {
  position: absolute; top: 7%; right: 9%;
  width: 110px; height: 110px; border-radius: 50%;
  background: #ffd84d;
  box-shadow: 0 0 0 14px rgba(255, 216, 77, 0.25), 0 0 0 30px rgba(255, 216, 77, 0.12);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 50% { box-shadow: 0 0 0 20px rgba(255, 216, 77, 0.22), 0 0 0 42px rgba(255, 216, 77, 0.08); } }
.cloud {
  position: absolute; height: 34px; border-radius: 40px; background: #fff; opacity: 0.9;
  animation: drift linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 46px; height: 46px; top: -24px; left: 18px; }
.cloud::after { width: 62px; height: 62px; top: -34px; left: 52px; }
.c1 { width: 150px; top: 14%; animation-duration: 70s; animation-delay: -20s; }
.c2 { width: 110px; top: 30%; animation-duration: 95s; animation-delay: -60s; transform: scale(0.8); opacity: 0.75; }
.c3 { width: 180px; top: 8%; animation-duration: 120s; animation-delay: -90s; opacity: 0.7; }
@keyframes drift { from { left: -240px; } to { left: 110%; } }

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 15;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: transparent;
}
.logo { font-family: var(--display); font-size: clamp(28px, 4vw, 40px); color: var(--bark); letter-spacing: 1px; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: clamp(12px, 2vw, 24px); }
.mint-peek {
  display: grid; grid-template-columns: auto 92px auto; align-items: center; gap: 8px;
  padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.mint-peek-label { font: 700 17px var(--hand); white-space: nowrap; }
.mint-peek b { font: 20px var(--display); color: var(--grass-dark); }
.mint-progress {
  width: 100%; height: 9px; appearance: none; -webkit-appearance: none;
  border: 0; border-radius: 99px; background: transparent; accent-color: var(--grass-dark);
}
.mint-progress::-webkit-progress-bar { background: transparent; }
.mint-progress::-webkit-progress-value { border-radius: 99px; background: var(--grass-dark); }
.mint-progress::-moz-progress-bar { border-radius: 99px; background: var(--grass-dark); }
.leaf-mint {
  margin: 12px 0 14px; padding: 10px 12px;
  border: 2px solid rgba(43, 29, 18, 0.4); border-radius: 6px;
  background: rgba(255, 250, 240, 0.38);
}
.leaf-mint .mint-count { margin: 2px 0 8px; font: 17px var(--body); white-space: nowrap; }
.leaf-mint .mint-count b { font: 23px var(--display); font-weight: 400; color: var(--ink); }
.leaf .leaf-mint .mint-left { color: var(--ink); font: 700 19px var(--hand); margin: 6px 0 0; }
.leaf-mint .mint-progress { width: 100%; }
.leaf-mint-progress { display: flex; align-items: center; gap: 12px; }
.leaf-mint-progress b { min-width: 54px; font: 24px var(--display); color: var(--grass-dark); }
.leaf-mint > p { margin: 6px 0 0; font-size: 17px; }
.leaf-mint .mint-left { font: 700 19px var(--hand); }
.leaf-mint .mint-split { justify-content: flex-start; margin: 5px 0 0; }
.leaf-mint .mint-status { font-size: 14px; margin: 5px 0 0; }
.leaf-mint .mint-status::before { content: ""; }
.leaf-mint progress { height: 12px; }


.intro {
  position: absolute; z-index: 3;
  top: clamp(80px, 14vh, 140px); left: clamp(16px, 5vw, 72px);
  max-width: var(--intro-w);
}
.intro h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(26px, min(5vw, 7.5vh), 64px); line-height: 1.02; margin: 0;
  color: var(--ink);
}
.intro h1 em { font-style: normal; color: var(--grass-dark); display: inline-block; animation: wobble 3.5s ease-in-out infinite; }
@keyframes wobble { 50% { transform: rotate(-4deg) translateY(-3px); } }
.hint { font-family: var(--hand); font-size: clamp(19px, min(2.2vw, 3.4vh), 28px); color: var(--bark); margin: 14px 0 0; position: relative; opacity: 0; animation: fadeIn 0.8s ease 3.6s forwards; }
.arrow { position: absolute; width: 110px; left: 60%; top: 34px; fill: none; stroke: var(--bark); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@keyframes fadeIn { to { opacity: 1; } }
.intro { transition: opacity 0.3s; }
.leaf-open .intro { opacity: 0.15; }

/* ---------- tree stage ---------- */
.stage {
  position: relative; z-index: 2;
  /* as big as the screen height allows; slides right if the headline would cover the left branches */
  --w: min(100vw, 1000px, calc((100vh - 30px) * 1.111));
  --w: min(100vw, 1000px, calc((100svh - 30px) * 1.111));
  width: var(--w);
  margin: auto max(0px, min(calc((100vw - var(--w)) / 2), calc(100vw - var(--w) * 0.88 - var(--intro-w) - 5vw))) 0 auto;
  aspect-ratio: 1000 / 900;
}
#tree { display: block; width: 100%; height: 100%; overflow: visible; }

.hill { fill: var(--grass); }
.trunk { fill: var(--bark); transform-box: fill-box; transform-origin: 50% 100%; animation: growUp 1.3s cubic-bezier(.3, 1.2, .5, 1) both; }
.trunk-shade { fill: #4a2f1c; transform-box: fill-box; transform-origin: 50% 100%; animation: growUp 1.3s cubic-bezier(.3, 1.2, .5, 1) both; }
@keyframes growUp { from { transform: scaleY(0); } }

.branch, .ext { fill: none; stroke: var(--bark); stroke-linecap: round; stroke-dasharray: 1 2; stroke-dashoffset: 1.01; }
.branch { animation: draw 0.9s ease-out forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }

.deco { transform-box: fill-box; transform-origin: 0% 50%; animation: pop 0.5s cubic-bezier(.3, 1.6, .5, 1) both; }
.deco-in { animation: pop 0.45s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes pop { from { transform: scale(0); } }

.bud { cursor: pointer; outline: none; }
.bud-shape { transform-box: fill-box; transform-origin: 50% 100%; animation: pop 0.6s cubic-bezier(.3, 1.8, .5, 1) both, pulse 2.2s ease-in-out infinite; stroke: var(--ink); stroke-width: 3; }
.bud:hover .bud-shape, .bud:focus-visible .bud-shape { filter: brightness(1.08); }
.bud:hover .bud-ring, .bud:focus-visible .bud-ring { opacity: 1; }
.bud-ring { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 5 6; opacity: 0; }
@keyframes pulse { 50% { transform: scale(1.1) rotate(4deg); } }
.bud-label {
  font-family: var(--hand); font-weight: 700; font-size: 30px; fill: var(--ink);
  opacity: 0; animation: fadeIn 0.6s ease forwards; pointer-events: none;
}
.bud.open .bud-shape { opacity: 0; transform: scale(0); transition: all 0.25s; animation: none; }
.bud.seen .bud-label { fill: #7a5a3f; }

/* falling leaves */
.falling { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.fall { position: absolute; width: 30px; height: 18px; margin: -9px 0 0 -15px; }
.fall svg { width: 100%; height: 100%; display: block; }

.grass {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px; z-index: 1;
  background:
    radial-gradient(14px 18px at 10px 0, transparent 60%, var(--grass) 62%) 0 0 / 22px 26px repeat-x,
    var(--grass);
  border-bottom: 6px solid var(--grass-dark);
}

/* ---------- the leaf card ---------- */
.leaf {
  --tint: #a7d96b;
  position: absolute; z-index: 20;
  width: min(340px, calc(100vw - 32px));
  padding: 34px 38px 38px;
  background:
    linear-gradient(var(--angle, 135deg), transparent calc(50% - 1.5px), rgba(43, 29, 18, 0.18) calc(50% - 1.5px), rgba(43, 29, 18, 0.18) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    var(--tint);
  border: 3px solid var(--ink);
  border-radius: 6px 150px 6px 150px;
  box-shadow: 8px 10px 0 rgba(43, 29, 18, 0.22);
  transform-origin: var(--origin, 0% 100%);
  animation: unfurl 0.6s cubic-bezier(.25, 1.5, .45, 1) both;
}
.leaf.right { border-radius: 150px 6px 150px 6px; }
.leaf.closing { animation: furl 0.28s ease-in forwards; }
@keyframes unfurl {
  0% { transform: scale(0.05) rotate(var(--spin, -50deg)); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
@keyframes furl { to { transform: scale(0.05) rotate(var(--spin, -50deg)); opacity: 0; } }
.leaf > * { position: relative; animation: fadeIn 0.3s ease 0.35s both; opacity: 0; }
.leaf h2 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.05; margin: 10px 0 8px; }
.leaf p { font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
.leaf ul { margin: 0; padding-left: 20px; font-size: 18px; line-height: 1.35; }
.leaf ul:empty { display: none; }
.leaf-action {
  display: inline-block; margin-top: 14px; padding: 7px 12px;
  border: 2px solid var(--ink); border-radius: 6px; background: var(--grass-dark);
  color: var(--cream); font: 700 19px var(--hand); text-decoration: none;
}
.leaf-action:hover { background: #3f7d2b; }
.leaf-stamp {
  display: inline-block; font-family: var(--hand); font-weight: 700; font-size: 19px;
  color: #b42318; border: 2px solid #b42318; border-radius: 6px; padding: 0 8px; transform: rotate(-4deg);
  background: rgba(255, 250, 240, 0.55);
}
.leaf-close {
  position: absolute; top: 10px; right: 14px; z-index: 1;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid var(--ink); background: var(--cream); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.leaf.right .leaf-close { right: auto; left: 14px; }
.leaf.right .leaf-stamp { margin-left: 34px; }
.leaf.left .leaf-stamp { margin-right: 34px; }

/* ---------- soil ---------- */
.soil {
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0 3px, transparent 4px) 0 0 / 60px 60px,
    radial-gradient(circle at 70% 80%, rgba(0, 0, 0, 0.12) 0 4px, transparent 5px) 0 0 / 90px 80px,
    var(--soil);
  color: var(--cream);
  text-align: center;
  padding-bottom: 60px;
}
.roots { display: block; width: 100%; height: 180px; transition: transform 0.3s ease; fill: none; stroke: var(--soil-dark); stroke-width: 10; stroke-linecap: round; }
.soil-inner { max-width: 640px; margin: -40px auto 0; padding: 0 16px; position: relative; }
.soil h2 { font-family: var(--hand); font-weight: 700; font-size: 48px; margin: 0; color: #ffe8b8; }
.soil p { font-size: 21px; margin: 6px 0 22px; color: #f1dcc0; }
.pebbles { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.pebble {
  font-family: var(--display); font-size: 20px; text-decoration: none;
  color: var(--ink); background: #e9dccb;
  padding: 12px 22px; border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
  border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--soil-dark);
  transition: transform 0.15s;
}
.pebble:hover { transform: translateY(-3px) rotate(-3deg); }
.pebble:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--soil-dark); }
.pebble.soon::after { content: " · soon"; font-family: var(--hand); font-size: 18px; color: #7a5a3f; }
.ca { font-size: 18px !important; margin-top: 26px !important; }
.ca code { font-family: var(--hand); font-size: 22px; color: #ffe8b8; word-break: break-all; }
.fine { font-size: 15px !important; color: #c9ad8c !important; max-width: 480px; margin: 30px auto 0 !important; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 40;
  transform: translateX(-50%);
  font-family: var(--hand); font-weight: 700; font-size: 24px;
  background: var(--cream); border: 3px solid var(--ink); border-radius: 14px;
  padding: 6px 18px; box-shadow: 4px 5px 0 rgba(43, 29, 18, 0.25);
  animation: fadeIn 0.2s ease;
}

/* ---------- road to the mint (in the soil) ---------- */
.mint { position: relative; max-width: 760px; margin: -10px auto 70px; padding: 0 16px; text-align: center; }
.mint h2 { font-family: var(--hand); font-weight: 700; font-size: 48px; margin: 0; color: #ffe8b8; }
.mint-lead { font-size: 21px; margin: 6px 0 18px; color: #f1dcc0; }
.mint-meter { position: relative; width: min(280px, 72vw); aspect-ratio: 1; margin: 0 auto; }
.mint-meter svg { width: 100%; height: 100%; display: block; }
.ring-track { fill: #6b4a32; stroke: var(--soil-dark); stroke-width: 22; }
.ring-grain { fill: none; stroke: #7d5a3e; stroke-width: 2.5; }
.ring-fill { fill: none; stroke: #ffc23d; stroke-width: 16; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.3, .9, .3, 1); filter: drop-shadow(0 0 6px rgba(255, 194, 61, 0.55)); }
.mint-meter.open .ring-fill { stroke: #8fe36a; filter: drop-shadow(0 0 8px rgba(143, 227, 106, 0.7)); }
.mint-num { position: absolute; inset: 0; display: grid; place-content: center; gap: 2px; padding: 0 22%; }
.mint-num b { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 11vw, 64px); line-height: 1; color: var(--cream); }
.mint-num span { font-size: 15px; color: #f1dcc0; line-height: 1.2; }
.mint-left { font-family: var(--hand); font-weight: 700; font-size: 28px; color: #ffe8b8; margin: 14px 0 34px; }
.mint h3 { font-family: var(--hand); font-weight: 700; font-size: 36px; color: #ffe8b8; margin: 0 0 10px; }
.mint-left { margin-bottom: 8px; }
.mint-split { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: 17px; color: #f1dcc0; margin: 0 0 34px; }
.mint-status { font-size: 15px; color: #c9ad8c; margin: 12px 0 0; }
.mint.is-preview .mint-status::before { content: "● "; color: #ffc23d; }

/* ---------- phones ---------- */
/* portrait screens: headline on top, tree below with a tighter crop (matches TALL in app.js) */
@media (max-aspect-ratio: 1/1), (max-width: 700px) {
  .top { position: fixed; }
  .intro { position: relative; top: auto; left: auto; max-width: none; padding: clamp(14px, 3vh, 40px) clamp(16px, 5vw, 56px) 0; }
  .intro h1 { font-size: clamp(32px, 7.5vw, 76px); }
  .hint { font-size: clamp(20px, 3.4vw, 30px); display: inline-block; }
  .arrow { left: auto; right: -60px; top: 22px; width: 60px; transform: rotate(25deg); }
  .stage {
    --w: min(100vw, 1000px, calc((100vh - 30px) * 1.0127));
    --w: min(100vw, 1000px, calc((100svh - 30px) * 1.0127));
    margin: auto auto 0;
    aspect-ratio: 800 / 790;
  }
  .bud-label { font-size: 36px; }
  .sun { width: clamp(64px, 11vw, 110px); height: clamp(64px, 11vw, 110px); top: 70px; right: 6%; }
}

/* short landscape screens (phones on their side): bigger labels */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .bud-label { font-size: 46px; }
}

/* phones: no tall empty sky, leaf opens as a bottom sheet */
@media (max-width: 700px) {
  .top { align-items: center; flex-wrap: nowrap; gap: 8px; }
  .top-actions { width: auto; min-width: 0; flex: 0 1 auto; justify-content: flex-end; gap: 8px; }
  .mint-peek { grid-template-columns: auto 56px auto; gap: 5px; }
  .mint-peek-label { font-size: 14px; }
  .mint-peek b { font-size: 17px; }
  .sky { min-height: 0; padding-top: 64px; }
  .stage { margin-top: 12px; }
  /* phones: the leaf sits on top, just under the header, and unfolds downward */
  .leaf {
    position: fixed; left: 16px !important; right: 16px; top: 64px !important; bottom: auto;
    width: auto; max-height: calc(100dvh - 80px); overflow-y: auto;
    padding: 28px 24px; border-radius: 6px 90px 6px 90px;
    --origin: 50% 0%;
  }
  .leaf.right { border-radius: 90px 6px 90px 6px; }
}
@media (max-width: 340px) {
  .logo { font-size: 24px; }
  .mint-peek { grid-template-columns: auto 40px auto; gap: 4px; }
  .mint-peek-label { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- docs page ---------- */
.docs-body { margin: 0; background: #fff6e4; color: var(--ink); font-size: 19px; line-height: 1.55; }
.docs-top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 42px);
  background: rgba(255, 246, 228, 0.92); backdrop-filter: blur(6px); border-bottom: 2px solid #ead9bd;
}
.docs-logo { font: 34px var(--display); color: var(--bark); text-decoration: none; }
.docs-nav { display: flex; gap: 20px; }
.docs-nav a { font: 700 21px var(--hand); color: var(--ink); text-decoration: none; border-bottom: 2px solid currentColor; }
.docs-nav a:hover { color: var(--grass-dark); }
.docs-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; max-width: 1100px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 42px) 80px; }
.docs-toc { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 6px; }
.docs-toc-title { margin: 0 0 4px; font: 700 22px var(--hand); color: var(--grass-dark); }
.docs-toc a { color: #6b5440; text-decoration: none; font-size: 17px; }
.docs-toc a:hover { color: var(--ink); text-decoration: underline; }
.docs { max-width: 720px; }
.docs-kicker { margin: 0; font: 700 22px var(--hand); color: var(--grass-dark); }
.docs h1 { margin: 0 0 10px; font: 52px/1.05 var(--display); color: var(--bark); }
.docs-lead { font-size: 22px; margin: 0 0 16px; }
.docs section { scroll-margin-top: 90px; padding-top: 18px; margin-top: 18px; border-top: 2px dashed #ead9bd; }
.docs h2 { font: 32px var(--display); color: var(--bark); margin: 0 0 8px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.docs a { color: #2f7d36; }
.docs ul, .docs ol { padding-left: 24px; }
.docs li { margin: 4px 0; }
.docs-small { font-size: 16px; color: #6b5440; }
.tag { font: 700 16px var(--hand); padding: 1px 10px; border-radius: 999px; border: 2px solid; vertical-align: middle; }
.tag.soon { color: #9a5b12; border-color: #e3b56e; background: #fff1d6; }
.docs-formula { font: 24px var(--display); color: var(--bark); background: #fff; border: 2px solid #ead9bd; border-radius: 12px; padding: 12px 16px; text-align: center; }
.docs-meter { background: #fff; border: 2px solid #ead9bd; border-radius: 14px; padding: 14px 18px; margin: 12px 0; }
.docs-meter-count { margin: 0 0 8px; }
.docs-meter-count b { font: 30px var(--display); font-weight: 400; color: var(--bark); }
.docs-meter-count small { font-size: 17px; color: #6b5440; }
.docs-meter .mint-progress { width: 100%; height: 14px; }
.docs-table-wrap { overflow-x: auto; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 17px; margin: 8px 0; background: #fff; border-radius: 12px; overflow: hidden; }
.docs-table.narrow { max-width: 420px; }
.docs-table th, .docs-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #f0e2c8; }
.docs-table th { background: #f6e7c8; font-weight: 400; color: #6b5440; }
.docs-steps li.done::marker { color: var(--grass-dark); }
.docs-end { margin-top: 36px; font: 700 24px var(--hand); color: var(--bark); }
@media (max-width: 860px) {
  .docs-wrap { grid-template-columns: 1fr; gap: 0; }
  .docs-toc { display: none; }
  .docs h1 { font-size: 40px; }
  .docs h2 { font-size: 27px; }
}

/* support */
.pebble-support { background: #ffe9a8; }
.docs-support-btn {
  display: inline-block; font: 20px var(--display); color: var(--ink) !important; text-decoration: none;
  background: #ffe9a8; border: 3px solid var(--ink); border-radius: 14px; padding: 10px 20px;
  box-shadow: 0 4px 0 #d6b45c;
}
.docs-support-btn:hover { transform: translateY(-2px); }
.docs-support-btn.soon::after, .docs-support.soon::after { content: " · soon"; font: 700 16px var(--hand); color: #8a6a3a; }

/* ---------- mint page: the nursery ---------- */
.nursery { max-width: 1100px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 42px) 80px; }
.nursery h2 { font: 36px var(--display); color: var(--bark); margin: 0 0 6px; }
.nursery-hero { position: relative; text-align: center; }
.nursery-hero h1 { font: clamp(44px, 7vw, 76px)/1 var(--display); color: var(--bark); margin: 4px 0 10px; }
.soon-stamp {
  display: inline-block; font: 700 30px var(--hand); color: #c2410c; border: 4px solid #c2410c; border-radius: 10px;
  padding: 0 14px; transform: rotate(-5deg); background: rgba(255, 250, 240, .7); margin-bottom: 18px;
}
.road { max-width: 720px; margin: 0 auto; background: #fff; border: 3px solid var(--ink); border-radius: 22px; padding: 18px 24px 16px; box-shadow: 0 8px 0 #ead9bd; }
.road-top { display: flex; justify-content: space-between; align-items: baseline; font: 700 26px var(--hand); }
.road-top b { font: 34px var(--display); font-weight: 400; color: var(--grass-dark); }
.road-bar { position: relative; height: 30px; margin: 8px 0 12px; border-radius: 99px; background: #f3e6cc; border: 3px solid var(--ink); }
.road-bar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; transition: width 1.4s cubic-bezier(.3,.9,.3,1);
  background: repeating-linear-gradient(-45deg, #6dbb47 0 14px, #5aa83a 14px 28px); animation: roadstripes 1.2s linear infinite; }
@keyframes roadstripes { to { background-position: 40px 0; } }
.road-sprout { position: absolute; top: -26px; left: 0; font-size: 34px; transform: translateX(-50%); transition: left 1.4s cubic-bezier(.3,.9,.3,1); animation: hop 1.4s ease-in-out infinite; }
@keyframes hop { 50% { transform: translateX(-50%) translateY(-6px); } }
.road-count { margin: 0; font-size: 20px; }
.road-count b { font: 26px var(--display); font-weight: 400; color: var(--bark); }
.road-left { margin: 2px 0 0; font: 700 22px var(--hand); color: #7a2a12; }

.lineup { margin-top: 44px; }
.lineup-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; }
.lineup-head p { margin: 0; font-size: 19px; }
.belt-wrap { position: relative; display: flex; align-items: stretch; margin-top: 14px; border: 3px solid var(--ink); border-radius: 24px; overflow: hidden; }
.belt { position: relative; flex: 1; overflow: hidden; padding: 22px 0 40px;
  background: linear-gradient(180deg, #cdeafd 0%, #eaf6ff 66%, #7cc25a 66%, #5aa83a 100%); }
.belt::after { content: ""; position: absolute; left: 0; right: 0; bottom: 14px; height: 16px;
  background: repeating-linear-gradient(90deg, #3d2817 0 22px, #5b3a24 22px 44px); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  animation: beltmove 1s linear infinite; }
@keyframes beltmove { to { background-position: 44px 0; } }
.belt-track { display: flex; gap: 14px; width: max-content; padding-left: 14px; animation: march 70s linear infinite; }
.belt:hover .belt-track { animation-play-state: paused; }
@keyframes march { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.pot { position: relative; width: 118px; padding: 0; border: 0; background: none; cursor: pointer; font-family: inherit; }
.pot-art { display: block; width: 118px; height: 150px; transition: transform .2s; }
.pot-art svg { width: 100%; height: 100%; display: block; }
.pot:hover .pot-art { animation: wiggle .5s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.pot-q { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); font: 44px var(--display); color: #fff;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateX(-50%) translateY(-5px); } }
.pot-no { display: block; margin-top: 2px; font: 15px var(--display); color: #fff6e4; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.pot.open.rare .pot-art { filter: drop-shadow(0 0 10px #7fd6f2); }
.pot.open.legendary .pot-art { filter: drop-shadow(0 0 14px #ffd54a); animation: shimmer 2s ease-in-out infinite; }
@keyframes shimmer { 50% { filter: drop-shadow(0 0 22px #ffe57a); } }

.gate { flex: none; width: 190px; display: grid; place-items: center; background: linear-gradient(180deg, #5b3a24, #3d2817); border-left: 3px solid var(--ink); }
.gate-arch { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #ffe8b8; text-align: center; }
.gate-lock { font-size: 34px; animation: bob2 2s ease-in-out infinite; }
@keyframes bob2 { 50% { transform: translateY(-4px); } }
.gate-btn { font: 34px var(--display); color: #8a7a62; background: #d9ccb4; border: 4px solid var(--ink); border-radius: 18px; padding: 10px 22px;
  box-shadow: 0 6px 0 #1a0f08; cursor: not-allowed; }
.gate-arch small { font: 700 20px var(--hand); }
.mint-open .gate-btn { color: var(--ink); background: #ffc23d; cursor: pointer; animation: pulse-gate 1.2s ease-in-out infinite; }
.mint-open .gate-lock { display: none; }
@keyframes pulse-gate { 50% { transform: scale(1.06); } }

.peek-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.peek-stats div { background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 10px; text-align: center; }
.peek-stats b { display: block; font: 34px var(--display); font-weight: 400; color: var(--bark); }
.peek-stats span { font-size: 16px; color: #6b5440; }

.peek-card { position: fixed; z-index: 40; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100vw - 32px));
  background: #fff6e4; border: 4px solid var(--ink); border-radius: 28px; padding: 22px 24px; text-align: center;
  box-shadow: 0 16px 0 rgba(43,29,18,.2), 0 30px 60px rgba(0,0,0,.25); animation: peekpop .45s cubic-bezier(.2,1.5,.4,1); }
@keyframes peekpop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }
.peek-card.rare { background: #e9f8ff; }
.peek-card.legendary { background: linear-gradient(160deg, #fff4c4, #ffd76a); }
.peek-art { width: 170px; height: 210px; margin: 0 auto; }
.peek-art svg { width: 100%; height: 100%; }
.peek-no { margin: 4px 0 0; font: 700 22px var(--hand); color: #6b5440; }
.peek-card h3 { font: 44px var(--display); margin: 0; color: var(--bark); }
.peek-card.rare h3 { color: #1f6f8b; }
.peek-card.legendary h3 { color: #a35d00; }
.peek-card p { margin: 4px 0 0; font-size: 18px; }
.peek-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.burst { position: fixed; z-index: 50; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; pointer-events: none; }

.tiers-row, .waves-row { margin-top: 48px; }
.tier-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 10px; }
.tier-card { background: #fff; border: 3px solid var(--ink); border-radius: 22px; padding: 14px; text-align: center; }
.tier-card.rare { background: #eef9ff; }
.tier-card.legendary { background: linear-gradient(160deg, #fff6d0, #ffe28a); }
.tier-art { width: 120px; height: 150px; margin: 0 auto; }
.tier-art svg { width: 100%; height: 100%; }
.tier-card h3 { font: 30px var(--display); margin: 4px 0 0; color: var(--bark); }
.tier-card p { margin: 0; font-size: 18px; }
.tier-bonus { font: 700 22px var(--hand) !important; color: var(--grass-dark); }
.waves-sub { margin: 0 0 12px; font-size: 18px; }
.waves { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.wave { background: #fff; border: 3px solid #d8c6a6; border-radius: 16px; padding: 12px; text-align: center; color: #8a7a62; }
.wave b { display: block; font: 24px var(--display); font-weight: 400; }
.wave span { display: block; font-size: 15px; }
.wave em { font: 700 19px var(--hand); font-style: normal; }
.wave.next { border-color: var(--ink); color: var(--ink); background: #e9f7dc; animation: bob2 2.4s ease-in-out infinite; }
.wave.next em { color: var(--grass-dark); }
.nursery-end { margin-top: 40px; text-align: center; font: 700 26px var(--hand); color: var(--bark); }
.nursery-end a { color: #2f7d36; }
@media (max-width: 760px) {
  .belt-wrap { flex-direction: column; }
  .gate { width: auto; padding: 14px; border-left: 0; border-top: 3px solid var(--ink); }
  .gate-arch { flex-direction: row; }
  .tier-cards { grid-template-columns: 1fr; }
  .waves { grid-template-columns: repeat(2, 1fr); }
  .peek-stats span { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .belt-track { animation: none; } }

a.mint-peek { color: inherit; text-decoration: none; cursor: pointer; }
a.mint-peek:hover .mint-peek-label { text-decoration: underline; }

/* phones: messages pop up in the middle of the screen, big enough to read */
@media (max-width: 700px) {
  .toast {
    top: 50%; bottom: auto; transform: translate(-50%, -50%);
    width: calc(100vw - 40px); text-align: center;
    font-size: 26px; line-height: 1.25; padding: 16px 20px; z-index: 60;
    box-shadow: 0 10px 0 rgba(43, 29, 18, 0.2), 0 20px 50px rgba(0, 0, 0, 0.25);
  }
}

/* ---------- two forests ---------- */
:root { --sol: #9b6bff; --hood: #6fcf3a; }
.split-bar { display: inline-flex; width: 56px; height: 12px; border-radius: 99px; overflow: hidden; background: rgba(43,29,18,.15); vertical-align: middle; }
.split-bar i { display: block; height: 100%; width: 0; transition: width 1.2s cubic-bezier(.3,.9,.3,1); }
.split-bar i.sol, .road-fill i.sol { background: var(--sol); }
.split-bar i.hood, .road-fill i.hood { background: var(--hood); }
.split-bar.big { width: 100%; height: 16px; margin: 4px 0 6px; border: 2px solid var(--ink); }
.road-fill { position: absolute; inset: 0; display: flex; border-radius: 99px; overflow: hidden; }
.road-fill i { height: 100%; width: 0; transition: width 1.4s cubic-bezier(.3,.9,.3,1);
  background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.18) 0 14px, transparent 14px 28px) !important; background-color: inherit; }
.road-fill i.sol { background-color: var(--sol); }
.road-fill i.hood { background-color: var(--hood); }
.hero-sub { margin: 0 0 8px; font: 700 28px var(--hand); color: #6b5440; }
.forests { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; max-width: 720px; margin: 22px auto 0; }
.forest { position: relative; background: #fff; border: 3px solid var(--ink); border-radius: 20px; padding: 14px 12px 12px; text-align: center; transition: transform .3s; }
.forest.sol { background: #f3ecff; } .forest.hood { background: #edfbe3; }
.forest h3 { margin: 4px 0 0; font: 26px var(--display); color: var(--bark); }
.forest-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--ink); }
.forest.sol .forest-dot { background: var(--sol); } .forest.hood .forest-dot { background: var(--hood); }
.forest-where { margin: 0; font-size: 17px; color: #6b5440; }
.forest-num { margin: 4px 0 0; font-size: 17px; }
.forest-num b { font: 24px var(--display); font-weight: 400; color: var(--ink); }
.forest .crown { position: absolute; top: -26px; left: 50%; transform: translateX(-50%) scale(0); font-size: 36px; transition: transform .4s cubic-bezier(.2,1.6,.4,1); }
.forest.leading { transform: translateY(-4px); box-shadow: 0 8px 0 #ead9bd; }
.forest.leading .crown { transform: translateX(-50%) scale(1); animation: bob2 2s ease-in-out infinite; }
.vs { font: 34px var(--display); color: #c2410c; transform: rotate(-8deg); }
.forest-leader { margin: 14px 0 0; text-align: center; font: 700 26px var(--hand); color: var(--bark); }
.forest-bonus { margin: 2px auto 0; max-width: 640px; text-align: center; font-size: 17px; color: #6b5440; }
.pot-forest { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; border: 2px solid #fff; vertical-align: 0; }
.pot-forest.sol { background: var(--sol); } .pot-forest.hood { background: var(--hood); }
.peek-forest.sol { color: #6b3fd6; } .peek-forest.hood { color: #3e8f1c; }
.split-note { margin-top: 12px !important; text-align: center; }
.docs-forests { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.docs-forest { border: 2px solid var(--ink); border-radius: 14px; padding: 10px 14px; }
.docs-forest b:first-child { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; }
.docs-forest.sol { background: #f3ecff; } .docs-forest.hood { background: #edfbe3; }
.docs-h3 { font: 24px var(--display); color: var(--bark); margin: 16px 0 4px; }
@media (max-width: 760px) {
  .forests { grid-template-columns: 1fr; }
  .vs { margin: -4px auto; }
  .docs-forests { grid-template-columns: 1fr; }
}

/* ---------- sound toggle ---------- */
#soundToggle {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 700 18px var(--hand); color: var(--ink); cursor: pointer;
  background: #fff6e4; border: 2.5px solid var(--ink); border-radius: 999px; padding: 3px 12px 3px 9px;
  box-shadow: 0 3px 0 rgba(43,29,18,.25);
}
#soundToggle span { font-size: 15px; }
#soundToggle:hover { transform: translateY(-1px); }
#soundToggle:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(43,29,18,.25); }
#soundToggle.off { background: #e9dfcc; color: #6b5440; }
#soundToggle.floating { position: fixed; left: 14px; bottom: 14px; z-index: 70; }
#soundToggle .sound-label { font: inherit; }
@media (max-width: 700px) {
  #soundToggle { font-size: 15px; padding: 2px 9px 2px 7px; }
  .top-actions #soundToggle { padding: 4px 7px; }
  .top-actions #soundToggle .sound-label { display: none; }   /* tight home header on phones: icon only */
}

.forest-num.pending b { font-size: 20px; color: #8a7a62; }
.forest-num.pending .bought-word { display: none; }
