/* Bifrost-only mobile information layers. Main controls retain >=48px targets. */
#minimap-toggle{display:none}
#mobile-health-value{display:none}
#game-shell[data-bf-compact="true"]{--bf-safe-top:max(4px,env(safe-area-inset-top));--bf-safe-left:max(12px,env(safe-area-inset-left));--bf-safe-right:max(12px,env(safe-area-inset-right));--bf-safe-bottom:max(12px,env(safe-area-inset-bottom))}
#game-shell[data-bf-compact="true"] .battle-top{top:var(--bf-safe-top);left:var(--bf-safe-left);right:var(--bf-safe-right);display:grid!important;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr) 48px 48px!important;grid-template-rows:48px!important;gap:4px!important;height:56px!important;min-height:56px!important;padding:4px 6px!important;box-sizing:border-box}
#game-shell[data-bf-compact="true"] .battle-top>.battle-score{display:contents!important;width:auto!important}
#game-shell[data-bf-compact="true"] #battle-ruleset-label,
#game-shell[data-bf-compact="true"] #supply-value,
#game-shell[data-bf-compact="true"] #objective-status{display:none!important}
#game-shell[data-bf-compact="true"] .battle-top .core-side{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:20px 8px;gap:2px!important;align-items:center;min-width:0;margin:0!important;max-width:none!important;width:auto!important;grid-row:1!important}
#game-shell[data-bf-compact="true"] .battle-top .core-side.player{grid-column:1!important}
#game-shell[data-bf-compact="true"] .battle-top .core-side.enemy{grid-column:3!important}
#game-shell[data-bf-compact="true"] .core-side b{display:block!important;grid-column:1;grid-row:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--ag-type-caption)!important}
#game-shell[data-bf-compact="true"] .core-side b:before{display:none}
#game-shell[data-bf-compact="true"] .core-side span{grid-column:2;grid-row:1;font:var(--ag-type-caption)!important}
#game-shell[data-bf-compact="true"] .core-side meter{grid-column:1 / 3;grid-row:2;width:100%!important;min-width:0!important;height:6px}
#game-shell[data-bf-compact="true"] #battle-clock{grid-column:2!important;grid-row:1!important;font:var(--ag-type-caption);align-self:center;text-align:center}
#game-shell[data-bf-compact="true"] #battle-locale{grid-column:4!important;grid-row:1!important;align-self:center;justify-self:center}
#game-shell[data-bf-compact="true"] #pause-button{grid-column:5!important;grid-row:1!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;align-self:center}
#game-shell[data-bf-compact="true"] .hero-hud{top:calc(var(--bf-safe-top) + 64px)!important;left:var(--bf-safe-left)!important;width:224px!important;max-width:224px!important;min-height:56px;height:56px;box-sizing:border-box;padding:4px 6px!important;gap:4px;align-items:center}
#game-shell[data-bf-compact="true"] .hero-hud img{width:28px;height:36px;flex:none}
#game-shell[data-bf-compact="true"] .hero-hud>div{width:auto!important;min-width:0!important;flex:1}
#game-shell[data-bf-compact="true"] .hero-hud b{display:block;font:var(--ag-type-caption)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#game-shell[data-bf-compact="true"] #hero-level{display:none}
#game-shell[data-bf-compact="true"] #hero-energy-value{font:var(--ag-type-caption)!important;white-space:nowrap}
#game-shell[data-bf-compact="true"] #hero-health{height:5px;margin-top:2px}
#game-shell[data-bf-compact="true"] #hero-energy{display:none}
#game-shell[data-bf-compact="true"] #mobile-health-value{display:inline;font:var(--ag-type-caption);margin-right:4px}
#game-shell[data-bf-compact="true"] #recenter{display:flex!important;flex-direction:column;align-items:center;justify-content:center;width:56px!important;min-width:56px!important;height:48px!important;min-height:48px!important;padding:2px;font:var(--ag-type-caption)!important;line-height:14px!important}
#game-shell[data-bf-compact="true"] #recenter:before{display:none}
#game-shell[data-bf-compact="true"] #camera-recall-controls{left:var(--bf-safe-left)!important;right:auto!important;top:calc(var(--bf-safe-top) + 128px)!important;display:grid;grid-template-columns:76px 64px 84px!important;gap:4px;width:232px;max-width:232px;z-index:6}
#game-shell[data-bf-compact="true"] #camera-recall-controls button{width:100%;height:48px;min-width:48px;min-height:48px;padding:3px;font:var(--ag-type-caption);line-height:16px}
#game-shell[data-bf-compact="true"] #minimap-toggle{display:block}
#game-shell[data-bf-compact="true"] #recall-status{position:absolute!important;left:-9999px!important;right:auto!important;width:1px!important;height:1px!important;max-height:1px!important;padding:0;overflow:hidden;clip-path:inset(50%);pointer-events:none}
#game-shell[data-bf-compact="true"] #minimap{top:calc(var(--bf-safe-top) + 64px)!important;right:var(--bf-safe-right)!important;left:auto!important;width:112px!important;height:64px!important;z-index:6}
#game-shell[data-bf-compact="true"]:not([data-map-open="true"]) #minimap{visibility:hidden;pointer-events:none}
/* Closed details must have no invisible intrinsic box over the travel controls. */
#game-shell[data-bf-compact="true"] #frontline-status:not([open]){top:calc(var(--bf-safe-top) + 128px)!important;right:var(--bf-safe-right)!important;left:auto!important;width:116px!important;max-width:116px!important;min-height:48px;max-height:48px!important;padding:0!important;box-sizing:border-box;overflow:hidden;z-index:6}
#game-shell[data-bf-compact="true"] #frontline-status:not([open])>summary{display:flex;align-items:center;justify-content:center;min-height:46px;max-height:46px;padding:0 6px!important;box-sizing:border-box;text-align:center;font:var(--ag-type-caption);line-height:16px}
#game-shell[data-bf-compact="true"] #frontline-status[open]{top:calc(var(--bf-safe-top) + 64px)!important;right:var(--bf-safe-right)!important;left:auto!important;width:min(350px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(var(--viewport-height,100vh) - 88px);z-index:15;padding:12px}
#game-shell[data-bf-compact="true"] #frontline-status[open]>summary{min-height:48px;display:flex;align-items:center;font:var(--ag-type-caption)}
#game-shell[data-bf-compact="true"] #frontline-onboarding{left:var(--bf-safe-left)!important;top:calc(var(--bf-safe-top) + 184px)!important;width:232px!important;max-width:232px!important;grid-template-columns:1fr!important;gap:0;z-index:4}
#game-shell[data-bf-compact="true"] #frontline-onboarding-coach,
#game-shell[data-bf-compact="true"] #frontline-onboarding-help{display:none!important}
#game-shell[data-bf-compact="true"] #frontline-onboarding-toggle{grid-column:1!important;min-height:48px!important;padding:5px 8px;font:var(--ag-type-caption);line-height:17px}
#game-shell[data-bf-compact="true"] #frontline-onboarding-danger{grid-column:1!important;min-height:48px;box-sizing:border-box;display:flex;align-items:center;font:var(--ag-type-caption);line-height:17px;padding:5px 8px}
#game-shell[data-bf-compact="true"] #frontline-onboarding-danger[hidden]{display:none!important}
#game-shell[data-bf-compact="true"] #attack-status,
#game-shell[data-bf-compact="true"] #event-caption,
#game-shell[data-bf-compact="true"] #renderer-note,
#game-shell[data-bf-compact="true"] .skill-keycap{display:none!important}
#game-shell[data-bf-compact="true"] #objective-toast{top:calc(var(--bf-safe-top) + 240px)!important;left:auto!important;right:var(--bf-safe-right);transform:none;min-height:48px;max-width:232px;font:var(--ag-type-caption);line-height:17px}
#game-shell[data-bf-compact="true"] .combat-tools{bottom:var(--bf-safe-bottom)!important;right:var(--bf-safe-right)!important}
#game-shell[data-bf-compact="true"] .combat-tools button>span,
#game-shell[data-bf-compact="true"] .combat-tools button>small{font-size:12px!important;line-height:15px!important}
#game-shell[data-bf-compact="true"] #joystick{bottom:var(--bf-safe-bottom)!important;left:var(--bf-safe-left)!important}
#game-shell[data-bf-compact="true"] .tactical-tools{left:var(--bf-safe-left)!important;bottom:calc(var(--bf-safe-bottom) + 128px)!important;transform:none!important;gap:0}
#game-shell[data-bf-compact="true"] #upgrade-button{width:104px!important;min-height:56px;font:var(--ag-type-caption)}
#game-shell[data-bf-compact="true"] #teleport-button{display:none!important}
#game-shell[data-bf-compact="true"] #modal-close{width:48px;min-width:48px;height:48px;min-height:48px}
#game-shell[data-bf-compact="true"] #modal-content select{min-height:48px}
#game-shell[data-bf-compact="true"][data-bf-orientation="landscape"] #camera-recall-controls{left:calc(var(--bf-safe-left) + 238px)!important;top:calc(var(--bf-safe-top) + 64px)!important}
#game-shell[data-bf-compact="true"][data-bf-orientation="landscape"] #frontline-status:not([open]){top:calc(var(--bf-safe-top) + 64px)!important}
#game-shell[data-bf-compact="true"][data-bf-orientation="landscape"] #minimap{top:calc(var(--bf-safe-top) + 120px)!important;left:calc(var(--bf-safe-left) + 260px)!important;right:auto!important;width:104px!important;height:61px!important}
#game-shell[data-bf-compact="true"][data-bf-orientation="landscape"] #frontline-onboarding{top:calc(var(--bf-safe-top) + 128px)!important}
#game-shell[data-bf-compact="true"][data-bf-orientation="landscape"] #objective-toast{top:calc(var(--bf-safe-top) + 192px)!important}
#game-shell[data-bf-compact="true"][data-bf-orientation="landscape"] .tactical-tools{left:calc(var(--bf-safe-left) + 120px)!important;bottom:var(--bf-safe-bottom)!important}
#game-shell[data-bf-compact="true"][data-bf-orientation="landscape"] #frontline-support-mode:not([hidden]){left:calc(var(--bf-safe-left) + 120px)!important;right:auto!important;bottom:calc(var(--bf-safe-bottom) + 72px)!important;width:136px!important;grid-template-columns:1fr 1fr}
#game-shell[data-bf-compact="true"] #frontline-support-mode button{min-height:48px;font:var(--ag-type-caption);line-height:15px}
/* Native summary includes a border outside its interactive content box. */
#game-shell[data-bf-compact="true"] #frontline-status:not([open]){min-height:50px;max-height:50px!important}
#game-shell[data-bf-compact="true"] #frontline-status:not([open])>summary{min-height:48px;max-height:48px}
/* One critical-information slot replaces the optional mission, never the skills. */
#game-shell[data-bf-compact="true"] #objective-toast{top:calc(var(--bf-safe-top) + 184px)!important;left:var(--bf-safe-left)!important;right:auto!important;width:232px;max-width:232px;height:48px;max-height:48px;box-sizing:border-box;padding:6px 8px;line-height:17px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#game-shell[data-bf-compact="true"][data-bf-orientation="landscape"] #objective-toast{top:calc(var(--bf-safe-top) + 128px)!important}
#game-shell[data-bf-compact="true"][data-bf-alert-owns-slot="true"]:has(#objective-toast.visible) #frontline-onboarding{visibility:hidden}
#game-shell[data-bf-compact="true"][data-bf-alert-owns-slot="false"] #objective-toast{visibility:hidden;pointer-events:none}
#game-shell[data-bf-compact="true"][data-bf-orientation="landscape"] #frontline-support-mode:not([hidden]){left:calc(var(--bf-safe-left) + 238px)!important}
#game-shell[data-bf-compact="true"][data-map-open="true"] #frontline-support-mode{visibility:hidden;pointer-events:none}

/* Camera hints remain in the polite live region; compact battle uses the visible Return to hero button instead of another overlay. Other receipts/errors keep their normal rail. */
#game-shell[data-bf-compact="true"] #toast[data-kind="camera"]{top:0;left:0;width:1px;max-width:1px;height:1px;max-height:1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;transform:none}
