@charset "UTF-8";
:root{
  --ink:#162320; --cream:#fff0c8; --gold:#ffd26d; --muted:#a8c1b6;
  --night:#102b2b; --purple:#e0b7ff; --outline:#162019;
  font-family:"Barlow","Microsoft YaHei","PingFang SC",system-ui,sans-serif;
  font-synthesis:weight; color:var(--cream); color-scheme:dark;
}
*{box-sizing:border-box}
body{margin:0;background:var(--night);min-height:100svh;display:grid;align-items:center}
button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button:focus-visible,canvas:focus-visible{outline:3px solid #fff7b5;outline-offset:3px}
button:active{translate:0 2px}
button:hover{filter:brightness(1.07)}
svg{width:100%;height:100%;display:block}
i[data-icon],.utility i,.wave i,.location i,.action i{display:inline-flex;flex:none;width:20px;height:20px}
#backdrop{position:fixed;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none}
.game-shell{width:min(1232px,94vw,calc((100svh - 365px)*2.65));min-width:min(94vw,850px);margin:14px auto 16px}
.masthead,.brand,.tools,.command-strip,.location,.wave,.shortcuts,.game-footer,.arena-status,.augment-console,.action,.utility,.edition{display:flex;align-items:center}
.masthead{justify-content:space-between;margin:0 1px 15px;gap:14px;min-height:58px}
.brand{gap:10px;isolation:isolate}
.brand-art{width:60px;height:59px;position:relative;transform:rotate(-7deg);flex:none}
.brand-art i{position:absolute;inset:9px 4px 0;background:linear-gradient(150deg,#e8c565,#957447);border:3px solid #1d2b24;outline:1px solid #7c8962;box-shadow:inset 0 0 0 3px #dbb566;transform:rotate(-9deg);border-radius:19px 10px 18px 9px}
.brand-art img{position:absolute;inset:-5px -2px 0;width:68px;height:68px;filter:drop-shadow(0 1px 1px #12231c)}
h1{margin:0;display:flex;align-items:baseline;white-space:nowrap;letter-spacing:-3px;transform:skew(-7deg) rotate(-1deg);font-size:clamp(31px,3.25vw,47px);font-weight:1000;line-height:1.16;filter:drop-shadow(0 3px 0 #112218)}
h1 span{paint-order:stroke fill;-webkit-text-stroke:3.5px #1c3023;text-shadow:0 3px #648742,1px 4px #182a1e}
.word-plants{color:#c8ee79}.word-vs{font-size:.73em;color:#ffda8a;text-shadow:0 2.5px #a07740;margin:0 2px}.word-zombies{color:#f0ead2;text-shadow:0 3px #8c9782}
.edition{background:linear-gradient(135deg,#524062,#3a334d);border:1px solid #9272ab;box-shadow:inset 0 0 0 2px #403249,0 2px 0 #121e21;border-radius:6px;gap:3px;padding:4px 8px;color:#ecd4ff;letter-spacing:.8px;font-size:13px;font-weight:800;transform:rotate(-3deg);white-space:nowrap}
.edition i{width:13px;height:17px}
.tools{gap:8px}
.utility{height:35px;justify-content:center;gap:6px;border:1px solid #61756a;border-radius:8px;padding:0 12px;color:#e0e7d0;background:linear-gradient(#334c45,#223b37);box-shadow:inset 0 1px 0 #60776a70,0 2px 1px #102620;font-size:13px;font-weight:700}
.utility i{width:16px;height:16px}
.icon-only{width:37px;padding:0}
.seed-bank{position:relative;display:flex;align-items:stretch;gap:12px;padding:9px 15px;margin:0 0 13px;border:3px solid #263124;border-radius:14px;background:repeating-linear-gradient(1deg,transparent 0 9px,#4f422928 10px 11px,transparent 12px 23px),linear-gradient(#806846 0%,#665538 50%,#584931 100%);box-shadow:inset 0 2px #b39c6e,inset 0 -3px #493c2a,0 2px 0 #081a15,0 5px 15px #05180e42}
.seed-bank::before,.seed-bank::after{content:"";position:absolute;width:4px;height:4px;background:#d0bc87;border-radius:50%;top:45%;left:4px;box-shadow:0 1px #422e1b}
.seed-bank::after{left:auto;right:4px}
.sun-bank{flex:1 1 125px;min-width:90px;display:flex;align-items:center;justify-content:center;gap:7px;background:radial-gradient(ellipse at 25% 50%,#79663a88,transparent),linear-gradient(140deg,#524832,#423c2b);border:2px solid #403a2c;box-shadow:inset 0 1px 3px #282d21,inset 0 -1px 0 #948057;border-radius:7px}
.sun-bank .big-sun{width:44px;height:44px;filter:drop-shadow(0 2px 0 #473923);transform:rotate(-8deg)}
.sun-bank small,.sun-bank strong{display:block}.sun-bank small{font-size:11px;font-weight:700;color:#e9cf93;line-height:1.3;letter-spacing:2px}
.sun-bank strong{font-size:29px;line-height:1.15;font-weight:900;color:#ffe39b;font-variant-numeric:tabular-nums;text-shadow:0 2px #403521}
.seeds{flex:6 1 0;min-width:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.seed{--tint:#e9d89b;--base:#dbba77;position:relative;min-height:65px;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:2px;padding:2px 7px 3px 0;border-radius:7px;border:2px solid #4a452d;color:#322e1f;background:linear-gradient(125deg,#fff1c454 35%,transparent 36%),linear-gradient(115deg,var(--tint),var(--base));box-shadow:inset 0 0 0 2px #fff7bd66,inset 0 -3px 0 #7f622b54,0 2px 0 #382f22;transition:filter .12s,transform .12s}
.seed[data-type="pea"]{--tint:#dfebaf;--base:#b3c882}
.seed[data-type="nut"]{--tint:#edd2a0;--base:#d3ae79}
.seed[data-type="frost"]{--tint:#d6eddd;--base:#a2cabe}
.seed.selected,.shovel-tool.selected{border-color:#fada75;outline:2px solid #f7c750;box-shadow:inset 0 0 0 2px #fff5ae,0 2px 0 #583e1e}
.seed img{width:clamp(39px,4.5vw,65px);height:56px;object-fit:contain;filter:drop-shadow(0 2px 0 #56512c31);flex:none}
.seed .seed-copy{display:grid;gap:2px;text-align:left;z-index:1}
.seed strong{font-size:clamp(13px,1.14vw,16px);white-space:nowrap;font-weight:900;letter-spacing:.2px}
.cost{display:flex;gap:3px;align-items:center;font:bold 15px/1 "Barlow","Arial",sans-serif;color:#4c4329}
.cost svg{width:16px;height:16px}.seed kbd,.shovel-tool kbd{position:absolute;right:3px;top:2px;font:bold 9px/1.2 "Arial",sans-serif;color:#514f35a6}
.seed.poor{filter:saturate(.45) brightness(.78)}.seed.poor:hover{filter:saturate(.7) brightness(.9)}
.shovel-tool{position:relative;flex:0 1 68px;min-width:46px;display:grid;place-items:center;align-content:center;gap:1px;padding:1px;border:2px solid #433f2b;border-radius:7px;box-shadow:inset 0 0 0 2px #c2b29466,0 2px 0 #332e24;background:linear-gradient(135deg,#baac8a,#998e73);color:#34382c;font-size:11px;font-weight:800}
.shovel-tool i{width:34px;height:34px}
.arena-frame{background:#53583c;padding:3px;border:2px solid #17241c;border-radius:15px;box-shadow:inset 0 1px #a5a17a,0 4px 0 #0e1d15,0 7px 20px #07170655;overflow:hidden}
.arena-status{height:39px;justify-content:space-between;padding:0 16px 2px;background:linear-gradient(100deg,#2c4338,#293c34 65%,#243b32);border-radius:10px 10px 0 0;border:1px solid #6a7150;border-bottom:2px solid #293a26}
.location,.wave{gap:9px}
.location h2{font-size:17px;letter-spacing:1.2px;margin:0;color:#f0e8ca}
.location i{width:20px;height:20px;color:#325535}
.small-rule{height:13px;width:1px;background:#647961;margin:0 1px}
.phase-label{display:flex;align-items:center;gap:5px;font-size:11px;color:#c2db92}
.phase-label b{width:6px;height:6px;border-radius:50%;background:#b2de74;box-shadow:0 0 5px #9ee86b44}
.wave i{color:#794e2e;width:18px;height:18px}
.wave>span{font-size:12px;color:#c8d4bc}.wave strong{font-size:17px;color:#ffe09c;font-weight:900}.wave small{font-size:12px;color:#b9c4a9;font-weight:700}
.wave-track{display:flex;gap:3px;margin-left:1px}.wave-track i{width:20px;height:7px;background:#162c24;border-radius:2px;border:1px solid #455e48;transform:skewX(-15deg)}.wave-track i.on{border-color:#e0b65a;background:#f2c66e}
.field-wrap{position:relative;width:100%;aspect-ratio:2.65;background:#769947;overflow:hidden;border-radius:0 0 9px 9px}
#lawn{display:block;width:100%;height:100%;touch-action:manipulation;user-select:none;outline:none}
.toast{pointer-events:none;opacity:0;position:absolute;left:50%;top:8px;transform:translate(-50%,-4px);transition:opacity .15s,transform .15s;background:#233928eb;border:1px solid #a0b678;border-radius:20px;padding:5px 14px;font-size:13px;white-space:nowrap;box-shadow:0 2px 5px #243c253b;color:#fff5d1}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.error{background:#684a2e}
.command-strip{gap:13px;margin-top:13px;align-items:stretch}
.augment-console{position:relative;text-align:left;min-width:0;flex:1;padding:6px 15px 6px 11px;gap:11px;border:2px solid #262b2a;border-radius:11px;min-height:62px;background:repeating-linear-gradient(124deg,transparent 0 38px,#9272b112 39px 40px,transparent 41px 69px),linear-gradient(112deg,#49394d 0%,#373044 47%,#302e3e);box-shadow:inset 0 0 0 1px #877182,inset 0 -3px #292631,0 3px #0d1f1b}
.crystal{width:48px;height:50px;flex:none;filter:drop-shadow(0 1px 3px #cf7aff4a)}
.augment-copy{display:grid;gap:2px}.augment-copy strong{font-size:17px;letter-spacing:1px;color:#f2d6ff}.augment-copy small{font-size:12px;color:#d5c2db}
.hex-sockets{display:flex;gap:8px;margin-left:auto}
.socket{width:32px;height:36px;display:grid;place-items:center;position:relative;background:#88718a;clip-path:polygon(50% 0,96% 25%,96% 75%,50% 100%,4% 75%,4% 25%)}
.socket:before{content:"";z-index:-1;position:absolute;inset:2px;clip-path:inherit;background:linear-gradient(150deg,#252531,#483b4d)}.socket svg{width:13px;height:13px;color:#948297}.socket img{width:100%;height:100%;object-fit:contain}
.detail-arrow{width:13px!important;height:13px!important;color:#beabbc}
.action{gap:11px;min-width:190px;justify-content:center;padding:10px 21px;border:3px solid #47371e;border-radius:12px;background:linear-gradient(#ffe38c,#f8c65c 58%,#edb247);box-shadow:inset 0 2px 0 #fff5b8,inset 0 -3px 0 #bc8739,0 3px 0 #152319;color:#47391e;font-size:22px;font-weight:900;letter-spacing:1.5px;text-shadow:0 1px 0 #ffec9e}
.action i{width:22px;height:22px}.action.speed{background:linear-gradient(#d6dfaf,#aabc86);border-color:#364632;box-shadow:inset 0 2px #f2efc1,inset 0 -3px #89966d,0 3px #16271e;font-size:18px}
.game-footer{justify-content:space-between;margin:12px 3px 0;color:#a0b6aa;font-size:11px;letter-spacing:.4px;gap:5px}
.game-footer>span:first-child{display:flex;align-items:center;gap:6px}.game-footer i{width:13px;height:13px}.shortcuts{gap:6px}.shortcuts kbd{border:1px solid #5c756b;border-radius:3px;padding:0 4px;font:10px/15px Arial,sans-serif;box-shadow:0 1px #41584f}.shortcuts em{width:7px}
dialog{color:var(--cream);padding:0;border:2px solid #9c9874;border-radius:17px;background:linear-gradient(140deg,#344e40,#213d34);max-width:min(620px,93vw);width:100%;max-height:90svh;box-shadow:inset 0 0 0 4px #253a2e,0 8px 40px #071813c9;text-align:center}
dialog::backdrop{background:#0b1a1bd9;backdrop-filter:blur(3px)}
#modalInner{padding:25px 26px 23px;position:relative}
.dialog-close{position:absolute;right:12px;top:12px;width:29px;height:29px;border:1px solid #809181;border-radius:7px;background:#30473c;color:#deebce;padding:6px}
.modal-crest{width:52px;height:55px;display:block;margin:0 auto 5px}.modal-crest img{width:100%;height:100%;object-fit:contain}
dialog h2{font-size:26px;margin:3px 0 7px;letter-spacing:1px}dialog p{color:#cbd9c3;font-size:14px;line-height:1.7;margin:7px auto 15px}
.dialog-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:15px}.dialog-actions .action{font-size:16px;min-width:125px;min-height:42px;border-width:2px;padding:8px 15px}.secondary{border:1px solid #8ea28d;color:#e0e7d3;background:#304a3c;border-radius:7px;padding:8px 16px;font-weight:700}
.help-grid,.talent-list{text-align:left;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.help-plant,.talent-item{display:flex;align-items:center;background:#172f26a1;border-radius:8px;padding:7px;gap:7px;border:1px solid #60735a}
.help-plant img,.talent-item img{width:42px;height:42px;object-fit:contain}.help-plant strong,.talent-item strong{font-size:14px}.help-plant small,.talent-item small{display:block;color:#c9d6c1;font-size:11px;margin-top:3px}
.result-stats{font-size:15px;color:#f4d691}
@media (max-width:900px){.seeds{gap:6px}.seed-bank{gap:8px;padding:8px 11px}.sun-bank{flex-basis:82px}.sun-bank .big-sun{width:32px;height:32px}.sun-bank strong{font-size:24px}.seed{gap:0}.wave-track i{width:16px}.shovel-tool{flex-basis:48px}.game-shell{margin-top:10px;margin-bottom:10px}.masthead{margin-bottom:10px}}
@media (max-width:680px){
  .game-shell{width:96vw;min-width:0;margin:12px auto}.masthead{gap:4px;min-height:46px}.brand{gap:5px}.brand-art{width:36px;height:38px}.brand-art img{width:42px;height:42px}.brand-art i{inset:7px 0 0}.brand h1{font-size:29px;letter-spacing:-2px}.edition{font-size:10px;padding:3px 4px;letter-spacing:0}.edition i{width:10px;height:12px}.tools{gap:4px}.utility{width:36px;height:40px;padding:6px}.utility span{display:none}.utility i{width:15px;height:15px}
  .seed-bank{padding:7px 6px;gap:5px;margin-bottom:8px;border-radius:9px}.seeds{gap:3px}.seed{min-height:80px;flex-direction:column;padding:1px 0 3px;justify-content:center}.seed img{width:38px;height:36px}.seed strong{font-size:11px}.seed .seed-copy{text-align:center;gap:2px}.cost{font-size:11px;justify-content:center}.cost svg{width:11px;height:11px}.seed kbd,.shovel-tool kbd{display:none}.sun-bank{min-width:37px;flex:0 0 44px;flex-direction:column;gap:2px}.sun-bank .big-sun{width:27px;height:27px}.sun-bank small{display:none}.sun-bank strong{font-size:16px}.shovel-tool{flex:0 0 32px;min-width:0}.shovel-tool i{width:25px;height:25px}.arena-status{height:33px;padding:0 7px}.location,.wave{gap:4px}.location h2{font-size:13px}.location i,.wave i{width:14px;height:14px}.phase-label,.wave>span{font-size:10px}.wave-track{gap:2px}.wave-track i{width:8px;height:5px}.wave strong{font-size:14px}.field-wrap{aspect-ratio:1.4}
  .command-strip{gap:6px;margin-top:9px}.augment-console{padding:5px;gap:4px;min-height:52px}.augment-copy strong{font-size:13px}.augment-copy small{font-size:11px;line-height:1.4}.crystal{width:30px;height:36px}.hex-sockets{display:none}.detail-arrow{margin-left:auto}.action{min-width:91px;font-size:15px;gap:4px;letter-spacing:.2px;padding:6px}.action i{width:14px;height:14px}.action.speed{font-size:13px}.shortcuts{display:none}.game-footer{font-size:10px;margin-top:9px;justify-content:center}
  #modalInner{padding:18px 13px}.help-grid,.talent-list{gap:4px}dialog h2{font-size:21px}
}
@media(max-width:410px){.brand{position:relative;padding-bottom:15px}.brand-art{margin-bottom:-10px}.edition{position:absolute;bottom:0;left:45px;font-size:8px;padding:1px 4px}.brand h1{font-size:27px}}
@media(max-height:510px) and (min-width:681px){
  .game-shell{width:min(96vw,calc((100svh - 118px)*2.85));min-width:min(95vw,580px);margin:5px auto}.masthead{min-height:27px;margin-bottom:5px}.brand-art{width:28px;height:28px}.brand-art img{width:34px;height:34px}.brand h1{font-size:24px}.edition{font-size:9px;padding:1px 5px}.utility{height:25px}.seed-bank{padding:3px 9px;margin-bottom:5px}.seed{min-height:37px}.seed img{height:33px;width:35px}.seed strong{font-size:11px}.cost{font-size:10px}.cost svg{width:10px;height:10px}.sun-bank strong{font-size:18px}.sun-bank small{font-size:9px}.shovel-tool i{height:22px}.shovel-tool span{display:none}.arena-status{height:25px}.location h2{font-size:12px}.field-wrap{aspect-ratio:3.3}.command-strip{margin-top:5px}.augment-console{min-height:37px;padding:2px 9px}.crystal{width:28px;height:28px}.augment-copy strong{font-size:12px}.augment-copy small{font-size:9px}.action{min-width:130px;padding:2px 12px;font-size:15px}.hex-sockets .socket{width:22px;height:25px}.game-footer{display:none}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

.seed.evolved{
  background:radial-gradient(ellipse at 18% 30%,color-mix(in srgb,var(--trait) 38%,transparent),transparent 65%),linear-gradient(120deg,#343543,#282b37);
  border-color:var(--trait);
  box-shadow:inset 0 0 0 2px #fbebce24,inset 0 -3px #161d2b99,0 2px 0 #322b21;
  color:#fff4d8;
}
.seed.evolved.selected{outline:2px solid #ffe28a;outline-offset:1px}
.seed.evolved.poor{filter:saturate(.73) brightness(.79)}
.seed.evolved img{filter:drop-shadow(0 1px 2px #141c21)}
.seed.evolved .cost{color:#f5d999}
.seed.evolved kbd{color:#d3d4c9}
.evolution-pips{display:flex;gap:3px;align-items:center;position:absolute;bottom:6px;right:7px}
.evolution-pips i{background:var(--hex-accent,var(--trait));transform:rotate(45deg);width:5px;height:5px;box-shadow:inset 1px 1px #fff8}
.socket[data-hex-tier]{background:var(--hex-frame);padding:2px}
.socket[data-hex-tier]::before{background:#222d30}
.held-tier{margin-left:5px;padding:1px 5px;border:1px solid var(--hex-accent);color:var(--hex-accent);border-radius:4px;white-space:nowrap;font-size:11px;font-weight:700}
.talent-item[data-hex-tier]{border-left:3px solid var(--hex-accent);background:#15282a}
.talent-item img{flex:none}
.sound-dialog{max-width:min(455px,94vw);background:linear-gradient(145deg,#334d40,#1c352d)}
.sound-dialog h2{margin:0 0 16px}
.volume-list{border:1px solid #586e55;border-radius:10px;background:#152e26;text-align:left;overflow:hidden}
.volume-row{padding:11px 15px 7px}
.volume-row + .volume-row{border-top:1px solid #415443}
.volume-caption,.volume-controls,.volume-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}
.volume-caption label{font-weight:800;font-size:16px;cursor:pointer}
.volume-caption output{color:#ffe096;font-weight:750;font-size:14px;font-variant-numeric:tabular-nums}
.volume-row small{display:block;color:#bdcdb9;line-height:1.5;font-size:12px}
.volume-controls input{appearance:none;-webkit-appearance:none;flex:1;min-width:0;margin:0;height:34px;background:transparent;cursor:pointer;touch-action:pan-y}
.volume-controls input:focus-visible{outline:2px solid #ffdb80;outline-offset:1px;border-radius:4px}
.volume-controls input::-webkit-slider-runnable-track{height:6px;border-radius:8px;background:linear-gradient(to right,#efc460 var(--volume),#536755 var(--volume))}
.volume-controls input::-moz-range-track{height:6px;border-radius:8px;background:#536755}
.volume-controls input::-moz-range-progress{height:6px;border-radius:8px;background:#efc460}
.volume-controls input::-webkit-slider-thumb{appearance:none;width:18px;height:18px;margin-top:-6px;border-radius:50%;border:2px solid #79542c;background:#ffe8a2;box-shadow:0 1px 2px #07180c}
.volume-controls input::-moz-range-thumb{width:15px;height:15px;border-radius:50%;border:2px solid #79542c;background:#ffe8a2}
.preview-sound,.mute-all{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid #748571;border-radius:6px;font-weight:700;color:#edf0cc;background:#304a3c}
.preview-sound{min-height:31px;padding:3px 8px;font-size:12px}
.preview-sound svg{width:10px;height:10px}.preview-sound:disabled{opacity:.46;cursor:default}
.volume-actions{margin-top:15px}.mute-all{padding:8px 10px}.mute-all svg{width:16px;height:16px}
.mute-all[aria-pressed=true]{background:#f0d794;color:#4f4028;border-color:#d7af68}
.volume-actions .action{min-width:88px;font-size:16px;letter-spacing:.3px;padding:6px 14px;border-width:2px}
@media(max-width:450px){.tools #settings{width:28px;padding:5px}.volume-row{padding:9px 11px 6px}}
@media(max-width:680px){
  .seed.evolved strong{font-size:10px}
  .evolution-pips{top:5px;bottom:auto;right:5px;gap:2px}
  .evolution-pips i{width:3px;height:3px}
  .talent-list{grid-template-columns:1fr}
}
