:root{--soil:#21170f;--soil-deep:#130e0a;--paper:#fff9e8;--muted:#d7cfbd;--mint:#67e7bd;--mint-deep:#176f61;--amber:#f2b83e;--amber-pale:#ffe3a0;--coral:#e75758;--plum:#52243f;--glass:rgba(24,19,14,.88);--glass-solid:#211b15;--line:rgba(255,249,232,.28);--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent;letter-spacing:0}
html,body{width:100%;height:100%;overflow:hidden;background:var(--soil-deep)}
body{font-family:Inter,ui-sans-serif,system-ui,"PingFang SC","Noto Sans SC",sans-serif;color:var(--paper);user-select:none;-webkit-user-select:none}
button{font:inherit;color:inherit;letter-spacing:0;touch-action:manipulation}
button:focus-visible{outline:3px solid #fff;outline-offset:3px}
[hidden]{display:none!important}
#stage{position:relative;width:100%;height:100%;overflow:hidden;isolation:isolate}
#gameCanvas{position:absolute;inset:0;display:block;width:100%;height:100%;background:#271a10;touch-action:none}
#__juice_mute{display:none!important}
.hud{position:absolute;z-index:20;top:calc(8px + var(--safe-top));left:8px;right:8px;height:54px;display:grid;grid-template-columns:minmax(66px,82px) minmax(0,1fr) minmax(66px,82px);gap:7px;pointer-events:none}
.hudRead,.hudCenter{height:54px;border:1px solid var(--line);border-radius:8px;background:var(--glass);box-shadow:0 5px 18px rgba(10,7,5,.32);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);text-align:center;overflow:hidden}
.hudRead{padding:7px 3px 4px}.hudRead b{display:block;font-size:16px;line-height:1.08;font-weight:950;font-variant-numeric:tabular-nums;white-space:nowrap}.hudRead span{display:block;margin-top:5px;font-size:9px;line-height:1;color:var(--muted);text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sapRead b{color:var(--mint)}.seedRead b{color:var(--amber-pale)}
.hudCenter{padding:6px 8px 5px;display:grid;grid-template-columns:1fr auto;grid-template-rows:18px 8px;align-items:center;column-gap:6px}.hudCenter>b{font-size:13px;line-height:1;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hudCenter>span{font-size:11px;color:var(--amber-pale);font-weight:900;font-variant-numeric:tabular-nums}.hudCenter>i{grid-column:1 / span 2;display:block;height:6px;border-radius:3px;background:rgba(255,255,255,.14);overflow:hidden}.hudCenter>i>i{display:block;height:100%;width:0;background:var(--mint);transition:width .25s ease}
.brandIntro{position:absolute;z-index:16;top:calc(76px + var(--safe-top));left:50%;transform:translateX(-50%);width:min(90vw,520px);text-align:center;pointer-events:none;text-shadow:0 3px 14px rgba(9,6,4,.78);transition:opacity .35s ease,transform .35s ease}.brandIntro.gone{opacity:0;transform:translate(-50%,-12px)}.brandIntro p{font-size:9px;font-weight:900;color:var(--amber-pale)}.brandIntro h1{font-size:38px;line-height:1.05;font-weight:1000;color:#fff8df;margin-top:4px}.brandIntro span{display:block;font-size:12px;font-weight:800;color:#dffdf1;margin-top:5px}
.coach{position:absolute;z-index:24;top:calc(154px + var(--safe-top));left:50%;transform:translateX(-50%);width:min(88vw,390px);min-height:44px;padding:10px 13px;border:1px solid rgba(255,227,160,.62);border-radius:8px;background:rgba(31,23,16,.91);font-size:13px;font-weight:900;line-height:1.32;text-align:center;pointer-events:none;box-shadow:0 5px 18px rgba(9,6,4,.3)}
.coach.playing{top:calc(70px + var(--safe-top));opacity:.94}
.toast{position:absolute;z-index:90;left:50%;bottom:calc(104px + var(--safe-bottom));transform:translateX(-50%);width:max-content;max-width:min(88vw,430px);padding:9px 12px;border-radius:6px;background:#1d1813;border:1px solid var(--line);font-size:12px;font-weight:850;line-height:1.35;text-align:center;pointer-events:none}
.playTray{position:absolute;z-index:22;left:10px;right:10px;bottom:calc(9px + var(--safe-bottom));height:74px;display:grid;grid-template-columns:minmax(150px,220px) minmax(90px,150px);justify-content:space-between;align-items:end;gap:10px;pointer-events:none}.playTray button{pointer-events:auto}
.pruneBtn{height:64px;border:1px solid rgba(103,231,189,.72);border-radius:8px;background:var(--glass);display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:8px;padding:5px 10px;box-shadow:0 6px 18px rgba(10,7,5,.34);cursor:pointer;text-align:left}.pruneBtn[disabled]{opacity:.48}.pruneBtn>span:last-child{min-width:0}.pruneBtn b{display:block;font-size:12px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pruneBtn small{display:block;margin-top:4px;color:var(--mint);font-size:11px;font-weight:900}.pruneIcon{position:relative;width:40px;height:40px}.pruneIcon::before,.pruneIcon::after{content:"";position:absolute;left:18px;top:5px;width:4px;height:30px;border-radius:2px;background:var(--mint);transform-origin:50% 78%}.pruneIcon::before{transform:rotate(39deg)}.pruneIcon::after{transform:rotate(-39deg)}.pruneIcon{background:radial-gradient(circle at 11px 30px,transparent 6px,var(--mint) 6px,var(--mint) 9px,transparent 9px),radial-gradient(circle at 29px 30px,transparent 6px,var(--mint) 6px,var(--mint) 9px,transparent 9px)}
.pressureRead{height:58px;border:1px solid var(--line);border-radius:8px;background:var(--glass);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;overflow:hidden}.pressureRead span{font-size:9px;color:var(--muted);text-transform:uppercase}.pressureRead b{font-size:13px;color:var(--amber-pale);margin-top:4px;white-space:nowrap}
.utilityOffer{position:absolute;z-index:28;left:10px;right:10px;bottom:calc(9px + var(--safe-bottom));display:grid;grid-template-columns:minmax(0,1fr) minmax(92px,130px);gap:7px;padding:8px;border:1px solid rgba(255,227,160,.58);border-radius:8px;background:rgba(29,23,17,.97);box-shadow:0 7px 22px rgba(9,6,4,.45)}.utilityOffer .statusLine{grid-column:1 / span 2}.rewardBtn{min-height:52px;border-radius:7px;border:1px solid #96f1d4;background:#176f61;color:#fff;padding:8px 12px;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-size:12px;font-weight:950;line-height:1.25;cursor:pointer;white-space:normal}.rewardBtn[disabled]{opacity:.55;cursor:default}.videoIcon{width:25px;height:18px;border:2px solid currentColor;border-radius:4px;position:relative;display:inline-block;flex:none}.videoIcon::after{content:"";position:absolute;left:8px;top:3px;border-left:7px solid currentColor;border-top:4px solid transparent;border-bottom:4px solid transparent}
.freeBtn,.earnedBtn,.genomeBtn{min-height:48px;border-radius:7px;border:1px solid var(--line);background:#493a2d;color:#fff;padding:8px 12px;font-size:12px;font-weight:900;line-height:1.3;cursor:pointer}.compactFree{min-height:52px}.primaryFree{background:#6a4825;border-color:var(--amber-pale)}.dangerBtn{background:#6b2632;border-color:#ff9aa5}.earnedBtn{background:#6a4f1b;border-color:var(--amber-pale)}.genomeBtn{width:100%;background:#352c23;border-color:rgba(255,227,160,.56)}.genomeBtn[disabled]{opacity:.56}.statusLine{min-height:16px;color:#f3e8d7;font-size:11px;line-height:1.3;text-align:center}
.surface{position:absolute;z-index:40;inset:0;min-width:0;min-height:0;overflow:hidden;padding:calc(16px + var(--safe-top)) max(12px,env(safe-area-inset-right,0px)) calc(16px + var(--safe-bottom)) max(12px,env(safe-area-inset-left,0px));background:rgba(25,19,14,.97)}
.decisionSurface{display:grid;grid-template-rows:minmax(108px,.75fr) auto minmax(118px,.65fr);align-items:center;justify-items:center;gap:14px;text-align:center}.decisionTop{align-self:end;width:min(100%,560px)}.kicker{font-size:10px;font-weight:950;color:var(--amber-pale);text-transform:uppercase}.decisionTop h2{font-size:26px;line-height:1.12;margin-top:6px}.surfaceCopy{font-size:13px;color:var(--muted);line-height:1.45;margin-top:8px}.growthStep{width:min(100%,650px)}.growthChoices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.growthChoice{min-height:128px;border:1px solid var(--line);border-radius:8px;background:#342b22;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:10px 7px;cursor:pointer}.growthChoice .growthGlyph{width:42px;height:42px;border-radius:50%;border:2px solid var(--mint);display:grid;place-items:center;color:var(--mint);font-size:20px;font-weight:950}.growthChoice b{font-size:13px}.growthChoice span{font-size:11px;color:var(--muted);line-height:1.28}.growthChoice strong{font-size:11px;color:var(--amber-pale)}
.rewardStep{width:min(100%,520px);display:grid;gap:8px;justify-items:stretch}.harvestSummary{display:flex;align-items:baseline;justify-content:center;gap:8px}.harvestSummary b{font-size:25px;color:var(--amber-pale)}.harvestSummary span{font-size:12px;color:var(--muted)}.decisionArea,.shortfallArea{display:grid;gap:7px;justify-items:stretch}.shortfallArea{padding-top:2px}.rescueActions{width:min(100%,480px)}.rescueSurface{background:radial-gradient(circle at 50% 35%,rgba(116,35,49,.7),rgba(24,18,14,.98) 66%)}.resultSurface{background:linear-gradient(rgba(24,18,14,.88),rgba(24,18,14,.97)),url("assets/undergarden-arena.webp") center/cover no-repeat}.resultActions{width:min(100%,390px);grid-template-columns:92px minmax(0,1fr);align-items:center;padding:14px;border:1px solid rgba(255,227,160,.48);border-radius:8px;background:rgba(31,24,18,.88)}.resultSeed{width:86px;height:86px;object-fit:contain;filter:drop-shadow(0 8px 14px rgba(8,6,4,.42))}.resultSummary{min-width:0;text-align:left}.resultSummary b,.resultSummary span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.resultSummary b{font-size:20px;color:var(--amber-pale)}.resultSummary span{margin-top:7px;font-size:12px;color:var(--muted)}.resultReplay{grid-column:1 / span 2;width:100%;min-height:52px;background:#176f61;border-color:#96f1d4}
.surface.dfl-overlay{z-index:40}.surface.dfl-overlay>.dfl-panel{width:100%;max-width:680px;height:100%;max-height:none;margin:auto;padding:0;border-radius:0;background:transparent;overflow:hidden}.decisionSurface.dfl-overlay>.dfl-panel{display:grid;grid-template-rows:minmax(108px,.75fr) auto minmax(118px,.65fr);align-items:center;justify-items:center;gap:14px;text-align:center}.decisionSurface.dfl-overlay>.dfl-panel>.rewardStep,.decisionSurface.dfl-overlay>.dfl-panel>.growthStep{width:min(100%,650px)}
html[data-dfg-fs="1"] .hud{top:calc(60px + var(--safe-top))}html[data-dfg-fs="1"] .brandIntro{top:calc(128px + var(--safe-top))}html[data-dfg-fs="1"] .coach{top:calc(206px + var(--safe-top))}
@media (max-width:360px){.hud{left:5px;right:5px;gap:5px;grid-template-columns:64px minmax(0,1fr) 64px}.hudRead b{font-size:14px}.hudRead span{font-size:8px}.hudCenter{padding-left:5px;padding-right:5px}.hudCenter>b{font-size:11px}.brandIntro h1{font-size:29px}.coach{font-size:12px}.playTray{left:7px;right:7px;grid-template-columns:minmax(138px,190px) minmax(82px,112px);gap:7px}.pruneBtn{padding-left:7px}.pruneIcon{transform:scale(.88)}.utilityOffer{left:7px;right:7px;grid-template-columns:minmax(0,1fr) 88px;padding:7px}.rewardBtn{font-size:11px;padding-left:8px;padding-right:8px}.surface{padding-left:8px;padding-right:8px}.growthChoice{min-height:112px;padding:7px 4px}.growthChoice .growthGlyph{width:36px;height:36px}.growthChoice b{font-size:12px}.growthChoice span{font-size:10px}.decisionTop h2{font-size:22px}}
@media (max-height:640px) and (orientation:portrait){.brandIntro{top:calc(69px + var(--safe-top))}.brandIntro p,.brandIntro span{display:none}.brandIntro h1{font-size:27px}.coach{top:calc(108px + var(--safe-top));min-height:38px;padding:7px 10px}.playTray{height:64px}.pruneBtn{height:56px}.pressureRead{height:52px}.utilityOffer{bottom:calc(7px + var(--safe-bottom))}.toast{bottom:calc(87px + var(--safe-bottom))}.decisionSurface,.decisionSurface.dfl-overlay>.dfl-panel{grid-template-rows:minmax(78px,.52fr) auto minmax(82px,.44fr);gap:7px}.decisionTop h2{font-size:20px;margin-top:3px}.surfaceCopy{font-size:11px;margin-top:4px}.growthChoice{min-height:88px;gap:4px}.growthChoice .growthGlyph{width:31px;height:31px;font-size:16px}.growthChoice span{display:none}.rewardStep{gap:5px}.rewardBtn,.freeBtn,.earnedBtn,.genomeBtn{min-height:44px}.harvestSummary b{font-size:20px}}
@media (orientation:landscape) and (max-height:460px){.hud{right:126px;grid-template-columns:70px minmax(210px,360px) 70px;justify-content:start;height:48px}.hudRead,.hudCenter{height:48px}.hudRead{padding-top:5px}.hudCenter{padding-top:4px}.brandIntro{top:calc(64px + var(--safe-top));left:18px;transform:none;width:330px;text-align:left}.brandIntro.gone{transform:translateY(-10px)}.brandIntro h1{font-size:30px}.coach{top:auto;bottom:10px;left:14px;transform:none;width:min(42vw,330px)}.playTray{left:auto;right:calc(8px + env(safe-area-inset-right,0px));top:calc(10px + var(--safe-top));bottom:10px;width:110px;height:auto;display:flex;flex-direction:column;justify-content:flex-end}.pruneBtn{width:104px;height:92px;grid-template-columns:1fr;grid-template-rows:40px auto;text-align:center;padding:7px}.pruneIcon{margin:auto}.pressureRead{width:104px;height:58px}.utilityOffer{left:auto;right:126px;bottom:10px;width:min(360px,44vw);grid-template-columns:minmax(0,1fr) 96px}.toast{bottom:10px;left:43%}.surface{padding:8px 126px 8px 10px}.decisionSurface,.decisionSurface.dfl-overlay>.dfl-panel{grid-template-columns:minmax(180px,.72fr) minmax(330px,1.28fr);grid-template-rows:1fr auto;column-gap:13px;row-gap:7px;max-width:none}.decisionTop{grid-column:1;grid-row:1;align-self:center}.growthStep,.rewardStep{grid-column:2;grid-row:1}.decisionSurface>.decisionArea,.decisionSurface.dfl-overlay>.dfl-panel>.decisionArea{grid-column:1 / span 2;grid-row:2;max-width:680px;width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}.decisionArea .statusLine{grid-column:1 / span 2}.growthChoice{min-height:104px}.rewardStep{max-width:520px}.rescueSurface .decisionArea{grid-column:2;grid-row:1;display:grid;grid-template-columns:1fr}.rescueSurface .decisionArea .statusLine{grid-column:auto}.resultSurface .decisionArea{grid-column:2;grid-row:1;display:grid;grid-template-columns:76px minmax(0,1fr);padding:9px;max-width:430px}.resultSeed{width:70px;height:70px}.resultReplay{grid-column:1 / span 2;min-height:44px}.decisionTop h2{font-size:21px}.surfaceCopy{font-size:11px}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
