/* Width and input capabilities respond immediately to resize and rotation. */
html{scroll-behavior:smooth;scroll-padding-top:65px}
body{min-width:0}
main,.game-layout,.garden-panel,.entry-panel,.difficulty-card{min-width:0}
input,button,a{-webkit-tap-highlight-color:transparent}
button,a,input{touch-action:manipulation}
.mobile-status,.mobile-submit-summary{display:none}
#roundForm{scroll-margin-top:70px}
@media(min-width:761px) and (max-width:1100px){
 main{padding-left:3%;padding-right:3%}
 .game-layout{grid-template-columns:minmax(0,1.3fr) minmax(310px,1fr);gap:16px}
 .header-middle{display:none}
 .difficulty-card{gap:8px}.difficulty-card p{font-size:10px}
 .garden-stats>div{padding-left:12px}.garden-stats strong{font-size:24px}
 .garden-scene{margin:0 10px}
 .garden-stats{margin-left:15px;margin-right:15px}
 .sun-stat{gap:5px}.sun-stat>svg{width:30px;flex-shrink:0}
 .garden-stats small{font-size:9px}
}
@media(pointer:coarse){
 .counter button{width:44px;height:44px}
 .counter input{min-height:44px;font-size:16px}
 .help-button,.text-button,.dialog-close,.dialog-actions button{min-height:44px;min-width:44px}
 .outcome-toggle button{min-height:44px}
}
@media(max-width:760px){
 body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
 .topbar{height:66px;padding:0 16px}
 .brand{font-size:19px;gap:7px}.brand svg{width:33px;height:42px}
 .help-button{min-height:44px;font-size:11px;padding:8px 10px}
 .mobile-status{display:flex;position:sticky;top:0;z-index:5;min-height:49px;gap:16px;align-items:center;padding:8px 16px;background:#faf9eef5;border-bottom:1px solid #dce2ca;backdrop-filter:blur(12px);box-shadow:0 3px 10px #354a2a08}
 .mobile-status>div{display:flex;align-items:center;gap:5px;white-space:nowrap}
 .mobile-status strong{font-size:16px;line-height:1.3}.mobile-status small{font-size:10px;color:#7d886c}.mobile-status>div>span{color:#ba8a29;font-size:22px;line-height:1}
 .mobile-status a{margin-left:auto;font-size:11px;color:#52713a;text-decoration:none;min-height:32px;display:flex;align-items:center;padding-left:5px}
 main{padding:20px 12px 0}
 .page-heading{margin-bottom:20px}.page-heading .eyebrow{font-size:8px;letter-spacing:.9px}
 h1{font-size:clamp(20px,5.6vw,29px);margin:8px 0;letter-spacing:-.6px}.page-heading p{font-size:11px;max-width:100%;line-height:1.8}
 .difficulty-grid{gap:7px}.difficulty-card{min-height:142px;padding-top:11px;padding-bottom:9px}.difficulty-card.active{padding-top:10px;padding-bottom:8px}
 .difficulty-art{height:57px}.difficulty-art svg{height:62px}.difficulty-art.boss img{height:66px;width:58px}
 .difficulty-card h3{font-size:13px}.difficulty-card p{font-size:9px;line-height:1.8}.difficulty-tag{font-size:9px}
 .section-label{gap:8px}.section-label h2{font-size:15px}
 .game-layout{display:flex;flex-direction:column;gap:18px;margin-top:20px}.garden-panel,.entry-panel{width:100%}
 .garden-heading{height:54px;padding:0 13px}.garden-heading h2{font-size:14px}.garden-heading .round-pill{font-size:9px;margin-left:0}
 .garden-heading>div{gap:7px}.text-button{font-size:11px;min-height:44px;min-width:44px}
 .garden-scene{height:255px;margin:0 9px}.garden-grid{top:-12px;bottom:30px}.garden-cell svg{height:46px;width:43px}
 .zombie-area.boss{top:-92px;bottom:11px}.zombie-area.boss img{max-height:205px}
 .scene-label{font-size:9px;left:8px;max-width:72%;line-height:1.5}.scene-label span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .garden-stats{margin:15px 13px 0;padding-bottom:15px;grid-template-columns:1fr 1fr 1fr}.garden-stats>div{padding-left:10px}
 .garden-stats span{font-size:10px}.garden-stats strong{font-size:25px}.garden-stats small{font-size:10px}.sun-stat{gap:5px}.sun-stat>svg{width:29px;height:35px;flex-shrink:0}
 .progress-wrap{padding:13px 13px 8px}.progress-label,.progress-wrap p{font-size:10px}.progress-track{height:9px}
 .history-section{padding:9px 13px 3px}.history-heading h2{font-size:14px}.history-list{max-height:230px}.history-row{grid-template-columns:30px minmax(0,1fr) auto;gap:8px}
 .history-row p{font-size:10px;overflow-wrap:anywhere}.history-row strong{font-size:12px}.history-delta{font-size:18px}.history-delta small{font-size:10px}.history-empty{padding:10px 0 16px;font-size:11px}.history-empty span{display:none}
 .entry-panel{padding:20px 15px 16px}.entry-panel .section-label{margin-bottom:18px}.entry-index{font-size:10px}
 .field-title{font-size:13px;margin-bottom:10px}.field-title>span{font-size:11px}.outcome-toggle{margin-bottom:19px}.outcome-toggle button{min-height:44px;font-size:13px}
 .revenue-input{height:54px}.revenue-input input{font-size:24px;min-height:48px}.revenue-input>span{font-size:12px}.revenue-unit-help{font-size:12px}
 .revenue-chips{gap:6px;margin-bottom:20px}.revenue-chips button{font-size:11px;min-height:44px;padding:8px 2px}.revenue-chips b{margin-left:2px}
 .loot-title>span{font-size:11px}.loot-row{gap:8px;padding:12px 0}.loot-name{font-size:13px}.loot-name small{font-size:10px;margin-left:4px}.loot-name>span{font-size:11px}.loot-icon{width:26px;height:29px;flex-shrink:0}
 .counter{gap:3px}.counter button{width:44px;height:44px;font-size:20px}.counter input{width:40px;min-height:44px;font-size:16px}
 .round-preview{margin-top:19px}.round-preview>div>span{font-size:12px}.round-preview p{font-size:10px}
 .revenue-warning{padding:12px}.revenue-warning>button{min-height:44px;font-size:12px}.revenue-confirm{font-size:12px;min-height:44px;align-items:center}.revenue-confirm input{width:20px;height:20px;margin:0}
 .mobile-action-bar{position:fixed;z-index:8;bottom:0;left:0;right:0;display:flex;align-items:center;gap:13px;padding:11px max(15px,env(safe-area-inset-right)) calc(13px + env(safe-area-inset-bottom)) max(15px,env(safe-area-inset-left));background:#fbfaf1f5;border-top:1px solid #d4dcc2;box-shadow:0 -5px 20px #2f462616;backdrop-filter:blur(12px)}
 .mobile-submit-summary{display:flex;flex-direction:column;gap:3px;flex-shrink:0;min-width:97px}.mobile-submit-summary span{font-size:10px;color:#81906e}.mobile-submit-summary strong{font-size:23px;line-height:1.2;color:#a47e28}
 .mobile-action-bar .submit-button{flex:1;min-width:0;width:auto;min-height:49px;padding:13px 12px;font-size:12px;gap:7px}
 .entry-footnote{font-size:11px;margin:12px 0 0}.toast{bottom:calc(100px + env(safe-area-inset-bottom));font-size:12px;width:max-content;max-width:calc(100% - 28px);text-align:center;line-height:1.7;padding:11px 18px}
 footer{padding:20px 0 calc(115px + env(safe-area-inset-bottom));font-size:10px;gap:7px;text-align:center;line-height:1.7}
 html{scroll-padding-bottom:115px}input{scroll-margin:85px 0 135px}
 dialog{padding:25px 21px;max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain}dialog p{font-size:13px}.dialog-close{width:44px;height:44px;top:5px;right:5px}.dialog-actions button{min-height:44px}.rules-table{font-size:13px}
 body:has(dialog[open]) .mobile-action-bar{visibility:hidden}
 body.keyboard-open .mobile-action-bar{display:none}body.keyboard-open .toast{bottom:15px}
}
@media(max-width:360px){
 main{padding-left:9px;padding-right:9px}.mobile-status{padding-left:12px;padding-right:12px;gap:10px}.mobile-status strong{font-size:14px}.mobile-status small{font-size:9px}
 .difficulty-card h3{font-size:12px}.difficulty-card p{font-size:8px}.difficulty-grid{gap:5px}.garden-stats strong{font-size:22px}.garden-stats small{font-size:9px}.sun-stat>svg{width:23px}
 .entry-panel{padding-left:12px;padding-right:12px}.loot-row{gap:6px}.loot-icon{width:22px;height:26px}.loot-name{font-size:12px}.loot-name small{display:block;margin-left:0}.loot-name>span{font-size:10px}.counter{gap:0}.counter input{width:33px}.mobile-action-bar{gap:8px}.mobile-submit-summary{min-width:91px}.mobile-action-bar .submit-button{font-size:11px;padding-left:9px;padding-right:9px}
}
@media(max-width:760px) and (orientation:landscape) and (max-height:500px){
 .mobile-status{position:relative}.mobile-action-bar{padding-top:7px;padding-bottom:calc(7px + env(safe-area-inset-bottom))}.mobile-submit-summary{flex-direction:row;align-items:center;gap:10px}.mobile-submit-summary strong{font-size:20px}.mobile-action-bar .submit-button{min-height:44px}.toast{bottom:80px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
