/* Phone game scene: the whole play area stays between the mission and the tool dock. */
.mobile-game-ui{display:none}
.garden-settings{width:min(350px,calc(100vw - 28px));padding:32px 24px 23px;background:#fffdec;border:2px solid #718b58;border-radius:25px;color:#3e593b;box-shadow:0 9px 0 #324c3526}
.garden-settings::backdrop{background:#1e3e3470;backdrop-filter:blur(3px)}
.garden-settings h2{font-size:25px;margin:8px 0}.garden-settings-caption{font-size:12px!important;color:#7b8d69!important;margin:7px 0 20px!important}
.garden-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.garden-settings-grid button{min-height:46px;border:1px solid #c4d2a6;border-radius:12px;background:#f0f5dd;color:#59744a;font-size:13px;font-weight:600}.garden-settings-grid button:disabled{opacity:.4}
.garden-home-action,.garden-resume-action{width:100%;min-height:46px;margin-top:12px;border-radius:12px;font-weight:700;font-size:13px}.garden-home-action{background:#edf0df;color:#758266}.garden-resume-action{background:#729b4f;color:#fffce7;box-shadow:0 3px 0 #4d7138}
@media(max-width:760px){
 body[data-screen="game"]{background:#d8eaaa;overflow:hidden;color:#385538;overscroll-behavior:none}
 body[data-screen="game"] .ambient{display:none}
 body[data-screen="game"] .app{width:100%;max-width:none;height:100svh;height:100dvh;padding:0!important;margin:0;isolation:isolate}
 body[data-screen="game"] .topbar,body[data-screen="game"] footer,body[data-screen="game"] #game-screen>.intro,body[data-screen="game"] .left-column,body[data-screen="game"] .right-column{display:none!important}
 body[data-screen="game"] #game-screen{position:relative;display:flex;flex-direction:column;gap:0;height:100%;overflow:hidden;overflow:clip;padding:calc(8px + env(safe-area-inset-top,0px)) 5px calc(9px + env(safe-area-inset-bottom,0px));background:radial-gradient(ellipse at 50% 46%,#f0f6caaa,transparent 63%),linear-gradient(170deg,#d6e9a3,#e8f0b9 48%,#c8dfa0);z-index:0}
 body[data-screen="game"] #game-screen::before,body[data-screen="game"] #game-screen::after{content:"";position:absolute;z-index:-1;pointer-events:none;width:170px;height:230px;opacity:.55;background:radial-gradient(ellipse at 0% 12%,#56855a 0 17%,transparent 18%),radial-gradient(ellipse at 8% 36%,#76a566 0 26%,transparent 27%),radial-gradient(ellipse at 12% 67%,#8cb96c 0 22%,transparent 23%),radial-gradient(ellipse at 50% 5%,#a8ca78 0 29%,transparent 30%)}
 body[data-screen="game"] #game-screen::before{left:-57px;top:-90px;transform:rotate(-17deg)}
 body[data-screen="game"] #game-screen::after{right:-64px;bottom:-95px;transform:rotate(168deg)}
 .mobile-game-ui{display:flex}
 .mobile-game-hud{display:grid;grid-template-columns:44px minmax(0,1fr)56px;align-items:center;gap:12px;min-height:60px;padding:0 8px;flex-shrink:0}
 .garden-round-button{height:44px;width:44px;display:grid;place-items:center;background:#fffde9;border:2px solid #567348;border-radius:15px;box-shadow:0 3px 0 #759554;color:#506c40}
 .garden-round-button svg{width:25px;height:25px;fill:#a8c783;stroke:#4e6c3e;stroke-width:2;stroke-linejoin:round}.garden-round-button circle{fill:#fffce8}
 .mobile-mission{min-width:0;text-align:center}.mobile-mission h1{font-size:20px!important;color:#344e31;line-height:1.2;letter-spacing:.5px;margin:0 0 3px!important;text-shadow:0 2px 0 #f8ffde}
 .mobile-progress{height:16px;background:#f9ffde;border:2px solid #57723f;border-radius:8px;position:relative;overflow:hidden;box-shadow:0 2px 0 #879e5b33}.mobile-progress>span{display:block;height:100%;width:0;background:linear-gradient(#ffe979,#eabf44);border-radius:5px;transition:width .18s ease}.mobile-progress>b{position:absolute;inset:0;font-size:9px;line-height:12px;color:#3b5631;font-variant-numeric:tabular-nums}
 .mobile-mission p{font-size:10px;margin:3px 0 0;color:#6c8054;font-variant-numeric:tabular-nums}.mobile-mission p strong{font-weight:700;color:#466337}
 .mobile-moves{background:#fffce5;border:2px solid #829752;border-radius:13px;box-shadow:0 3px 0 #98ad62;text-align:center;padding:4px 2px}.mobile-moves>span{display:block;font-size:9px;color:#889558;white-space:nowrap}.mobile-moves strong{display:block;line-height:1.15;font-size:25px;color:#56733b;font-variant-numeric:tabular-nums}.mobile-moves strong.low{color:#ba7650}
 .mobile-level-meta{justify-content:space-between;align-items:center;min-height:20px;padding:1px 10px;gap:8px;font-size:10px;color:#6c8150;flex-shrink:0}.mobile-level-meta>span{white-space:nowrap}.mobile-level-meta>span:last-child{font-size:9px;background:#f8ffe45c;border-radius:20px;padding:1px 7px}
 body[data-screen="game"] .game-layout{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;gap:0;margin:0!important;width:100%}
 body[data-screen="game"] .play-card{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;max-height:100%;min-height:0;padding:0!important;margin:0;background:none;border:0;box-shadow:none;border-radius:0;overflow:visible}
 body[data-screen="game"] .board-top,body[data-screen="game"] .orchard-strip,body[data-screen="game"] .board-controls{display:none!important}
 body[data-screen="game"] .board-viewport{width:100%;max-width:100%;padding:0 0 3px;border-radius:12px;flex-shrink:1;min-height:0;scrollbar-width:thin}
 body[data-screen="game"] .board-wrap{width:var(--mobile-board-width,100%);max-width:100%;margin:0 auto;position:relative;border-radius:10px;background:none}
 body[data-screen="game"] .board{width:100%;padding:3px;gap:3px;border:1px solid #a6b98a;border-radius:10px;background:#d3ddba;box-shadow:0 3px 0 #a6ba83;overflow:hidden}
 body[data-screen="game"] .tile[data-type]{border:1px solid #a6b68a;border-radius:5px;background:linear-gradient(155deg,#fffefb 8%,#faf9ed 48%,#edf0db);box-shadow:0 2px 0 #a0b67a,inset 0 2px 0 #fff,inset 2px 0 0 #ffffffb0,inset -2px -3px 0 #718b4c26;min-width:0;aspect-ratio:1;touch-action:none}
 body[data-screen="game"] .tile .fruit-image{width:84%;height:84%;min-width:22px;min-height:22px;max-width:calc(100% - 2px);max-height:calc(100% - 2px);object-fit:contain;filter:none}
 body[data-screen="game"] .tile.selected{outline:2px solid #fcba35;outline-offset:-2px;background:#fff0b9!important;z-index:4;filter:brightness(1.03)}
 body[data-screen="game"] .tile.hinted{outline-color:#ecad32}.tile[data-type].tile-ice{border-color:#719eac}
 body[data-screen="game"] .tile[data-special="1"],body[data-screen="game"] .tile[data-special="2"]{background:repeating-linear-gradient(135deg,#ffecac 0 5px,#fff9dd 5px 10px)}
 body[data-screen="game"] .tile[data-special="3"]{background:#fff4c9;box-shadow:inset 0 0 0 1px #edb242,0 2px 0 #a4a45d}
 body[data-screen="game"] .tile[data-special="4"]{background:conic-gradient(#ffdad3,#fff0c7,#e3edc4,#d4e8f0,#eadcf4,#ffdad3)}
 body[data-screen="game"] .tile .special-badge{min-width:9px;min-height:9px;width:39%;height:39%}.tile .rocket-badge{font-size:13px}
 body[data-screen="game"] .board-bottom{min-height:24px;max-width:100%;gap:5px;padding:5px 8px 1px;font-size:10px;line-height:16px;color:#789254;text-align:center;justify-content:center;flex-shrink:0}.board-bottom #status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.board-bottom .status-dot{background:#86a75e;flex-shrink:0}
 .mobile-game-dock{flex-shrink:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:min(288px,100%);margin:6px auto 0;padding:0 4px 4px}
 .garden-tool{position:relative;display:grid;grid-template-columns:22px auto;align-items:center;align-content:center;justify-content:center;gap:2px 4px;min-height:56px;border:2px solid #547545;border-radius:13px;box-shadow:0 3px 0 #658648,inset 0 2px 0 #fbffe7;background:linear-gradient(#f5ffd9,#d5eaa4);padding:4px;transition:transform .12s,filter .12s;color:#456437}
 .garden-tool svg{width:22px;height:22px;fill:#f4cc54;stroke:#788146;stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round;overflow:visible}
 .garden-tool b{font-size:12px;font-weight:800;letter-spacing:0;margin:0;line-height:1.3;white-space:nowrap;text-shadow:0 1px 0 #fffde3}.garden-tool small{grid-column:1/-1}.garden-shuffle{background:linear-gradient(#fff6d4,#f1df9c)}.garden-shuffle svg{fill:#e7bb43;stroke-width:1.6}.garden-save{background:linear-gradient(#e2f6eb,#baddbc)}.garden-save svg{fill:#9fc4a6;stroke:#5c8461}.garden-save svg path+path{fill:#f9f5cb;stroke-width:2}
 .garden-tool-count{position:absolute;right:-4px;top:-6px;min-width:21px;height:21px;padding:0 4px;display:grid;place-items:center;background:#fff5b8;border:2px solid #768447;border-radius:50%;color:#6a743e;font-size:10px;font-weight:800;box-shadow:0 2px 0 #7b98442b}
 .garden-tool:disabled{opacity:.5;filter:saturate(.6)}.garden-tool:active:not(:disabled){transform:translateY(3px);box-shadow:0 1px 0 #658648}
 body[data-screen="game"] .board-viewport.is-zoomed{width:100%;max-height:100%;height:var(--mobile-board-room);border:2px solid #87a665;background:#c3d992;overscroll-behavior:contain;overflow:auto}
 body[data-screen="game"] .board-viewport.is-zoomed .board-wrap{width:570px;min-width:570px;max-width:none}.board-viewport.is-zoomed .tile{touch-action:pan-x pan-y!important}
 body[data-screen="game"] dialog{max-height:calc(100dvh - 28px);overflow-y:auto}
}
@media(max-width:760px) and (max-height:650px){
 body[data-screen="game"] #game-screen{padding-top:calc(5px + env(safe-area-inset-top,0px));padding-bottom:calc(6px + env(safe-area-inset-bottom,0px))}
 .mobile-game-hud{min-height:54px;grid-template-columns:44px minmax(0,1fr)54px;gap:10px;padding:0 5px}.mobile-mission h1{font-size:18px!important;margin-bottom:3px!important}.mobile-mission p{font-size:9px;margin-top:3px}.mobile-progress{height:13px}.mobile-progress>b{font-size:8px;line-height:9px}.mobile-moves{padding:4px 2px;border-radius:13px}.mobile-moves strong{font-size:23px}.mobile-moves>span{font-size:8px}.garden-round-button{width:44px;height:44px;border-radius:13px}
 .mobile-level-meta{min-height:18px;font-size:9px;padding:1px 7px}.mobile-level-meta>span:last-child{font-size:8px;padding:1px 6px}
 .mobile-game-dock{margin-top:5px;gap:12px;width:min(276px,100%);padding-bottom:4px}.garden-tool{min-height:54px;border-radius:12px;padding:4px}.garden-tool svg{width:22px;height:22px}.garden-tool b{font-size:12px;margin-top:0}.garden-tool-count{min-width:21px;height:21px;font-size:10px;top:-5px}.garden-settings{padding:28px 20px 20px}
 body[data-screen="game"] .board-bottom{min-height:19px;padding:2px 5px 0;font-size:9px;line-height:15px}.mobile-mission h1{letter-spacing:.5px}
}
/* Thirteen rows: keep the feedback strip slim and preserve accessible tap areas. */
@media(max-width:760px){
 body[data-screen="game"] .board-bottom{min-height:15px;padding:1px 5px 0;font-size:9px;line-height:13px;gap:4px}
 .mobile-game-hud{min-height:52px;gap:9px}.mobile-mission h1{font-size:18px!important}
 .mobile-level-meta{min-height:16px;padding-top:0;padding-bottom:0}
 .mobile-game-dock{margin-top:2px;gap:9px;padding-bottom:2px;width:min(276px,100%)}
 .garden-tool{min-height:48px;padding:3px;border-radius:11px}.garden-tool svg{width:20px;height:20px}.garden-tool b{font-size:11px}
}
@media(max-width:760px) and (max-height:650px){
 .mobile-game-hud{min-height:49px}.mobile-mission h1{font-size:17px!important}.mobile-level-meta{min-height:15px}
 body[data-screen="game"] .board-bottom{min-height:14px;line-height:12px;padding-top:1px}
 .garden-tool{min-height:46px}.mobile-game-dock{margin-top:2px}
}
@media(prefers-reduced-motion:reduce){.mobile-progress>span,.garden-tool{transition:none}}

@media(max-width:760px) and (max-height:650px){body[data-screen="game"] .board{gap:2px}}

/* Preserve phone effects performance within the single-screen layout. */
@media(max-width:760px){body[data-screen=game] .tile{contain:layout style}body[data-screen=game] .tile .fruit-image,body[data-screen=game] .tile.reward-bloom{filter:none}}
