/* Size the island from its real 1448 × 1200 viewBox. The old mobile 1.8
   multiplier pushed the bottom 100+ pixels outside a landscape phone. */
.play-screen{--garden-safe-top:env(safe-area-inset-top,0px);--garden-safe-right:env(safe-area-inset-right,0px);--garden-safe-bottom:env(safe-area-inset-bottom,0px);--garden-safe-left:env(safe-area-inset-left,0px)}
.play-screen .scene #world{width:min(calc(var(--play-width,100dvw) - 128px - var(--garden-safe-left) - var(--garden-safe-right)),calc((var(--play-height,100dvh) - 24px - var(--garden-safe-top) - var(--garden-safe-bottom))*1.2067));height:auto;left:50%;top:50%;bottom:auto;overflow:visible}
@media (max-width:760px) and (orientation:portrait){
 .play-screen{--garden-safe-left:env(safe-area-inset-top,0px);--garden-safe-right:env(safe-area-inset-bottom,0px);--garden-safe-top:env(safe-area-inset-right,0px);--garden-safe-bottom:env(safe-area-inset-left,0px)}
}
@media (max-width:760px) and (orientation:portrait), (max-width:1024px) and (max-height:600px) and (orientation:landscape){
 .play-screen .play-topbar{left:max(12px,var(--garden-safe-left));right:max(12px,var(--garden-safe-right));top:max(8px,var(--garden-safe-top))}
 .play-screen .action-dock{left:max(13px,var(--garden-safe-left))}
 .play-screen .quick-rail,.play-screen .game-tools{right:max(14px,var(--garden-safe-right))}
 .play-screen .game-tools{bottom:max(12px,var(--garden-safe-bottom))}
 .play-screen .session-goal{bottom:max(8px,var(--garden-safe-bottom))}
 .play-screen dialog::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none;background:#61797088}
}
/* Independent paint surfaces keep flower motion from invalidating the island. */
.play-screen .scene .world-layer{position:absolute;aspect-ratio:1448/1200;width:min(calc(var(--play-width,100dvw) - 128px - var(--garden-safe-left) - var(--garden-safe-right)),calc((var(--play-height,100dvh) - 24px - var(--garden-safe-top) - var(--garden-safe-bottom))*1.2067));left:50%;top:50%;height:auto;transform:translate(-50%,-50%);pointer-events:none;overflow:visible}
#plant-layer{z-index:1}#plot-actions{z-index:2}.chest-layer{z-index:3}
.world-plant{position:absolute;pointer-events:none;contain:layout style;isolation:isolate}
.world-plant>div,.world-plant>div>svg{display:block;width:100%;height:100%;overflow:visible}
.world-layer .plot-action{position:absolute;pointer-events:auto;display:grid;place-items:center}
.world-layer .plot-action>div{display:grid;place-items:center;width:100%;height:100%}
.world-layer .care-badge{width:59.1%;height:59.1%}
.chest-layer .chest-anchor{position:absolute;left:81.4917%;top:36.25%;width:12.0856%;height:19.5833%}
.chest-layer .chest-anchor>div,.chest-layer .garden-chest{width:100%}
.chest-layer .garden-chest .rabbit-rig{width:100%;height:auto;aspect-ratio:1}
.chest-layer .garden-chest::before{left:19.43%;top:61%;width:66.28%;height:10%;filter:none}
.chest-layer .garden-chest strong{font-size:clamp(7px,.8vw,11px);padding:2px 6px;margin-top:-4px}
.chest-layer .garden-chest small{font-size:clamp(6px,.7vw,10px);padding:1px 4px;white-space:nowrap}

.world-plant{will-change:transform}
.world-flower{position:absolute;pointer-events:none}
.world-flower>.plant-wind{width:100%;height:100%;display:block;object-fit:contain;transform-origin:50% 100%;will-change:transform}

/* WebKit can highlight delegated click targets, including SVG groups and their
   ancestors. Apply this to the whole game while preserving keyboard outlines. */
.play-screen,.play-screen *{-webkit-tap-highlight-color:transparent}
.play-screen button,.play-screen [role=button],.play-screen .ui-icon{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
@media (hover:none),(pointer:coarse){
 .play-screen .float-tool:hover:not(:disabled) .tool-disc{filter:none;transform:none}
 .play-screen .plot-action:hover .care-badge,.play-screen .primary:hover:not(:disabled),.play-screen .secondary:hover:not(:disabled){filter:none}
 .play-screen dialog{filter:none}
 .play-screen .plot:hover:not(:focus-visible) .plot-highlight{opacity:0}
 .play-screen .sowing .plot.empty:hover:not(:focus-visible) .plot-highlight{opacity:.6}
 .play-screen .float-tool:active:not(:disabled) .tool-disc{opacity:.8}
}
