/* Clear play space on phones and touch tablets; details are opened on demand. */
.compact-controls{display:none}
.toolbox .tool{flex:1;min-width:0}.toolbox{max-width:680px}
#more-dialog{width:min(460px,94vw);padding:26px 22px;max-height:90dvh;overflow:auto}
.compact-objective{background:#e7efd5;border:1px solid #b6c7a2;border-radius:18px;padding:16px}
.compact-objective h3{margin:0;font-size:18px}.compact-objective p{margin:10px 0;line-height:1.5}.compact-objective small{display:block;margin-bottom:12px}
.compact-objective .button{width:100%;min-height:44px}
.compact-instructions{font-size:14px;line-height:1.6;color:#3b5742}
.compact-options{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.compact-options button{background:#f0f4e7;color:#294c35;border:1px solid #bacbaa;border-radius:12px;min-height:48px;font:inherit;font-size:14px;padding:9px;cursor:pointer}
.compact-quality{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:18px;font-size:14px}
.compact-quality select{min-height:44px;border:1px solid #a9b998;border-radius:10px;background:#fffdf1;padding:8px;color:#294c35;font:inherit}
@media(max-width:900px),(pointer:coarse){
 :root{--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px)}
 .topbar{top:calc(6px + var(--safe-top));left:calc(8px + var(--safe-left));right:calc(8px + var(--safe-right));width:auto;height:48px;padding:0 9px;gap:6px;border-radius:16px}
 .brand{font-size:12px;gap:4px}.brand b{font-size:10px}.brand-mark{width:24px;height:24px;font-size:21px}
 .resources{gap:10px}.resource{gap:4px}.resource>span{font-size:18px}.resource small{display:none}.resource strong,.water-resource strong{font-size:13px;white-space:nowrap}
 .water-resource{min-height:38px;padding:4px 7px;border-radius:11px}.topbar #help{display:none}
 .farm-stage{inset:calc(60px + var(--safe-top)) 0 calc(68px + var(--safe-bottom));min-height:0}.farm-heading{display:none}
 .farm-nav{position:fixed;top:auto;left:calc(8px + var(--safe-left));right:calc(8px + var(--safe-right));bottom:calc(6px + var(--safe-bottom));width:auto;height:56px;gap:4px;z-index:25;grid-template-columns:repeat(5,minmax(0,1fr))}
 .farm-nav button{min-width:0;min-height:54px;height:54px;gap:2px;padding:5px 2px!important;border-radius:13px;background:#fffdf1f7;font-size:20px;box-shadow:0 2px 8px #183f2c20}
 .farm-nav button span,.farm-nav #account-open span{font-size:10px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.farm-nav button[aria-pressed=true]{background:#326347}
 .toolbox,.action-hint,.camera-hint,.camera-controls,.quality-control,.mission-card,.stage-tip,.field-label{display:none!important}
 .progression-header{position:fixed;top:calc(64px + var(--safe-top));left:calc(8px + var(--safe-left));bottom:auto;width:125px;padding:4px 6px;gap:6px;border-radius:12px;z-index:5}
 .level-badge{font-size:11px;min-width:60px;min-height:36px;padding:4px}.xp-info{min-width:0;width:45px}.xp-info>div{font-size:9px;justify-content:center}.xp-info>div b,.xp-info small{display:none}.xp-info progress{height:5px}.xp-info>div span{font-size:9px}
 .compact-controls{position:fixed;top:calc(64px + var(--safe-top));right:calc(8px + var(--safe-right));display:flex;gap:6px;z-index:25}
 .compact-controls button{position:relative;min-width:40px;width:40px;height:40px;background:#fffdf1f2;border:1px solid #adc6a1;border-radius:13px;color:#294c35;font-size:24px;cursor:pointer}
 #goal-badge{position:absolute;top:-3px;right:-3px;background:#f4b83c;color:#353519;border:2px solid #fff8df;border-radius:50%;width:18px;height:18px;font:bold 12px/14px sans-serif}#goal-badge[hidden]{display:none}
 .mini-map{display:none;right:8px;bottom:8px;grid-template-columns:repeat(3,36px)}body.show-minimap .mini-map{display:grid}.mini-map button{width:36px;height:36px}
 .scene-tag.land-tag,.scene-tag.construction-tag,.scene-tag.region-tag:not(.owned){display:none!important}body.show-minimap .scene-tag.region-tag:not(.owned){display:block!important}
 .seeds-panel,.barn-panel{position:fixed;top:auto;left:calc(8px + var(--safe-left));right:calc(8px + var(--safe-right));bottom:calc(73px + var(--safe-bottom));width:auto;max-height:65dvh;padding:16px;z-index:20;border-radius:18px;overscroll-behavior:contain}
 .seed-list{grid-template-columns:1fr 1fr;gap:7px}.seed{min-height:54px}.seeds-panel .section-heading,.seeds-panel>.muted,.seeds-panel .water-card{display:none}.seeds-panel .button,.barn-panel button{min-height:44px}
 .evolution-panel{position:fixed;left:calc(8px + var(--safe-left));right:calc(8px + var(--safe-right));top:calc(112px + var(--safe-top));bottom:calc(73px + var(--safe-bottom));padding:16px;z-index:20;overscroll-behavior:contain}.evolution-grid{display:block}.evolution-grid>.panel{margin-bottom:12px}
 .session-note{display:none}body.save-problem .session-note{display:block;position:fixed;top:auto;left:10px;right:10px;bottom:calc(75px + var(--safe-bottom));background:#fff1d9;color:#673e25;border:1px solid #c8a365;padding:10px;border-radius:12px;font-size:12px;z-index:30;text-align:center}#retry{min-height:36px}
 .accessible-plots .field-grid{inset:52px 8px 8px;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:70px;z-index:20;gap:7px;background:#e2edd4f7}.accessible-plots .plot{min-height:60px}.accessible-plots .plot .growth-text{font-size:11px}
 #toast{bottom:calc(78px + var(--safe-bottom));font-size:13px;max-width:calc(100vw - 24px);z-index:35}
 dialog,#account-dialog,#region-dialog,#animals-dialog,#more-dialog{max-height:calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom));overscroll-behavior:contain}.close-dialog,#account-close{min-width:44px;min-height:44px}
}
@media(max-height:500px) and (pointer:coarse){
 .topbar{left:8px;right:8px;width:auto}.farm-stage{inset:60px 0 calc(62px + var(--safe-bottom))}.farm-nav{left:8px;right:8px;top:auto;height:50px}.farm-nav button{height:48px;min-height:48px;flex-direction:row;gap:5px}.farm-nav button span{font-size:11px}
 .progression-header,.compact-controls{top:64px}.seeds-panel,.barn-panel{max-height:calc(100dvh - 142px);bottom:68px}.evolution-panel{top:112px;bottom:68px}.accessible-plots .field-grid{grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:60px}
}
