#stage{--game-unit:.6px}
#run-progress{top:calc(env(safe-area-inset-top) + var(--game-unit)*350);bottom:auto;left:8px;right:8px;padding:5px 8px;font-size:12px;min-height:25px}
#top-tools-toggle{position:absolute;z-index:4;top:calc(env(safe-area-inset-top) + var(--game-unit)*350 + 30px);left:8px;padding:0 12px;height:44px;background:#20271cdd}
#top-tools{position:absolute;z-index:20;top:calc(env(safe-area-inset-top) + var(--game-unit)*350 + 78px);left:8px;padding:7px;display:flex;flex-wrap:wrap;gap:6px;max-width:calc(100% - 16px);background:#111c16f5;border:1px solid #655c44;border-radius:7px}
#top-tools[hidden],#top-tools-toggle[hidden]{display:none}
#top-tools #combat-debug,#top-tools #loot-debug,#top-tools #loot-fx-toggle{position:static;width:auto;height:44px;min-height:44px;margin:0;padding:0 10px;white-space:nowrap}
#village-gate,#loot-toggle{top:calc(env(safe-area-inset-top) + var(--game-unit)*350 + 30px);bottom:auto;right:8px;max-width:calc(100% - 84px)}
#loot-list{top:calc(env(safe-area-inset-top) + var(--game-unit)*350 + 78px);bottom:auto;max-height:28vh}
#economy-toast{top:calc(env(safe-area-inset-top) + var(--game-unit)*350 + 82px);bottom:auto;left:8px;right:8px;padding:8px;font-size:12px}
/* The main world and lower combat controls are intentionally untouched. */
/* Keep pickup and return separately reachable when both are visible. */
#stage:has(#village-gate:not([hidden])) #loot-toggle{top:calc(env(safe-area-inset-top) + var(--game-unit)*350 + 80px)}
#stage:has(#village-gate:not([hidden])) #loot-list{top:calc(env(safe-area-inset-top) + var(--game-unit)*350 + 128px)}
