:root {
  --night: #0d1424;
  --night-soft: #151f35;
  --panel: #18243b;
  --panel-light: #202e47;
  --ink: #f3f1df;
  --muted: #b8c0ca;
  --gold: #f5d66f;
  --gold-soft: #fff1aa;
  --green: #738d69;
  --line: rgba(255,255,255,.12);
  --shadow: 0 22px 60px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 50% -20%, #263b61 0, var(--night-soft) 38%, var(--night) 76%);
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.app-shell { width: min(100%, 580px); min-height: 100vh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom)); }
.topbar, .activity-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display:flex; gap:9px; align-items:center; border:0; background:transparent; font-weight:800; font-size:1.05rem; cursor:pointer; }
.brand-mark { color:var(--gold); text-shadow:0 0 14px var(--gold); }
.screen { display:none; }
.screen.active { display:block; }
#homeScreen { padding-top:20px; text-align:center; }
.meadow { height:300px; position:relative; overflow:hidden; border-radius:32px; margin-bottom:28px; background:linear-gradient(#172846 0 56%, #253c43 56% 100%); box-shadow:var(--shadow); border:1px solid rgba(255,255,255,.08); }
.moon { position:absolute; width:62px; height:62px; border-radius:50%; right:34px; top:30px; background:#f7edbd; box-shadow:0 0 35px rgba(255,239,164,.52); }
.cloud { position:absolute; width:95px; height:22px; border-radius:50px; background:rgba(224,232,240,.12); filter:blur(1px); animation:drift 18s linear infinite; }
.cloud-one { top:52px; left:-100px; } .cloud-two { top:105px; left:-140px; animation-duration:27s; animation-delay:-8s; opacity:.65; }
@keyframes drift { to { transform:translateX(720px); } }
.hill { position:absolute; left:-12%; width:125%; border-radius:50% 50% 0 0; }
.hill-back { height:130px; bottom:35px; background:#314f4a; transform:rotate(-2deg); }
.hill-front { height:120px; bottom:-25px; background:#243e36; transform:rotate(3deg); }
.meadow-surprise { position:absolute; z-index:3; left:18%; bottom:34px; font-size:2rem; filter:drop-shadow(0 5px 5px rgba(0,0,0,.3)); }
.firefly { position:absolute; z-index:4; width:7px; height:7px; border-radius:50%; background:var(--gold-soft); box-shadow:0 0 5px var(--gold),0 0 15px var(--gold); animation:float var(--duration,6s) ease-in-out infinite alternate, flicker 2.4s ease-in-out infinite; }
@keyframes float { from { transform:translate(0,0); } to { transform:translate(var(--dx,24px),var(--dy,-35px)); } }
@keyframes flicker { 0%,100%{opacity:.35} 45%{opacity:1} 62%{opacity:.55} 80%{opacity:.92} }
.home-copy { max-width:480px; margin:0 auto 25px; }
.eyebrow { margin:0; color:var(--gold); font-weight:780; font-size:.82rem; letter-spacing:.08em; text-transform:uppercase; }
h1 { font-size:clamp(2.1rem,8vw,3.15rem); line-height:1.04; margin:11px 0 14px; }
h2 { line-height:1.16; }
.subcopy,.dialog-copy,.activity-intro,.leave-note { color:var(--muted); }
.subcopy { font-size:1.08rem; line-height:1.55; }
.leave-note { margin:18px auto 0; font-size:.86rem; max-width:390px; line-height:1.5; }
.primary-button,.secondary-button,.mode-button,.quiet-button,.icon-button,.choice-card,.memory-card,.sort-bin,.sort-item,.find-object,.focus-card,.firefly-target { border:0; cursor:pointer; border-radius:16px; text-decoration:none; display:inline-flex; justify-content:center; align-items:center; }
.primary-button { width:100%; min-height:60px; padding:16px 20px; color:#172039; background:linear-gradient(180deg,#ffe88e,#e8c95e); font-weight:820; font-size:1.08rem; box-shadow:0 12px 28px rgba(235,205,98,.18); }
.secondary-button { min-height:50px; padding:13px 16px; color:var(--ink); background:var(--panel-light); font-weight:720; border:1px solid var(--line); }
.quiet-button { padding:10px 12px; color:var(--muted); background:transparent; font-weight:720; }
.icon-button { width:42px; height:42px; background:var(--panel); color:var(--ink); font-size:1.25rem; box-shadow:0 7px 20px rgba(0,0,0,.2); }
.mode-row { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-top:17px; }
.mode-button { padding:10px 13px; color:var(--muted); background:rgba(255,255,255,.04); border:1px solid var(--line); }
.mode-button.selected { color:#172039; background:var(--gold-soft); font-weight:760; }
#activityScreen { padding-top:6px; }
.companion-line { color:var(--muted); font-size:.9rem; text-align:center; }
.activity-mount { min-height:570px; margin-top:22px; padding:24px; border-radius:28px; background:rgba(24,36,59,.94); border:1px solid var(--line); box-shadow:var(--shadow); }
.activity-title { margin:0 0 10px; font-size:1.65rem; }
.activity-intro { margin:0 0 22px; line-height:1.5; }
.choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.choice-card { flex-direction:column; min-height:125px; padding:14px; background:var(--panel-light); border:1px solid var(--line); color:var(--ink); }
.choice-card .emoji { font-size:2.7rem; margin-bottom:8px; }
.choice-card.correct { outline:3px solid var(--gold); background:#344b45; }
.choice-card.wrong { opacity:.45; }
.memory-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.memory-card { aspect-ratio:1; background:#293954; color:var(--ink); font-size:2rem; }
.memory-card.hidden-face { color:transparent; background:radial-gradient(circle,#f2d86a 0 5%,#2a3a56 7%); }
.memory-card.matched { background:#32483f; }
.find-scene,.firefly-scene { height:390px; position:relative; overflow:hidden; border-radius:22px; background:linear-gradient(#203552 0 55%,#345044 55%); border:1px solid var(--line); }
.find-scene::before,.firefly-scene::before { content:""; position:absolute; left:-10%; bottom:-45px; width:120%; height:180px; border-radius:50%; background:#253f36; }
.find-object { position:absolute; transform:translate(-50%,-50%); background:transparent; font-size:2rem; z-index:2; padding:5px; }
.find-object.found { opacity:.25; transform:translate(-50%,-50%) scale(.75); }
.find-status { text-align:center; color:var(--muted); margin-top:13px; }
.sort-items { display:flex; flex-wrap:wrap; gap:10px; margin:18px 0; }
.sort-item { padding:12px 14px; font-size:1.45rem; background:var(--panel-light); border:1px solid var(--line); }
.sort-item.selected { outline:3px solid var(--gold); }
.sort-zone { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.sort-bin { display:block; min-height:155px; padding:14px; background:rgba(255,255,255,.035); border:2px dashed rgba(255,255,255,.16); }
.sort-bin h3 { margin-top:0; font-size:1rem; }
.orbit-scene { min-height:440px; display:grid; place-items:center; text-align:center; overflow:hidden; }
.orbit { width:210px; height:210px; border-radius:50%; border:1px solid rgba(255,255,255,.1); position:relative; animation:slowturn 20s linear infinite; }
.orbit::before,.orbit::after { content:"✦"; position:absolute; color:var(--gold); text-shadow:0 0 12px var(--gold); }
.orbit::before { top:10px; left:46%; } .orbit::after { bottom:18px; right:18px; }
.orbit span { position:absolute; inset:0; display:grid; place-items:center; font-size:4rem; animation:slowturn 20s linear infinite reverse; }
@keyframes slowturn { to { transform:rotate(360deg); } }
.focus-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.focus-card { min-height:190px; flex-direction:column; gap:9px; background:var(--panel-light); border:1px solid var(--line); overflow:hidden; padding:14px; }
.focus-image { font-size:4.2rem; line-height:1; }
.focus-card.blurry .focus-image { filter:blur(4px); opacity:.8; }
.focus-card.correct { outline:3px solid var(--gold); }
.firefly-target { position:absolute; width:30px; height:30px; background:transparent; z-index:4; }
.firefly-target::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--gold-soft); box-shadow:0 0 7px var(--gold),0 0 18px var(--gold); animation:flicker 1.5s infinite; }
.activity-footer { margin-top:18px; text-align:center; }
.activity-footer p { color:var(--muted); margin:0 0 12px; }
.activity-footer .secondary-button { width:100%; margin-top:9px; }
.wide { width:100%; margin-top:8px; }
.hidden { display:none !important; }
.support-dialog { width:min(92vw,500px); color:var(--ink); background:#17233a; border:1px solid var(--line); border-radius:24px; box-shadow:var(--shadow); padding:0; }
.support-dialog::backdrop { background:rgba(3,7,15,.75); backdrop-filter:blur(4px); }
.support-dialog form { padding:26px; position:relative; }
.dialog-close { position:absolute; top:12px; right:14px; border:0; background:transparent; color:var(--muted); font-size:1.8rem; cursor:pointer; }
.support-dialog label { display:block; font-weight:700; margin:15px 0 7px; }
.support-dialog input { width:100%; padding:14px; border-radius:13px; border:1px solid var(--line); color:var(--ink); background:#0f192c; }
.support-actions { display:grid; gap:9px; margin:17px 0; }
.disabled { pointer-events:none; opacity:.42; }
@media (max-width:390px) { .activity-mount{padding:18px;min-height:520px}.memory-grid{gap:7px}.choice-card{min-height:110px}.meadow{height:270px}.companion-line{display:none} }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; } }
.track-mark{font-size:4.2rem;text-align:center;letter-spacing:.35em;margin:22px 0 18px;color:var(--gold-soft);text-shadow:0 0 18px rgba(245,214,111,.25)}
.choice-card.compact{min-height:82px;font-size:1.05rem}.text-choices{margin-top:18px}.emoji-only{font-size:2.2rem}
.composition-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.composition-card{min-height:210px;border:1px solid var(--line);border-radius:18px;background:var(--panel-light);color:var(--ink);display:flex;flex-direction:column;justify-content:center;gap:18px;align-items:center;font-size:2.4rem;padding:18px;cursor:pointer}.composition-card small{font-size:.85rem;color:var(--muted)}.composition-card.chosen{outline:3px solid var(--gold);background:#344b45}
.odd-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:28px}.odd-card{min-height:145px;border:1px solid var(--line);border-radius:20px;background:var(--panel-light);color:var(--ink);font-size:3.4rem;cursor:pointer}.odd-card.correct{outline:3px solid var(--gold);background:#344b45}.odd-card.wrong{opacity:.45}
.pattern-strip{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;margin:44px 0;font-size:2.4rem}.pattern-strip span{width:58px;height:58px;border-radius:16px;background:var(--panel-light);display:grid;place-items:center}.pattern-strip .question-mark{color:var(--gold);font-weight:800}.pattern-choices{max-width:360px;margin:auto}
.size-row{min-height:270px;display:flex;justify-content:space-around;align-items:center;gap:8px}.size-item{border:0;background:transparent;cursor:pointer;filter:drop-shadow(0 6px 5px rgba(0,0,0,.25));transition:.2s}.size-item.placed{opacity:.22;transform:translateY(18px)}
.curiosity-card{min-height:470px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:26px;background:radial-gradient(circle at 50% 20%,rgba(245,214,111,.12),transparent 38%);border-radius:22px}.curiosity-card p{font-family:Georgia,serif;font-size:1.7rem;line-height:1.45;margin:22px 0;max-width:420px}.curiosity-card small{color:var(--muted)}.curiosity-spark{font-size:2rem;color:var(--gold);text-shadow:0 0 14px var(--gold)}
.quiet-scene,.follow-scene,.tiny-garden{height:390px;position:relative;overflow:hidden;border-radius:22px;background:linear-gradient(#162b49 0 58%,#29463d 58%);border:1px solid var(--line)}.quiet-scene{display:grid;place-items:center}.quiet-icon{font-size:5.5rem;animation:quietbob 5s ease-in-out infinite}.quiet-lights i{position:absolute;width:6px;height:6px;border-radius:50%;background:var(--gold-soft);box-shadow:0 0 12px var(--gold);animation:flicker 2s infinite}.quiet-lights i:nth-child(1){left:14%;top:22%}.quiet-lights i:nth-child(2){left:28%;top:48%;animation-delay:-.6s}.quiet-lights i:nth-child(3){left:44%;top:18%;animation-delay:-1s}.quiet-lights i:nth-child(4){left:61%;top:35%;animation-delay:-1.4s}.quiet-lights i:nth-child(5){left:78%;top:20%;animation-delay:-.3s}.quiet-lights i:nth-child(6){left:83%;top:62%;animation-delay:-1.2s}.quiet-lights i:nth-child(7){left:35%;top:72%;animation-delay:-.8s}.quiet-lights i:nth-child(8){left:65%;top:78%;animation-delay:-1.7s}@keyframes quietbob{50%{transform:translateY(-8px)}}
.follow-scene{background:linear-gradient(#152642,#29453b)}.moving-light{position:absolute;width:42px;height:42px;transform:translate(-50%,-50%);border:0;background:transparent;cursor:pointer;transition:left .55s ease,top .55s ease}.moving-light::before{content:"";display:block;width:10px;height:10px;border-radius:50%;margin:auto;background:var(--gold-soft);box-shadow:0 0 8px var(--gold),0 0 22px var(--gold)}
.garden-palette{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}.palette-item{width:48px;height:48px;border-radius:14px;border:1px solid var(--line);background:var(--panel-light);font-size:1.55rem;cursor:pointer}.palette-item.selected{outline:3px solid var(--gold)}.tiny-garden{height:320px;cursor:crosshair;background:linear-gradient(#203552 0 55%,#345044 55%)}.tiny-garden span{position:absolute;transform:translate(-50%,-50%);font-size:2rem;filter:drop-shadow(0 5px 4px rgba(0,0,0,.25))}.finish-garden{width:100%;margin-top:12px}
@media(max-width:390px){.composition-card{min-height:170px;font-size:1.9rem}.odd-card{min-height:120px}.curiosity-card p{font-size:1.42rem}.track-mark{font-size:3.5rem}}
.version-note{margin:10px 0 0;color:rgba(184,192,202,.55);font-size:.75rem;letter-spacing:.04em}

/* v0.4 activity packs */
.track-trail-mark{font-size:3rem;line-height:1.4;text-align:center;white-space:pre-line;padding:1rem;border-radius:22px;background:rgba(255,255,255,.05);margin:1rem 0}.track-choice-row,.photo-choice-row,.story-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.track-choice,.photo-frame,.story-card,.crop-card{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.055);color:inherit;border-radius:20px;min-height:120px;padding:1rem;font:inherit}.track-choice span,.photo-frame span,.story-card,.crop-card span{display:block;font-size:2.4rem}.track-choice small,.photo-frame small,.crop-card small{display:block;margin-top:.5rem;color:var(--muted)}.track-choice.correct,.photo-frame.correct{outline:2px solid rgba(160,220,175,.75)}.track-choice.wrong,.photo-frame.wrong{opacity:.5}.track-match-area{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.track-names,.track-marks{display:grid;gap:.7rem}.track-match-button{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:inherit;border-radius:16px;padding:.85rem;font:inherit;min-height:58px}.track-match-button.mark span{font-size:1.9rem;display:block}.track-match-button small{display:block;color:var(--muted);font-size:.72rem}.track-match-button.selected{outline:2px solid rgba(255,218,106,.8)}.track-match-button.matched{opacity:.45}.crop-row{display:grid;grid-template-columns:1.35fr .85fr;gap:.8rem}.crop-card.chosen,.story-card.chosen{outline:2px solid rgba(255,218,106,.8);transform:translateY(-2px)}.story-grid{grid-template-columns:repeat(3,1fr)}.story-card{font-size:2.2rem;min-height:130px}.distraction-frame{position:relative;min-height:280px;border-radius:24px;background:linear-gradient(180deg,rgba(53,85,98,.55),rgba(18,47,39,.8));overflow:hidden}.distraction-frame button{position:relative;margin:1rem;border:0;background:transparent;font-size:2.4rem}.distraction-frame button.removed{opacity:.12;transform:scale(.7)}.distraction-frame button.hint{outline:2px solid rgba(255,218,106,.8);border-radius:12px}.plant-bed,.stone-garden,.seedling-bed{position:relative;min-height:310px;border-radius:25px;overflow:hidden;background:linear-gradient(180deg,rgba(48,85,74,.75) 0 45%,rgba(68,52,34,.95) 46%)}.plant-bed span,.placed-stone{position:absolute;transform:translate(-50%,-50%);font-size:2rem}.garden-finish{margin-top:1rem}.stone-garden{background:linear-gradient(180deg,rgba(42,76,70,.8),rgba(35,66,47,.95))}.path-start,.path-end{position:absolute;font-size:2rem}.path-start{left:6%;bottom:8%}.path-end{right:7%;top:8%}.bouquet-palette{display:flex;flex-wrap:wrap;justify-content:center;gap:.6rem}.bouquet-palette button{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);border-radius:16px;font-size:2rem;padding:.65rem}.bouquet-vase{position:relative;text-align:center;font-size:4rem;padding-top:6rem}.bouquet-stems{position:absolute;left:50%;top:0;transform:translateX(-50%);display:flex;align-items:flex-end;justify-content:center;width:220px;height:140px}.bouquet-stems span{font-size:2.4rem;margin:-.35rem}.seedling-bed{background:linear-gradient(180deg,rgba(27,64,60,.78),rgba(70,49,31,.95))}.seedling{position:absolute;transform:translate(-50%,-50%);border:0;background:transparent;font-size:2rem}.seedling.watered{animation:seedling-grow .35s ease-out}@keyframes seedling-grow{50%{transform:translate(-50%,-50%) scale(1.35)}}
@media(max-width:520px){.track-choice-row,.photo-choice-row{grid-template-columns:1fr 1fr}.track-match-area{gap:.6rem}.story-grid{grid-template-columns:repeat(3,1fr)}.story-card{min-height:100px;padding:.5rem;font-size:1.65rem}.crop-row{grid-template-columns:1fr 1fr}}
