@font-face{font-family:"Fredoka";src:url("fonts/fredoka.woff") format("woff");font-weight:400 700;font-display:swap}
:root{--sky:#8fd3ff;--leaf:#4fb548;--leafd:#2f7d34;--soil:#7a4e2f;--cream:#fff8e8;--coral:#ff6f61;--sun:#ffd23f;--ink:#2b3a2a;
  --safe-t:env(safe-area-inset-top,0px);--safe-b:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;overflow:hidden;background:var(--sky);font-family:"Fredoka","Trebuchet MS","Segoe UI",system-ui,sans-serif;color:var(--ink);
  user-select:none;-webkit-user-select:none;overscroll-behavior:none}
#app{position:fixed;inset:0}
#game{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:pointer}
.hidden{display:none!important}
.loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(#bfe8ff,#d8f5c8);z-index:50;font-weight:800;font-size:22px;color:var(--leafd);transition:opacity .4s}
.loading.done{opacity:0;pointer-events:none}
.sprout-spin{width:46px;height:46px;border-radius:50%;border:6px solid #c9ecb9;border-top-color:var(--leaf);animation:spin 0.9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* HUD */
.hud{position:absolute;inset:0;pointer-events:none;z-index:10}
.hud-top{position:absolute;left:0;right:0;top:calc(6px + var(--safe-t));display:flex;gap:6px;justify-content:center;align-items:stretch;padding:0 8px;flex-wrap:nowrap}
.hud-chip{background:rgba(255,248,232,.92);border:3px solid #fff;border-radius:16px;padding:4px 10px;box-shadow:0 3px 0 rgba(47,125,52,.35);display:flex;align-items:center;gap:6px;font-size:15px;white-space:nowrap}
.hud-chip b{font-size:18px;color:var(--leafd)}
.lbl{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:#6b7a5a;font-weight:700}
.day-chip{flex-direction:column;align-items:flex-start;gap:2px;min-width:92px}
.timebar{position:relative;width:100%;height:8px;border-radius:6px;background:#d6eef9;overflow:visible}
#hud-time{height:100%;width:100%;border-radius:6px;background:linear-gradient(90deg,#ffd23f,#ff9f43);transition:width .2s linear}
.timebar.hurry #hud-time{background:#ff6f61;animation:pulse .5s ease-in-out infinite alternate}
.sun{position:absolute;top:-7px;width:20px;height:20px;margin-left:-10px;left:0;filter:drop-shadow(0 1px 1px rgba(0,0,0,.2))}
@keyframes pulse{from{opacity:1}to{opacity:.45}}
.goal-chip{flex-direction:column;align-items:stretch;gap:3px;min-width:120px}
.goalrow{display:flex;align-items:baseline;gap:4px}.slash{opacity:.5}
.goalbar{position:relative;height:9px;border-radius:6px;background:#e3efd9;overflow:hidden}
#hud-goalfill{height:100%;width:0;background:linear-gradient(90deg,#7ed957,#3fae49);border-radius:6px;transition:width .25s}
.goalbar.met #hud-goalfill{background:linear-gradient(90deg,#ffd23f,#ff9f43)}
.tick{position:absolute;top:0;bottom:0;width:2px;background:rgba(43,58,42,.35)}
.tick.t1{left:62.5%}.tick.t2{left:81.25%}
.ico{width:22px;height:22px;vertical-align:middle}
.combo{background:var(--coral);color:#fff;border-radius:10px;padding:1px 7px;font-weight:800;font-size:13px}
.combo.bump{animation:bump .35s}
@keyframes bump{40%{transform:scale(1.35)}}
.hud-btns{display:flex;gap:6px;pointer-events:auto}
.round-btn{width:40px;height:40px;border-radius:50%;border:3px solid #fff;background:rgba(255,248,232,.92);font-size:18px;font-weight:800;color:var(--leafd);box-shadow:0 3px 0 rgba(47,125,52,.35);cursor:pointer;padding:0}
.round-btn.off{opacity:.55;text-decoration:line-through}
.coach{position:absolute;left:50%;top:calc(66px + var(--safe-t));transform:translateX(-50%);max-width:min(560px,92vw);background:#fff;border:3px solid var(--sun);border-radius:14px;padding:8px 14px;font-weight:700;font-size:15px;text-align:center;box-shadow:0 4px 0 rgba(0,0,0,.12);animation:coachIn .35s ease-out}
@keyframes coachIn{from{transform:translate(-50%,-10px);opacity:0}}
.hud-bottom{position:absolute;left:0;right:0;bottom:calc(8px + var(--safe-b));display:flex;flex-direction:column;align-items:center;gap:6px}
.basket{display:flex;gap:5px;background:rgba(255,248,232,.88);border:3px solid #fff;border-radius:14px;padding:3px 8px;align-items:center;font-weight:800;font-size:14px;min-height:34px;box-shadow:0 3px 0 rgba(47,125,52,.3)}
.basket .bk{display:flex;align-items:center;gap:1px}.basket .bk img{width:24px;height:24px}
.basket .cap{color:#7a8a6a;font-size:12px;margin-left:4px}
.basket.full{border-color:var(--coral)}
.basket.pop{animation:bump .3s}
.seeds{display:flex;gap:8px;pointer-events:auto}
.seed{position:relative;width:66px;height:66px;border-radius:16px;border:3px solid #fff;background:rgba(255,248,232,.95);box-shadow:0 4px 0 rgba(47,125,52,.4);display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;padding:0;font:inherit;color:var(--ink)}
.seed img{width:40px;height:40px;pointer-events:none}
.seed .cost{font-size:12px;font-weight:800;display:flex;align-items:center;gap:1px}
.seed .cost img{width:14px;height:14px}
.seed .key{position:absolute;top:2px;left:5px;font-size:10px;color:#9aa88a;font-weight:800}
.seed.sel{border-color:var(--leaf);background:#eaffdf;transform:translateY(-4px);box-shadow:0 7px 0 rgba(47,125,52,.45)}
.seed.locked{filter:grayscale(1);opacity:.55;cursor:default}
.seed.locked .cost{font-size:11px}
.seed.poor .cost{color:#d0473b}

/* world overlays */
#bubbles,#floats{position:absolute;inset:0;pointer-events:none;z-index:8;overflow:hidden}
.bubble{position:absolute;transform:translate(-50%,-100%);background:#fff;border-radius:14px;padding:4px 6px 7px;box-shadow:0 3px 0 rgba(0,0,0,.15);display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:auto;cursor:pointer;border:3px solid #fff}
.bubble::after{content:"";position:absolute;bottom:-9px;left:50%;margin-left:-8px;border:8px solid transparent;border-top-color:#fff;border-bottom:0}
.bubble .items{display:flex;gap:2px}
.bubble .it{position:relative;width:30px;height:30px}
.bubble .it img{width:30px;height:30px}
.bubble .it.done img{opacity:.35}
.bubble .it.done::after{content:"✓";position:absolute;right:-2px;bottom:-4px;color:#2f9e44;font-weight:900;font-size:18px;text-shadow:0 0 3px #fff}
.bubble .pat{width:100%;height:5px;background:#e6e6e6;border-radius:4px;overflow:hidden}
.bubble .pat i{display:block;height:100%;background:#4fb548;border-radius:4px}
.bubble.vip{border-color:#ffd23f;background:#fffbe6}
.bubble.vip::before{content:"👑";position:absolute;top:-16px;font-size:16px}
.bubble.warn .pat i{background:#ff9f43}.bubble.crit{animation:shake .3s infinite}.bubble.crit .pat i{background:#ff4d4d}
.bubble.can{border-color:#7ed957}
@keyframes shake{25%{margin-left:-2px}75%{margin-left:2px}}
.float{position:absolute;transform:translate(-50%,-50%);font-weight:900;font-size:20px;color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.35),0 0 6px rgba(0,0,0,.25);white-space:nowrap;animation:floatUp 1.1s ease-out forwards;display:flex;align-items:center;gap:3px}
.float img{width:22px;height:22px}
.float.coin{color:#ffe066}.float.bad{color:#ff8a80}.float.big{font-size:28px;color:#ffe066}.float.info{font-size:15px;color:#fff}
@keyframes floatUp{0%{opacity:0;margin-top:8px;transform:translate(-50%,-50%) scale(.6)}15%{opacity:1;transform:translate(-50%,-50%) scale(1.15)}30%{transform:translate(-50%,-50%) scale(1)}100%{opacity:0;margin-top:-56px}}
.flyicon{position:absolute;width:30px;height:30px;transform:translate(-50%,-50%);z-index:9;transition:left .45s cubic-bezier(.5,-.3,.6,1),top .45s cubic-bezier(.5,-.6,.6,1),transform .45s}

/* screens */
.screen,.overlay{position:absolute;inset:0;display:none;align-items:center;justify-content:center;z-index:20;padding:12px;background:rgba(143,211,255,.25);backdrop-filter:blur(2px)}
.screen.active,.overlay.active{display:flex}
.panel{background:var(--cream);border:4px solid #fff;border-radius:24px;padding:16px 20px;max-width:430px;width:100%;text-align:center;box-shadow:0 8px 0 rgba(47,125,52,.35),0 14px 30px rgba(0,0,0,.18);max-height:calc(100% - 10px);overflow-y:auto;animation:panelIn .35s cubic-bezier(.3,1.5,.6,1)}
.panel.small{max-width:320px}.panel.wide{max-width:520px}
@keyframes panelIn{from{transform:scale(.85);opacity:0}}
h1{margin:4px 0 2px;font-size:44px;line-height:1;letter-spacing:-.01em}
h1 .t1{color:var(--leaf);text-shadow:0 3px 0 var(--leafd)}h1 .t2{color:var(--coral);text-shadow:0 3px 0 #c9483d}
h2{margin:6px 0 6px;font-size:26px;color:var(--leafd)}
.badge{display:inline-block;margin:4px 0;background:var(--leaf);color:#fff;font-weight:800;font-size:12px;letter-spacing:.08em;padding:3px 10px;border-radius:999px}
.tagline{margin:4px 0;font-weight:700}
.ver{margin:0;font-size:11px;color:#8a9a7a}
.howto{text-align:left;margin:8px 0;padding-left:22px;font-size:14px;line-height:1.35}
.howto li{margin:3px 0}
.muted{color:#6b7a5a;font-size:14px;margin:4px 0}
.btn{display:block;width:100%;margin:7px 0;padding:12px;border-radius:16px;border:0;font:inherit;font-weight:800;font-size:18px;cursor:pointer;text-decoration:none;text-align:center}
.btn-play{background:var(--leaf);color:#fff;box-shadow:0 5px 0 var(--leafd)}
.btn-play:active{transform:translateY(3px);box-shadow:0 2px 0 var(--leafd)}
.btn-ghost{background:#fff;color:var(--leafd);box-shadow:0 4px 0 #cfe3c3;font-size:15px;padding:9px}
.btn-tip{background:#ff8fa3;color:#fff;box-shadow:0 4px 0 #d9667c;font-size:15px;padding:9px}
.row2{display:flex;gap:8px}.row2 .btn{flex:1}
.hint{font-size:13px;margin:6px 0 2px}.keys{font-size:11px;color:#8a9a7a;margin:2px 0}
@media (hover:none) and (pointer:coarse){.keys{display:none}}
.studio{font-size:11px;letter-spacing:.12em;color:#9aa88a;margin:4px 0 0;text-transform:uppercase}
.lang-picker{display:flex;justify-content:flex-end;gap:4px}
.lang-btn{border:2px solid #cfe3c3;background:#fff;border-radius:8px;font-weight:800;font-size:12px;padding:3px 8px;cursor:pointer;color:var(--leafd)}
.lang-btn.active{background:var(--leaf);color:#fff;border-color:var(--leaf)}
.news{list-style:none;padding:0;margin:8px 0;text-align:left}
.news li{background:#fff;border-radius:12px;padding:8px 10px;margin:6px 0;font-weight:700;font-size:14px;display:flex;align-items:center;gap:8px;border:2px solid #e8f3df}
.news li img{width:34px;height:34px}
.stars{display:flex;justify-content:center;gap:6px;margin:4px 0}
.stars img{width:52px;height:52px;opacity:0;transform:scale(.3)}
.stars img.show{animation:starIn .45s cubic-bezier(.3,1.8,.5,1) forwards}
@keyframes starIn{to{opacity:1;transform:scale(1)}}
.stats p{margin:4px 0;display:flex;justify-content:space-between;background:#fff;border-radius:10px;padding:6px 12px;font-size:15px}
.new-record{color:var(--coral);font-weight:900;font-size:18px;animation:bump .6s infinite alternate}
.walletline{font-size:22px;margin:4px 0}.walletline b{color:#c98a12}
.shop-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.up{background:#fff;border:3px solid #e8f3df;border-radius:14px;padding:8px;text-align:left;display:flex;flex-direction:column;gap:3px;cursor:pointer;font:inherit;color:inherit}
.up .nm{font-weight:800;font-size:14px}.up .ds{font-size:12px;color:#6b7a5a;min-height:28px}
.up .ft{display:flex;justify-content:space-between;align-items:center;font-weight:800;font-size:13px}
.up .pr{display:flex;align-items:center;gap:2px;color:#c98a12}.up .pr img{width:16px;height:16px}
.up .pips{color:var(--leaf);letter-spacing:1px}
.up.can{border-color:var(--leaf)}.up.can:hover{background:#f2ffe9}
.up.poor{opacity:.6;cursor:default}.up.maxed{opacity:.7;cursor:default}
.up.bought{animation:bump .4s}
.coach-inline{background:#fff;border:3px solid var(--sun);border-radius:12px;padding:6px 10px;font-weight:700;font-size:14px}
@media (max-width:520px){
  .hud-chip{padding:3px 7px;font-size:13px;border-radius:12px}.hud-chip b{font-size:15px}
  .day-chip{min-width:70px}.goal-chip{min-width:92px}.lbl{font-size:10px}
  .round-btn{width:34px;height:34px;font-size:15px}
  .coach{top:calc(58px + var(--safe-t));font-size:14px}
  .seed{width:58px;height:60px}.seed img{width:34px;height:34px}
  h1{font-size:38px}.shop-list{grid-template-columns:1fr 1fr}.up .ds{display:none}
  .bubble{padding:3px 4px 6px;border-radius:12px}.bubble .it,.bubble .it img{width:24px;height:24px}
}
@media (max-height:500px){
  .seed{width:54px;height:54px}.seed img{width:30px;height:30px}.hud-bottom{flex-direction:row;justify-content:center;gap:10px}
  .panel{padding:10px 16px}.howto{display:none}
}

body.clean .hud,body.clean #bubbles,body.clean #floats,body.clean .screen{display:none!important}
