/* The station itself remains the tap target. The coach does not catch taps or steal focus. */
#fieldRail {display:contents}
#statsHead {border:0;padding:0;width:100%;text-align:left;background:transparent;color:inherit}
#fieldObjective{display:none}
@media(min-width:721px) and (min-height:551px),(min-width:1025px){
 #hud #fieldRail{position:absolute;left:18px;top:86px;width:206px;display:flex;flex-direction:column;gap:6px;pointer-events:none}
 #fieldRail :is(#stats,#quests,#warning){position:static;width:100%;max-width:none;max-height:none;transform:none;pointer-events:auto}
 #fieldRail #stats,#fieldRail #quests{padding:8px 11px}
 #hud #brand{min-width:206px;padding:9px 12px}
 #brand .eyebrow{display:none}
 #hud #brand h1{font-size:20px;letter-spacing:.015em}
 #hud #levelName{max-width:245px;font:600 12px/1.3 system-ui}
 #hud #statsHead{min-height:28px;margin:0 0 2px}
 #hud #statsHead span:first-child{letter-spacing:.03em;font:700 13px/1.2 system-ui;text-transform:none}
 #hud #statsHead span:last-child{color:#b7c9d0;font:600 11px/1.2 system-ui}
 #stats:not(.showReadings):not(.tourReveal) #statItems{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
 #stats:not(.showReadings):not(.tourReveal) .stat{position:relative;display:block;padding:3px 2px 2px;min-height:38px}
 #stats:not(.showReadings):not(.tourReveal) .statIcon{width:100%;font-size:16px}
 #stats:not(.showReadings):not(.tourReveal) .statRow{display:none}
 #stats:not(.showReadings):not(.tourReveal) .meter{height:3px;margin-top:5px}
 #fieldRail #warning{font:700 11px/1.35 system-ui;padding:8px 10px}
 #fieldRail #questToggle{min-height:26px;width:100%}
 #fieldRail #quests.collapsed #fieldObjective{display:block;font:650 13px/1.35 system-ui;color:#ffe4ad;margin:2px 0 1px}
 #hud #mapWrap{width:141px;padding:6px;top:91px}
 #hud #miniMap{width:127px;height:127px}
 #hud #mapLabel{display:none}
 #hud #mapWrap .sectiontitle{margin-bottom:5px}
 #hud #lives{min-height:0;padding:7px 11px}
}
#stationDock{position:relative}#stationDock button{width:100%}
#unloadCoach{position:absolute;z-index:2;bottom:calc(100% + 12px);right:0;width:max-content;max-width:180px;padding:8px 11px;border-radius:12px;background:#fff2bf;color:#25271f;border:2px solid #f9c96c;font:800 15px/1.22 system-ui;box-shadow:0 3px 12px #10192566;pointer-events:none}
#unloadCoach::after{content:"";position:absolute;top:100%;right:24px;border:8px solid transparent;border-top-color:#f9c96c}
#hud.firstUnload #stationBtn{background:#ffcd78;color:#202531;border:2px solid #fff3c6;box-shadow:0 0 0 3px #29374b,0 0 0 5px #ffda8d}
#hud.firstUnload #scanBtn,#hud.firstUnload #collectBtn{visibility:hidden}
#pocketBar,#pocketWarning{display:none}
.packTitle{display:flex;align-items:center;justify-content:space-between;gap:10px}.packTitle h2{margin:3px 0}.packTitle small{color:#ffd18a;font-weight:700}.packGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 14px}.packGrid .stat{min-height:44px}.packGrid .statRow{flex-wrap:wrap}.packInfo{margin:10px 0;color:#e6f1f3}.packInfo summary{cursor:pointer;padding:7px 0;font-weight:bold}.packInfo p{margin:5px 0}.packButtons{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.packButtons button{min-height:44px}
@media(max-width:720px),(max-width:1024px) and (max-height:550px) {
 #hud{--px:max(10px,env(safe-area-inset-left));--pr:max(10px,env(safe-area-inset-right));--pt:max(8px,env(safe-area-inset-top));--pb:max(12px,env(safe-area-inset-bottom));--mapW:54px}
 #hud #top,#hud #stats,#hud #quests,#hud #guide,#hud #warning,#hud #tip,#hud #moveHint{display:none!important}
 #hud #pocketBar{position:absolute;display:flex;align-items:center;gap:7px;top:var(--pt);left:var(--px);right:calc(var(--pr) + var(--mapW) + 6px);pointer-events:none}
 .pocketGoal{max-width:350px;min-width:0;flex:1;align-self:start;padding:6px 10px 7px;border-radius:12px;background:#102233ee;border:1px solid #69848c91;box-shadow:0 2px 9px #07142633}
 #pocketLevel{display:block;font:700 9px/1.25 system-ui;letter-spacing:.10em;color:#a5d4ce}
 #pocketGoal{display:block;margin:2px 0;font:750 clamp(13px,3.7vw,17px)/1.18 system-ui;color:#fff0ce}
 #pocketRoute{display:block;color:#b7deeb;font:650 11px/1.15 system-ui}
 #fieldPack,#hud #mapWrap{width:var(--mapW);height:48px;flex:none;pointer-events:auto;display:flex;align-items:center;justify-content:center;background:#142b3deb;border:1px solid #72939c99;color:#e6f1ef;border-radius:12px;box-shadow:0 2px 9px #07142633}
 #fieldPack{margin-left:auto;font:700 11px/1 system-ui;gap:3px;flex-direction:column}#fieldPack span{font-size:18px}
 #hud #mapWrap{top:var(--pt);right:var(--pr);padding:0;cursor:pointer}
 #mapWrap .sectiontitle{font-size:0;line-height:1;margin:0;display:flex;flex-direction:column;gap:3px;align-items:center}#mapWrap .sectiontitle span,#mapWrap :is(#miniMap,#mapLabel,#homeRange){display:none}
 #mapWrap .sectiontitle::before{content:'🧭';font:18px/1 system-ui}#mapWrap .sectiontitle::after{content:'Map';font:700 11px/1 system-ui;text-transform:none;color:#e6f1ef}
 #hud #pocketWarning:not(:empty){position:absolute;display:block;left:var(--px);top:calc(var(--pt) + 70px);max-width:calc(100% - var(--px) - var(--pr));border:1px solid #f1c36f;background:#3b2e1ef0;color:#ffe5a9;font:700 12px/1.25 system-ui;border-radius:8px;padding:6px 10px;pointer-events:none}
 #hud #actions{width:clamp(149px,40vw,174px);right:var(--pr);bottom:var(--pb);display:grid;gap:5px}
 #hud #actions button{min-height:48px;font:750 14px/1.15 system-ui;padding:6px 8px;white-space:nowrap}
 #hud #actions button:disabled{opacity:1}
 #hud #actions #scanBtn,#hud #actions #collectBtn,#hud #actions #stationDock{display:none}
 #hud[data-tool=scan] #actions #scanBtn,#hud[data-tool=extract] #actions #collectBtn,#hud[data-station=yes] #actions #stationDock{display:block}
 #hud[data-tool=extract] #collectBtn,#hud.loadedStation #stationBtn{background:#ffca77;color:#222935;border-color:#ffe0a4}
 #hud #joystick{width:clamp(80px,22vw,103px);height:clamp(80px,22vw,103px);bottom:var(--pb);left:var(--px)}
 #hud #stick{width:46%;height:46%}#hud #joystick::before{inset:10px}
 #hud[data-walk-intro=yes] #joystick::after{content:'Drag to walk';position:absolute;bottom:calc(100% + 6px);white-space:nowrap;color:white;background:#172b3be0;border-radius:8px;font:700 12px/1.2 system-ui;padding:4px 8px;pointer-events:none}
 #hud #notice{top:calc(var(--pt) + 71px);font-size:12px;padding:7px 12px;width:max-content;max-width:90%}
 #hud:has(#pocketWarning:not(:empty)) #notice{top:calc(var(--pt) + 111px)}
 #hud #pointToast{top:30%;font-size:24px}#unloadCoach{font-size:14px;max-width:205px;white-space:nowrap}
 #hud:has(.tourReveal) #actions :is(#scanBtn,#collectBtn).tourReveal,#hud #actions #stationDock:has(.tourReveal){display:block;visibility:visible}
}
@media(max-width:1024px) and (max-height:550px) and (orientation:landscape){
 .pocketGoal{max-width:310px}#hud #joystick{width:76px;height:76px}#hud #actions{width:145px}#hud #notice{top:var(--pt);left:54%;max-width:27%}
 #hud:has(#pocketWarning:not(:empty)) #notice{top:var(--pt)}
}
