/* A scene-first shell. Informational panels move into the pause/menu sheet. */
#view-btn{display:none}
.handheld .desktop-help{display:none}
.handheld .pause-copy{display:flex;flex-direction:column}
.handheld .pause-copy>h3,.handheld .pause-copy>p{order:-2}
.handheld #resume-btn{order:-1}
.handheld .pause-copy .settings-actions{order:0}
.handheld .menu-summary{order:1}
.handheld .menu-goal{order:2}
html.handheld,html.handheld body{height:100%;overflow:hidden;overscroll-behavior:none}
.handheld body{padding:0;background:#e9eddd}
.handheld .app{height:100vh;height:100dvh;max-width:none;padding:max(5px,env(safe-area-inset-top,0px)) max(6px,env(safe-area-inset-right,0px)) max(5px,env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));margin:0}
.handheld .masthead,.handheld .stats,.handheld .sidebar,.handheld .bottom-nav,.handheld .life-nav,.handheld .system-bar,.handheld .page-footer{display:none}
.handheld .main-grid{display:block;height:100%;min-height:0}
.handheld .game-card{display:flex;flex-direction:column;height:100%;width:100%;margin:0;min-height:0;border-color:#c2cdb5;box-shadow:0 2px 12px #3e593511}
.handheld .scene-bar{height:42px;min-height:42px;padding:0 10px;gap:6px}
.handheld .scene-bar>div{min-width:0;gap:7px}.handheld .scene-bar strong{font-size:14px;white-space:nowrap}
.handheld #zone-subtitle{display:none}.handheld #day-badge{font-size:11px!important;padding:2px 7px}
.handheld #map-btn{font-size:12px;min-height:40px;padding:0 5px}.handheld #map-btn span{margin-left:3px}
.handheld .compact-hud{position:static;display:flex;flex:none;justify-content:space-between;align-items:center;gap:8px;min-height:32px;padding:4px 11px;border:0;border-top:1px solid #dbe2cd;background:#edf1e3;font-size:12px;line-height:1.5;pointer-events:none;color:#617854}
.handheld .compact-hud span{white-space:nowrap}.handheld .compact-hud strong{color:#315b43;font:600 14px Consolas,monospace}
.handheld .canvas-wrap{flex:1;min-height:0;background:#a4b699;overflow:hidden;isolation:isolate;touch-action:none}
.handheld #game{position:absolute;left:0;top:0;max-width:none;image-rendering:pixelated;transform-origin:top left}
.handheld .scene-badge,.handheld .scene-location,.handheld .spot-hint{display:none}
.handheld .game-toolbar{flex:none;min-height:56px;padding:5px 7px;background:#f7f8ee;border-top:1px solid #d2ddc4;gap:0}
.handheld .game-toolbar>span{display:none}.handheld .game-toolbar>div{display:flex;gap:7px;width:100%;margin:0;justify-content:stretch}
.handheld .game-toolbar .subtle{flex:1;min-width:0;min-height:44px;font-size:13px;padding:6px 9px;border-radius:4px;white-space:nowrap}
.handheld #auto-btn{flex:1.6}.handheld #scan-btn small{display:none}.handheld #view-btn{display:block}.handheld #pause-btn{background:#315d48;border-color:#315d48;color:#faf6e1}
.handheld #scan-btn[disabled]{display:none}
.handheld .welcome{padding:16px}.handheld .welcome:before{inset:8% 5%;border-radius:7px}.handheld .welcome-art{display:none}
.handheld .welcome h2{font-size:clamp(18px,3.2vw,25px);letter-spacing:0;margin:9px 0}.handheld .welcome p{font-size:12px;line-height:1.8;margin:5px 0 16px}.handheld .welcome .eyebrow{font-size:10px;letter-spacing:1px}.handheld .welcome .primary{min-height:44px;font-size:14px;padding:9px 20px}.handheld .welcome small{font-size:11px;margin-top:13px}
.handheld .pickup-card{top:auto;bottom:12px;right:10px;width:225px;min-height:82px;padding:8px 33px 8px 79px;text-align:left;border-radius:5px;box-shadow:0 4px 14px #29452f2b;animation:none}
.handheld .pickup-photo{position:absolute;left:8px;top:8px;width:62px;height:62px;margin:0;border-radius:4px}
.handheld .pickup-label{font-size:9px;margin:0 0 3px;padding:0;letter-spacing:0}.handheld .pickup-card .rarity{font-size:9px}.handheld .pickup-card h3{font-size:12px;line-height:1.5;margin:0}.handheld .pickup-card>strong{font-size:14px}
.handheld .pickup-close{width:32px;height:32px;min-height:32px;right:1px;top:1px;font-size:22px;padding:0}
.handheld .pickup-detail{font-size:0;position:absolute;inset:33px 0 0 72px;margin:0;width:auto;min-height:40px;padding:0}.handheld .pickup-detail:after{content:'详情 ↗';font-size:10px;position:absolute;right:8px;bottom:5px;color:#6d805e}
.handheld dialog{width:calc(100vw - max(12px,env(safe-area-inset-left,0px)) - max(12px,env(safe-area-inset-right,0px)));max-width:840px;max-height:calc(100dvh - max(12px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px)));border-radius:8px;box-shadow:0 8px 30px #1c382b3b;overscroll-behavior:contain}
.handheld .modal-header{padding:12px 15px;gap:12px}.handheld .modal-header h2{font-size:18px;letter-spacing:0}.handheld .modal-header .eyebrow{font-size:8px}.handheld #close-modal{height:44px;min-width:44px;flex:none;font-size:25px}
.handheld #modal-body{padding:15px}.handheld .buy-button,.handheld .tab,.handheld .phone-tabs button,.handheld .story-actions button,.handheld .chat-tools button{min-height:44px;font-size:12px}
.handheld .pause-copy{padding:0;text-align:left}.handheld .pause-copy>h3{font-size:17px;margin:2px 0 9px}.handheld .pause-copy>p{font-size:12px;margin:5px 0 12px}.handheld #resume-btn{display:block;width:100%;min-height:44px;margin:0 0 14px;font-size:14px}
.menu-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0 15px}.menu-summary div{padding:10px;background:#edf1e2;border:1px solid #d9e1cd}.menu-summary small{display:block;font-size:10px;color:#8a967c}.menu-summary strong{display:block;font-size:15px;overflow-wrap:anywhere}
.menu-goal{padding:12px 14px;background:#e7edde;border-left:3px solid #7b9970;margin:12px 0;font-size:12px;line-height:1.8}.menu-goal h3{font-size:14px;margin:0 0 3px}.menu-goal p{margin:0;color:#6b805e}
.handheld .pause-copy .settings-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:14px 0}.handheld .pause-copy .settings-actions button{min-height:48px;padding:7px;font-size:12px}
.handheld .toasts{top:calc(85px + env(safe-area-inset-top,0px));bottom:auto;gap:4px;max-height:72px;overflow:hidden}.handheld .toast{font-size:11px;padding:7px 12px;border-radius:4px}
@media(max-width:430px){.handheld .menu-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.handheld .pause-copy .settings-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(orientation:landscape) and (max-height:560px){.handheld .scene-bar{min-height:36px;height:36px}.handheld .compact-hud{min-height:27px;padding:2px 11px;font-size:11px}.handheld .compact-hud strong{font-size:12px}.handheld .game-toolbar{min-height:52px;padding:4px 7px}.handheld .pickup-card{bottom:8px;right:9px}.handheld .welcome:before{inset:3% 12%}.handheld .welcome h2{font-size:20px;margin:4px 0}.handheld .welcome p{font-size:11px;line-height:1.5;margin:3px 0 8px}.handheld .welcome small{margin-top:8px;font-size:10px}.handheld .modal-header{padding:8px 14px}.handheld .modal-header .eyebrow{display:none}}

@media(orientation:landscape) and (max-height:560px){
 .handheld .game-card{display:grid;grid-template-columns:minmax(250px,1.2fr) minmax(200px,1fr);grid-template-rows:40px minmax(0,1fr) 52px;grid-template-areas:"scene stats" "world world" "tools tools"}
 .handheld .scene-bar{grid-area:scene;height:40px;min-height:40px}.handheld .compact-hud{grid-area:stats;min-height:0;border-top:0;background:#fbfbf3;padding:3px 10px}
 .handheld .canvas-wrap{grid-area:world}.handheld .game-toolbar{grid-area:tools}
 .handheld .pause-copy .settings-actions{grid-template-columns:repeat(5,minmax(0,1fr));margin:5px 0 12px}
 .handheld .pause-copy>h3,.handheld .pause-copy>p{display:none}
 .handheld .toasts{top:calc(52px + env(safe-area-inset-top,0px))}
}
@media(orientation:landscape) and (max-height:320px){.handheld .welcome p:not(.eyebrow),.handheld .welcome small{display:none}.handheld .welcome .eyebrow{margin-bottom:4px}.handheld .welcome h2{margin:2px 0 9px}}
