/* Native game gestures, with one-finger menu scrolling retained. */
html,body,#game{touch-action:pan-x pan-y;overscroll-behavior:none;-webkit-text-size-adjust:100%;text-size-adjust:100%}
#game *{touch-action:pan-x pan-y}
#game #world,#game #joystick,#game .combat,#game .combat *{touch-action:none}
#game button,#game a{touch-action:pan-y}
#game input,#game textarea,#game select{font-size:16px!important}
#game .panel-content,#game .item-list,#game .welcome,#game #battleTracker{touch-action:pan-y;overscroll-behavior:contain}
#game:fullscreen{width:100vw;height:100dvh}#game:-webkit-full-screen{width:100vw;height:100dvh}
/* Status and objectives share a real flow container instead of overlapping offsets. */
#statusStack{position:absolute;z-index:4;top:110px;left:28px;width:250px;display:flex;flex-direction:column;gap:12px;pointer-events:none}
#game #statusStack .hero-hud{position:static;width:100%;transform:none;margin:0;pointer-events:auto}
#game #statusStack #battleTracker{position:static;width:100%;min-height:0;max-height:min(240px,32dvh);margin:0;padding:10px;pointer-events:auto;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}
#game #battleTracker button{height:auto;white-space:normal;overflow-wrap:anywhere;line-height:1.5;letter-spacing:0;transform:none}
#game #battleTracker #battleTrack strong{font-size:14px;line-height:1.5;margin:0 0 4px}
#game #battleTracker #battleTrack span,#game #battleTracker .battle-side-progress button{font-size:14px;line-height:1.5}
#game #battleTracker #battleTrack small{font-size:12px;line-height:1.5;margin-bottom:4px}
#game #battleTracker .battle-side-progress{white-space:normal;border-top:1px solid #e5c48a40;margin-top:7px;padding-top:4px}
#game #battleTracker .battle-side-progress:empty{display:none}
#game #battleTracker #taskDetails{font-size:14px;min-height:36px;margin-top:5px}
#game .hero-info{min-width:0}#game .hero-name{flex-wrap:wrap;gap:0 6px}#game .hero-name strong{overflow-wrap:anywhere}
#game .is-battle .quest,#game.is-battle .quest{display:none}
@media(orientation:portrait){
 #game .topbar{padding:0 12px;top:calc(8px + env(safe-area-inset-top));height:44px;gap:8px}
 #game .brand{font-size:17px;letter-spacing:1px;gap:5px}#game .brand small{display:none}#game .sigil{font-size:26px}
 #game .top-actions{gap:4px}#game .coin{font-size:13px;margin-right:3px}
 #game .top-actions .icon-button{width:44px;height:44px;min-height:44px;padding:0;border-width:8px;border-image-width:8px}
 #statusStack{top:calc(66px + env(safe-area-inset-top));left:12px;width:min(236px,58vw);gap:10px}
 #game #statusStack .portrait{width:42px;height:42px;flex:0 0 42px}#game #statusStack .portrait-art{width:42px;height:42px}
 #game #statusStack .portrait b{left:8px;bottom:-8px;font-size:12px;line-height:22px;width:24px}
 #game #statusStack .hero-hud{gap:7px}#game #statusStack .hero-name strong{font-size:14px}#game #statusStack .hero-name span{font-size:12px}
 #game #statusStack .xp-row span{font-size:12px;color:#f7e6bd;text-shadow:0 1px 3px #000}
 #game #statusStack #battleTracker{max-height:clamp(130px,25dvh,218px);padding:7px 9px}
 #game .location{top:calc(67px + env(safe-area-inset-top));right:12px;left:auto;transform:none;width:32%;white-space:normal;text-align:right}
 #game .location h1{font-size:17px;line-height:1.4;letter-spacing:1px;margin:0 0 4px}#game .location .eyebrow{display:none}#game .location>span{font-size:12px;line-height:1.5;letter-spacing:0}
 #game .quest,#game .world-minimap{display:none}
 #game .boss-hud{top:calc(365px + env(safe-area-inset-top));width:calc(100% - 32px)}
 #game .lesson-hud{left:auto;right:12px;top:calc(155px + env(safe-area-inset-top));width:32%;max-width:32%;transform:none;font-size:14px}
 #game .exploration-hint{top:auto;left:12px;right:auto;bottom:calc(300px + env(safe-area-inset-bottom));max-width:calc(100% - 24px);width:auto}
}
@media(orientation:landscape) and (max-height:600px){
 #statusStack{top:calc(8px + env(safe-area-inset-top));left:calc(12px + env(safe-area-inset-left));width:208px;gap:10px}
 #game #statusStack #battleTracker{max-height:calc(100dvh - 205px);min-height:68px;padding:6px 8px}
 #game #statusStack .hero-hud{width:208px}
 #game #battleTracker #battleTrack small{display:none}
}
@media(orientation:portrait) and (max-height:680px){#game #statusStack #battleTracker{max-height:132px}#game .boss-hud{top:calc(300px + env(safe-area-inset-top))}}

#game #statusStack .hero-hud{color:#fff0d1;text-shadow:0 1px 3px #10191c}
#game #battleTracker #battleTrack span{color:#fff0d1}
