:root{color-scheme:dark;--ink:#e9e7d8;--muted:#a4b7ae;--line:#bfd8b526;--accent:#d0deb0;--surface:#142c29;--gold:#e4c897;--danger:#e3a08a;font-family:Georgia,'Times New Roman',serif;background:#0c211f;color:var(--ink)}
body{height:100vh}
*{box-sizing:border-box}body{margin:0;height:100dvh;overflow:hidden;touch-action:manipulation;user-select:none;-webkit-user-select:none}button,input,select{font:inherit}button{color:inherit;border:1px solid var(--line);background:#263e34;cursor:pointer;min-height:44px;padding:10px 16px;border-radius:8px;transition:background .15s,border-color .15s,transform .15s}button:hover:not(:disabled){background:#3b5140;border-color:#d5e2b46b}button:active:not(:disabled){transform:translateY(1px)}button:disabled{opacity:.42;cursor:default}button:focus-visible,a:focus-visible,select:focus-visible{outline:2px solid var(--gold);outline-offset:3px}button.primary{background:var(--accent);color:#1a3329;border-color:var(--accent);font-weight:bold}button.primary:hover:not(:disabled){background:#e3edc7}button.ghost{background:#132a2588}button.small{padding:8px 12px;font:13px system-ui;min-height:44px}button.danger{color:var(--danger)}h1,h2,h3,p{margin:0}h1{font-weight:normal;font-size:clamp(48px,7.3vw,100px);line-height:1.05;letter-spacing:-3px}h2{font-size:clamp(28px,4vw,45px);font-weight:normal}h3{font-size:22px;font-weight:normal}p{color:var(--muted);line-height:1.6}.label,.eyebrow{font:11px system-ui;letter-spacing:2px;text-transform:uppercase;color:var(--accent)}.muted{color:var(--muted);font:13px/1.6 system-ui}.gold{color:var(--gold)}#forest{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}#app{position:relative;z-index:1;height:100%;background:linear-gradient(90deg,#071d1bd9,#071d1b22)}.loading{height:100%;display:grid;place-items:center;font-size:26px}.home{display:flex;flex-direction:column;justify-content:center;height:100%;padding:6vh 7vw;max-width:720px;gap:26px}.home h1 span{display:block;color:var(--accent)}.home p{max-width:390px;font-size:18px}.home .buttons{display:flex;flex-wrap:wrap;gap:10px}.home .primary{padding:16px 34px;font-size:18px;min-width:230px}.home footer{position:absolute;bottom:22px;left:7vw;font:11px/1.5 system-ui;color:#afc2b899;max-width:440px}.ornament{width:65px;height:1px;background:var(--gold);box-shadow:17px 0 0 #e4c89740}.page{height:100%;max-width:1240px;margin:auto;display:flex;flex-direction:column;padding:24px 30px;gap:24px;background:#0b211de8}.page-header{display:flex;align-items:center;justify-content:space-between;gap:16px}.page-header .title{display:flex;flex-direction:column;gap:7px}.scroll-area{overflow:auto;min-height:0;flex:1;overscroll-behavior:contain;padding-bottom:12px}.biome{margin-bottom:25px}.biome-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px;padding-bottom:12px;border-bottom:1px solid var(--line)}.levels{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.level-card{text-align:left;background:linear-gradient(140deg,#243d33,#152d29);min-height:116px;position:relative;padding:18px}.level-card .number{font:12px system-ui;color:var(--accent);display:block;margin-bottom:10px}.level-card strong{font-weight:normal;font-size:19px;display:block}.level-card .stars{display:block;color:var(--gold);font:15px system-ui;margin-top:10px;letter-spacing:3px}.level-card.boss{border-color:#d7b78450}.level-card:disabled{opacity:.55;background:#142825}.challenges-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.challenge-card{padding:24px;display:flex;flex-direction:column;gap:18px;text-align:left;background:#22392f}.settings-grid{display:grid;gap:14px;max-width:640px}.setting{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#1c342e;padding:16px;border:1px solid var(--line);border-radius:10px;font:16px system-ui}.setting input{width:24px;height:24px;accent-color:var(--accent)}select{border:1px solid var(--line);background:#162e29;color:var(--ink);padding:10px;border-radius:6px;min-height:44px}.cosmetics{display:flex;gap:12px;flex-wrap:wrap;margin-top:12px}.cosmetic{display:flex;flex-direction:column;gap:10px;padding:15px;border:1px solid var(--line);border-radius:10px;min-width:175px;background:#1b322a}.cosmetic-dot{width:25px;height:35px;border-radius:70% 35% 70% 35%;align-self:center;box-shadow:0 0 25px currentColor}.help-text{font-size:19px;max-width:750px;margin-top:20px}.game{height:100%;display:flex;flex-direction:column;padding:12px 20px;gap:10px;background:#0d231fee}.game-header{display:flex;justify-content:space-between;align-items:center;gap:12px}.game-heading{display:flex;flex-direction:column;gap:4px}.game-heading h3{font-size:24px}.game-header .actions{display:flex;gap:6px}.hud{display:flex;align-items:center;gap:28px;padding:9px 16px;background:#1b342d;border:1px solid var(--line);border-radius:10px;font:13px system-ui}.hud-item{display:flex;gap:8px;align-items:baseline;white-space:nowrap}.hud-item strong{font:20px Georgia;color:var(--accent)}.hud-item.health strong{color:#dfb8a2}.weather{margin-left:auto;color:var(--muted)}.game-body{flex:1;display:grid;grid-template-columns:minmax(0,1fr) 255px;gap:14px;min-height:0}.field-wrap{position:relative;min-width:0;min-height:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#122b28;display:flex;align-items:center;justify-content:center}#board{width:100%;height:100%;min-height:0;touch-action:none}.sidebar{display:flex;flex-direction:column;gap:10px;min-height:0}.plant-list{display:grid;grid-template-columns:1fr 1fr;gap:7px}.plant-card{display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 4px;min-height:93px;background:#203930;font:12px system-ui}.plant-card canvas{width:41px;height:39px;pointer-events:none}.plant-card .price{color:var(--gold);font-size:12px}.plant-card.selected{background:#456044;border-color:var(--accent)}.detail{flex:1;overflow:auto;min-height:0;background:#1a322b;border:1px solid var(--line);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:9px}.detail h3{font-size:20px}.detail p{font:13px/1.5 system-ui}.detail button{font:13px system-ui;padding:10px 8px}.detail .error{color:var(--danger)}.detail .hint{font:12px/1.5 system-ui;color:var(--gold)}.game-footer{display:flex;gap:10px;align-items:center}.game-footer .primary{min-width:190px}.game-footer .tutorial{font:12px/1.5 system-ui;color:var(--muted);flex:1}.game-footer .ability{margin-left:auto;font:13px system-ui}.overlay{position:absolute;inset:0;background:#0c211ed9;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;text-align:center;padding:20px;z-index:3}.overlay[hidden]{display:none}.overlay p{max-width:350px}.result-page{height:100%;display:flex;align-items:center;justify-content:center;background:#0a211acc;padding:24px}.result-card{max-width:580px;width:100%;padding:38px;border:1px solid #c9dbb240;border-radius:18px;background:linear-gradient(135deg,#2c4636f2,#132d29f2);text-align:center;display:flex;flex-direction:column;align-items:center;gap:20px;box-shadow:0 30px 100px #0005}.result-stars{font-size:39px;color:var(--gold);letter-spacing:9px}.result-card .buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:9px}.result-card .pollen{font-size:22px;color:var(--gold)}#toast{position:fixed;bottom:max(16px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%) translateY(100px);opacity:0;transition:opacity .2s,transform .2s;max-width:90vw;background:#e0d7b9;color:#1c3329;padding:14px 22px;border-radius:10px;font:14px/1.5 system-ui;z-index:8;pointer-events:none;box-shadow:0 8px 30px #0005}#toast.visible{transform:translateX(-50%) translateY(0);opacity:1}.save-status{font:11px system-ui;color:var(--muted)}
@media(min-width:1450px){.game{max-width:1550px;margin:auto;padding:20px 30px}.game-body{grid-template-columns:minmax(0,1fr) 290px}.plant-card{min-height:105px;font-size:13px}.plant-card canvas{width:48px;height:48px}}
@media(max-height:600px) and (min-width:700px){.game{padding:6px 10px;gap:6px}.game-heading h3{font-size:19px}.hud{padding:5px 10px;gap:18px}.hud-item strong{font-size:17px}.game-body{grid-template-columns:minmax(0,1fr) 228px;gap:8px}.plant-list{grid-template-columns:repeat(4,1fr);gap:4px}.plant-card{min-height:65px;padding:3px 1px;font-size:9px}.plant-card canvas{width:30px;height:27px}.plant-card .price{font-size:10px}.detail{padding:8px;gap:5px}.detail h3{font-size:16px}.detail p{font-size:11px}.detail button{padding:6px}.game-footer .tutorial{font-size:10px}.game-footer .primary{min-width:150px;padding:8px}.game-footer .ability{padding:8px;font-size:11px}.game-header .small{min-height:36px}.game-heading .label{font-size:9px}.home{gap:18px}.home footer{bottom:12px}.page{padding:15px 20px;gap:15px}.level-card{min-height:100px}}
@media(max-width:699px){h1{font-size:65px;letter-spacing:-2px}.home{padding:30px 24px;gap:22px;justify-content:center;background:#08201b70}.home p{font-size:17px;max-width:280px}.home footer{left:24px;bottom:16px;max-width:300px;font-size:10px}.home .primary{padding:14px 24px;min-width:230px}.page{padding:18px 14px;gap:17px}.page-header h2{font-size:27px}.levels{grid-template-columns:repeat(2,1fr);gap:9px}.level-card{padding:13px;min-height:109px}.level-card strong{font-size:17px}.biome-header h3{font-size:20px}.challenges-grid{grid-template-columns:1fr}.game{padding:8px;gap:7px}.game-heading h3{font-size:19px}.game-heading .label{font-size:9px;letter-spacing:1px}.game-header .actions{gap:4px}.game-header .small{padding:6px 8px;font-size:11px}.hud{padding:8px;gap:12px;flex-wrap:wrap;font-size:11px}.hud-item{gap:4px}.hud-item strong{font-size:17px}.weather{font-size:10px}.game-body{display:flex;flex-direction:column;gap:7px;min-height:0}.field-wrap{flex:none;width:100%;aspect-ratio:1.5;min-height:0}.sidebar{flex:1;min-height:0;gap:7px}.plant-list{grid-template-columns:repeat(4,1fr);gap:5px}.plant-card{min-height:70px;font-size:10px;padding:4px 2px;gap:1px}.plant-card canvas{width:32px;height:30px}.plant-card .price{font-size:10px}.detail{padding:8px;gap:6px}.detail h3{font-size:17px}.detail p{font-size:12px}.detail button{min-height:44px}.detail-actions{display:flex;gap:5px;flex-wrap:wrap}.detail-actions button{flex:1}.game-footer{flex-wrap:wrap;gap:6px}.game-footer .tutorial{order:3;flex-basis:100%;font-size:10px;max-height:33px;overflow:auto}.game-footer .primary{min-width:140px;flex:1;font-size:13px}.game-footer .ability{font-size:11px;padding:8px}.result-card{padding:28px 20px}.cosmetic{min-width:140px}.settings-grid .setting{font-size:14px}}
@media(max-width:699px) and (max-height:680px){.game-heading .label{display:none}.field-wrap{aspect-ratio:1.6}.plant-card{min-height:55px}.plant-card canvas{width:25px;height:23px}.game-footer .tutorial{display:none}.hud .weather{display:none}.detail p{font-size:11px}.game{gap:5px}.hud{padding:5px 8px}.plant-list{gap:3px}.sidebar{gap:4px}}
.detail-actions{position:sticky;top:0;background:#1a322b;z-index:1;display:flex;flex-wrap:wrap;gap:5px}.detail-actions button{flex:1}.plant-card{min-width:0}canvas,button{-webkit-touch-callout:none}
@media(max-height:600px) and (min-width:700px){.plant-card>span:not(.price){max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail{min-height:76px}.plant-list{flex-shrink:0;grid-auto-rows:65px}.detail-actions button{font-size:11px;padding:6px 4px}}
@media(prefers-reduced-motion:reduce){button,#toast{transition:none}}
/* ===== Pixel UI theme: notched corners, stepped bevels, hard two-tone fills, no blur. ===== */
/* Tiny5, self-hosted (SIL OFL 1.1, assets/fonts/OFL.txt): real pixel Cyrillic and Latin, single weight. */
@font-face{font-family:"Tiny5";font-style:normal;font-weight:400;font-display:swap;src:url(assets/fonts/tiny5-cyrillic.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Tiny5";font-style:normal;font-weight:400;font-display:swap;src:url(assets/fonts/tiny5-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
:root{
  --ui:"Tiny5","Segoe UI",system-ui,sans-serif;--title:"Tiny5","Trebuchet MS",system-ui,sans-serif;
  --ink:#f3eedb;--muted:#a9bfae;--edge:#050a08;--line:#050a08;--panel:#11221a;--panel-2:#183223;--hi:#3f6c49;--lo:#0a170f;
  --accent:#a6d86c;--accent-hi:#e2fab8;--accent-lo:#4f8a32;--gold:#f5c04e;--rose:#ff9a8a;--violet:#c4a3ef;--teal:#7fe0c8;--danger:#ffab9c;
  --notch:polygon(4px 0,calc(100% - 4px) 0,100% 4px,100% calc(100% - 4px),calc(100% - 4px) 100%,4px 100%,0 calc(100% - 4px),0 4px);
  background:#060c10;color:var(--ink)
}
*{font-family:var(--ui)!important;font-synthesis:none!important;font-size-adjust:.7}
h1,h2,h3,.hud-item strong,.level-card strong,.result-card .pollen{font-family:var(--title)!important}
*,*::before,*::after{border-radius:0!important}
canvas,img.px{image-rendering:pixelated;image-rendering:crisp-edges}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
img.px{display:inline-block;vertical-align:middle;margin-right:7px;flex:none}
h1,h2,h3{font-weight:800;letter-spacing:.3px;text-shadow:2px 2px 0 #000d}
p{color:var(--muted)}
.label,.eyebrow{font-weight:800;letter-spacing:2.5px;color:var(--gold);text-shadow:1px 1px 0 #000}
#app{background:linear-gradient(90deg,#050a14ee 0,#050a14b8 28%,#050a1400 60%)}

/* Buttons */
button{font-weight:700;color:var(--ink);background:var(--panel-2);border:2px solid var(--edge);clip-path:var(--notch);box-shadow:inset -3px -3px 0 var(--lo),inset 3px 3px 0 var(--hi);text-shadow:1px 1px 0 #000b;transition:none}
button:hover:not(:disabled){background:#22432d;border-color:var(--edge)}
button:active:not(:disabled){transform:translateY(2px);box-shadow:inset 3px 3px 0 var(--lo),inset -3px -3px 0 var(--hi)}
button:focus-visible,select:focus-visible{outline:none;box-shadow:inset 0 0 0 3px var(--gold)}
button:disabled{opacity:.5}
.detail button,button.small,.game-footer .ability{font-weight:700}
button.ghost{background:#132619}
button.primary{background:linear-gradient(#bde784 0 50%,#a2d466 50% 100%);color:#0f240f;box-shadow:inset -3px -3px 0 var(--accent-lo),inset 3px 3px 0 var(--accent-hi);text-shadow:1px 1px 0 #e2fab880}
button.primary:hover:not(:disabled){background:linear-gradient(#cdf099 0 50%,#b2e077 50% 100%)}
button.primary:disabled{background:linear-gradient(#5a7a48 0 50%,#4e6c3e 50% 100%);color:#d4ecc0;text-shadow:1px 1px 0 #0f240f}
button.danger{color:var(--danger);background:#3a1c19;box-shadow:inset -3px -3px 0 #1d0c0a,inset 3px 3px 0 #74392f}
button.danger:hover:not(:disabled){background:#4a231f}
button.ability{color:#d2fff2;background:linear-gradient(#1d4a48 0 50%,#173e3c 50% 100%);box-shadow:inset -3px -3px 0 #0b2120,inset 3px 3px 0 #3a9488}
button.ability:hover:not(:disabled){background:#225654}

/* Panels */
.hud,.detail,.setting,.cosmetic,.level-card,.challenge-card,.plant-card,.result-card,select{border:2px solid var(--edge);clip-path:var(--notch)}
.detail,.setting,.cosmetic,select{background:var(--panel);box-shadow:inset -3px -3px 0 var(--lo),inset 3px 3px 0 #2a4a33}
.detail-actions{background:var(--panel)}
.page,.game{background:#07110cf2}
.page{background:linear-gradient(#0b1914f4,#070f0bf7)}
.ornament{height:4px;width:72px;background:repeating-linear-gradient(90deg,var(--gold) 0 8px,transparent 8px 12px);box-shadow:none}
.overlay{backdrop-filter:none;background:#050a10e6}
.overlay h2{color:var(--gold)}
#toast{border:2px solid var(--edge);background:#efe3b8;color:#1c2a1c;font-weight:700;clip-path:var(--notch);box-shadow:inset -3px -3px 0 #b8a676,inset 3px 3px 0 #fff6d8;transition:opacity .15s steps(3)}

/* Home */
.home{gap:22px}
.home .logo{margin:0;line-height:0}
.home .logo canvas{display:block;max-width:100%;height:auto}
.home p{color:#e3ecd6;font-weight:600;text-shadow:2px 2px 0 #000}
.home .primary{font-size:20px;padding:16px 40px;min-width:250px}
.home footer{color:#a9bfb0}
.home .muted{color:#c9d6c4;text-shadow:1px 1px 0 #000}

/* Campaign and challenges */
.biome-header{border-bottom:2px dashed #2c4a33}
.biome-header h3{display:flex;align-items:center}
.level-card,.challenge-card{--biome:#8fd06a;--card:linear-gradient(#1b3424 0 50%,#172e20 50%);--rim:#365e40;background:var(--card);box-shadow:inset 0 5px 0 var(--biome),inset -3px -3px 0 var(--lo),inset 3px 8px 0 var(--rim)}
.level-card.biome-1{--biome:#c4a3ef;--card:linear-gradient(#221f3c 0 50%,#1c1a33 50%);--rim:#463f74}
.level-card.biome-2{--biome:#f0a060;--card:linear-gradient(#2f2219 0 50%,#281d15 50%);--rim:#644630}
.level-card.boss{--rim:#7a6330;box-shadow:inset 0 5px 0 var(--gold),inset -3px -3px 0 #1a170c,inset 3px 8px 0 var(--rim)}
button.level-card:hover:not(:disabled),button.challenge-card:hover:not(:disabled),button.plant-card:hover:not(:disabled){background:var(--card);filter:brightness(1.18)}
.level-card .number{color:var(--biome);font-weight:800;font-size:13px;display:flex;align-items:center;gap:6px}
.level-card .number img{margin:0}
.level-card strong{font-weight:800;text-shadow:2px 2px 0 #000}
.level-card .stars,.challenge-card .stars{display:flex;align-items:center;gap:3px;color:var(--muted);font-size:12px;font-weight:700;letter-spacing:1px}
.level-card .stars img,.challenge-card .stars img{margin:0}
.level-card:disabled{opacity:.62;filter:saturate(.55)}

/* Battle */
.game-heading h3{font-weight:800}
.hud{background:linear-gradient(#18331f 0 50%,#132a1a 50%);box-shadow:inset -3px -3px 0 var(--lo),inset 3px 3px 0 #2f5a3a;gap:24px}
.hud-item{align-items:center;color:var(--muted);font-weight:600}
.hud-item strong{font-weight:800;color:var(--accent);text-shadow:2px 2px 0 #000}
.hud-item.health strong{color:var(--rose)}
.hud-item.sap strong{color:#c8f08a}
.hud-item.wave strong{color:var(--violet)}
.hud-item img{margin-right:4px}
.hp-bar{display:inline-block;width:64px;height:10px;margin-left:6px;background:#2a0d0d;border:2px solid var(--edge);box-shadow:inset 0 2px 0 #0007;align-self:center}
.hp-bar i{display:block;height:100%;width:100%;background:linear-gradient(#ffa08e 0 40%,#e2584a 40%)}
.weather{display:flex;align-items:center;color:var(--teal);font-weight:700}
.field-wrap{border:3px solid var(--edge);background:#060d09;box-shadow:inset 0 0 0 2px #2a4a33}
.sidebar>.label{display:flex;align-items:center;gap:8px}
.sidebar>.label::after{content:"";flex:1;height:2px;background:repeating-linear-gradient(90deg,#3c6343 0 4px,transparent 4px 6px)}
.plant-card{--card:linear-gradient(#1d3727 0 50%,#183020 50%);background:var(--card);box-shadow:inset -3px -3px 0 var(--lo),inset 3px 3px 0 #3c6343;font-weight:700}
.plant-card .price{color:var(--gold);display:flex;align-items:center;font-weight:800;text-shadow:1px 1px 0 #000}
.plant-card .price img{margin-right:3px}
.plant-card.selected{--card:linear-gradient(#3f7242 0 50%,#36653a 50%);box-shadow:inset 0 0 0 3px var(--accent),inset -6px -6px 0 #24452a}
.plant-card canvas{width:48px;height:48px}
.detail h3{color:var(--ink)}
.detail .label{margin-top:2px}
.threats{display:flex;flex-wrap:wrap;gap:4px 10px}
.threat{display:inline-flex;align-items:center;color:var(--ink);font-size:13px;font-weight:600}
.threat img{margin-right:4px}
.forecast{display:flex;align-items:center}
.game-footer .tutorial{background:var(--panel);border:2px solid var(--edge);clip-path:var(--notch);padding:6px 12px;color:#d2ddca;box-shadow:inset 3px 3px 0 #22402b}

/* Result and settings */
.result-card{background:linear-gradient(#183322 0 50%,#142c1d 50%);box-shadow:inset -4px -4px 0 var(--lo),inset 4px 4px 0 #3c6343}
.result-card h2{color:var(--gold)}
.result-stars{display:flex;gap:10px}
.result-stars img{margin:0}
.result-card .pollen{display:flex;align-items:center;font-weight:800;color:var(--gold);text-shadow:2px 2px 0 #000}
.cosmetic-icon{align-self:center;margin:0}
.setting input{accent-color:var(--accent)}

@media(max-height:600px) and (min-width:700px){.plant-card canvas{width:32px;height:32px}.hud{gap:14px}.hp-bar{width:44px}}
@media(max-width:699px){
  #app{background:#050a14a8}
  .home{background:none}
  .plant-card canvas{width:32px;height:32px}
  .hud{gap:10px}.hud-name{display:none}.hp-bar{width:40px}
  .home .primary{min-width:220px}
  .game-footer .tutorial{padding:4px 8px;max-height:46px}
}
@media(max-width:699px) and (max-height:680px){.plant-card canvas{width:24px;height:24px}}
/* Large Tiny5 text uses whole multiples of its 8px grid instead of font-size-adjust, so glyphs stay undistorted. */
h1,h2,h3,.hud-item strong,.level-card strong,.result-card .pollen{font-size-adjust:none}
h2{font-size:40px}
h3,.detail h3,.biome-header h3,.result-card .pollen{font-size:24px}
.game-heading h3{font-size:32px}
.hud-item strong,.level-card strong{font-size:24px}
@media(max-height:600px) and (min-width:700px){.game-heading h3,.detail h3{font-size:16px}.hud-item strong{font-size:16px}}
@media(max-width:699px){h2,.page-header h2{font-size:32px}.game-heading h3{font-size:24px}.level-card strong{font-size:16px}}

/* Thirteen plants: icon-and-price cards in four columns; the name is in the tooltip and the detail panel (shown on wide screens). */
.plant-list{grid-template-columns:repeat(4,1fr);gap:5px}
.plant-card{min-height:0;padding:6px 2px;gap:2px}
.plant-card>span:not(.price){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.plant-card canvas{width:32px;height:32px}
.sidebar{overflow:auto}
@media(min-width:1450px){.plant-list{grid-template-columns:repeat(3,1fr)}.plant-card>span:not(.price){position:static;width:auto;height:auto;clip:auto;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-align:center;line-height:1.15;font-size:12px}.plant-card canvas{width:48px;height:48px}}
@media(max-height:600px) and (min-width:700px){.plant-list{grid-template-columns:repeat(5,1fr);grid-auto-rows:auto}.plant-card canvas{width:24px;height:24px}}
@media(max-width:699px){.plant-list{grid-template-columns:repeat(7,1fr);gap:4px}.plant-card canvas{width:24px;height:24px}}

/* Garden slots counter: turns rose when the garden is full. */
.hud-item.slots strong{color:#9fd8c8}
.hud-item.slots strong.full{color:var(--rose)}

/* Endless trail: campaign button, result score and leaderboard. */
.endless-button{border-color:var(--violet)}
.endless-score{display:flex;align-items:center;justify-content:center;gap:10px;font-size:20px;color:var(--ink);white-space:nowrap}
@media(max-width:699px){.endless-score{font-size:15px;gap:6px}.endless-score strong{font-size:24px}}
.endless-score strong{font-family:var(--title);font-size:32px;color:var(--violet);text-shadow:2px 2px 0 #000}
.leaderboard{width:100%;max-width:340px;text-align:left}
.leaderboard ol{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:3px}
.leaderboard li{display:grid;grid-template-columns:32px 1fr auto;gap:8px;padding:4px 8px;background:#0e1d1a;font:13px system-ui;color:var(--muted)}
.leaderboard li strong{color:var(--accent)}
.leaderboard li.me{outline:1px solid var(--gold);color:var(--ink)}

/* Rewarded start boost: stands out from the plant panel, but stays a plain button. */
.detail .boost-button{border-color:var(--gold);color:var(--gold);display:flex;align-items:center;justify-content:center;gap:6px}
.result-card .hint{font:13px/1.5 system-ui;color:var(--gold);max-width:340px}
