/* DejaVu Sans Bold keeps a clean two-story lowercase a, matching Sound Train and Rocket Mail. */
@font-face { font-family: "Letters"; src: url("fonts/DejaVuSans-Bold.ttf"); font-weight: bold; }

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #10182c;
  touch-action: none;
  overscroll-behavior: none;
}

:root {
  --ink: #2a344c;
  --red: #e84b4c;
  --pink: #ff8fb3;
  --gold: #ffe066;
  --green: #4ec862;
  --sky: #8fd6ff;
  --mud: #8a5630;
  --cream: #fffdf5;
  --blue: #3a86e8;
}

/* Fixed 1280x800 stage (16:10, matching Galaxy Tab S9), scaled smoothly by game.js. */
#stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 1280px;
  height: 800px;
  overflow: hidden;
  transform-origin: 0 0;
  font-family: "Letters", Verdana, sans-serif;
  color: var(--ink);
}
#stage > div, #stage > button { position: absolute; }

/* ---- Gameplay sunny countryside backdrop ---- */
#sky { inset: 0; background: linear-gradient(#84d0ff, #d9f3ff 62%); }
#sun {
  position: absolute;
  right: 92px;
  top: 34px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #ffd84a;
  box-shadow: 0 0 0 14px #ffd84a44;
}
.cloud {
  position: absolute;
  width: 165px;
  height: 52px;
  border-radius: 30px;
  background: #fff;
  opacity: .92;
  animation: drift 56s linear infinite alternate;
}
.cloud::before {
  content: "";
  position: absolute;
  left: 28px;
  top: -26px;
  width: 68px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
}
.cloud::after {
  content: "";
  position: absolute;
  left: 78px;
  top: -16px;
  width: 54px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
}
@keyframes drift { to { margin-left: 110px; } }

#hills {
  left: 0;
  right: 0;
  top: 340px;
  height: 240px;
  background:
    radial-gradient(ellipse 470px 200px at 220px 240px, #98dc85 99%, transparent 100%),
    radial-gradient(ellipse 560px 175px at 780px 240px, #85d178 99%, transparent 100%),
    radial-gradient(ellipse 360px 140px at 1220px 240px, #98dc85 99%, transparent 100%);
}
#meadow {
  left: 0;
  right: 0;
  top: 525px;
  bottom: 0;
  background: linear-gradient(#7ecc6d, #5db35a);
}

#world { inset: 0; z-index: 2; }
#world > * { position: absolute; }

/* ---- Shared controls ---- */
.round {
  border: 6px solid var(--ink);
  border-radius: 50%;
  font-family: inherit;
  color: var(--ink);
  padding: 0;
  cursor: pointer;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 7px 0 #2a344c26;
}
.round:active { transform: scale(.94); }

#home {
  left: 20px;
  top: 18px;
  width: 82px;
  height: 82px;
  background: #fff;
  font-size: 38px;
  z-index: 12;
}
#replay {
  right: 20px;
  top: 18px;
  width: 82px;
  height: 82px;
  background: #fff8d6;
  font-size: 38px;
  z-index: 12;
}
#next {
  right: 34px;
  bottom: 30px;
  width: 136px;
  height: 136px;
  background: var(--green);
  color: #fff;
  font-size: 68px;
  padding-left: 10px;
  z-index: 14;
  display: none;
  animation: pulse 1s ease-in-out infinite alternate;
}
@keyframes pulse { to { transform: scale(1.1); } }

#beads {
  left: 50%;
  top: 32px;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  padding: 10px 20px;
  background: #ffffffbf;
  border: 4px solid var(--ink);
  border-radius: 999px;
  z-index: 11;
}
.bead {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5edf5;
  border: 3.5px solid var(--ink);
  transition: background .3s, transform .3s;
}
.bead.done { background: var(--gold); }
.bead.now { background: var(--pink); transform: scale(1.22); }

#hint {
  left: 0;
  top: 0;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: #ffffffd6;
  border: 6px solid var(--ink);
  opacity: 0;
  pointer-events: none;
  z-index: 15;
}

/* ---- Screens ---- */
.screen { inset: 0; display: none; z-index: 20; }
.screen.on { display: block; }

/* ---- Start Splash ---- */
#start { background: var(--sky); z-index: 35; }
#start.on { display: flex; align-items: center; justify-content: center; }
#start-bg, #map-bg, #finale-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
#start-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffffde;
  border: 7px solid var(--ink);
  border-radius: 44px;
  padding: 26px 54px 32px;
  box-shadow: 0 16px 0 #2a344c30;
}
#start-cast {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  height: 235px;
}
#start-cast img { object-fit: contain; filter: drop-shadow(0 6px 0 #2a344c1c); }
.cast-tall { height: 225px; }
.cast-kid { height: 180px; animation: bob 2.2s ease-in-out infinite alternate; }
.cast-small { height: 158px; animation: bob 2.2s ease-in-out .4s infinite alternate; }
@keyframes bob { to { transform: translateY(-10px); } }
#start-title {
  font-size: 74px;
  color: var(--red);
  -webkit-text-stroke: 2.5px var(--ink);
  margin: 8px 0 18px;
  letter-spacing: 1px;
}
#play-btn {
  width: 144px;
  height: 144px;
  background: var(--green);
  color: #fff;
  font-size: 72px;
  padding-left: 12px;
  animation: pulse 1s ease-in-out infinite alternate;
}

/* ---- Village Map ---- */
#map-header {
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 3;
}
#map-header h1 {
  margin: 0;
  padding: 6px 34px 10px;
  background: #fffdf5ee;
  border: 6px solid var(--ink);
  border-radius: 999px;
  font-size: 54px;
  color: var(--red);
  -webkit-text-stroke: 2px var(--ink);
  box-shadow: 0 6px 0 #2a344c24;
}
.header-pig {
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 4px 0 #2a344c22);
}
#gear {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 64px;
  height: 64px;
  background: #ffffffcc;
  font-size: 30px;
  border-width: 4px;
  opacity: .75;
  z-index: 6;
}
#gear.holding {
  background: conic-gradient(var(--green) var(--p, 0%), #fff 0);
  opacity: 1;
}

#stations {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 118px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 3;
}
.map-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex: 1;
}
.station {
  flex: 1;
  max-width: 590px;
  background: #fffdf5e8;
  border: 6px solid var(--ink);
  border-radius: 34px;
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 0 #2a344c24;
}
.st-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.st-art {
  width: 112px;
  height: 112px;
  flex: none;
  border-radius: 26px;
  background: var(--tint, #eaf7ff);
  border: 4px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
}
.st-art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.st-info { flex: 1; min-width: 0; }
.st-title { font-size: 28px; line-height: 1.15; color: var(--ink); }
.st-sub { font-size: 16px; color: #54627c; margin-top: 4px; font-family: Helvetica, Arial, sans-serif; font-weight: bold; }
.st-stops {
  display: flex;
  justify-content: space-evenly;
  gap: 12px;
  margin-top: 8px;
}
.stop-btn {
  flex: 1;
  max-width: 152px;
  height: 92px;
  border: 5px solid var(--ink);
  border-radius: 26px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 6px 0 #2a344c20;
  position: relative;
  touch-action: none;
}
.stop-btn:active { transform: translateY(3px); }
.stop-btn.been { background: #fff09e; }
.stop-btn.been::after {
  content: "★";
  position: absolute;
  right: 8px;
  top: 2px;
  font-size: 22px;
  color: #e69500;
}
.stop-badge { font-size: 30px; line-height: 1.05; }
.stop-icon { width: 34px; height: 34px; }
.stop-icon svg { width: 100%; height: 100%; }

/* ---- Characters & Animations ---- */
.char {
  position: absolute;
  object-fit: contain;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 8px 0 #2a344c1e);
  transform-origin: 50% 100%;
}
/* The picture inside a character box breathes gently, with its feet on the ground. */
.char-img {
  display: block;
  pointer-events: none;
  transform-origin: 50% 100%;
  animation: breathe 2.4s ease-in-out infinite alternate;
}
@keyframes breathe { to { transform: scale(.985, 1.02); } }

.particle { width: 42px; height: 42px; pointer-events: none; z-index: 16; }
.particle svg { width: 100%; height: 100%; }

/* ---- Mode 1: Muddy Puddle Jumps ---- */
.stop-post {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.stop-sign {
  width: 148px;
  height: 148px;
  border-radius: 32px;
  background: #fffdf5;
  border: 10px solid var(--red);
  box-shadow: 0 0 0 5px var(--ink), 0 10px 0 #2a344c26;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.stop-sign .num { font-size: 94px; line-height: 1; color: var(--ink); }
.stop-pole {
  width: 22px;
  height: 76px;
  background: #b67e48;
  border: 5px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.puddle-slot {
  width: 120px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.puddle-slot svg { width: 116px; height: 74px; pointer-events: none; }
.puddle-slot.next-puddle svg {
  filter: drop-shadow(0 0 10px #ffe066) drop-shadow(0 0 4px #4ec862);
  animation: puddlePulse .85s ease-in-out infinite alternate;
}
@keyframes puddlePulse { to { transform: scale(1.09); } }

.action-btn {
  border: 7px solid var(--ink);
  border-radius: 36px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: 0 9px 0 #2a344c2c;
  touch-action: none;
}
.action-btn:active { transform: translateY(4px); }
.jump-btn {
  width: 260px;
  height: 112px;
  background: #a4683a;
  color: #fff;
  font-size: 40px;
}
.stop-btn-big {
  width: 248px;
  height: 118px;
  background: var(--red);
  color: #fff;
  font-size: 42px;
}
.stop-btn-big svg { width: 58px; height: 58px; }
.stop-btn-big.glow { animation: pulse .8s ease-in-out infinite alternate; box-shadow: 0 0 0 10px #ffe06699, 0 9px 0 #2a344c2c; }

/* ---- Mode 2: Picnic Plates ---- */
.blanket {
  background: #fff9ec;
  border: 7px solid var(--ink);
  border-radius: 38px;
  box-shadow: 0 12px 0 #2a344c22, inset 0 0 0 14px #ffd2d2;
}
.basket-zone {
  width: 220px;
  height: 136px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.basket-zone svg.b-svg { width: 190px; height: 128px; pointer-events: none; }
.basket-treat {
  position: absolute;
  top: -10px;
  width: 78px;
  height: 78px;
  pointer-events: none;
  animation: bob 1.1s ease-in-out infinite alternate;
}
.basket-treat svg { width: 100%; height: 100%; }

.plate-slot {
  width: 126px;
  height: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.plate-slot svg.plate-bg { width: 120px; height: 120px; position: absolute; pointer-events: none; }
.plate-slot.open { animation: platePulse .95s ease-in-out infinite alternate; }
@keyframes platePulse { to { transform: scale(1.06); } }
.plate-slot .treat {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  pointer-events: none;
}
.plate-slot .treat svg { width: 100%; height: 100%; }
.plate-slot.lit svg.plate-bg { filter: drop-shadow(0 0 14px #ffd43b); }

.drag-ghost {
  width: 92px;
  height: 92px;
  pointer-events: none;
  z-index: 18;
  filter: drop-shadow(0 12px 6px #2a344c33);
}
.drag-ghost svg { width: 100%; height: 100%; }

.num-choices {
  display: flex;
  justify-content: center;
  gap: 32px;
}
.num-card {
  width: 146px;
  height: 132px;
  background: #fffdf5;
  border: 7px solid var(--ink);
  border-radius: 30px;
  font-family: inherit;
  font-size: 80px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 9px 0 #2a344c26;
  touch-action: none;
}
.num-card:active { transform: translateY(4px); }
.num-card.right { background: #9bf2a7; }
.num-card.shake { animation: shake .4s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-12px); }
  75% { transform: translateX(12px); }
}

/* ---- Mode 3: Silly Daddy Pig ---- */
.speech-puff {
  min-width: 118px;
  height: 92px;
  padding: 0 24px;
  background: #fff;
  border: 6px solid var(--ink);
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 62px;
  color: var(--ink);
  opacity: 0;
  transition: opacity .15s;
  box-shadow: 0 8px 0 #2a344c1e;
}
.speech-puff::after {
  content: "";
  position: absolute;
  left: -20px;
  top: 34px;
  border: 14px solid transparent;
  border-right: 20px solid var(--ink);
  border-left: 0;
}

.silly-item {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.silly-item svg { width: 96px; height: 96px; pointer-events: none; }
.silly-item.active {
  background: #fff099cc;
  box-shadow: 0 0 0 6px var(--gold);
  transform: scale(1.12);
}
.silly-item.counted {
  background: #c8f7cecc;
  box-shadow: 0 0 0 5px var(--green);
}
.silly-item.missed {
  background: #ffd6d6aa;
  box-shadow: 0 0 0 5px var(--red);
}
.silly-item.tap-me {
  animation: puddlePulse .85s ease-in-out infinite alternate;
}
.daddy-pointer {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffe066;
  border: 5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  pointer-events: none;
  z-index: 8;
  opacity: 0;
}

.verdict-row {
  display: flex;
  justify-content: center;
  gap: 44px;
}
.verdict-btn {
  width: 316px;
  height: 118px;
  border: 7px solid var(--ink);
  border-radius: 34px;
  font-family: inherit;
  font-size: 32px;
  white-space: nowrap;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: 0 9px 0 #2a344c2a;
}
.verdict-btn:active { transform: translateY(4px); }
.btn-silly { background: #ff7a3d; }
.btn-good { background: var(--green); }
.verdict-btn svg { width: 48px; height: 48px; }

/* ---- Mode 4: Red Car Number Road ---- */
.road-strip {
  background: #efe2c4;
  border: 6px solid #7d623b;
  border-radius: 34px;
  box-shadow: 0 10px 0 #2a344c22;
}
.road-tile {
  border: 5px solid var(--ink);
  border-radius: 22px;
  background: #fffdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: var(--ink);
  cursor: pointer;
  transition: background .25s, transform .2s;
}
.road-tile.small { font-size: 42px; border-radius: 16px; }
.road-tile.passed { background: #ffe999; }
.road-tile.here { background: #a8f0b3; box-shadow: 0 0 0 6px var(--green); }
.road-tile.due {
  background: #d8ffdf;
  box-shadow: 0 0 0 8px var(--green), 0 0 26px #4ec86299;
  animation: puddlePulse .75s ease-in-out infinite alternate;
}
.road-dest {
  display: flex;
  align-items: center;
  justify-content: center;
}
.road-dest svg { width: 100%; height: 100%; }

.spinner-box {
  display: flex;
  align-items: center;
  gap: 24px;
}
.wheel-btn {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  border: 8px solid var(--ink);
  background: conic-gradient(#ffd859 0 180deg, #9be7ff 180deg 360deg);
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 0 #2a344c2a;
  position: relative;
}
.wheel-btn.ready { animation: pulse .85s ease-in-out infinite alternate; }
.wheel-center {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #fffdf5;
  border: 6px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.wheel-num { font-size: 62px; line-height: 1; }
.wheel-dots { display: flex; gap: 8px; margin-top: 2px; }
.wheel-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--red); display: block; }
.step-pips { display: flex; gap: 12px; }
.step-pip {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--ink);
}
.step-pip.left { background: var(--green); }

/* ---- Mode 5: Garden Picnic (More, One More, Fair Share) ---- */
.tray {
  background: #fffdf5f2;
  border: 7px solid var(--ink);
  border-radius: 32px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 22px;
  cursor: pointer;
  box-shadow: 0 9px 0 #2a344c22;
  transition: transform .2s, background .25s;
}
.tray:active { transform: scale(.98); }
.tray.win { background: #c9f7d0; box-shadow: 0 0 0 8px var(--green); }
.tray.shake { animation: shake .4s ease-in-out; }
.tray-slot {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.tray-slot svg { width: 84px; height: 84px; pointer-events: none; }
.tray-slot.extra {
  background: #ffe98a;
  box-shadow: 0 0 0 5px #f0a500;
}
.tray-slot.need {
  border: 5px dashed #8a9ab5;
  background: #f2f6fb;
  cursor: pointer;
  animation: platePulse .9s ease-in-out infinite alternate;
}

.match-line {
  width: 8px;
  background: repeating-linear-gradient(180deg, #3a86e8 0 12px, transparent 12px 22px);
  border-radius: 4px;
  pointer-events: none;
  z-index: 6;
}

.add-one-btn {
  width: 144px;
  height: 144px;
  border-radius: 34px;
  background: #fff8cc;
  border: 7px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 0 10px #4ec86288, 0 10px 0 #2a344c26;
  animation: pulse .85s ease-in-out infinite alternate;
}
.add-one-btn svg { width: 86px; height: 86px; }
.add-one-tag { font-size: 28px; color: var(--red); line-height: 1; margin-top: -4px; }

.start-badge {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  background: #fffdf5;
  border: 6px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 68px;
  box-shadow: 0 7px 0 #2a344c20;
}

/* ---- Finale ---- */
#finale { z-index: 25; }
#finale-stage { position: absolute; inset: 0; z-index: 3; }
#finale-stage > * { position: absolute; }
#finale-stage svg { width: 100%; height: 100%; pointer-events: none; display: block; }
#finale-stage .char { z-index: 4; }

/* Muddy Puddles finale */
.fin-puddle {
  left: 240px;
  top: 538px;
  width: 800px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 45% 42%, #ad7246 0%, #87522c 58%, #6c3e1d 100%);
  border: 8px solid #4d2c15;
  box-shadow: 0 10px 0 #2a344c24;
  cursor: pointer;
  z-index: 3;
}
.splat { width: 90px; height: 90px; pointer-events: none; z-index: 7; }

/* Duck pond finale */
.fin-pond {
  left: 240px;
  top: 494px;
  width: 800px;
  height: 236px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 42% 38%, #b9ecff 0%, #6bc5f8 55%, #4aa9e6 100%);
  border: 8px solid #29648a;
  box-shadow: 0 10px 0 #2a344c24;
  cursor: pointer;
  z-index: 3;
}
.fin-duck {
  width: 110px;
  height: 90px;
  cursor: pointer;
  z-index: 6;
  transition: left .9s ease-in-out, top .9s ease-in-out;
  animation: bob 1.3s ease-in-out infinite alternate;
}
.fin-duck.left { scale: -1 1; }
.fin-crumb { width: 34px; height: 34px; pointer-events: none; z-index: 5; }
.fin-ripple {
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 4;
}
.fin-ripple::after {
  content: "";
  position: absolute;
  left: -40px;
  top: -16px;
  width: 80px;
  height: 32px;
  border: 5px solid #ffffffcc;
  border-radius: 50%;
  animation: ripple .8s ease-out forwards;
}
@keyframes ripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

/* Picnic finale */
.fin-blanket { left: 290px; top: 512px; width: 700px; height: 236px; z-index: 3; }
.fin-basket { left: 562px; top: 414px; width: 152px; height: 104px; cursor: pointer; z-index: 5; }
.fin-basket.ready { animation: pulse .8s ease-in-out infinite alternate; filter: drop-shadow(0 0 12px #ffe066); }
.fin-treat { width: 84px; height: 84px; cursor: pointer; z-index: 5; }

/* Red car finale */
.fin-road {
  left: -10px;
  right: -10px;
  top: 606px;
  height: 118px;
  background:
    repeating-linear-gradient(90deg, #fffdf5 0 46px, transparent 46px 92px) center / 100% 8px no-repeat,
    #cdbb96;
  border: 6px solid #7d623b;
  z-index: 3;
}
.fin-place { top: 446px; width: 150px; height: 150px; cursor: pointer; z-index: 4; }
.fin-car {
  top: 562px;
  width: 300px;
  cursor: pointer;
  z-index: 6;
  filter: drop-shadow(0 8px 0 #2a344c1e);
  transition: left .6s cubic-bezier(.3, .7, .3, 1);
}
.fin-car.left { scale: -1 1; }

/* Garden finale */
.fin-soil { top: 634px; width: 140px; height: 60px; cursor: pointer; z-index: 5; }
.fin-plant {
  top: 424px;
  width: 140px;
  height: 230px;
  cursor: pointer;
  z-index: 4;
  transform-origin: 50% 100%;
}
.fin-can {
  width: 150px;
  height: 110px;
  cursor: pointer;
  z-index: 7;
  transition: left .4s ease-in-out, top .4s ease-in-out, rotate .25s ease-in-out;
}
.fin-can.pour { rotate: -38deg; }
.fin-drop { top: 440px; width: 26px; height: 26px; pointer-events: none; z-index: 6; }

/* Counting rhyme: a round button, and the numbers that light up as the lines are said */
#finale-song {
  position: absolute;
  left: 30px;
  top: 26px;
  width: 104px;
  height: 104px;
  background: var(--gold);
  font-size: 50px;
  z-index: 8;
  animation: pulse 1.2s ease-in-out infinite alternate;
}
#finale-song.on { animation: none; background: #fff; opacity: .55; }
#finale-nums {
  position: absolute;
  left: 170px;
  right: 170px;
  top: 34px;
  display: none;
  justify-content: center;
  gap: 12px;
  z-index: 8;
  pointer-events: none;
}
#finale-nums.on { display: flex; }
#finale-nums span {
  width: 78px;
  height: 84px;
  border: 5px solid var(--ink);
  border-radius: 20px;
  background: #fffdf5d9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  transition: transform .2s, background .2s;
}
#finale-nums span.lit { background: var(--gold); transform: scale(1.16); }
#finale-done {
  position: absolute;
  right: 34px;
  bottom: 34px;
  width: 118px;
  height: 118px;
  background: var(--green);
  font-size: 56px;
  z-index: 8;
}

/* ---- Grown-up Corner ---- */
#grownup { background: #10182cd4; z-index: 30; }
#panel {
  position: absolute;
  left: 110px;
  right: 110px;
  top: 32px;
  bottom: 32px;
  padding: 20px 32px;
  background: #fff;
  border-radius: 30px;
  border: 6px solid var(--ink);
  overflow: auto;
  font: 19px/1.38 Helvetica, Arial, sans-serif;
  touch-action: pan-y;
}
#panel h2 { margin: 0 0 8px; font-size: 28px; font-family: "Letters", Verdana, sans-serif; }
#panel p { margin: 8px 0; }
#log {
  background: #f5f8fc;
  border: 2px solid #d2dce8;
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 17px;
  line-height: 1.42;
  min-height: 100px;
}
#log h3 { margin: 8px 0 2px; font-size: 18px; color: var(--ink); }
#log h3:first-child { margin-top: 0; }
.opt {
  font: inherit;
  margin: 2px 8px 2px 0;
  padding: 7px 16px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.opt.on { background: var(--gold); font-weight: bold; }
