/* ============================================================
   TURF TYCOON: MOW & GROW — stylesheet v2.0
   Design tokens · icon system · cohesive chunky-toy UI
   ============================================================ */
:root{
  /* palette */
  --green-950:#132b0d; --green-900:#1c3f14; --green-800:#2a5a1e;
  --green-700:#35701f; --green-600:#42902a; --green-500:#4fa832;
  --green-400:#6cc24a; --green-300:#9edc7d; --grass-strip:#4c9a35;
  --gold:#ffc531; --gold-hi:#ffe08a; --gold-dark:#e09a0e; --gold-deep:#a86c05;
  --cream:#fdf8e7; --paper:#fffdf4; --card-line:#e9e0c4;
  --ink:#2c3320; --ink-soft:#6d7a55; --ink-faint:#a3ad8e;
  --danger:#e05237; --danger-dark:#a33318;
  --hud-bg:rgba(21,35,14,.78); --hud-line:rgba(255,255,255,.14);
  --shadow-card:0 2px 0 rgba(43,66,26,.14), 0 8px 20px rgba(31,54,18,.14);
  --shadow-pop:0 18px 50px rgba(12,24,8,.45);
  /* shape & type */
  --r-s:10px; --r-m:14px; --r-l:20px;
  --font-display:'Baloo 2', 'Segoe UI', system-ui, sans-serif;
  --font-body:'Nunito', 'Segoe UI', system-ui, sans-serif;
  /* safe areas (notch devices) */
  --sat:env(safe-area-inset-top, 0px);
  --sab:env(safe-area-inset-bottom, 0px);
  --sal:env(safe-area-inset-left, 0px);
  --sar:env(safe-area-inset-right, 0px);
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{height:100%;}
body{
  margin:0; overflow:hidden; background:var(--green-900);
  font-family:var(--font-body); color:var(--ink);
  user-select:none; -webkit-user-select:none;
}
#app{position:fixed; inset:0;}
#game{position:absolute; inset:0; width:100%; height:100%; display:block; cursor:crosshair; touch-action:none;}

.hidden{display:none !important;}
.ic{display:inline-block; vertical-align:-4px; flex:none;}
span[data-icon]{display:inline-flex; line-height:0;}

/* ---------------- Splash screen ---------------- */
#splash{
  position:absolute; inset:0; z-index:100;
  background:linear-gradient(180deg,#7ec5e4 0%,#a8d9c0 42%,#6aab4e 100%);
  display:flex; align-items:center; justify-content:center;
  transition:opacity .45s ease, visibility .45s;
}
#splash.leaving{opacity:0; visibility:hidden; pointer-events:none;}
#splash-inner{text-align:center; padding:24px; animation:splashIn .55s cubic-bezier(.2,1.2,.4,1);}
@keyframes splashIn{from{transform:scale(.92) translateY(10px); opacity:0}to{transform:none; opacity:1}}
.splash-mark{display:flex; justify-content:center; margin-bottom:6px; animation:mowerBob 2.6s ease-in-out infinite; filter:drop-shadow(0 12px 16px rgba(20,40,10,.4));}
#splash-title{
  margin:0; font-family:var(--font-display); font-weight:800;
  font-size:clamp(40px, 9vw, 76px); line-height:.95; letter-spacing:2px; color:#fff;
  text-shadow:0 3px 0 var(--green-700), 0 6px 0 var(--green-800), 0 12px 0 rgba(20,45,12,.45), 0 18px 34px rgba(10,30,8,.45);
}
#splash-title span{
  display:block; font-size:.48em; letter-spacing:12px; padding-left:12px;
  background:linear-gradient(180deg,#ffe89a,var(--gold) 70%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 3px 0 rgba(122,82,4,.9)) drop-shadow(0 6px 10px rgba(60,40,0,.35));
}
#splash-bar{
  width:min(320px, 72vw); height:16px; margin:26px auto 10px;
  background:rgba(15,40,10,.35); border:3px solid var(--green-900);
  border-radius:999px; overflow:hidden; box-shadow:inset 0 2px 5px rgba(0,0,0,.3);
}
#splash-fill{
  height:100%; width:0%;
  background:linear-gradient(90deg,#ffd95e,var(--gold) 60%,#ff9a3d);
  border-radius:999px; transition:width .3s ease;
  box-shadow:0 0 12px rgba(255,197,49,.7);
}
#splash-status{
  font-family:var(--font-display); font-weight:700; font-size:15px;
  color:#1e4510; margin:0 0 16px; min-height:22px; text-shadow:0 1px 0 rgba(255,255,255,.4);
}
#splash .btn{animation:btnPop .35s cubic-bezier(.25,1.5,.45,1);}
@keyframes btnPop{from{transform:scale(.8); opacity:0}to{transform:none; opacity:1}}
#splash-note{
  font-family:var(--font-display); font-weight:600; font-size:13px;
  color:rgba(255,255,255,.9); margin-top:18px; text-shadow:0 1px 0 rgba(20,45,12,.45);
}

/* ---------------- Buttons ---------------- */
.btn{
  position:relative; display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-family:var(--font-display); font-weight:700; font-size:17px; color:var(--ink);
  background:linear-gradient(180deg,#fffef5 0%,#f3ecd2 100%);
  border:3px solid var(--green-800); border-radius:var(--r-m);
  padding:10px 22px; cursor:pointer;
  box-shadow:0 4px 0 var(--green-900), inset 0 2px 0 rgba(255,255,255,.85);
  transition:transform .09s ease, box-shadow .09s ease, filter .15s ease;
}
.btn::after{ /* soft top sheen */
  content:""; position:absolute; inset:2px 2px 55% 2px; border-radius:10px 10px 40% 40%;
  background:linear-gradient(180deg,rgba(255,255,255,.5),rgba(255,255,255,0)); pointer-events:none;
}
.btn:hover{filter:brightness(1.05); transform:translateY(-1px); box-shadow:0 5px 0 var(--green-900), inset 0 2px 0 rgba(255,255,255,.85);}
.btn:active{transform:translateY(3px); box-shadow:0 1px 0 var(--green-900), inset 0 2px 0 rgba(255,255,255,.85);}
.btn:focus-visible{outline:3px solid rgba(255,197,49,.85); outline-offset:2px;}
.btn.primary{
  background:linear-gradient(180deg,#ffd95e 0%,#f7b722 100%);
  border-color:var(--gold-deep); color:#4a3403;
  box-shadow:0 4px 0 #7a5204, inset 0 2px 0 rgba(255,255,255,.65);
  text-shadow:0 1px 0 rgba(255,255,255,.35);
}
.btn.primary:hover{box-shadow:0 5px 0 #7a5204, inset 0 2px 0 rgba(255,255,255,.65);}
.btn.primary:active{box-shadow:0 1px 0 #7a5204, inset 0 2px 0 rgba(255,255,255,.65);}
.btn.big{font-size:21px; padding:13px 30px; border-radius:var(--r-l);}
.btn.small{font-size:14px; padding:6px 14px; border-radius:var(--r-s);}
.btn.danger{
  background:linear-gradient(180deg,#f07a5a,#d84a2b);
  border-color:var(--danger-dark); color:#fff; text-shadow:0 1px 0 rgba(0,0,0,.25);
  box-shadow:0 4px 0 #6e1f0a, inset 0 2px 0 rgba(255,255,255,.3);
}
.btn.danger:hover{box-shadow:0 5px 0 #6e1f0a, inset 0 2px 0 rgba(255,255,255,.3);}
.btn.danger:active{box-shadow:0 1px 0 #6e1f0a, inset 0 2px 0 rgba(255,255,255,.3);}
.btn.danger-ghost{
  background:transparent; border-color:rgba(224,82,55,.65); color:#ffb49e;
  box-shadow:0 3px 0 rgba(0,0,0,.28);
}
.btn.danger-ghost:hover{background:rgba(224,82,55,.12);}
.btn:disabled{opacity:.55; cursor:not-allowed; transform:none !important; filter:grayscale(.45);}

.icon-btn{
  width:46px; height:46px; border-radius:var(--r-m); font-size:19px;
  border:3px solid var(--green-800); cursor:pointer; color:var(--ink);
  background:linear-gradient(180deg,#fffef5,#eee5c6);
  box-shadow:0 4px 0 var(--green-900), inset 0 2px 0 rgba(255,255,255,.85);
  display:inline-flex; align-items:center; justify-content:center;
  transition:transform .09s, box-shadow .09s, filter .15s;
}
.icon-btn:hover{filter:brightness(1.06); transform:translateY(-1px);}
.icon-btn:active{transform:translateY(3px); box-shadow:0 1px 0 var(--green-900);}
.icon-btn.small{width:36px; height:36px; border-radius:var(--r-s);}
.icon-btn .mute-off{display:none;}
.icon-btn.muted .mute-on{display:none;}
.icon-btn.muted .mute-off{display:inline-flex;}

/* ---------------- HUD ---------------- */
#hud{position:absolute; inset:0; pointer-events:none; z-index:5; padding:calc(14px + var(--sat)) calc(14px + var(--sar)) calc(14px + var(--sab)) calc(14px + var(--sal));}
#hud button{pointer-events:auto;}
#hud-top-left{position:absolute; top:calc(14px + var(--sat)); left:calc(14px + var(--sal)); display:flex; flex-direction:column; gap:8px; align-items:flex-start;}
.pill{
  display:inline-flex; align-items:center; gap:9px;
  background:var(--hud-bg); color:#fff; border-radius:999px;
  padding:8px 18px 8px 12px; font-family:var(--font-display); font-weight:700; font-size:19px;
  border:2px solid var(--hud-line); backdrop-filter:blur(5px);
  box-shadow:0 4px 14px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.12);
  width:max-content;
}
.pill .pill-ic{color:#b9d29b;}
.pill.gold .pill-ic{color:var(--gold);}
#gold-pill{font-size:24px;}
#gold-val{color:var(--gold); min-width:56px; text-shadow:0 0 14px rgba(255,197,49,.35); font-variant-numeric:tabular-nums;}
#rate-val,#grass-val{font-size:15px; color:#cfe3b6; font-variant-numeric:tabular-nums;}

/* prestige pill */
.pill-btn{cursor:pointer; font-size:15px; padding:6px 14px 6px 11px; transition:transform .12s, filter .15s;}
.pill-btn:hover{filter:brightness(1.15); transform:translateY(-1px);}
.pill-btn:active{transform:translateY(1px) scale(.98);}
.pill-btn .star-ic{color:var(--gold); display:inline-flex;}
#prestige-val{color:#ffe9a8; font-variant-numeric:tabular-nums; min-width:38px;}
.prestige-mini-bar{
  width:44px; height:7px; background:rgba(255,255,255,.16); border-radius:99px;
  overflow:hidden; display:inline-flex; flex:none;
}
#prestige-fill{
  height:100%; width:0%; border-radius:99px;
  background:linear-gradient(90deg,var(--gold-dark),var(--gold-hi));
  transition:width .4s ease;
}
.pill-btn.unlocked .star-ic{animation:starWink 1.4s ease-in-out infinite; filter:drop-shadow(0 0 6px rgba(255,197,49,.8));}
@keyframes starWink{0%,100%{transform:scale(1) rotate(0)}50%{transform:scale(1.22) rotate(14deg)}}

#hud-top-right{position:absolute; top:calc(14px + var(--sat)); right:calc(14px + var(--sar)); display:flex; gap:9px; z-index:6;}

#boost-banner{
  position:absolute; top:calc(16px + var(--sat)); left:50%; transform:translateX(-50%);
  display:inline-flex; align-items:center; gap:9px;
  background:linear-gradient(90deg,#ff9a3d,#ffce54,#ff9a3d);
  background-size:200% 100%;
  color:#5a3200; font-family:var(--font-display); font-weight:800; font-size:17px;
  border:3px solid #b86b00; border-radius:999px; padding:7px 22px;
  box-shadow:0 4px 0 #7a4a00, 0 8px 22px rgba(255,170,0,.35);
  animation:bannerPulse 1.15s ease-in-out infinite, bannerShimmer 2.4s linear infinite;
  pointer-events:none;
}
#boost-banner .bb-sep{width:4px; height:4px; border-radius:50%; background:rgba(90,50,0,.55);}
@keyframes bannerPulse{0%,100%{transform:translateX(-50%) scale(1)}50%{transform:translateX(-50%) scale(1.045)}}
@keyframes bannerShimmer{0%{background-position:0% 0}100%{background-position:200% 0}}

/* mission tracker (flows below the pill stack) */
#missions-tracker{
  display:flex; flex-direction:column; gap:9px; width:262px;
}
.mission-card{
  background:var(--hud-bg); border:2px solid var(--hud-line);
  border-radius:var(--r-m); padding:10px 12px; color:#fff; backdrop-filter:blur(5px);
  box-shadow:0 4px 14px rgba(0,0,0,.25); animation:cardIn .35s cubic-bezier(.2,1.2,.4,1);
}
@keyframes cardIn{from{opacity:0; transform:translateY(-8px) scale(.97)}to{opacity:1; transform:none}}
.mission-card .m-title{
  font-family:var(--font-display); font-size:14.5px; font-weight:700;
  display:flex; justify-content:space-between; align-items:center; gap:8px;
}
.mission-card .m-title .m-name{display:inline-flex; align-items:center; gap:7px; min-width:0;}
.mission-card .m-title .m-name .ic{color:#a9d585;}
.mission-card .m-reward{
  display:inline-flex; align-items:center; gap:5px; white-space:nowrap;
  font-size:13px; font-weight:800; color:var(--gold-hi);
}
.mission-card .m-reward .ic{color:var(--gold);}
.mission-card .m-bar{height:9px; background:rgba(255,255,255,.14); border-radius:99px; margin-top:8px; overflow:hidden;}
.mission-card .m-fill{
  height:100%; width:0%; border-radius:99px; position:relative;
  background:linear-gradient(90deg,#7ed957,#c7f464); transition:width .35s ease;
  overflow:hidden;
}
.mission-card .m-fill::after{ /* sheen sweep */
  content:""; position:absolute; inset:0;
  background:linear-gradient(115deg,transparent 30%,rgba(255,255,255,.5) 50%,transparent 70%);
  animation:sheen 2.6s linear infinite;
}
@keyframes sheen{from{transform:translateX(-120%)}to{transform:translateX(220%)}}
.mission-card.done{border-color:rgba(255,197,49,.85); box-shadow:0 0 0 1px rgba(255,197,49,.35), 0 0 18px rgba(255,197,49,.28);}
.mission-card.done .m-fill{background:linear-gradient(90deg,#ffd95e,#fff3b0);}
.mission-card .m-claim{
  margin-top:9px; width:100%; font-size:14px; padding:6px 8px;
  animation:claimPulse 1.1s ease-in-out infinite;
}
.mission-card .m-claim .ic{color:#3f7d27;}
@keyframes claimPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.035)}}

#btn-shop{position:absolute; right:calc(16px + var(--sar)); bottom:calc(16px + var(--sab));}
@keyframes shopWiggle{0%,86%,100%{transform:rotate(0) translateY(0)}90%{transform:rotate(-1.6deg) translateY(-2px)}95%{transform:rotate(1.6deg) translateY(-1px)}}
#btn-shop.wiggle{animation:shopWiggle 3.8s infinite;}

#hint{
  position:absolute; bottom:calc(18px + var(--sab)); left:50%; transform:translateX(-50%);
  background:var(--hud-bg); color:#fff; border:2px solid var(--hud-line);
  border-radius:999px; padding:10px 22px;
  font-family:var(--font-display); font-weight:700; font-size:15px;
  display:inline-flex; align-items:center; gap:9px;
  backdrop-filter:blur(5px); animation:hintFloat 2.2s ease-in-out infinite;
  box-shadow:0 6px 18px rgba(0,0,0,.3); max-width:86vw; text-align:center;
}
#hint::before{content:""; width:8px; height:8px; border-radius:50%; background:var(--gold); box-shadow:0 0 10px var(--gold); flex:none; animation:hintDot 2.2s ease-in-out infinite;}
@keyframes hintFloat{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,-7px)}}
@keyframes hintDot{0%,100%{opacity:.5}50%{opacity:1}}

/* ---------------- Tutorial (coach marks) ---------------- */
#tut-root{position:absolute; inset:0; z-index:35; overflow:hidden; pointer-events:none;}
#tut-hole{
  position:absolute; left:0; top:0; width:0; height:0;
  border:3px solid rgba(255,197,49,.95); border-radius:16px;
  box-shadow:0 0 0 9999px rgba(7,15,5,.6);
  transition:left .28s ease, top .28s ease, width .28s ease, height .28s ease, border-radius .28s ease;
}
#tut-hole.full{border-color:transparent; box-shadow:none; background:rgba(7,15,5,.62);}
#tut-hole::after{
  content:""; position:absolute; inset:-8px; border-radius:inherit;
  border:2px solid rgba(255,197,49,.55); animation:tutRing 1.7s ease-out infinite;
}
#tut-hole.full::after{display:none;}
@keyframes tutRing{0%{transform:scale(1); opacity:.9}70%,100%{transform:scale(1.08); opacity:0}}

#tut-card{
  position:absolute; width:min(352px, calc(100vw - 24px)); pointer-events:auto;
  background:var(--paper); border:3px solid var(--green-800); border-radius:var(--r-l);
  box-shadow:var(--shadow-pop), 0 0 0 5px rgba(255,255,255,.18);
  padding:14px 16px 13px; z-index:36;
  animation:tutCardIn .34s cubic-bezier(.25,1.35,.45,1);
}
@keyframes tutCardIn{from{transform:translateY(10px) scale(.94); opacity:0}to{transform:none; opacity:1}}
.tut-head{display:flex; align-items:center; gap:9px;}
.tut-head .tut-ic{
  width:36px; height:36px; border-radius:11px; flex:none;
  display:inline-flex; align-items:center; justify-content:center; color:var(--green-700);
  background:linear-gradient(180deg,#eef6e3,#dcecc8); border:1.5px solid #c8dcb0;
}
#tut-title{margin:0; flex:1; font-family:var(--font-display); font-weight:800; font-size:19px; line-height:1.15;}
#tut-badge{
  font-family:var(--font-display); font-weight:800; font-size:12px; color:#4a3403;
  background:linear-gradient(180deg,#ffe08a,var(--gold)); border:2px solid var(--gold-deep);
  border-radius:999px; padding:2px 10px; white-space:nowrap; flex:none;
}
.tut-skip{
  background:none; border:none; cursor:pointer; padding:4px 2px; flex:none;
  font-family:var(--font-display); font-weight:700; font-size:13px; color:var(--ink-faint);
}
.tut-skip:hover{color:var(--danger);}
#tut-body{margin:10px 0 13px; font-size:14.5px; line-height:1.5; color:var(--ink);}
#tut-body b{color:var(--green-700);}
.tut-foot{display:flex; align-items:center; gap:10px;}
.tut-dots{display:inline-flex; gap:5px; flex:1;}
.tut-dots i{width:8px; height:8px; border-radius:50%; background:#ded6b8; transition:background .2s, transform .2s;}
.tut-dots i.done{background:var(--green-400);}
.tut-dots i.on{background:var(--gold); transform:scale(1.25); box-shadow:0 0 8px rgba(255,197,49,.8);}
#tut-next{font-size:15px; padding:8px 20px; border-radius:var(--r-s);}

/* gold glow on the currently highlighted element */
.tut-focus{box-shadow:0 0 0 4px rgba(255,197,49,.85), 0 0 24px rgba(255,197,49,.45) !important;}

/* ---------------- Shop panel ---------------- */
#shop-panel{
  position:absolute; top:0; right:0; height:100%; width:408px; max-width:96vw; z-index:20;
  background:var(--paper); border-left:4px solid var(--green-800);
  box-shadow:-14px 0 40px rgba(0,0,0,.32);
  display:flex; flex-direction:column;
  padding-top:var(--sat); padding-bottom:var(--sab);
  animation:panelIn .26s cubic-bezier(.2,.9,.3,1);
}
@keyframes panelIn{from{transform:translateX(46px); opacity:0}to{transform:none; opacity:1}}
#shop-panel header{
  display:flex; align-items:center; gap:12px;
  padding:13px 16px; background:linear-gradient(180deg,var(--green-600),var(--green-700));
  color:#fff; border-bottom:3px solid var(--green-800);
}
#shop-panel header h2{
  margin:0; font-family:var(--font-display); font-size:23px; display:inline-flex; align-items:center; gap:9px;
  text-shadow:0 2px 0 rgba(0,0,0,.25); flex:1;
}
.shop-balance{
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(0,0,0,.28); border-radius:999px; padding:5px 12px;
  font-family:var(--font-display); font-weight:800; font-size:15px; color:var(--gold-hi);
}
.shop-balance .ic{color:var(--gold);}
#shop-tabs{display:flex; flex-wrap:wrap; gap:6px; padding:10px 12px; background:var(--green-600); border-bottom:3px solid var(--green-800);}
.tab{
  flex:1 1 auto; display:inline-flex; align-items:center; justify-content:center; gap:6px;
  font-family:var(--font-display); font-weight:700; font-size:14px;
  background:rgba(255,255,255,.14); color:#eaf5df; border:2px solid rgba(255,255,255,.22);
  border-radius:var(--r-s); padding:7px 10px; cursor:pointer;
  transition:background .15s, transform .1s, color .15s;
}
.tab .ic{opacity:.85;}
.tab:hover{background:rgba(255,255,255,.28); transform:translateY(-1px);}
.tab.active{background:var(--paper); color:var(--ink); border-color:var(--paper);}

/* buy-multi segmented control */
#buy-multi{
  display:flex; align-items:center; gap:6px; padding:9px 14px;
  background:#f4eed7; border-bottom:2px solid var(--card-line);
}
#buy-multi .bm-label{
  font-family:var(--font-display); font-weight:800; font-size:13px;
  color:var(--ink-soft); letter-spacing:.5px; text-transform:uppercase; margin-right:2px;
}
.bm-opt{
  font-family:var(--font-display); font-weight:800; font-size:14px;
  background:#fff; color:var(--ink-soft); border:2px solid var(--card-line);
  border-radius:999px; padding:4px 15px; cursor:pointer;
  transition:background .13s, color .13s, transform .1s, border-color .13s;
}
.bm-opt:hover{transform:translateY(-1px); border-color:var(--green-400);}
.bm-opt.active{background:var(--green-600); color:#fff; border-color:var(--green-800);}
#shop-content{flex:1; overflow-y:auto; padding:14px 14px 18px; scrollbar-width:thin; scrollbar-color:var(--green-400) transparent;}
#shop-content::-webkit-scrollbar{width:9px;}
#shop-content::-webkit-scrollbar-thumb{background:var(--green-400); border-radius:8px;}
.modal-body::-webkit-scrollbar{width:9px;}
.modal-body::-webkit-scrollbar-thumb{background:var(--green-400); border-radius:8px;}

.shop-note{
  display:flex; align-items:flex-start; gap:8px;
  font-size:13.5px; color:var(--ink-soft);
  background:#f4eed7; border:1px solid var(--card-line); border-radius:var(--r-s);
  padding:9px 11px; margin:0 0 12px;
}
.shop-note .ic{color:var(--gold-dark); margin-top:1px;}
.shop-section-title{
  font-family:var(--font-display); font-size:15px; font-weight:800; letter-spacing:.8px;
  color:var(--ink-faint); margin:2px 2px 10px; text-transform:uppercase;
}
.card{
  background:#fff; border:2px solid var(--card-line); border-radius:var(--r-m);
  padding:12px 13px; margin-bottom:10px; position:relative;
  box-shadow:var(--shadow-card); transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card:hover{transform:translateY(-2px); box-shadow:0 4px 0 rgba(43,66,26,.14), 0 12px 26px rgba(31,54,18,.2);}
.card.affordable{border-color:rgba(224,154,14,.65); box-shadow:0 0 0 1px rgba(255,197,49,.4), var(--shadow-card);}
.card.maxed{opacity:.72; filter:saturate(.55);}
.card.just-bought{animation:cardFlash .55s ease;}
@keyframes cardFlash{
  0%{box-shadow:0 0 0 0 rgba(110,220,90,.9); border-color:#6cdc5a;}
  100%{box-shadow:0 0 0 14px rgba(110,220,90,0); border-color:var(--card-line);}
}
.card .row1{display:flex; justify-content:space-between; align-items:center; gap:8px;}
.card .c-name{
  font-family:var(--font-display); font-weight:800; font-size:16.5px;
  display:flex; align-items:center; gap:9px; min-width:0;
}
.card .c-name .c-ic{
  width:34px; height:34px; border-radius:10px; flex:none;
  display:inline-flex; align-items:center; justify-content:center;
  background:linear-gradient(180deg,#eef6e3,#dcecc8); color:var(--green-700);
  border:1.5px solid #c8dcb0;
}
.card .c-desc{font-size:13.5px; color:var(--ink-soft); margin:6px 0 8px; line-height:1.45;}
.card .c-stat{
  font-size:12.5px; font-weight:800; color:var(--green-700); margin-bottom:9px;
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
}
.card .c-stat .arrow{color:var(--ink-faint);}
.card .c-foot{display:flex; justify-content:space-between; align-items:center; gap:8px;}
.card .c-cost{
  display:inline-flex; align-items:center; gap:5px;
  font-family:var(--font-display); font-weight:800; color:var(--gold-deep); font-size:15px;
  font-variant-numeric:tabular-nums;
}
.card .c-cost .ic{color:var(--gold-dark);}
.card .c-lvl{
  position:absolute; top:-11px; right:12px;
  background:var(--green-600); color:#fff; border-radius:999px;
  font-family:var(--font-display); font-size:12px; font-weight:800; padding:2px 11px;
  border:2px solid var(--green-800); box-shadow:0 2px 5px rgba(0,0,0,.2);
}
.card .c-btn{font-size:14.5px; padding:7px 16px; border-radius:var(--r-s);}
.card .owned-tag{
  display:inline-flex; align-items:center; gap:6px;
  font-family:var(--font-display); font-weight:800; font-size:14px; color:var(--green-600);
}
.card .locked-tag{
  display:inline-flex; align-items:center; gap:6px;
  font-family:var(--font-display); font-weight:700; font-size:13px; color:var(--ink-soft);
  background:#f1ecd9; border:1px dashed #d5cba6; border-radius:999px; padding:5px 12px;
}
.bar{height:10px; background:#ece5cc; border-radius:99px; overflow:hidden; margin-bottom:9px;}
.bar .fill{height:100%; background:linear-gradient(90deg,var(--green-500),var(--green-400)); border-radius:99px; transition:width .4s ease;}
.bar.gold .fill{background:linear-gradient(90deg,var(--gold),var(--gold-hi));}
.bar.locked .fill{background:#b9b4a2;}

/* prestige */
.prestige-hero{text-align:center; padding:16px 10px 6px;}
.prestige-hero .stars{display:inline-flex; color:var(--gold-dark); filter:drop-shadow(0 3px 5px rgba(168,108,5,.35)); animation:starSpin 7s linear infinite;}
@keyframes starSpin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
.prestige-hero .big-num{font-family:var(--font-display); font-size:36px; font-weight:800; color:var(--gold-deep); line-height:1.1;}
.prestige-hero .sub{color:var(--ink-soft); font-size:14px; margin-top:4px;}
.prestige-note{font-size:13.5px; color:var(--ink-soft); line-height:1.55;}

/* milestones */
.ms-grid{display:grid; grid-template-columns:1fr; gap:10px;}
.ms-item{background:#fff; border:2px solid var(--card-line); border-radius:var(--r-m); padding:11px 13px; box-shadow:var(--shadow-card);}
.ms-item.done{border-color:rgba(224,154,14,.6); background:#fffaf0;}
.ms-item .ms-row{
  display:flex; justify-content:space-between; align-items:center; gap:8px;
  font-family:var(--font-display); font-weight:800; font-size:14.5px;
}
.ms-item .ms-row .ms-name{display:inline-flex; align-items:center; gap:8px;}
.ms-item .ms-row .ms-name .ic{color:var(--gold-dark);}
.ms-item .ms-check{color:var(--green-500); display:inline-flex;}
.ms-item .ms-desc{font-size:12.5px; color:var(--ink-soft); margin:4px 0 8px;}

/* ---------------- Menus ---------------- */
#main-menu, #pause-menu{position:absolute; inset:0; z-index:30; display:flex; align-items:center; justify-content:center;}
#main-menu{background:linear-gradient(180deg,#8ecfe8 0%,#b5e2cf 46%,#79b95c 100%); overflow:hidden;}
#pause-menu{background:rgba(12,24,8,.55); backdrop-filter:blur(4px); animation:fadeIn .2s;}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}

/* painted menu scene */
#menu-art{position:absolute; inset:0; overflow:hidden; pointer-events:none;}
#menu-art .sun{
  position:absolute; top:7%; right:12%; width:110px; height:110px; border-radius:50%;
  background:radial-gradient(circle at 38% 35%, #fff7cf, #ffd95e 58%, #ffc531);
  box-shadow:0 0 60px 22px rgba(255,220,110,.55);
  animation:sunBob 6s ease-in-out infinite;
}
@keyframes sunBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
#menu-art .cloud{
  position:absolute; background:#fff; border-radius:999px; opacity:.92; filter:drop-shadow(0 8px 14px rgba(60,110,140,.18));
}
#menu-art .cloud::before, #menu-art .cloud::after{content:""; position:absolute; background:#fff; border-radius:50%;}
#menu-art .cloud.c1{width:150px; height:44px; top:16%; left:8%;  animation:drift 46s linear infinite;}
#menu-art .cloud.c2{width:110px; height:34px; top:28%; right:22%; animation:drift 60s linear infinite reverse; opacity:.75;}
#menu-art .cloud.c3{width:190px; height:52px; top:8%;  left:44%; animation:drift 72s linear infinite; opacity:.85;}
#menu-art .cloud.c1::before{width:56px; height:56px; top:-26px; left:22px;}
#menu-art .cloud.c1::after{width:40px; height:40px; top:-16px; left:76px;}
#menu-art .cloud.c2::before{width:42px; height:42px; top:-19px; left:18px;}
#menu-art .cloud.c2::after{width:30px; height:30px; top:-11px; left:58px;}
#menu-art .cloud.c3::before{width:70px; height:70px; top:-32px; left:34px;}
#menu-art .cloud.c3::after{width:48px; height:48px; top:-20px; left:104px;}
@keyframes drift{from{transform:translateX(-30vw)}to{transform:translateX(120vw)}}
#menu-art .hills{position:absolute; left:0; right:0; bottom:96px; width:100%; height:180px; display:block;}
#menu-art .grass-strip{position:absolute; left:0; right:0; bottom:0; width:100%; height:120px; display:block;}
#menu-art .mower-lane{position:absolute; left:0; right:0; bottom:58px; height:64px; overflow:hidden;}
.menu-mower{
  position:absolute; bottom:0; left:-140px; width:110px; height:auto;
  animation:mowerDrive 14s linear infinite;
  filter:drop-shadow(0 6px 6px rgba(20,40,10,.3));
}
@keyframes mowerDrive{
  0%{transform:translateX(0) scaleX(1);}
  49.9%{transform:translateX(calc(100vw + 280px)) scaleX(1);}
  50%{transform:translateX(calc(100vw + 280px)) scaleX(-1);}
  99.9%{transform:translateX(0) scaleX(-1);}
  100%{transform:translateX(0) scaleX(1);}
}
#menu-art .flower{
  position:absolute; bottom:26px; width:16px; height:16px; border-radius:50%;
  background:radial-gradient(circle at 50% 42%, #ffd95e 0 34%, #fff 36% 70%, transparent 72%);
  box-shadow:0 0 0 3px rgba(255,255,255,.25);
  animation:flowerSway 3.4s ease-in-out infinite;
}
#menu-art .flower.f1{left:12%; animation-delay:.2s}
#menu-art .flower.f2{left:30%; bottom:40px; transform:scale(.8)}
#menu-art .flower.f3{left:55%; animation-delay:1.1s}
#menu-art .flower.f4{left:74%; bottom:44px; transform:scale(.85); animation-delay:.6s}
#menu-art .flower.f5{left:88%; animation-delay:1.5s}
#menu-art .flower.f6{left:44%; bottom:18px; transform:scale(.7); animation-delay:.9s}
@keyframes flowerSway{0%,100%{rotate:0deg}50%{rotate:8deg}}

.menu-inner, .pause-inner{position:relative; text-align:center; animation:menuPop .5s cubic-bezier(.2,1.35,.4,1); padding:24px;}
@keyframes menuPop{from{transform:scale(.88) translateY(14px); opacity:0}to{transform:none; opacity:1}}
.mower-mark{display:flex; justify-content:center; margin-bottom:2px; animation:mowerBob 3.2s ease-in-out infinite; filter:drop-shadow(0 10px 14px rgba(20,40,10,.35));}
@keyframes mowerBob{0%,100%{transform:translateY(0) rotate(-1.2deg)}50%{transform:translateY(-9px) rotate(1.2deg)}}
#title{
  margin:2px 0 0; font-family:var(--font-display); font-weight:800;
  font-size:clamp(46px, 9vw, 92px); line-height:.94; letter-spacing:2px; color:#fff;
  text-shadow:0 3px 0 var(--green-700), 0 6px 0 var(--green-800), 0 12px 0 rgba(20,45,12,.45), 0 18px 34px rgba(10,30,8,.45);
}
#title span{
  display:block; font-size:.52em; letter-spacing:10px; padding-left:10px;
  background:linear-gradient(180deg,#ffe89a,var(--gold) 70%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 3px 0 rgba(122,82,4,.9)) drop-shadow(0 6px 10px rgba(60,40,0,.35));
}
#title span, #tagline{animation:titleBob 3.2s ease-in-out infinite;}
@keyframes titleBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
#tagline{
  font-family:var(--font-display); color:#24530f; font-size:18px; font-weight:700;
  margin:16px 0 26px; text-shadow:0 1px 0 rgba(255,255,255,.55);
}
.menu-buttons{display:flex; flex-direction:column; gap:12px; align-items:stretch; width:288px; margin:0 auto;}
.menu-buttons .btn{width:100%;}
#version-note, #pause-note{color:rgba(255,255,255,.92); font-family:var(--font-display); font-weight:600; font-size:13.5px; margin-top:22px; text-shadow:0 1px 0 rgba(20,45,12,.4);}
#pause-note{color:rgba(255,255,255,.72);}
.pause-inner h1{
  font-family:var(--font-display); font-size:44px; color:#fff; margin:0 0 26px;
  display:inline-flex; align-items:center; gap:14px;
  text-shadow:0 3px 0 rgba(0,0,0,.3);
}

/* ---------------- Modals ---------------- */
.modal-back{
  position:absolute; inset:0; z-index:40; background:rgba(9,18,5,.58);
  display:flex; align-items:center; justify-content:center;
  backdrop-filter:blur(3px); animation:fadeIn .18s;
  padding:16px;
}
.modal{
  background:var(--paper); border:4px solid var(--green-800); border-radius:var(--r-l);
  width:min(432px, 92vw); max-height:86vh; display:flex; flex-direction:column;
  box-shadow:var(--shadow-pop), 0 0 0 6px rgba(255,255,255,.18);
  animation:modalPop .28s cubic-bezier(.25,1.4,.45,1); overflow:hidden;
}
@keyframes modalPop{from{transform:scale(.86) translateY(16px); opacity:0}to{transform:none; opacity:1}}
.modal.wide{width:min(560px, 94vw);}
.modal header{
  display:flex; align-items:center; justify-content:space-between;
  background:linear-gradient(180deg,var(--green-600),var(--green-700));
  color:#fff; padding:13px 16px; border-bottom:3px solid var(--green-800);
}
.modal header h3{margin:0; font-family:var(--font-display); font-size:20px; display:inline-flex; align-items:center; gap:9px; text-shadow:0 2px 0 rgba(0,0,0,.22);}
.modal-body{padding:16px 18px 18px; overflow-y:auto; font-size:15px; line-height:1.55;}
.modal-body.center{text-align:center; display:flex; flex-direction:column; align-items:center;}
.modal-body .lead{margin:0 0 10px;}
.modal-body ul.tips{list-style:none; margin:10px 0 4px; padding:0; display:flex; flex-direction:column; gap:10px;}
.modal-body ul.tips li{display:flex; gap:11px; align-items:flex-start; font-size:14px; line-height:1.5;}
.tip-ic{
  width:30px; height:30px; border-radius:9px; flex:none; margin-top:1px;
  display:inline-flex; align-items:center; justify-content:center;
  background:linear-gradient(180deg,#eef6e3,#dcecc8); color:var(--green-700); border:1.5px solid #c8dcb0;
}
.tip-ic.gold{background:linear-gradient(180deg,#fff3c8,#ffe08a); color:var(--gold-deep); border-color:#f0d488;}
.modal-actions{display:flex; gap:10px; justify-content:center; margin-top:16px; flex-wrap:wrap;}
.muted-note{color:var(--ink-soft); font-size:13px; margin:6px 0 0;}
.keys{
  margin-top:14px; font-size:13.5px; color:var(--ink-soft);
  display:flex; align-items:center; gap:7px; flex-wrap:wrap;
}
.kbd{
  font-family:var(--font-display); font-weight:800; font-size:12.5px; color:var(--ink);
  background:#f1ecd9; border:1.5px solid #d5cba6; border-bottom-width:3px;
  border-radius:7px; padding:2px 8px;
}
.keys .dot{width:4px; height:4px; border-radius:50%; background:#c9c2a6; margin:0 3px;}
.slider-row{display:flex; align-items:center; gap:12px; margin:13px 0; font-family:var(--font-display); font-weight:700; font-size:15px;}
.slider-row span{width:78px; flex:none;}
.slider-row input[type=range]{flex:1; accent-color:var(--green-500); cursor:pointer;}
.slider-row b{width:36px; text-align:right; font-variant-numeric:tabular-nums;}
.check-row{display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:700; margin:13px 0; cursor:pointer;}
.check-row input{width:18px; height:18px; accent-color:var(--green-500); cursor:pointer;}
.offline-gold{
  display:inline-flex; align-items:center; gap:12px; margin:12px 0 6px;
  font-family:var(--font-display); font-size:38px; font-weight:800; color:var(--gold-deep);
  animation:goldPulse 1.5s ease-in-out infinite;
}
.offline-gold .ic{color:var(--gold-dark);}
@keyframes goldPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}
#save-text{
  width:100%; height:112px; font-family:ui-monospace, Menlo, Consolas, monospace; font-size:11px;
  border:2px solid var(--card-line); border-radius:var(--r-s); padding:9px; resize:vertical;
  background:#faf6e6; color:var(--ink); user-select:text; -webkit-user-select:text;
}

/* ---------------- Toasts ---------------- */
#toast-root{
  position:absolute; top:calc(72px + var(--sat)); left:50%; transform:translateX(-50%); z-index:50;
  display:flex; flex-direction:column; gap:8px; align-items:center; pointer-events:none;
}
.toast{
  display:inline-flex; align-items:center; gap:9px;
  background:rgba(21,35,14,.92); color:#fff; border:2px solid rgba(255,255,255,.16);
  padding:10px 20px; border-radius:999px;
  font-family:var(--font-display); font-weight:700; font-size:15px;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
  animation:toastIn .32s cubic-bezier(.2,1.4,.4,1); max-width:88vw; text-align:center;
}
.toast .t-ic{display:inline-flex; color:var(--gold);}
.toast.gold{background:linear-gradient(90deg,#b8810b,#e6a817); border-color:#ffe08a;}
.toast.gold .t-ic{color:#fff3c8;}
.toast.out{animation:toastOut .3s ease forwards;}
@keyframes toastIn{from{transform:translateY(-16px) scale(.9); opacity:0}to{transform:none; opacity:1}}
@keyframes toastOut{to{transform:translateY(-14px); opacity:0}}

/* bump for gold pill */
.pill.bump{animation:bump .28s cubic-bezier(.3,1.6,.5,1);}
@keyframes bump{0%{transform:scale(1)}45%{transform:scale(1.09)}100%{transform:scale(1)}}

/* full-screen juice flash (milestones, prestige) */
#flash{
  position:absolute; inset:0; z-index:45; pointer-events:none; opacity:0;
  background:radial-gradient(circle at 50% 45%, rgba(255,236,150,.85), rgba(255,197,49,.25) 55%, transparent 78%);
}
#flash.go{animation:flashPop .65s ease-out forwards;}
@keyframes flashPop{0%{opacity:0}18%{opacity:.9}100%{opacity:0}}

/* ---------------- Responsive & a11y ---------------- */
@media (max-width:720px){
  #shop-panel{width:100vw; border-left:none;}
  #missions-tracker{width:206px;}
  .pill{font-size:16px; padding:6px 13px;}
  #gold-pill{font-size:19px;}
  .menu-buttons{width:min(288px, 84vw);}
  #btn-shop{right:calc(12px + var(--sar)); bottom:calc(12px + var(--sab));}
  #splash-bar{width:min(280px, 70vw);}
  .bm-opt{padding:4px 12px; font-size:13px;}
  #tut-card{width:min(330px, calc(100vw - 20px)); padding:12px 13px;}
  #tut-title{font-size:17px;}
  #tut-body{font-size:13.5px; margin:8px 0 11px;}
}
@media (max-height:560px){
  #missions-tracker{display:none;}
  #title{font-size:clamp(34px, 8vw, 56px);}
}
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{animation-duration:.001s !important; animation-iteration-count:1 !important; transition-duration:.001s !important;}
}
