/* Compact inventory tiles and exploration controls. */
.item-tile-grid,.route-bag-items{display:grid;grid-template-columns:repeat(auto-fill,48px);gap:8px;align-content:start}.item-tile{position:relative;box-sizing:border-box;width:48px;height:48px;min-height:0;padding:4px;border:1px solid #88704e;background:#18202b;color:#d8bb83;cursor:pointer;font:inherit}.item-tile:hover,.item-tile:focus-visible{border-color:#e4c998;background:#2c3440;outline:1px solid #e4c998}.item-tile b{display:block;font-size:25px;line-height:30px;font-weight:400}.item-tile small{position:absolute;right:3px;bottom:2px;font-size:11px;background:#101820c9;padding:0 2px}.reward-items{margin:12px 0}.route-bag-heading{display:flex;justify-content:space-between;align-items:center}.bag-trash{width:32px;height:32px;border:0;background:transparent;color:#a3423e;cursor:pointer}.bag-trash:hover{color:#e17368}.bag-trash svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.backstreet-screen .route-details{background:none;border:0;outline:0;box-shadow:none;padding:12px}.route-details::before,.route-details::after{display:none}.backstreet-screen .backstreet-map{overflow:hidden}.backstreet-screen .route-board{min-width:0;width:100%}.backstreet-screen .route-crossings{display:none}.backstreet-screen .backstreet-map[data-route-map=deep]{background-image:url(backstreet-map-dusk.webp)}
.route-avatar{position:relative;display:block;flex-shrink:0;width:64px;height:64px}.route-avatar img{width:100%;height:100%;object-fit:cover}.route-member.fallen .route-avatar::after{content:"";position:absolute;inset:3px 1px;background:#712d2bed;clip-path:polygon(75% 0,89% 4%,84% 17%,88% 16%,65% 46%,63% 59%,39% 82%,31% 99%,13% 96%,23% 79%,22% 71%,45% 45%,43% 39%,65% 12%);transform:rotate(6deg);filter:drop-shadow(1px 1px 1px #21100e)}
.warehouse .stock-grid{grid-template-columns:repeat(auto-fill,72px);gap:10px}.warehouse .stock-item,.warehouse .stock-empty{box-sizing:border-box;width:72px;height:68px;min-height:0;padding:5px;position:relative}.warehouse .stock-item>span:nth-child(2){display:none}.warehouse .stock-mark{font-size:30px;line-height:38px}.warehouse .stock-count{position:absolute;bottom:4px;right:5px;font-size:12px}.map-world{background-image:url(expedition-map-user.webp);background-size:100% 100%;background-position:center}.map-tip,#map-summary{display:none}.employee-filters #employee-profile-back{margin-left:auto}.employee-filters #close-employees{margin-left:0}.employee-filters #employee-profile-back[hidden]{display:none}.result-loot{display:flex;flex-wrap:wrap;gap:8px;padding:0;list-style:none}.result-loot li{border:0;background:none;padding:0}.battle-team.enemy{isolation:isolate}.battle-position-holder{position:relative;z-index:2}.battle-position-holder.crown-underlay{z-index:0}.cinema-performer.crown-underlay{z-index:0!important}.yellow-dice{display:block!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;color:#d8c18c}.yellow-dice svg{display:block;width:100%;height:100%}.supplies-dialog .item-tile-grid{margin:12px 0}.supply-stock-card{width:64px;height:64px;min-height:0!important;padding:4px!important;position:relative}.supply-stock-card strong,.supply-stock-card span{display:none}.supply-stock-card small{font-size:11px}.supply-stock-grid{grid-template-columns:repeat(auto-fill,64px)!important}.route-node b{max-width:90px;font-size:12px}.route-node{transform:translate(-50%,-50%)}

/* Keep the brigade return anchored when the profile return is hidden. */
.employee-filters:has(#employee-profile-back[hidden]) #close-employees{margin-left:auto}

/* Normalize the actual glyph bounds instead of relying on font size. */
.item-icon{display:block;width:32px;height:32px;flex:none;overflow:visible;margin:auto}.item-tile b,.supply-stock-card b,.supply-pack-slot b,.warehouse .stock-mark{display:flex;align-items:center;justify-content:center;font-weight:400;line-height:1;min-width:0;padding:0;margin:0}.item-tile b{height:32px}.supply-stock-card b,.supply-pack-slot b{height:36px}.warehouse .stock-mark{height:40px}.warehouse .stock-mark .item-icon{width:36px;height:36px}.loot-notice.backstreet-event-dialog{width:min(420px,calc(100vw - 32px));padding:24px}.loot-notice .route-event{display:block}.loot-notice .reward-items{justify-content:center;margin:24px 0}.loot-notice h2{text-align:center}.loot-notice [data-event-continue]{display:block;margin:16px auto 0}
/* One status beside the name; effects share the framed information surface. */
.battle-unit-slot{position:relative}.battle-unit strong{min-height:28px;line-height:28px;white-space:nowrap}.battle-buff-bar{position:absolute;left:4px;bottom:56px;width:28px;height:28px;padding:0;overflow:visible;z-index:7;justify-content:flex-start}.battle-buff-icon{box-sizing:border-box;flex:0 0 28px;width:28px;height:28px;font-size:15px}.buff-cycling{animation:status-cycle 1s ease-in-out infinite}@keyframes status-cycle{0%,100%{opacity:.5}20%,80%{opacity:1}}@media(prefers-reduced-motion:reduce){.buff-cycling{animation:none}}
.game-info-tooltip{box-sizing:border-box;width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;white-space:pre-line;padding:17px 19px;margin:0;inset:auto;border:3px double #bd9b62;background:#102033f5;box-shadow:0 0 0 2px #07101d,inset 0 0 0 3px #80653f44,0 8px 28px #000b;text-align:left;pointer-events:none;font-family:inherit;color:#e4dac8;font-size:14px;line-height:1.65}.game-info-tooltip section+section{margin-top:12px;border-top:1px solid #b18b4e55;padding-top:10px}.game-info-tooltip::before{content:"";position:absolute;inset:6px;border:1px solid #b9925066;pointer-events:none}.game-info-tooltip strong{font-size:16px}.game-info-tooltip::backdrop{background:none}
.battle-screen .enemy-intent-mark{box-sizing:border-box;width:34px;height:34px;min-width:34px;min-height:34px;max-width:34px;max-height:34px;padding:4px;flex-shrink:0;line-height:1}.enemy-intent-icon{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round}.battle-screen .battle-sprite .corpse-timer{width:34px;height:34px;font-size:15px}
/* Anchor the event ornament to the entire scrolling content. */
.backstreet-event-dialog::before,.backstreet-event-dialog::after{display:none}.backstreet-event-dialog{padding:12px}.backstreet-event-dialog .route-event{position:relative;box-sizing:border-box;padding:20px;border:1px solid #b992505c;min-height:100%;background:linear-gradient(#efd299,#efd299) left top/28px 2px no-repeat,linear-gradient(#efd299,#efd299) right bottom/28px 2px no-repeat,linear-gradient(#efd299,#efd299) left top/2px 28px no-repeat,linear-gradient(#efd299,#efd299) right bottom/2px 28px no-repeat}.backstreet-event-dialog.loot-notice{padding:12px}

/* Inventory cells represent actual occupied slots, including empty capacity. */
.item-tile-empty{background:#070e18b8;border-color:#23303f;box-shadow:inset 0 0 10px #0008;cursor:default;pointer-events:none}.route-bag-items{gap:6px}.route-avatar img{display:block}.route-member.fallen .route-avatar::after{inset:10px 14px 6px 3px;transform:none}
.backstreet-screen .backstreet-map .route-board{min-width:0;width:calc(100% - 68px);max-width:calc(100% - 68px);margin:12px 34px 22px}.route-node[data-node=exit] b,.route-node[data-node=outer-gate] b,.route-node[data-node=deep-outer-gate] b{left:auto;right:0;transform:none;text-align:right}
.employee-return-actions{display:flex;flex:0 0 280px;align-items:center;justify-content:flex-end;gap:12px;margin-left:auto;min-height:44px}.employee-filters .employee-return-actions #close-employees,.employee-filters .employee-return-actions #employee-profile-back{margin-left:0;margin-right:0;flex-shrink:0}.employee-return-actions #employee-profile-back[hidden]{display:none}
.warehouse .stock-grid{grid-template-columns:repeat(auto-fill,64px);grid-auto-rows:60px;gap:5px;align-content:start;justify-content:start;padding:4px}.warehouse .stock-item{width:64px;height:60px}.stock-category-empty{grid-column:1/-1;color:#aeb9c5;font-size:15px;margin:8px}

/* Status belongs to the name row, independent of sprite height. */
.battle-name-row{display:grid;grid-template-columns:28px minmax(0,1fr) 28px;align-items:center;min-height:28px;margin:3px 5px}.battle-name-row strong{font-size:16px;white-space:nowrap}.battle-name-row .battle-buff-bar{position:static;inset:auto;height:28px;width:28px;margin:0;padding:0;overflow:visible}.battle-unit-slot>.battle-health{display:block;width:calc(100% - 10px);margin:0 5px}.battle-unit-slot>.battle-health progress{width:100%;height:100%;accent-color:#a8574c}.battle-unit-slot>.corpse-timer{position:absolute;left:50%;transform:translateX(-50%);z-index:10;pointer-events:auto;cursor:help;border-radius:50%;background:#182432;border:2px solid #bda275;color:#ead7ad;width:34px;height:34px;display:grid;place-items:center;font-family:serif;font-weight:bold}

.battle-screen .battle-unit-slot>.corpse-timer{background:#501e25;border-color:#b95151;color:#efb2a9;font-size:12px;line-height:1}
