:root {
  color-scheme: light;
  --ink: #173d35;
  --muted: #60776e;
  --leaf: #27985c;
  --leaf-dark: #146b42;
  --leaf-soft: #e6f7df;
  --sun: #ffc94a;
  --coral: #ef7152;
  --coral-dark: #bd4c34;
  --teal: #198d91;
  --line: #d8e9dc;
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next Rounded", "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; color: var(--ink); background: #e8f4dc; }
button { font: inherit; }
button:focus-visible, [tabindex]:focus-visible { outline: 4px solid rgba(25,141,145,.3); outline-offset: 4px; }
[hidden] { display: none !important; }

.game { position: relative; display: grid; place-items: center; width: 100%; height: 100%; min-height: 690px; overflow: hidden; isolation: isolate; }
.world-art { position: absolute; z-index: -4; inset: -18px; width: calc(100% + 36px); height: calc(100% + 36px); object-fit: cover; filter: saturate(.82) blur(1.5px); opacity: .62; }
.world-wash { position: absolute; z-index: -3; inset: 0; background: linear-gradient(110deg,rgba(238,248,224,.9),rgba(255,250,223,.68) 50%,rgba(228,246,223,.88)); }
.world-wash::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 48%,rgba(255,255,255,.08),rgba(235,246,224,.58) 76%); }

.garden-hud { position: absolute; z-index: 10; top: 24px; left: 28px; right: 28px; display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none; }
.mission-chip, .scoreboard, .growth-meter { border: 1px solid rgba(40,91,63,.08); background: rgba(255,255,255,.84); box-shadow: 0 10px 30px rgba(44,86,56,.1); backdrop-filter: blur(14px); }
.mission-chip { display: grid; gap: 3px; padding: 10px 15px; border-radius: 16px; }
.mission-chip span, .scoreboard span, .growth-meter span { color: var(--leaf-dark); font-size: 10px; font-weight: 950; letter-spacing: .085em; text-transform: uppercase; }
.mission-chip strong { font-size: 14px; }
.scoreboard { display: flex; gap: 4px; padding: 7px; border-radius: 18px; }
.scoreboard > div { min-width: 72px; padding: 5px 10px; text-align: center; }
.scoreboard span { display: block; color: var(--muted); }
.scoreboard strong { display: block; margin-top: 2px; font-size: 21px; line-height: 1; }
.scoreboard strong:first-letter { color: var(--sun); }
.growth-meter { position: absolute; left: 50%; width: 220px; padding: 9px 13px; border-radius: 16px; transform: translateX(-50%); }
.growth-meter > span { display: flex; justify-content: space-between; }
.growth-meter > i { display: block; height: 8px; margin: 7px 0 5px; overflow: hidden; border-radius: 999px; background: #dbe9d8; }
.growth-meter > i b { display: block; width: 12%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--leaf),#84c83f,var(--sun)); transition: width 220ms ease-out; }
.growth-meter > strong { color: var(--muted); font-size: 11px; }

.play-card { position: relative; z-index: 2; width: min(810px,calc(100% - 390px)); min-width: 720px; height: min(740px,calc(100% - 100px)); min-height: 650px; padding: 28px 44px 25px; border: 1px solid rgba(217,235,214,.94); border-radius: 34px; background: rgba(255,255,250,.95); box-shadow: 0 28px 85px rgba(43,86,55,.18),0 3px 0 rgba(255,255,255,.78) inset; backdrop-filter: blur(18px); }
.mission-copy { position: relative; z-index: 3; max-width: 680px; margin: 0 auto; text-align: center; }
.phase-label { display: inline-block; margin-bottom: 6px; color: var(--coral-dark); font-size: 10px; font-weight: 950; letter-spacing: .11em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(29px,2.6vw,40px); font-weight: 950; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.mission-copy p { min-height: 22px; margin: 8px 0 0; color: var(--muted); font-size: 15px; font-weight: 700; line-height: 1.35; }

.garden-stage { position: relative; width: 580px; height: 475px; margin: -4px auto 0; }
.plant { position: absolute; left: 30px; top: 0; width: 520px; height: 500px; overflow: visible; filter: drop-shadow(0 16px 14px rgba(50,80,42,.11)); }
.soil { fill: url(#soilFill); stroke: #5e3b25; stroke-width: 5; }
.part { cursor: pointer; transform-box: fill-box; transform-origin: center; transition: transform 150ms ease-out,filter 150ms ease-out,opacity 150ms ease-out; }
.part:hover { filter: brightness(1.08) drop-shadow(0 0 8px rgba(255,222,84,.45)); transform: scale(1.04); }
.part.is-correct { filter: url(#partGlow); transform: scale(1.09); }
.part.is-pointing { filter: drop-shadow(0 0 13px var(--sun)); transform: scale(1.08); }
.part.is-dim { opacity: .43; }
.tap-ring { fill: transparent !important; stroke: transparent !important; stroke-width: 7; }
.part:hover .tap-ring, .part:focus-visible .tap-ring { stroke: rgba(25,141,145,.38) !important; stroke-dasharray: 7 9; }
.roots path { fill: none; stroke: #cda663; stroke-width: 13; stroke-linecap: round; }
.stem > path { fill: none; stroke: #3c9c54; stroke-width: 24; stroke-linecap: round; }
.leaf > path:not(.vein) { fill: #4abf61; stroke: #217d44; stroke-width: 6; }
.leaf .vein { fill: none; stroke: #d0ed76; stroke-width: 4; stroke-linecap: round; }
.flower > circle:not(.tap-ring):not(.flower-centre) { fill: #f37a69; stroke: #c84e4c; stroke-width: 5; }
.flower .flower-centre { fill: #ffd04f; stroke: #df9c25; stroke-width: 5; }
.seed path:first-child { fill: #d8a03b; stroke: #8e5b27; stroke-width: 6; }
.seed-shine { fill: none; stroke: #ffe5a3; stroke-width: 6; stroke-linecap: round; }
.sunbeam { position: absolute; z-index: -1; top: 5px; left: 90px; width: 400px; height: 360px; opacity: 0; background: conic-gradient(from 220deg at 50% 0,transparent,rgba(255,226,91,.42),transparent 22%); transition: opacity 180ms ease-out; }
.garden-stage.show-sun .sunbeam { opacity: 1; }

.part-label { position: absolute; z-index: 8; top: 54px; right: 14px; padding: 8px 14px; border: 2px solid #fff; border-radius: 999px; color: #fff; background: var(--leaf-dark); box-shadow: 0 7px 18px rgba(25,83,54,.2); font-size: 14px; font-weight: 950; text-transform: capitalize; animation: labelPop 300ms cubic-bezier(.2,.85,.25,1.2); }
.fact-bubble { position: absolute; z-index: 8; right: -8px; bottom: 68px; width: 216px; padding: 13px 15px; border: 2px solid #f3c940; border-radius: 18px 18px 5px 18px; color: #634918; background: #fff9ce; box-shadow: 0 10px 25px rgba(91,69,22,.12); font-size: 12px; font-weight: 800; line-height: 1.35; animation: bubblePop 300ms cubic-bezier(.2,.85,.25,1.15); }
.need-tray { position: absolute; z-index: 7; left: 50%; bottom: 1px; display: flex; gap: 10px; opacity: 0; pointer-events: none; transform: translate(-50%,12px); transition: opacity 150ms ease-out,transform 150ms ease-out; }
.need-tray.is-active { opacity: 1; pointer-events: auto; transform: translate(-50%,0); }
.need-tray button { display: flex; align-items: center; gap: 7px; min-width: 116px; min-height: 50px; padding: 9px 14px; border: 2px solid var(--line); border-radius: 15px; color: var(--ink); background: #fff; box-shadow: 0 4px 0 #cedfce; font-size: 13px; font-weight: 900; cursor: pointer; transition: transform 130ms ease-out,box-shadow 130ms ease-out,background 130ms ease-out; }
.need-tray button span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: var(--coral-dark); background: #fff2b8; font-size: 18px; }
.need-tray button:hover { background: var(--leaf-soft); transform: translateY(-2px); box-shadow: 0 6px 0 #c6dbc8; }
.need-tray button.is-correct { border-color: var(--leaf); background: var(--leaf-soft); transform: scale(1.05); }

.action-area { position: relative; z-index: 10; min-height: 58px; max-width: 590px; margin: -13px auto 0; }
.choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.choice, .primary { min-height: 54px; padding: 10px 15px; border-radius: 16px; font-weight: 900; cursor: pointer; transition: transform 130ms ease-out,box-shadow 130ms ease-out,background 130ms ease-out; }
.choice { color: var(--ink); border: 2px solid var(--line); background: #fff; box-shadow: 0 4px 0 #d2e3d3; }
.choice:hover { border-color: #76bb8b; background: var(--leaf-soft); transform: translateY(-2px); box-shadow: 0 6px 0 #c8ddcb; }
.choice small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
.primary { display: flex; align-items: center; justify-content: center; width: min(370px,100%); margin: 0 auto; color: #fff; border: 1px solid var(--leaf-dark); background: linear-gradient(180deg,#43ad69,var(--leaf)); box-shadow: 0 6px 0 var(--leaf-dark),0 13px 25px rgba(25,109,62,.17); font-size: 16px; }
.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--leaf-dark),0 15px 28px rgba(25,109,62,.2); }
.primary:active, .choice:active { transform: translateY(3px); box-shadow: 0 1px 0 #bed2c1; }
.feedback { min-height: 18px; margin-top: 6px; color: var(--coral-dark); font-size: 12px; font-weight: 850; text-align: center; }
.play-card.is-miss { animation: gentleShake 320ms ease-out; }

.mascot { position: absolute; z-index: 5; left: max(20px,calc(50% - 680px)); bottom: 34px; width: 190px; pointer-events: none; transform-origin: 50% 100%; }
.sticker-art { overflow: hidden; padding: 7px; border: 1px solid rgba(35,79,48,.1); border-radius: 27px; background: #fff; box-shadow: 0 13px 30px rgba(38,75,45,.17); }
.sticker-art img { display: block; width: 100%; border-radius: 20px; }
.mascot p { position: absolute; top: -24px; left: 138px; width: 162px; margin: 0; padding: 11px 13px; border-radius: 16px 16px 16px 5px; color: var(--leaf-dark); background: rgba(255,255,255,.95); box-shadow: 0 10px 27px rgba(39,77,45,.13); font-size: 12px; font-weight: 850; line-height: 1.3; }
.mascot.is-happy { animation: mascotPop 600ms cubic-bezier(.2,.85,.25,1.2); }
.mascot.is-sad { animation: mascotNudge 350ms ease-out; }
.prop-art { position: absolute; z-index: 1; width: 130px; opacity: .75; pointer-events: none; }
.watering { right: max(20px,calc(50% - 670px)); bottom: 55px; transform: rotate(4deg); }
.seeds { right: max(52px,calc(50% - 640px)); top: 102px; width: 105px; opacity: .5; transform: rotate(-5deg); }

.toast { position: absolute; z-index: 60; top: 24px; left: 50%; max-width: 470px; padding: 11px 18px; border-radius: 999px; color: #fff; background: #174b3d; box-shadow: 0 14px 34px rgba(25,63,47,.2); opacity: 0; pointer-events: none; transform: translate(-50%,-12px) scale(.96); transition: opacity 150ms ease-out,transform 150ms ease-out; font-size: 13px; font-weight: 850; }
.toast.is-showing { opacity: 1; transform: translate(-50%,0) scale(1); }
.celebration { position: absolute; z-index: 55; inset: 0; overflow: hidden; pointer-events: none; }
.celebration i { position: absolute; top: 54%; left: 50%; color: var(--sun); opacity: 0; font-size: 24px; font-style: normal; }
.celebration.is-showing i { animation: confetti 820ms cubic-bezier(.15,.72,.25,1) forwards; }
.celebration i:nth-child(1){--x:-330px;--y:-270px}.celebration i:nth-child(2){--x:-245px;--y:-320px;color:var(--leaf)}.celebration i:nth-child(3){--x:-155px;--y:-260px;color:var(--coral)}.celebration i:nth-child(4){--x:-55px;--y:-335px}.celebration i:nth-child(5){--x:70px;--y:-290px;color:var(--leaf)}.celebration i:nth-child(6){--x:175px;--y:-340px;color:var(--coral)}.celebration i:nth-child(7){--x:275px;--y:-260px}.celebration i:nth-child(8){--x:350px;--y:-310px;color:var(--leaf)}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes gentleShake { 0%,100%{transform:translateX(0)}30%{transform:translateX(-7px) rotate(-.2deg)}70%{transform:translateX(6px) rotate(.2deg)} }
@keyframes labelPop { from{opacity:0;transform:scale(.6) rotate(-5deg)}to{opacity:1;transform:scale(1) rotate(0)} }
@keyframes bubblePop { from{opacity:0;transform:translateY(10px) scale(.85)}to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes mascotPop { 0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-18px) rotate(-3deg)}65%{transform:translateY(0) rotate(2deg)} }
@keyframes mascotNudge { 35%{transform:rotate(-4deg)}70%{transform:rotate(3deg)} }
@keyframes confetti { 0%{opacity:0;transform:translate(-50%,-50%) scale(.35)}12%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) rotate(480deg) scale(1.15)} }

@media (max-width: 1220px) {
  .play-card { width: min(780px,calc(100% - 270px)); min-width: 700px; padding-inline: 36px; }
  .mascot { left: 12px; width: 130px; }
  .mascot p { left: 28px; top: -57px; width: 145px; border-radius: 16px 16px 5px 16px; }
  .prop-art { right: 8px; width: 105px; }
  .seeds { display: none; }
}
@media (max-height: 780px) {
  .play-card { height: calc(100% - 85px); min-height: 635px; padding-top: 22px; }
  .garden-stage { transform: scale(.91); transform-origin: top center; margin-bottom: -40px; }
  .garden-hud { top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
