:root{--bg:#f6f7f9;--card:#fff;--soft:#e8ecf2;--ink:#1b1f23;--acc:#7cc37c;--rare:#8ec8ff;--epic:#b494ff;--leg:#ffde66}
*{box-sizing:border-box}
html,body{height:100%;margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial}
body{padding:env(safe-area-inset-top) env(safe-area-inset-right) calc(16px + env(safe-area-inset-bottom)) env(safe-area-inset-left)}
.app dialog{position:relative}
.dialog-close{position:absolute;top:12px;right:12px;border:0;background:transparent;font-size:20px;line-height:1;color:#425066;cursor:pointer;padding:4px;border-radius:999px}
.dialog-close:hover{background:rgba(66,80,102,.08)}
.dialog-close:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
.app{max-width:430px;margin:0 auto;display:flex;flex-direction:column;min-height:100dvh}
.topbar{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:12px 14px;background:var(--card);border-radius:16px;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.statusbar{margin-top:8px;display:grid;grid-template-columns:repeat(2,1fr);gap:10px;background:var(--card);padding:10px 14px;border-radius:14px;box-shadow:0 1px 6px rgba(0,0,0,.05);align-items:center}
.statusbar .slot{display:flex;flex-direction:column;gap:6px}
.statusbar h4{margin:0;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#425066}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{background:linear-gradient(180deg,#f0f4f0,#e6ede6);border:1px solid var(--soft);border-radius:999px;padding:4px 10px;font-size:12px;font-weight:600;display:flex;align-items:center;gap:6px}
.chip .icon{font-size:16px}
.chip.booster{position:relative;padding-right:32px;background:linear-gradient(180deg,#f7f1ff,#ebe1ff)}
.chip.booster .timerRing{position:absolute;right:6px;width:20px;height:20px;border-radius:50%;background:conic-gradient(var(--acc) 0deg,#d6dbe7 0)}
.chip.booster .timerValue{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:20px;height:20px;display:grid;place-items:center;font-size:10px;font-weight:700;color:#1b1f23}
.brand{font-weight:700}
.wallets{display:flex;gap:8px}
.pill{background:#0000;border:1px solid var(--soft);border-radius:999px;padding:6px 10px;font-variant-numeric:tabular-nums}
.actions{display:flex;gap:8px}
.icon-btn{border:0;background:transparent;font-size:20px}
.icon-btn:active{transform:scale(.94)}
.playfield{flex:0 0 auto;display:flex;justify-content:center;padding:12px 12px 0}
.garden{margin-top:8px}
.garden{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;background:linear-gradient(180deg,#eaf4ea,#eef5f0);padding:12px;border-radius:16px;box-shadow:inset 0 0 0 1px var(--soft)}
.cell{width:92px;height:92px}
.plot{width:100%;height:100%;border-radius:14px;border:1px solid var(--soft);background:linear-gradient(180deg,#cfe9cf,#bfe0bf);position:relative;overflow:hidden}
.plot .lock{position:absolute;inset:auto auto 6px 6px;display:none;gap:4px;align-items:center;font-size:13px;opacity:.9;padding:4px 6px;border-radius:999px;background:#ffffffb3;color:#1b1f23}
.plot.locked .lock{display:flex}
.plot.locked .spr{font-size:16px;color:#2c4730;opacity:.85}
.plot.locked .bar{opacity:.2}
.plot.locked .halo{filter:grayscale(.8)}
.plot.locked{filter:grayscale(.7) contrast(.9)}
.plot .spr{position:absolute;inset:0;display:grid;place-items:center;font-size:22px}
.plot .auto-label{position:absolute;top:6px;left:50%;transform:translateX(-50%);font-size:11px;font-weight:600;color:#425066;background:#ffffffcc;padding:2px 8px;border-radius:999px;opacity:0;transition:opacity .25s ease,transform .25s ease}
.plot .auto-label.show{opacity:1;transform:translate(-50%,0)}
.plot .bar{position:absolute;left:6px;right:6px;bottom:6px;height:6px;background:#0002;border-radius:6px;overflow:hidden}
.plot .bar span{display:block;height:100%;width:0;background:var(--acc)}
.plot.ready{animation:pulse .9s infinite alternate}
.plot.ready::after{content:"";position:absolute;inset:-2px;border-radius:14px;background:linear-gradient(120deg,#ffffff00 20%,#ffffff66 40%,#ffffff00 60%);opacity:0;animation:shine 1.2s linear infinite}
@keyframes shine{0%{transform:translateX(-120%);opacity:0}30%{opacity:.85}50%{transform:translateX(0);opacity:1}70%{opacity:.85}100%{transform:translateX(120%);opacity:0}}
@keyframes pulse{to{box-shadow:0 0 0 3px #fff8,0 0 0 6px #fff4}}
.plot .halo{position:absolute;inset:-2px;border-radius:12px;pointer-events:none}
.halo.rare{box-shadow:0 0 12px 2px var(--rare)}
.halo.epic{box-shadow:0 0 14px 3px var(--epic)}
.halo.legend{box-shadow:0 0 16px 4px var(--leg)}
.flower{width:92px;height:92px;border-radius:999px;border:1px solid var(--soft);background:linear-gradient(180deg,#ffe7f0,#ffd7ea);position:relative;display:grid;place-items:center}
.flower:active{transform:scale(.98)}
.flower .spr{font-size:28px}
.combo{position:absolute;inset:6px;border-radius:999px;border:3px solid #0002}
.combo.fill{border-color:#0006}
.dock{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:8px 12px}
.dock-btn{background:var(--card);border:1px solid var(--soft);border-radius:12px;padding:10px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:6px;color:var(--ink);font-size:14px;line-height:1;white-space:nowrap}
.dock-btn.active{outline:3px solid #0001}
.tray{background:var(--card);border-top:1px solid var(--soft);padding:8px 12px;border-radius:16px;min-height:220px;display:flex;flex-direction:column;overflow-y:auto}
.panel{display:none;gap:8px;grid-template-columns:repeat(3,1fr);margin-top:4px}
.panel.active{display:grid}
.card{background:var(--bg);border:1px solid var(--soft);border-radius:12px;padding:10px}
.card h4{margin:0 0 4px 0}
.card .meta{font-size:12px;color:#6b7480}
button.buy{margin-top:6px;width:100%;border-radius:10px;border:1px solid var(--soft);background:var(--card);padding:8px}
.card.buy.active{border-color:var(--acc);box-shadow:0 0 0 2px #7cc37c55}
#panel-upgrades .compendium-card{display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:left;cursor:pointer}
#panel-upgrades .compendium-card.open{border-color:var(--acc);box-shadow:0 0 0 2px #7cc37c55}
.compendium-card .toggle{font-size:12px;color:#6b7480}
.compendium-body{display:none;margin:8px 0 16px 0;padding:12px;border:1px dashed var(--soft);border-radius:12px;background:var(--card);gap:8px}
.compendium-body.open{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.compendium-body .seed-card{background:var(--bg);border:1px solid var(--soft);border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:4px}
.seed-card h5{margin:0;font-size:14px;display:flex;align-items:center;gap:6px}
.seed-card .stat-line{font-size:12px;color:#6b7480;display:flex;justify-content:space-between}
.seed-card .desc{font-size:12px;color:#425066}
#seedPicker .seed-desc{margin:6px 0 0;font-size:12px;line-height:1.35;color:#425066}
#seedPicker::backdrop,#settings::backdrop{background:#0006}
.picker-list{display:grid;gap:8px}
.seed-picker-controls{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-size:13px;color:#425066}
.seed-picker-controls select{flex:1;border:1px solid var(--soft);border-radius:8px;padding:6px 10px;font-size:13px;background:var(--card)}
.danger{background:#ffecec;border:1px solid #ffb4b4;border-radius:10px;padding:8px}
.cheat{margin-bottom:8px;background:#e9f5ff;border:1px solid #a3d4ff;border-radius:10px;padding:8px;font-weight:600;color:#0f3c68}
.cheat:active{transform:scale(.98)}
.popup{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#fff;padding:2px 6px;border-radius:8px;box-shadow:0 2px 6px #0002;font-weight:700}
.crit{color:#b3134a}
.sparkle{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.5);pointer-events:none;font-size:26px;animation:sparklePop .8s ease-out forwards}
@keyframes sparklePop{0%{opacity:0;transform:translate(-50%,-50%) scale(.3) rotate(0)}40%{opacity:1;transform:translate(-50%,-60%) scale(1.1) rotate(15deg)}100%{opacity:0;transform:translate(-50%,-80%) scale(.6) rotate(25deg)}}
.sparkle.rare{color:var(--rare)}
.sparkle.epic{color:var(--epic)}
.sparkle.legend{color:var(--leg)}
.card.buy .timer{margin-top:6px;font-size:12px;font-weight:600;color:#1b1f23}
.stats{display:grid;gap:12px;max-width:360px}
.stats-section{border:1px solid var(--soft);border-radius:12px;padding:12px;background:var(--card);box-shadow:0 1px 3px #0001}
.stats-section h4{margin:0 0 8px 0;font-size:15px;text-transform:uppercase;letter-spacing:.05em;color:#425066}
.stat-row{display:grid;gap:2px;margin-bottom:8px}
.stat-row:last-child{margin-bottom:0}
.stat-label{font-weight:600;color:#1b1f23;display:flex;align-items:center;gap:6px}
.stat-value{font-variant-numeric:tabular-nums;color:#0f3c68}
.stat-desc{font-size:12px;color:#6b7480}
.toast-stack{position:fixed;top:18px;right:18px;display:flex;flex-direction:column;gap:10px;pointer-events:none;z-index:1000}
.toast{background:rgba(34,39,46,.95);color:#fff;padding:10px 14px;border-radius:12px;box-shadow:0 6px 20px rgba(0,0,0,.18);font-size:13px;min-width:160px;max-width:240px;display:grid;gap:4px;animation:slideIn .3s ease-out;transition:opacity .25s ease,transform .25s ease}
.toast.legendary{background:linear-gradient(120deg,#3b2337,#c77ef2)}
.toast.epic{background:linear-gradient(120deg,#24324a,#7e8efc)}
.toast .title{font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.toast .body{font-size:12px;opacity:.9}
.toast-progress{height:3px;border-radius:999px;background:rgba(255,255,255,.25);overflow:hidden}
.toast-progress span{display:block;height:100%;background:rgba(255,255,255,.85);transform-origin:left center}
@keyframes slideIn{from{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}

