/* Native artwork and rules; only the presentation is rearranged on touch screens. */
#mobile-system-toggle,#mobile-system-backdrop{display:none!important}
#mobile-play-note{display:none}
@media(min-width:801px) and (pointer:fine){
 .world-hud.hero-ui .action-deck.loadout-deck{right:auto;width:calc(var(--compact-columns,3)*59px + 134px);max-width:calc(100% - var(--dock-edge)*2 - var(--dock-player) - var(--dock-menu) - var(--dock-items) - var(--dock-gap)*3);padding:7px 10px 5px;grid-template-rows:13px minmax(0,1fr) 18px;gap:3px}
 .world-hud.hero-ui .book-controls{height:auto;gap:10px;align-self:center;align-items:center;justify-content:center;min-width:0}
 .world-hud.hero-ui .book-hotbar{height:auto;grid-template-rows:repeat(2,54px);gap:5px;align-content:center;flex:0 1 auto;width:calc(var(--book-columns)*54px + (var(--book-columns) - 1)*5px);grid-template-columns:repeat(var(--book-columns),54px);justify-content:start;overflow-x:auto;min-width:0;scrollbar-width:thin}
}
@media(max-width:800px),(pointer:coarse){
 #mobile-play-note{display:block;font-size:12px;line-height:1.65;color:#f4dfa4;margin:8px 0;max-width:32em}
 .world-hud.hero-ui{--status-height:120px;--skills-height:142px;--mobile-dock:calc(var(--status-height) + var(--skills-height) + 18px + env(safe-area-inset-bottom));--corner-height:calc(var(--playfield-height,calc(100dvh - var(--mobile-dock)))*0.25)}
 .world-hud.hero-ui #game{height:100%;width:100%;touch-action:none}
 .world-hud.hero-ui .arena-wrap{background:#101b22}
 .world-hud.hero-ui .arena-wrap:after{bottom:0}
 .world-hud.hero-ui .topbar,.world-hud.hero-ui .mission-panel,.world-hud.hero-ui .battle-status,.world-hud.hero-ui .play-footer{display:none!important}
 .world-hud.hero-ui .location-bar{top:8px;left:8px;right:auto;max-width:48%;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .world-hud.hero-ui .action-deck.loadout-deck{left:6px;right:96px;width:auto;bottom:calc(var(--status-height) + 12px + env(safe-area-inset-bottom))!important;height:var(--skills-height)!important;padding:3px 5px;border-width:6px;border-image-width:14px;grid-template-rows:12px minmax(0,1fr) 16px;gap:2px}
 .world-hud.hero-ui .book-controls{display:flex;gap:4px;min-height:0;min-width:0;align-items:center;justify-content:center;height:100%}
 .world-hud.hero-ui .book-innate-controls{box-sizing:border-box;flex:0 0 34px;display:flex;flex-direction:column;gap:3px;padding-right:7px;border-right:1px solid #b1bfa155}
 .world-hud.hero-ui .book-controls .book-innate{width:26px;height:38px;max-height:38px;flex:none;aspect-ratio:auto;padding:1px}
 .world-hud.hero-ui .book-hotbar{display:grid;flex:0 1 auto;min-width:0;max-width:calc(100% - 38px);width:calc(var(--mobile-columns,3)*var(--mobile-skill,38px) + (var(--mobile-columns,3) - 1)*3px + 8px);height:auto;grid-auto-flow:row;grid-template-columns:repeat(var(--mobile-columns,3),var(--mobile-skill,38px));grid-template-rows:repeat(var(--mobile-rows,2),var(--mobile-skill,38px));gap:3px;align-content:center;justify-content:start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
 .world-hud.hero-ui .book-hotbar .book-slot{width:var(--mobile-skill,38px);height:var(--mobile-skill,38px);min-width:0;max-height:none;padding:1px;aspect-ratio:1}
 .world-hud.hero-ui .book-manage{font-size:9px;line-height:16px;margin:0 auto;padding:0 5px}
 .world-hud.hero-ui .item-deck{left:auto!important;right:6px;width:84px;height:var(--skills-height)!important;bottom:calc(var(--status-height) + 12px + env(safe-area-inset-bottom))!important;--slot:26px;padding:3px;border-width:4px;border-image-width:10px}
 .world-hud.hero-ui .item-deck .deck-caption{font-size:9px;white-space:normal;display:flex;flex-wrap:wrap;justify-content:center;gap:2px;line-height:11px}
 .world-hud.hero-ui .item-deck .tactical-gear{font-size:7px;padding:1px 3px;margin:0;line-height:10px}
 .world-hud.hero-ui .item-deck .item-row{gap:4px;justify-content:center}
 .world-hud.hero-ui .item-deck #potions{font-size:7px;white-space:normal;line-height:10px}
 .world-hud.hero-ui .arena-wrap>.player-card{left:6px;top:auto!important;width:calc(50% - 9px)!important;max-width:none!important;height:var(--status-height)!important;bottom:calc(6px + env(safe-area-inset-bottom))!important;padding:10px 8px 5px 63px}
 .world-hud.hero-ui .player-card .fighter-heading>.portrait{left:7px;top:10px;width:44px;height:58px}
 .world-hud.hero-ui .player-card .fighter-info{position:absolute!important;left:63px!important;right:7px!important;top:24px!important;width:auto!important}
 .world-hud.hero-ui .player-card .hero-orb{height:24px!important;min-height:0!important}
 .world-hud.hero-ui .player-card .fighting-gauges{margin-top:2px!important;gap:2px!important}
 .world-hud.hero-ui .player-card .fighting-gauges>span{height:14px!important;font-size:9px!important}
 .world-hud.hero-ui .player-card .character-level-hud{height:19px!important;bottom:4px;left:6px;right:6px;font-size:9px}
 .world-hud.hero-ui #world-shortcuts{display:grid!important;position:absolute;left:calc(50% + 3px);right:6px;top:auto!important;bottom:calc(6px + env(safe-area-inset-bottom))!important;width:auto!important;height:var(--status-height)!important;min-height:0!important;max-height:none;aspect-ratio:auto!important;transform:none!important;padding:2px;margin:0;border-width:4px;border-image-width:8px;border-image-outset:0;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))!important;gap:2px;z-index:50}
 .world-hud.hero-ui #world-shortcuts .world-shortcut{height:100%!important;min-height:0;padding:1px;font-size:9px;line-height:10px;gap:0;background-size:24px 24px}
 .world-hud.hero-ui #world-shortcuts .navigation-art{width:22px;height:22px;max-height:22px}
 /* Keep the desktop artwork, padding and type proportions; scale the complete widgets. */
 .world-hud.hero-ui .stage-hud{display:flex!important;position:absolute;flex-direction:column;top:calc(64px + 22px*var(--map-hud-scale,1))!important;right:calc(6px + 22px*var(--map-hud-scale,1))!important;left:auto!important;bottom:auto!important;width:174px!important;height:auto;max-height:none;padding:0;gap:0;background:none;transform:scale(var(--map-hud-scale,1));transform-origin:top right;z-index:50}
 .world-hud.hero-ui .minimap-panel{display:block;padding:0;border:14px solid transparent;border-image:var(--skin-panel) 36 fill / 36px / 22px stretch;background:none;border-radius:0;box-shadow:none;image-rendering:pixelated;height:auto;max-height:none}
 .world-hud.hero-ui .minimap-panel .hud-caption{font:9px/12px "Microsoft YaHei",sans-serif;letter-spacing:1px;color:#aab2bf;margin:0 0 5px}
 .world-hud.hero-ui #minimap{display:block;width:100%;height:auto;max-height:none;border:0;opacity:.95}
 .world-hud.hero-ui .map-legend{display:flex;margin-top:5px;font-size:8px}
 .world-hud.hero-ui #party-vitals{position:absolute!important;left:6px!important;top:64px!important;right:auto!important;bottom:auto!important;width:256px!important;display:flex!important;flex-direction:column!important;gap:1px!important;background:none;transform:scale(var(--party-hud-scale,1));transform-origin:top left;z-index:50}
 .world-hud.hero-ui #party-vitals .party-health{position:relative!important;flex:none;width:256px!important;height:76px!important;min-height:0;border:0;padding:14px 24px 10px 78px!important;display:block!important;background-color:transparent;background-image:var(--identity-frame),linear-gradient(#11151cf5,#11151cf5);background-size:100% 100%,calc(100% - 30px) calc(100% - 20px);background-position:center;background-repeat:no-repeat;font-size:11px}
 .world-hud.hero-ui #party-vitals .party-portrait{position:absolute;left:25px;top:16px;width:42px;height:43px;max-height:none;object-fit:cover}
 .world-hud.hero-ui #party-vitals .party-health>div{display:flex!important;justify-content:space-between;align-items:baseline;gap:10px;line-height:18px}
 .world-hud.hero-ui #party-vitals .party-health>div>b{font-size:12px;font-weight:500;line-height:18px;white-space:nowrap}
 .world-hud.hero-ui #party-vitals .party-health>div>span{font:10px/18px Consolas,monospace;white-space:nowrap}
 .world-hud.hero-ui #party-vitals .party-health>small{display:block!important;font-size:8px;line-height:13px;white-space:nowrap}
 .world-hud.hero-ui #party-vitals .party-meter{display:block!important;position:static;width:100%;height:7px;border:1px solid var(--identity-dark);padding:1px;margin:4px 0;background:#101822}
 .world-hud.hero-ui #party-vitals .party-empty{display:none!important}
 .world-hud.hero-ui #boss-bar{left:50%!important;right:auto!important;top:32px!important;bottom:auto!important;transform:translateX(-50%)!important;width:46%!important;max-width:360px!important;z-index:70}
 .world-hud.hero-ui #boss-bar>div:first-child{font-size:9px;line-height:11px;display:flex;justify-content:center;gap:5px;white-space:nowrap}
 .world-hud.hero-ui #boss-health-text{font-size:7px}
 .world-hud.hero-ui #boss-phase{display:none}
 .world-hud.hero-ui #boss-bar .bar.boss{height:16px;padding:3px 8px}
 .world-hud.hero-ui .interact-hint,.world-hud.hero-ui #clear-loot{bottom:calc(var(--mobile-dock) + 8px)!important}
}
@media(max-height:520px) and (pointer:coarse){
 .world-hud.hero-ui{--status-height:82px;--skills-height:110px}
 .world-hud.hero-ui .action-deck.loadout-deck{grid-template-rows:minmax(0,1fr);padding:3px 5px}
 .world-hud.hero-ui .action-deck .deck-caption,.world-hud.hero-ui .book-manage{display:none}
 .world-hud.hero-ui #world-shortcuts{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))!important}
 .world-hud.hero-ui .player-card .fighter-info{top:16px!important}
 .world-hud.hero-ui .player-card .hero-orb{height:18px!important}
 .world-hud.hero-ui .player-card .fighting-gauges>span{height:10px!important;font-size:8px!important}
 .world-hud.hero-ui .player-card .character-level-hud{height:14px!important;font-size:8px}
 .world-hud.hero-ui #party-vitals{top:36px!important}
 .world-hud.hero-ui .stage-hud{top:calc(36px + 22px*var(--map-hud-scale,1))!important}
 .world-hud.hero-ui #boss-bar{top:32px!important;width:40%!important}
}

@media(max-width:360px){
 .world-hud.hero-ui .arena-wrap>.player-card{padding-left:49px}
 .world-hud.hero-ui .player-card .fighter-heading>.portrait{width:34px;height:49px;left:6px}
 .world-hud.hero-ui .player-card .fighter-info{left:49px!important;right:6px!important}
 .world-hud.hero-ui .player-card .resource-label{font-size:7px;white-space:nowrap;padding:0 2px}
 .world-hud.hero-ui .player-card #hp-text,.world-hud.hero-ui .player-card .fighting-gauges b{font-size:8px;white-space:nowrap}
 .world-hud.hero-ui .player-card .fighting-gauges>span{font-size:7px!important;padding:0 2px;white-space:nowrap}
}

/* Dialog bounds follow the visible game area, including fullscreen and rotation. */
#game-root .modal-backdrop{position:fixed!important;inset:auto!important;left:var(--dialog-area-left,0px)!important;top:var(--dialog-area-top,0px)!important;width:var(--dialog-area-width,100vw)!important;height:var(--dialog-area-height,100dvh)!important;max-width:none!important;max-height:none!important;display:flex;align-items:center!important;justify-content:center!important;padding:0!important;overflow:hidden!important;z-index:500}
#game-root .modal-backdrop>:is(section,[role=dialog]){box-sizing:border-box!important;position:relative!important;inset:auto!important;transform:none!important;margin:0!important;max-width:var(--dialog-width,85vw)!important;height:auto!important;max-height:var(--dialog-height,85dvh)!important;min-width:0!important;min-height:0!important;overflow:auto!important;overscroll-behavior:contain;flex:0 1 auto;padding:clamp(8px,1.5vw,22px)!important}
#game-root .modal-backdrop .modal-head,#game-root .modal-backdrop section>header{gap:8px;min-width:0}
#game-root .modal-backdrop :is(h2,h3,p){overflow-wrap:anywhere}
#game-root .modal-backdrop .world-atlas-layout{min-width:0;min-height:0}
#game-root .native-gear-window{display:flex;flex-wrap:wrap;align-content:start;gap:10px;background:#14212b;border:1px solid #a68a5b;border-radius:4px}
#game-root .native-gear-window .gear-workspace-tools{position:static!important;flex:0 0 100%;transform:none!important;display:flex;flex-wrap:wrap;gap:6px}
#game-root .native-gear-window .gear-panel{position:relative!important;inset:auto!important;transform:none!important;max-width:100%!important;min-width:0!important;flex:1 1 310px;max-height:none!important}
.world-hud.hero-ui .book-hotbar{justify-content:safe center;touch-action:pan-y;padding:4px;scroll-padding-inline:4px;overscroll-behavior-x:contain;cursor:grab}
.world-hud.hero-ui .book-hotbar:active{cursor:grabbing}
.world-hud.hero-ui .item-deck .deck-caption{display:grid;grid-template-columns:1fr 1fr;justify-items:center;align-items:center;gap:3px}
.world-hud.hero-ui .item-deck .deck-caption .tactical-gear{grid-row:2;margin:0;white-space:nowrap}
.world-hud.hero-ui .item-deck .deck-caption{grid-auto-flow:row}
@media(max-width:800px),(pointer:coarse){
 .world-hud.hero-ui #party-vitals{top:var(--corner-top,36px)!important}
 .world-hud.hero-ui .stage-hud{top:var(--map-corner-top,36px)!important}
 #mobile-depart{position:absolute;z-index:60;height:32px;min-height:32px;margin:0;padding:4px 6px;font:12px/20px "Microsoft YaHei",sans-serif;color:#f2ddb5;border:1px solid #a58b5c;background:#182729e8;white-space:nowrap}
 #game-root .modal-backdrop :is(.ai-rule-fields,.help-columns,.world-atlas-layout,.career-layout,.skillbook-layout,.tactical-layout,.collection-layout,.guild-keeper){grid-template-columns:minmax(0,1fr)!important;min-width:0}
 #game-root .modal-backdrop .modal-head h2{font-size:17px}
 #game-root .modal-backdrop .modal-head>div{min-width:0}
 #game-root .modal-backdrop .modal-head>button{flex-shrink:0}
 #game-root .modal-backdrop .map-cards{grid-template-columns:minmax(0,1fr)}
 #game-root .modal-backdrop .ai-rule-footer{display:flex;flex-direction:column;align-items:stretch}
 #game-root .modal-backdrop .world-atlas-dialog{display:block}
 #game-root .modal-backdrop .world-atlas-left{min-height:150px}
 #game-root .modal-backdrop #atlas-viewport{height:180px;min-height:150px}
 .world-hud.hero-ui .item-deck .deck-caption{font-size:9px;line-height:12px;gap:3px}
 .world-hud.hero-ui .item-deck .tactical-gear{padding:2px 3px;font-size:8px;line-height:12px}
}

.world-hud.hero-ui .item-deck .deck-caption .supply-label{grid-column:1 / -1;white-space:nowrap;justify-self:center}
#game-root :is(#equipment-modal,#ew-trade-equipment-modal) .native-gear-window .gear-desktop{flex:0 0 100%;width:100%;min-height:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:10px;padding:0}
#game-root :is(#equipment-modal,#ew-trade-equipment-modal) .native-gear-window .gear-panel{grid-column:auto!important;width:100%!important;min-height:280px!important;height:clamp(300px,calc(var(--dialog-height) - 120px),650px)!important;flex:none}
#game-root :is(#equipment-modal,#ew-trade-equipment-modal) .native-gear-window .gear-panel-scroll{min-height:0;overflow:auto!important}
#game-root :is(#equipment-modal,#ew-trade-equipment-modal) .native-gear-window .gear-access-dock{position:static!important;inset:auto!important;transform:none!important;flex:0 0 100%;width:100%;justify-content:center;flex-wrap:wrap}
@media(max-width:800px),(pointer:coarse){#game-root :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel h2{font-size:20px!important;letter-spacing:2px!important;line-height:1.35!important}#game-root :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel>header{padding:10px 12px!important;min-height:60px!important}}

@media(max-width:800px),(pointer:coarse){#game-root .modal-backdrop>:is(section,[role=dialog]){width:var(--dialog-width,90vw)!important}}

/* Combat notices sit above HUD artwork; dialogs remain above both. */
#game-root .modal-backdrop{z-index:500!important}
.world-hud.hero-ui #clear-loot,.world-hud.hero-ui .toast{z-index:200!important}
.world-hud.hero-ui .toast{white-space:normal;overflow-wrap:anywhere;max-width:min(600px,90%)}
.world-hud.hero-ui #clear-loot{max-height:70%;overflow:auto;overscroll-behavior:contain}
/* The overview starts fully fitted; explicit +/− still permits inspection. */
#game-root #atlas-viewport,#game-root .regional-viewport{height:var(--fitted-map-height,auto)!important;max-height:none!important;min-height:0!important;overflow:auto}
#game-root #atlas-board,#game-root .regional-board{min-width:0!important;max-width:none!important;margin-inline:auto}

/* Desktop map details: retain every field while keeping both columns balanced. */
@media (min-width:801px) and (pointer:fine){
 #game-root #world-atlas-modal .world-atlas-layout,
 #game-root #map-modal .regional-layout{grid-template-columns:minmax(0,1fr) clamp(320px,29vw,420px);align-items:start}
 #game-root #world-atlas-modal .atlas-info{display:grid;grid-template-columns:minmax(0,1fr) 106px;column-gap:12px;padding:12px 16px;max-height:none;overflow:visible}
 #game-root #world-atlas-modal .atlas-info>small:first-child,
 #game-root #world-atlas-modal .atlas-info h3,
 #game-root #world-atlas-modal #atlas-region-subtitle,
 #game-root #world-atlas-modal #atlas-region-state{grid-column:1}
 #game-root #world-atlas-modal .atlas-info h3{font-size:30px;line-height:1.2;letter-spacing:2px;margin:4px 0}
 #game-root #world-atlas-modal #atlas-region-subtitle{margin:3px 0 5px}
 #game-root #world-atlas-modal #atlas-region-state{justify-self:start;align-self:start;padding:3px 7px;line-height:1.4}
 #game-root #world-atlas-modal #atlas-region-view{grid-column:2;grid-row:1/5;height:94px;margin:0;align-self:start}
 #game-root #world-atlas-modal .atlas-info>:is(#atlas-region-story,#atlas-region-feature,h4,button,#atlas-landmarks,#atlas-progress,#atlas-availability){grid-column:1/-1}
 #game-root #world-atlas-modal .atlas-info p{font-size:13px;line-height:1.55;margin:6px 0}
 #game-root #world-atlas-modal .atlas-info h4{font-size:15px;line-height:1.3;margin:7px 0 5px}
 #game-root #world-atlas-modal #atlas-landmarks{gap:4px}
 #game-root #world-atlas-modal #atlas-landmarks span{padding:3px 6px;font-size:11px}
 #game-root #world-atlas-modal #atlas-progress{margin:6px 0;font-size:12px}
 #game-root #world-atlas-modal .atlas-info>button{margin:4px 0;min-height:34px;padding:6px 10px;line-height:1.4}
 #game-root #world-atlas-modal #atlas-availability{margin-top:5px;font-size:11px;line-height:1.45}
 #game-root #world-atlas-modal #atlas-region-list{padding:8px 12px}
 #game-root #map-modal .regional-detail{padding:12px;max-height:none;overflow:visible;display:flow-root}
 #game-root #map-modal .regional-detail-image{float:right;width:112px;height:82px;margin:0 0 6px 12px}
 #game-root #map-modal .regional-detail h3{font-size:25px;line-height:1.25;margin:5px 0}
 #game-root #map-modal .regional-detail p{font-size:12px;line-height:1.5;margin:6px 0}
 #game-root #map-modal .regional-detail h4{clear:both;font-size:12px;line-height:1.4;margin:8px 0 5px}
 #game-root #map-modal .regional-detail>button{min-height:34px;margin-top:5px;padding:6px 8px;line-height:1.4}
 #game-root #map-modal #regional-route-stops{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px;margin-bottom:8px}
 #game-root #map-modal #regional-entry-hint{min-height:0}
 #game-root #map-modal .regional-detail>button{display:inline-flex;align-items:center;justify-content:center;width:calc((100% - 8px)/2);vertical-align:top}
 #game-root #map-modal #dungeon-return-town{margin-left:8px}
 #game-root #map-modal .regional-footer{margin-top:8px;padding-top:8px}
}

/* Responsive combat HUD: preserve native art and actual skill sizes; wrap before scrolling. */
#game-root.responsive-combat-hud .location-bar,
#game-root.responsive-combat-hud .topbar{display:none!important}
#game-root.responsive-combat-hud .stage-hud{top:var(--map-top,30px)!important;right:var(--map-right,30px)!important;bottom:auto!important;transform:scale(var(--map-hud-scale,1));transform-origin:top right;z-index:50}
#game-root.responsive-combat-hud .minimap-panel{position:relative;padding-top:26px!important}
#game-root.responsive-combat-hud .minimap-panel .hud-caption{display:none}
#game-root.responsive-combat-hud #live-performance{position:absolute;top:1px;right:0;left:auto;transform:scale(var(--metrics-scale,1));transform-origin:top right;font:13px/18px ui-monospace,monospace;padding:0 2px;border:0;border-radius:0;background:#102229c9;letter-spacing:0;z-index:3;color:#ffedc6}
#game-root.responsive-combat-hud #party-vitals{top:var(--party-top,6px)!important;left:6px!important;width:var(--party-width,256px)!important;display:flex!important;flex-direction:column!important;gap:0!important;transform:scale(var(--party-hud-scale,1));transform-origin:top left}
#game-root.responsive-combat-hud #party-vitals .party-health{width:256px!important;height:76px!important;min-height:76px!important;flex:none;box-sizing:border-box;position:relative!important;padding:14px 24px 10px 78px!important;background-size:100% 100%,calc(100% - 30px) calc(100% - 20px);background-position:center;background-repeat:no-repeat}
#game-root.responsive-combat-hud #party-vitals .party-portrait{left:25px;top:16px;width:42px;height:43px}
#game-root.responsive-combat-hud .party-skills{position:absolute;left:262px;top:0;display:flex;gap:5px;align-items:center;min-height:76px;pointer-events:auto}
#game-root.responsive-combat-hud .party-innate{display:flex;flex-direction:column;gap:4px;border-right:1px solid #b1bfa155;padding-right:3px;width:24px;box-sizing:border-box;flex:none}
#game-root.responsive-combat-hud .party-innate img{display:block;width:20px;height:26px;object-fit:contain;image-rendering:pixelated;background:#12202b;border:1px solid #8d8159;box-sizing:border-box}
#game-root.responsive-combat-hud .party-skill-grid{display:grid;grid-template-columns:repeat(var(--party-columns,3),32px);grid-template-rows:repeat(var(--party-rows,2),32px);gap:3px}
#game-root.responsive-combat-hud .party-skill{width:32px;height:32px;min-height:32px;max-height:none;padding:1px;cursor:default}
#game-root.responsive-combat-hud .party-skill .book-cooldown{font-size:15px;font-weight:600;letter-spacing:-1px}
#game-root.responsive-combat-hud .party-skill kbd{font-size:10px;line-height:10px;padding:0 1px}
#game-root.responsive-combat-hud #boss-bar{top:var(--boss-top,8px)!important}
#game-root.responsive-combat-hud .book-controls{gap:10px;align-items:center;justify-content:center;min-width:0;height:auto}
#game-root.responsive-combat-hud .book-hotbar{flex:0 0 auto;display:grid;width:calc(var(--skill-columns,3)*var(--skill-size,54px) + (var(--skill-columns,3) - 1)*var(--skill-gap,5px))!important;max-width:none;height:auto!important;grid-template-columns:repeat(var(--skill-columns,3),var(--skill-size,54px));grid-template-rows:repeat(var(--skill-rows,2),var(--skill-size,54px));grid-auto-flow:row;gap:var(--skill-gap,5px);padding:0;margin:0;overflow:visible;cursor:default;touch-action:manipulation}
#game-root.responsive-combat-hud .book-hotbar .book-slot{width:var(--skill-size,54px)!important;height:var(--skill-size,54px)!important;max-height:none!important;min-width:0}
#game-root.responsive-combat-hud .book-innate-controls{flex:0 0 46px;display:flex;flex-direction:column;gap:5px;align-items:center}
#game-root.responsive-combat-hud .book-controls .book-innate{flex:none;width:46px;height:54px;max-height:54px}
#game-root .party-menu-tabs{display:flex;gap:6px;margin:8px 0 14px;border-bottom:1px solid #8b825e66;padding-bottom:8px}
#game-root .party-menu-tabs button{min-height:36px;padding:7px 16px;background:#152c34;border:1px solid #687966;color:#e5d6b2;font:inherit;font-size:13px;cursor:pointer}
#game-root .party-menu-tabs button[aria-pressed=true]{background:#705c39;border-color:#e7cb95;color:#fff2ce}
#game-root #party-modal:has(.party-menu-tabs) [data-open-ai]{display:none}
@media(min-width:801px) and (pointer:fine){
 #game-root.stacked-desktop-hud .action-deck.loadout-deck,#game-root.stacked-desktop-hud .item-deck{bottom:calc(var(--dock-height) + var(--dock-edge) + 12px)!important}
 #game-root.stacked-desktop-hud .item-deck{right:16px;height:var(--skills-height)!important}
}
@media(max-width:800px),(pointer:coarse){
 #game-root.responsive-combat-hud .book-controls{gap:4px}
 #game-root.responsive-combat-hud .book-innate-controls{flex-basis:34px;width:34px;padding-right:7px;gap:3px}
 #game-root.responsive-combat-hud .book-controls .book-innate{width:26px;height:38px;max-height:38px}
 #game-root.responsive-combat-hud #live-performance{font-size:12px;line-height:16px}
 #game-root.responsive-combat-hud .book-hotbar .book-slot{padding:1px}
 #game-root.responsive-combat-hud .party-menu-tabs{margin:6px 0 10px}
}

#game-root.responsive-combat-hud .minimap-panel{border:14px solid transparent;border-image:var(--skin-panel) 36 fill / 36px / 22px stretch;background:none}
#game-root.responsive-combat-hud .book-controls{grid-column:1;grid-row:2}
@media(max-height:520px) and (pointer:coarse){#game-root.responsive-combat-hud .book-controls{grid-row:1}}

#game-root.stacked-desktop-hud .mission-panel{display:none!important}

/* Fixed-size HUD regions: only icon rows and sizes respond to skill count. */
#game-root.responsive-combat-hud{--mobile-skill-height:142px}
#game-root.responsive-combat-hud .action-deck.loadout-deck{padding:4px 8px;grid-template-rows:12px minmax(0,1fr) 12px;gap:2px}
#game-root.responsive-combat-hud .loadout-deck>.deck-caption{line-height:12px}
#game-root.responsive-combat-hud .book-manage{font-size:10px;line-height:12px}
#game-root.responsive-combat-hud .book-controls{gap:4px}
#game-root.responsive-combat-hud .book-innate-controls{box-sizing:border-box;flex:0 0 calc(var(--skill-size,38px) + 5px);width:calc(var(--skill-size,38px) + 5px);padding-right:4px;border-right:1px solid #b1bfa155;gap:2px}
#game-root.responsive-combat-hud .book-controls .book-innate{width:var(--skill-size,38px);height:var(--skill-size,38px);min-height:0;max-height:none;padding:1px}
#game-root.responsive-combat-hud .book-hotbar .book-slot{padding:1px}
#game-root.responsive-combat-hud .book-controls kbd{font-size:clamp(7px,calc(var(--skill-size,38px)*.23),11px);line-height:1;padding:0 1px}
#game-root.responsive-combat-hud .book-controls .book-cooldown{font-size:clamp(10px,calc(var(--skill-size,38px)*.46),22px)}
#game-root.responsive-combat-hud .party-skills{height:76px;min-height:76px;gap:2px;align-items:center}
#game-root.responsive-combat-hud .party-innate{width:calc(var(--party-skill-size,20px) + 3px);flex:0 0 calc(var(--party-skill-size,20px) + 3px);padding-right:2px;gap:2px}
#game-root.responsive-combat-hud .party-innate img{width:var(--party-skill-size,20px);height:var(--party-skill-size,20px)}
#game-root.responsive-combat-hud .party-skill-grid{grid-template-columns:repeat(var(--party-columns,3),var(--party-skill-size,20px));grid-template-rows:repeat(var(--party-rows,2),var(--party-skill-size,20px));gap:2px}
#game-root.responsive-combat-hud .party-skill{width:var(--party-skill-size,20px);height:var(--party-skill-size,20px);min-height:var(--party-skill-size,20px)}
#game-root.responsive-combat-hud .party-skill .book-cooldown{font-size:clamp(7px,calc(var(--party-skill-size,20px)*.44),14px)}
#game-root.responsive-combat-hud .party-skill kbd{font-size:clamp(6px,calc(var(--party-skill-size,20px)*.3),9px);line-height:1}
@media(max-width:800px),(pointer:coarse){#game-root.responsive-combat-hud .action-deck.loadout-deck{padding:3px 5px}#game-root.responsive-combat-hud .book-manage{font-size:9px}}
@media(max-height:520px) and (pointer:coarse){#game-root.responsive-combat-hud{--mobile-skill-height:110px}#game-root.responsive-combat-hud .action-deck.loadout-deck{grid-template-rows:minmax(0,1fr)}}

@media(max-width:800px),(pointer:coarse){
 #game-root.responsive-combat-hud{--mobile-skill-height:120px}
 #game-root.responsive-combat-hud .world-hud.hero-ui{--status-height:86px}
 #game-root.responsive-combat-hud #world-shortcuts{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:1px;padding:2px}
 #game-root.responsive-combat-hud #world-shortcuts .world-shortcut{font-size:7px;line-height:9px;min-width:0;overflow:hidden}
 #game-root.responsive-combat-hud #world-shortcuts .navigation-art{width:20px;height:20px;max-height:20px}
 #game-root.responsive-combat-hud .player-card .fighter-info{top:16px!important}
 #game-root.responsive-combat-hud .player-card .hero-orb{height:18px!important}
 #game-root.responsive-combat-hud .player-card .fighting-gauges>span{height:10px!important;font-size:8px!important}
 #game-root.responsive-combat-hud .player-card .character-level-hud{height:14px!important;font-size:8px}
}
@media(max-height:520px) and (pointer:coarse){#game-root.responsive-combat-hud{--mobile-skill-height:96px}#game-root.responsive-combat-hud .world-hud.hero-ui{--status-height:76px}}

/* Per-map local circuit executions, under RTT/FPS inside the native map frame. */
#game-root.responsive-combat-hud .minimap-panel{padding-top:calc(36px / var(--map-hud-scale,1))!important}
#live-performance .performance-value,#live-performance .circuit-count{display:block;white-space:nowrap;text-align:right}
#live-performance .circuit-count{font-size:10px;line-height:13px;font-weight:400;color:#d8dec7}
@media(max-width:800px),(pointer:coarse){#live-performance .circuit-count{font-size:9px;line-height:12px}}

/* EmberWorld window system · 2026-10-30. UI only; native controls and rules stay intact. */
#game-root.ui-rpg{--ui-paper:#e3ddc9;--ui-muted:#b3beb3;--ui-gold:#e2c58a;--ui-line:#766b4d;--ui-deep:#101d23;--ui-surface:#192d31;--ui-raised:#233a3a;--ui-active:#344c43}
#game-root.ui-rpg .rpg-overlay{background:#061316ad!important;backdrop-filter:blur(2px)!important;color-scheme:dark!important}
#game-root.ui-rpg .rpg-window{color:var(--ui-paper)!important;background:linear-gradient(135deg,#22373888,transparent 55%),var(--ui-deep)!important;border:2px solid #8c7954!important;border-image:none!important;border-radius:2px!important;box-shadow:inset 0 0 0 2px #0a171c,inset 0 0 0 3px #46534a,0 16px 55px #0009!important;font-family:EmberLanternText,"Microsoft YaHei",sans-serif!important;color-scheme:dark!important;scrollbar-color:#8d7c55 #122125;scrollbar-width:thin;isolation:isolate}
#game-root.ui-rpg .rpg-window :is(h1,h2,h3,h4){color:var(--ui-gold)!important;text-shadow:0 1px #0008!important}
#game-root.ui-rpg .rpg-window h2{font:24px/1.35 EmberLanternDisplay,serif!important;letter-spacing:2px!important;margin:0!important}
#game-root.ui-rpg .rpg-window :is(p,small,label,legend){color:var(--ui-muted)}
#game-root.ui-rpg .rpg-window :is(button,select,input,textarea){box-sizing:border-box;max-width:100%;font-family:inherit!important}
#game-root.ui-rpg .rpg-window button{border:1px solid #7b7458!important;border-bottom:3px solid #09191d!important;border-image:none!important;border-radius:2px!important;background:#263b3a!important;color:var(--ui-paper)!important;box-shadow:inset 0 1px #a8a78025!important;text-shadow:none!important;min-height:36px;padding:7px 11px!important;line-height:1.45;cursor:pointer;white-space:normal;overflow-wrap:anywhere;clip-path:none!important;transform:none!important}
#game-root.ui-rpg .rpg-window button:not(:disabled):hover{background:#354d43!important;border-color:#c0a573!important;color:#fff0c9!important}
#game-root.ui-rpg .rpg-window button:not(:disabled):active{background:#182c2d!important;box-shadow:inset 0 2px 3px #0008!important}
#game-root.ui-rpg .rpg-window :is(button,input,select,textarea):focus-visible{outline:2px solid #f2d291!important;outline-offset:2px}
#game-root.ui-rpg .rpg-window button:disabled{opacity:.5!important;cursor:not-allowed}
#game-root.ui-rpg .rpg-window :is(button.primary,button[aria-pressed=true],button.selected,button.active){background:#5b5135!important;border-color:#c6aa6c!important;color:#fff1ca!important}
#game-root.ui-rpg .rpg-window :is(select,input:not([type=range]):not([type=checkbox]),textarea){background:#0e2027!important;color:var(--ui-paper)!important;border:1px solid #637666!important;border-radius:2px!important;padding:8px 10px!important;min-height:36px}
#game-root.ui-rpg .rpg-window input::placeholder{color:#99aaa1!important}
#game-root.ui-rpg .rpg-window input[type=range]{accent-color:#c5a86d;width:100%;min-width:0}
#game-root.ui-rpg .rpg-window input[type=checkbox]{accent-color:#c5a86d}
#game-root.ui-rpg .rpg-window :is(header,.modal-head){background:transparent!important;border-color:var(--ui-line)!important;min-height:0;gap:12px}
#game-root.ui-rpg .rpg-window :is(.close-modal,[id$="-close"],[data-close-panel],[data-close-all]){min-width:36px;min-height:36px;flex-shrink:0}
#game-root.ui-rpg .rpg-window :is(.eyebrow,header>div>small){color:#acaa87!important;letter-spacing:1px!important}
#game-root.ui-rpg .rpg-window :is(.dengtuan-guide,.hero-folio-banner,.career-portrait,.career-points,.career-node,.career-branch,.career-milestones,.book-study-points,.book-innate-note,.book-skill-card,.hero-passives,.passive-entry,.study-shortcut,.tactical-catalog article,.guild-keeper,.collection-explainer,.hero-guide-reading){background:var(--ui-surface)!important;color:var(--ui-paper)!important;border-color:#536859!important;border-radius:2px!important;box-shadow:none!important}
#game-root.ui-rpg .rpg-window :is(.career-lede,.career-footer,.career-node p,.career-preview,.career-milestones,.book-stats,.book-next,.passive-note,.passive-preview,.passive-state,.folio-inscription,.hero-guide-reading p,.item-story,.gear-affinity){color:var(--ui-muted)!important}
#game-root.ui-rpg .rpg-window :is(.career-rank,.career-number,.book-rank,.career-points b,.career-points strong,.career-node-heading b,.career-node-bottom strong,.passive-heading b){color:var(--ui-gold)!important}
#game-root.ui-rpg .rpg-window :is(.gain,.career-preview b){color:#a7d6ae!important}
#game-root.ui-rpg .rpg-window :is(.loss,.party-error){color:#e8a194!important}
#game-root.ui-rpg .rpg-window .hero-folio-banner{margin:10px 0!important;padding:10px 12px!important;min-height:0!important;border:1px solid #536859!important}
#game-root.ui-rpg .rpg-window .folio-sigil{width:46px!important;height:46px!important;flex:0 0 46px!important}
#game-root.ui-rpg .rpg-window .folio-traits{font-size:11px!important;letter-spacing:0!important}
#game-root.ui-rpg .rpg-window .hero-folio-banner::after,#game-root.ui-rpg .rpg-window .hero-folio-banner::before{display:none!important}
/* Help stays available, with a small pixel guide instead of a full-page paper card. */
#game-root.ui-rpg .rpg-window .dengtuan-guide{gap:10px!important;margin:10px 0!important;padding:8px 10px!important;min-height:0!important;border:1px solid #4f6657!important;border-left:3px solid #ad9562!important}
#game-root.ui-rpg .rpg-window .dengtuan-toggle{width:42px!important;min-width:42px!important;padding:0!important;border:0!important;background:none!important}
#game-root.ui-rpg .rpg-window .dengtuan-toggle img{width:36px!important;height:36px!important;object-fit:contain}
#game-root.ui-rpg .rpg-window .dengtuan-toggle span{font-size:10px!important}
#game-root.ui-rpg .rpg-window .dengtuan-caption{font-size:12px!important;line-height:1.4;color:var(--ui-gold)!important}
#game-root.ui-rpg .rpg-window .dengtuan-copy{font-size:12px!important;line-height:1.6!important;color:var(--ui-muted)!important;margin:3px 0!important}
#game-root.ui-rpg .rpg-window .dengtuan-message{min-width:0;flex:1}
#game-root.ui-rpg .rpg-window .dengtuan-actions{gap:6px;flex-wrap:wrap}
#game-root.ui-rpg .rpg-window .dengtuan-actions button{min-height:28px!important;padding:3px 7px!important;font-size:11px!important}
/* Bag and character share one frame and retain their native open/close behaviour. */
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .native-gear-window{width:min(1180px,var(--dialog-width))!important;padding:12px!important;gap:10px}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-workspace-tools{gap:6px;margin:0;padding:0 0 8px;border-bottom:1px solid var(--ui-line)}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-desktop{min-height:0!important;gap:12px!important;align-items:start}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel{background:var(--ui-deep)!important;color:var(--ui-paper)!important;border:1px solid #4f6257!important;border-radius:2px!important;box-shadow:none!important;max-width:none!important;container-type:normal!important;height:clamp(280px,calc(var(--dialog-height) - 126px),700px)!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel>header{padding:10px 12px!important;min-height:54px!important;background:#203333!important;border-bottom:1px solid var(--ui-line)!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel>header::before,#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel>header::after{display:none!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel h2{font-size:22px!important;letter-spacing:2px!important;color:var(--ui-gold)!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel header small{font-size:10px!important;letter-spacing:1px!important;color:var(--ui-muted)!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel-scroll{background:none!important;padding:12px!important;scrollbar-color:#8d7c55 #122125}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(230px,.8fr)!important;gap:10px!important;align-content:start!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll>:is(.dengtuan-guide,.bag-wallet,.bag-search,.bag-mode-bar,.bag-secondary-filters){grid-column:1/-1!important;grid-row:auto!important;margin:0!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-wallet{padding:8px 0!important;color:var(--ui-paper)!important;border-color:#4f6257!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-search{display:flex!important;flex-wrap:wrap;gap:6px;padding:0!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-search input{flex:1 1 160px!important;min-width:0!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-search>small{flex:1 1 150px;color:var(--ui-muted)!important;font-size:11px}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(.bag-mode-bar,.bag-secondary-filters){display:flex!important;flex-wrap:wrap!important;gap:5px!important;padding:5px 0!important;border-color:#4f6257!important;align-items:center}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-mode-bar button{min-height:32px;font-size:12px!important;padding:5px 10px!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-storage{grid-column:1!important;grid-row:auto!important;min-width:0!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-storage-label{color:var(--ui-muted)!important;font-size:11px!important;margin:0 0 8px!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) #bag-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item{display:flex!important;align-items:center!important;gap:8px!important;padding:8px!important;min-height:70px!important;background:#213735!important;border:1px solid #516657!important;border-left:3px solid var(--rarity-color,#7d8a71)!important;border-radius:2px!important;box-shadow:none!important;text-align:left!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item[aria-pressed=true]{border-color:#dbc18b!important;background:#3a4c3a!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item :is(b,strong){color:var(--ui-paper)!important;font-size:13px!important;line-height:1.4!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item small{color:var(--ui-muted)!important;font-size:11px!important;line-height:1.5!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item .gear-pixel-icon{width:42px!important;height:42px!important;flex:0 0 42px!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-item-detail{grid-column:2!important;grid-row:auto!important;position:static!important;align-self:start;min-width:0!important;max-height:none!important;background:#1b3030!important;border:1px solid #7a7557!important;border-radius:2px!important;box-shadow:none!important;padding:12px!important;color:var(--ui-paper)!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(.weapon-grip,.gear-compare,.item-stat-block,.item-bonus,.avant-identity,.gear-insights,.passive-list,.stat-group,.bag-curator){background:#16292c!important;border-color:#516657!important;border-radius:2px!important;color:var(--ui-paper)!important;box-shadow:none!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-curator{padding:5px 8px!important;max-width:240px;font-size:11px}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(.gear-paperdoll,.gear-model-wrap){background-color:#11252a!important;border-color:#526458!important;border-radius:2px!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-access-dock{gap:8px!important;padding-top:8px!important;border-top:1px solid var(--ui-line)!important;background:none!important}
/* Settings: compact heading, travel actions, then display/audio columns. */
#game-root.ui-rpg #pause-modal .menu-avant{display:flex!important;flex-direction:column!important;gap:12px!important;width:min(920px,var(--dialog-width))!important;padding:18px!important}
#game-root.ui-rpg #pause-modal .menu-masthead{display:flex!important;justify-content:space-between;align-items:center;min-height:0!important;margin:0!important;padding:0 0 10px!important;border-bottom:1px solid var(--ui-line)!important}
#game-root.ui-rpg #pause-modal .menu-masthead b{color:var(--ui-gold)!important;font-size:13px!important;letter-spacing:1px!important}
#game-root.ui-rpg #pause-modal .menu-retreat{display:flex!important;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px!important;padding:0!important;margin:0!important;border:0!important}
#game-root.ui-rpg #pause-modal .menu-retreat #menu-title{font-size:23px!important;line-height:1.3!important;writing-mode:horizontal-tb!important;margin:0!important;letter-spacing:2px!important}
#game-root.ui-rpg #pause-modal :is(.menu-overline,.menu-poem,.menu-landscape){display:none!important}
#game-root.ui-rpg #pause-modal #menu-location{font-size:12px!important;margin:0!important;flex:1 1 100px!important}
#game-root.ui-rpg #pause-modal #menu-resume{width:auto!important;min-width:130px!important;min-height:40px;margin:0!important}
#game-root.ui-rpg #pause-modal #menu-resume i{display:none}
#game-root.ui-rpg #pause-modal .dengtuan-guide{margin:0!important}
#game-root.ui-rpg #pause-modal .menu-dashboard{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important;padding:0!important;min-width:0}
#game-root.ui-rpg #pause-modal .menu-block{padding:12px!important;background:var(--ui-surface)!important;border:1px solid #4e6457!important;border-radius:2px!important;min-width:0;margin:0!important}
#game-root.ui-rpg #pause-modal .menu-block:first-child{grid-column:1/-1}
#game-root.ui-rpg #pause-modal .menu-block h3{font-size:13px!important;padding:0 0 8px!important;margin:0!important;display:flex;gap:8px;justify-content:space-between;border-color:#536859!important}
#game-root.ui-rpg #pause-modal .menu-destinations{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin:0!important}
#game-root.ui-rpg #pause-modal .menu-destinations button{padding:8px 10px!important;min-height:48px!important;display:flex!important;flex-direction:column;justify-content:center;gap:3px}
#game-root.ui-rpg #pause-modal .menu-destinations button b{font-size:13px!important;color:var(--ui-paper)!important}
#game-root.ui-rpg #pause-modal .menu-destinations button small{font-size:10px!important;color:var(--ui-muted)!important}
#game-root.ui-rpg #pause-modal .menu-options{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;margin:0!important}
#game-root.ui-rpg #pause-modal .menu-options button{font-size:12px!important;min-height:44px!important}
#game-root.ui-rpg #pause-modal .rpg-account-row{margin-top:8px;display:flex}
#game-root.ui-rpg #pause-modal .rpg-account-row button{width:100%;min-height:38px}
#game-root.ui-rpg #pause-modal .menu-audio-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
#game-root.ui-rpg #pause-modal .menu-audio-channel{padding:0!important;min-width:0;background:none!important;border:0!important}
#game-root.ui-rpg #pause-modal .menu-audio-label{display:flex;justify-content:space-between;gap:4px;font-size:12px!important}
#game-root.ui-rpg #pause-modal .menu-audio-channel input{margin:10px 0!important}
#game-root.ui-rpg #pause-modal .menu-audio-channel button{font-size:12px!important;width:100%}
#game-root.ui-rpg #pause-modal .menu-playlist{display:grid!important;grid-template-columns:1fr!important;gap:5px!important;margin-top:10px!important}
#game-root.ui-rpg #pause-modal .menu-playlist select{width:100%;min-width:0!important;font-size:12px}
#game-root.ui-rpg #pause-modal .menu-footer{display:flex!important;flex-wrap:wrap;justify-content:space-between;gap:5px;margin:0!important;padding:8px 0 0!important;border-top:1px solid var(--ui-line)}
#game-root.ui-rpg #pause-modal .menu-footer p{margin:0!important;font-size:11px!important}
/* Skill / talent catalogues keep full details but use the available width. */
#game-root.ui-rpg #career-modal .career-heading{padding:0 0 10px!important;min-height:0!important;background:transparent!important;border-bottom:1px solid var(--ui-line)!important;border-radius:0!important}
#game-root.ui-rpg #career-modal .career-points{padding:8px!important;font-size:12px!important;border:1px solid #536859!important}
#game-root.ui-rpg #career-modal :is(.career-mascot-card,.career-mascot-story){display:none!important}
#game-root.ui-rpg .rpg-window :is(#career-heroes,#book-heroes){display:flex!important;flex-wrap:wrap!important;gap:5px!important;margin:10px 0!important}
#game-root.ui-rpg .rpg-window :is(#career-heroes,#book-heroes)>button{flex:1 1 100px!important;min-width:0!important;min-height:44px!important;padding:5px 7px!important;font-size:12px!important}
#game-root.ui-rpg .rpg-window :is(.career-node-grid,#book-catalog){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))!important;gap:8px!important}
#game-root.ui-rpg .rpg-window :is(.career-node,.book-skill-card){padding:10px!important;min-width:0!important}
#game-root.ui-rpg .rpg-window .career-portrait{padding:10px!important;gap:12px!important;min-height:0!important}
#game-root.ui-rpg .rpg-window .career-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0!important}
#game-root.ui-rpg .rpg-window .book-loadout{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(44px,1fr))!important;gap:5px!important;padding:8px!important;background:#12272b!important;border:1px solid #516657!important;border-radius:2px!important}
#game-root.ui-rpg .rpg-window .book-loadout-slot{min-height:44px!important;padding:3px!important;min-width:0!important}
/* Shop, codex, maps, party and town share the same frame and readable rows. */
#game-root.ui-rpg .rpg-window :is(.service-row,.development-card,.guild-actions,.collection-tools,.tactical-shop-bar){background:var(--ui-surface)!important;border-color:#566955!important;border-radius:2px!important}
#game-root.ui-rpg .rpg-window .service-body{grid-template-columns:170px minmax(0,1fr);gap:16px}
#game-root.ui-rpg .rpg-window .service-body aside{padding:10px;background:#15282c;border:1px solid #4e6457}
#game-root.ui-rpg .rpg-window .service-body aside>img{height:130px;width:90px}
#game-root.ui-rpg .rpg-window .service-row{gap:10px;padding:10px;min-width:0}
#game-root.ui-rpg .rpg-window .service-row button{flex:0 0 auto;min-width:90px!important}
#game-root.ui-rpg .rpg-window .party-footer{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#game-root.ui-rpg .rpg-window :is(.party-footer,.ai-rule-footer)>button{min-height:40px}
#game-root.ui-rpg .rpg-window :is(.codex-tabs,.collection-tools,.bestiary-tools,#help-tabs,#service-tabs){display:flex;gap:6px;flex-wrap:wrap;min-width:0}
#game-root.ui-rpg .rpg-window #development-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:10px}
#game-root.ui-rpg .rpg-window .building-vignette{max-width:94px}
#game-root.ui-rpg .rpg-window :is(.world-atlas-header,.codex-header,.hero-guide-head,.bestiary-header){flex-wrap:wrap}
#game-root.ui-rpg .rpg-window .codex-page>.modal{border:0!important;box-shadow:none!important;border-radius:0!important;background:transparent!important;padding:10px 0!important;width:100%!important;max-width:100%!important}
#game-root.ui-rpg #town-ui-actions{position:absolute;z-index:60;display:flex;flex-wrap:wrap;gap:5px}
#game-root.ui-rpg #town-ui-actions[hidden]{display:none}
#game-root.ui-rpg #town-ui-actions button{flex:1 1 60px;min-width:0;min-height:34px;padding:6px 4px;background:#1a3030ed;border:1px solid #a28b5e;border-bottom:3px solid #111b1a;border-radius:2px;color:#efdab1;font:12px/1.3 EmberLanternText,sans-serif;cursor:pointer}
#game-root.ui-rpg #town-ui-actions button:hover{background:#334b3d}
#game-root.ui-rpg #town-ui-actions button:focus-visible{outline:2px solid #f2d291;outline-offset:2px}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-rpg .rpg-window{padding:12px!important;width:var(--dialog-width,90vw)!important;font-size:13px}
 #game-root.ui-rpg .rpg-window h2{font-size:20px!important;letter-spacing:1px!important}
 #game-root.ui-rpg .rpg-window button{min-height:40px!important;font-size:12px}
 #game-root.ui-rpg .rpg-window :is(input,select){font-size:16px!important}
 #game-root.ui-rpg .rpg-window :is(header,.modal-head){flex-wrap:wrap;gap:8px}
 #game-root.ui-rpg .rpg-window .dengtuan-guide{padding:7px!important;gap:7px!important}
 #game-root.ui-rpg .rpg-window .dengtuan-copy{font-size:11px!important}
 #game-root.ui-rpg .rpg-window .dengtuan-actions button{min-height:32px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .native-gear-window{padding:8px!important;gap:8px}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel{height:auto!important;min-height:0!important;overflow:visible!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel-scroll{overflow:visible!important;padding:8px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(.bag-storage,.gear-item-detail){grid-column:1!important;grid-row:auto!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel>header{padding:8px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel h2{font-size:20px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-curator{max-width:130px;padding:4px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-curator img{width:28px!important;height:28px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-curator span{display:none}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-search>small{flex-basis:100%}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item{min-height:68px!important;gap:5px!important;padding:6px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item .gear-pixel-icon{width:32px!important;height:32px!important;flex-basis:32px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item :is(b,strong){font-size:12px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item small{font-size:10px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-access-dock{position:sticky!important;bottom:-8px!important;background:#14272a!important;z-index:5}
 #game-root.ui-rpg #pause-modal .menu-avant{gap:10px!important;padding:12px!important}
 #game-root.ui-rpg #pause-modal .menu-dashboard{grid-template-columns:1fr!important;gap:10px!important}
 #game-root.ui-rpg #pause-modal .menu-destinations{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #game-root.ui-rpg #pause-modal #menu-resume{min-width:110px!important;min-height:40px!important}
 #game-root.ui-rpg #pause-modal .menu-retreat #menu-title{font-size:20px!important}
 #game-root.ui-rpg #pause-modal #menu-location{flex-basis:100%!important;order:3}
 #game-root.ui-rpg #pause-modal .menu-pause-state{font-size:10px!important}
 #game-root.ui-rpg #pause-modal .menu-playlist select{font-size:13px!important}
 #game-root.ui-rpg .rpg-window .service-body{display:flex;flex-direction:column;gap:10px}
 #game-root.ui-rpg .rpg-window .service-body aside{display:grid;grid-template-columns:48px 1fr;gap:4px 8px;text-align:left;align-items:start}
 #game-root.ui-rpg .rpg-window .service-body aside>img{width:46px;height:64px;grid-row:1/4}
 #game-root.ui-rpg .rpg-window .service-body aside h3{font-size:17px;margin:0}
 #game-root.ui-rpg .rpg-window .service-body aside p{font-size:11px;margin:0}
 #game-root.ui-rpg .rpg-window #service-wallet{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;font-size:11px}
 #game-root.ui-rpg .rpg-window #service-wallet p{display:flex;flex-wrap:wrap;gap:6px}
 #game-root.ui-rpg .rpg-window .service-row{display:grid;grid-template-columns:40px minmax(0,1fr);gap:6px;padding:8px}
 #game-root.ui-rpg .rpg-window .service-row>.gear-pixel-icon{width:36px;height:36px}
 #game-root.ui-rpg .rpg-window .service-row>button{grid-column:1/-1;justify-self:end;min-width:120px!important;min-height:38px!important}
 #game-root.ui-rpg .rpg-window :is(.hero-folio-banner,.career-portrait){gap:8px!important;padding:8px!important}
 #game-root.ui-rpg .rpg-window .folio-traits{display:none!important}
 #game-root.ui-rpg .rpg-window :is(#career-heroes,#book-heroes)>button{flex-basis:calc(25% - 5px)!important;font-size:11px!important}
 #game-root.ui-rpg .rpg-window :is(#career-heroes,#book-heroes)>button img{width:26px!important;height:32px!important}
 #game-root.ui-rpg .rpg-window .career-milestones{gap:6px!important;font-size:10px!important}
 #game-root.ui-rpg .rpg-window .career-points{padding:6px!important}
 #game-root.ui-rpg .rpg-window .career-points b{font-size:18px!important}
 #game-root.ui-rpg .rpg-window .party-footer button{flex:1 1 130px}
 #game-root.ui-rpg .rpg-window :is(.bestiary-layout,.hero-guide-layout,.collection-layout,.map-book-layout,.regional-layout,.guild-keeper){display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
 #game-root.ui-rpg .rpg-window .world-atlas-left{padding:0!important}
 #game-root.ui-rpg .rpg-window .atlas-info{padding:10px!important;min-width:0}
 #game-root.ui-rpg .rpg-window .atlas-info h3{font-size:23px!important}
 #game-root.ui-rpg .rpg-window .bestiary-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:220px;overflow:auto}
 #game-root.ui-rpg .rpg-window .collection-tools>*{min-width:0!important;flex:1 1 120px}
 #game-root.ui-rpg .rpg-window #development-cards{grid-template-columns:minmax(0,1fr)}
 #game-root.ui-rpg .rpg-window .development-card{grid-template-columns:64px minmax(0,1fr);padding:8px;gap:8px}
 #game-root.ui-rpg .rpg-window .building-vignette{width:64px;min-width:0}
 #game-root.ui-rpg .rpg-window .development-card h3{font-size:17px}
 #game-root.ui-rpg .rpg-window .tactical-loadout{grid-template-columns:1fr 1fr}
 #game-root.ui-rpg #town-ui-actions button{font-size:10px;min-height:32px;flex-basis:100%}
}
@media(prefers-reduced-motion:reduce){#game-root.ui-rpg .rpg-window *{scroll-behavior:auto!important;transition:none!important}}
/* Shared compact help and predictable flow replace legacy per-window grid rows. */
#game-root.ui-rpg .rpg-window .rpg-help{grid-column:1/-1;grid-row:auto!important;margin:4px 0 8px!important;padding:0;border:1px solid #465c4f;background:#14272b;color:var(--ui-muted);border-radius:1px}
#game-root.ui-rpg .rpg-window .rpg-help>summary{cursor:pointer;padding:7px 10px;color:#caba8d;font-size:12px;line-height:1.5;list-style-position:inside}
#game-root.ui-rpg .rpg-window .rpg-help .dengtuan-guide{margin:0!important;border:0!important;border-top:1px solid #465c4f!important}
#game-root.ui-rpg .rpg-window .dengtuan-caption strong{color:var(--ui-gold)!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{display:flex!important;flex-direction:column!important;gap:8px!important;overflow:auto!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll>*{flex-shrink:0;min-width:0;width:100%;box-sizing:border-box;grid-area:auto!important;order:0!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(220px,.85fr);gap:12px;align-items:start}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .rpg-bag-detail{min-width:0;display:flex;flex-direction:column;gap:8px}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-detail,#ew-trade-bag-detail){width:100%;box-sizing:border-box;flex:none!important;min-height:0!important;max-height:none!important;overflow:visible!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) #bag-action{display:flex!important;flex-wrap:wrap;gap:6px;grid-area:auto!important;padding:0!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) #bag-action button{flex:1 1 120px}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;overflow:visible!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item{display:grid!important;grid-template-columns:40px minmax(0,1fr)!important;grid-template-rows:auto auto auto;gap:1px 7px!important;align-content:center!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item>img{grid-row:1/4;grid-column:1;max-width:40px;max-height:42px;align-self:center}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item>:is(b,small){grid-column:2;position:static!important;margin:0!important;white-space:normal!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-filters,#ew-trade-bag-filters){display:flex;flex-wrap:wrap;gap:5px!important;margin:0!important;padding:0!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-filters,#ew-trade-bag-filters) button{min-height:30px!important;padding:4px 8px!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-money,#bag-money span,#bag-money b,#bag-mode-note,.bag-secondary-filters label,.bag-storage-label,.bag-storage-label small){color:var(--ui-muted)!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-detail,#ew-trade-bag-detail) :is(p,small,.gear-affinity,.gear-compare){color:var(--ui-muted)!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel>footer{background:#17292c!important;color:var(--ui-muted)!important;border-top:1px solid #4f6257!important;padding:6px 10px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-panel-scroll{display:flex!important;flex-direction:column!important;gap:10px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-panel-scroll>*{flex-shrink:0;grid-area:auto!important;order:0!important;min-width:0}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #bag-roster{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;padding:0!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #bag-roster>button{display:flex;align-items:center;gap:5px;min-width:0;padding:5px!important;font-size:12px}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #bag-roster>button img{width:27px;height:33px;object-fit:cover}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .hero-folio-banner{display:none!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-name{display:flex!important;align-items:center;justify-content:space-between;gap:10px!important;min-height:0!important;padding:10px!important;background:#203432!important;border:1px solid #536859!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .avant-identity{padding:0!important;border:0!important;background:none!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .avant-identity :is(strong,h3,b){font-size:24px!important;line-height:1.2!important;margin:0!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .avant-level{border:0!important;padding:0!important;min-width:0!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .avant-level strong{font-size:24px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-progression{padding:8px 10px!important;background:#172c2e!important;margin:0!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{display:grid!important;grid-template-columns:96px minmax(80px,1fr) 96px!important;gap:8px!important;padding:8px 0!important;align-items:center}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{min-height:300px!important;height:340px!important;background:radial-gradient(ellipse at 50% 70%,#354634,#112329 70%)!important;border:1px solid #3f554c!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap::before{display:none!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap canvas{height:300px!important;max-height:300px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap>span{letter-spacing:0!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-insights{max-height:none!important;overflow:visible!important;padding:10px!important}
#game-root.ui-rpg #pause-modal .menu-masthead{flex-wrap:wrap!important;flex-shrink:0;position:static!important}
#game-root.ui-rpg #pause-modal .menu-masthead>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#game-root.ui-rpg #pause-modal .menu-pause-state{position:static!important;margin:0!important}
#game-root.ui-rpg #pause-modal .menu-dashboard{align-items:start!important}
#game-root.ui-rpg #pause-modal .menu-block:first-child{order:3}
#game-root.ui-rpg #pause-modal .menu-block:nth-child(2){order:1}
#game-root.ui-rpg #pause-modal .menu-block:nth-child(3){order:2}
#game-root.ui-rpg #pause-modal .menu-footer{order:10}
@media(min-width:801px) and (pointer:fine){
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal).both-open :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{grid-template-columns:minmax(0,1fr)}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-storage{max-height:275px;overflow:auto;overscroll-behavior:contain}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items){grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item{grid-template-columns:30px minmax(0,1fr)!important;gap:1px 4px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item>img{max-width:30px;max-height:34px}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-workspace-tools button{min-height:36px!important;font-size:11px!important;padding:5px 8px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #bag-roster{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #bag-roster>button{flex-direction:column;gap:2px;font-size:11px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{grid-template-columns:68px minmax(65px,1fr) 68px!important;gap:4px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{flex-direction:column!important;align-items:center!important;text-align:center!important;gap:2px!important;min-height:60px!important;padding:4px 2px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-slot b{font-size:10px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-slots{gap:5px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{height:360px!important;min-height:360px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap canvas{height:320px!important;max-height:320px!important}
 #game-root.ui-rpg #pause-modal .menu-masthead .eyebrow{display:none!important}
 #game-root.ui-rpg #pause-modal .menu-dashboard{display:flex!important;flex-direction:column!important}
 #game-root.ui-rpg #pause-modal .menu-block{box-sizing:border-box;width:100%}
 #game-root.ui-rpg #pause-modal .menu-block h3 small{display:none}
}
/* Character themes keep their accent, with one shared dark material palette. */
#game-root.ui-rpg :is(.rpg-overlay,.rpg-window,.gear-panel){--folio-paper:#14262b!important;--folio-card:#203735!important;--folio-ink:#e3ddc9!important;--folio-muted:#b3beb3!important;--folio-line:#536859!important;--folio-selected:#40513b!important;--folio-wash:#1b3030!important;--folio-stage:#13282c!important;--folio-gold:#dfc58b!important;--folio-radius:2px!important}
#game-root.ui-rpg .rpg-window :is(#career-hero,#career-profile,#skillbook-summary,#book-role-description>div,.career-footer){background:var(--ui-surface)!important;border-color:#536859!important;border-radius:2px!important;box-shadow:none!important;color:var(--ui-paper)!important}
#game-root.ui-rpg .rpg-window :is(.career-portrait,.career-identity,.hero-passives,.book-innate-note,#skillbook-summary,#book-role-description,.weapon-grip){color:var(--ui-paper)!important}
#game-root.ui-rpg .rpg-window :is(.career-identity p,.career-identity small,.career-milestones span,.career-portrait small,#skillbook-summary p,#skillbook-summary small,.weapon-grip b){color:var(--ui-muted)!important}
#game-root.ui-rpg .rpg-window :is(#career-roster,#skillbook-roster){display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:5px!important;margin:8px 0!important;width:100%!important}
#game-root.ui-rpg .rpg-window :is(#career-roster,#skillbook-roster)>button{min-width:0!important;display:grid!important;grid-template-columns:30px minmax(0,1fr);gap:2px 4px!important;padding:5px!important;font-size:12px!important}
#game-root.ui-rpg .rpg-window :is(#career-roster,#skillbook-roster)>button img{width:28px!important;height:34px!important;grid-row:1/3;object-fit:cover;border-radius:1px!important}
#game-root.ui-rpg .rpg-window :is(#career-roster,#skillbook-roster)>button span{font-size:12px!important;white-space:nowrap}
#game-root.ui-rpg .rpg-window :is(#career-roster,#skillbook-roster)>button small{font-size:9px!important;color:var(--ui-muted)!important;white-space:nowrap}
#game-root.ui-rpg .rpg-window :is(.career-heading,.skillbook-dialog>header)::before,#game-root.ui-rpg .rpg-window :is(.career-heading,.skillbook-dialog>header)::after{display:none!important}
#game-root.ui-rpg .rpg-window .book-loadout{display:block!important}
#game-root.ui-rpg .rpg-window #book-loadout-slots{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(52px,1fr))!important;gap:6px!important;padding:6px 0!important}
#game-root.ui-rpg .rpg-window .book-loadout-slot{background:#203735!important;border:1px solid #536859!important;border-radius:1px!important;min-width:0!important;padding:4px!important;color:var(--ui-paper)!important}
#game-root.ui-rpg .rpg-window #book-cards{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr))!important;gap:8px!important}
#game-root.ui-rpg .rpg-window #book-tabs{display:flex!important;flex-wrap:wrap;gap:5px}
#game-root.ui-rpg .rpg-window .book-skill-card .book-study-actions{display:flex;flex-wrap:wrap;gap:5px}
#game-root.ui-rpg .rpg-window .book-skill-card .book-study-actions button{flex:1 1 80px;min-width:0!important}
#game-root.ui-rpg .rpg-window #skillbook-summary{padding:10px!important;display:grid!important;grid-template-columns:56px minmax(0,1fr) auto!important;gap:10px!important}
#game-root.ui-rpg .rpg-window #skillbook-summary>img{width:52px!important;height:68px!important;object-fit:cover}
#game-root.ui-rpg .rpg-window #skillbook-summary :is(h3,p){margin:4px 0!important}
#game-root.ui-rpg #career-modal .career-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;align-items:center!important}
#game-root.ui-rpg #career-modal .career-heading>div:first-child{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
#game-root.ui-rpg #career-modal .career-heading>div:first-child>small{flex-basis:100%}
#game-root.ui-rpg #career-modal .career-points{margin:0!important;min-width:0!important}
#game-root.ui-rpg #career-modal .career-points b{font-size:18px!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-wallet{min-height:0!important;height:auto!important;padding:3px 0!important;line-height:1.5!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-wallet .resource-icon{height:25px!important;width:25px!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-wallet :is(b,span){margin:0!important;padding:0!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-mode-bar{padding:0!important;min-height:0!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-mode-bar button{min-height:32px!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-secondary-filters{padding:0!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-secondary-filters select{font-size:12px!important;min-height:32px!important;padding:5px!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-storage{overflow:visible!important}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel header .bag-curator{max-height:54px}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel header .bag-curator img{height:42px;width:34px;object-fit:cover}
#game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-workspace-tools{padding-bottom:6px!important}
#game-root.ui-rpg #pause-modal .menu-block h3 span{font-size:13px}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-rpg .rpg-window :is(#career-roster,#skillbook-roster){grid-template-columns:repeat(4,minmax(0,1fr))!important}
 #game-root.ui-rpg .rpg-window :is(#career-roster,#skillbook-roster)>button{display:flex!important;flex-direction:column!important;justify-content:center;align-items:center;min-height:64px!important;gap:2px!important;padding:4px!important}
 #game-root.ui-rpg .rpg-window :is(#career-roster,#skillbook-roster)>button small{white-space:normal!important;font-size:9px!important}
 #game-root.ui-rpg .rpg-window #skillbook-summary{grid-template-columns:44px minmax(0,1fr)!important}
 #game-root.ui-rpg .rpg-window #skillbook-summary>img{width:42px!important;height:56px!important}
 #game-root.ui-rpg .rpg-window #skillbook-summary .book-study-points{grid-column:1/-1;display:flex;gap:12px;align-items:center;padding:6px!important}
 #game-root.ui-rpg #career-modal .career-heading{grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important}
 #game-root.ui-rpg #career-modal .career-heading>div:first-child{grid-column:1;grid-row:1;gap:5px}
 #game-root.ui-rpg #career-modal #career-close{grid-column:2;grid-row:1;align-self:start}
 #game-root.ui-rpg #career-modal .career-points{grid-column:1/-1;grid-row:2;display:flex!important;gap:12px!important;justify-content:start!important;min-height:0!important}
 #game-root.ui-rpg #career-modal .career-heading .help-link{min-height:30px!important;padding:3px 7px!important;font-size:11px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .bag-storage{max-height:245px!important;overflow:auto!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) #bag-mode-note{font-size:10px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{gap:6px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .rpg-help{margin:0!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-workspace-tools{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-workspace-tools button{font-size:11px!important;min-height:32px!important;padding:4px!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal) .gear-access-dock{display:none!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-name{padding:6px 8px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-progression{align-self:stretch!important;width:auto!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-panel-scroll{gap:8px!important}
}
/* Keep the first screen useful: compact identity, then actual progression controls. */
#game-root.ui-rpg .rpg-window .hero-folio-banner{padding:8px 10px!important;margin:6px 0!important;gap:8px!important}
#game-root.ui-rpg .rpg-window .hero-folio-banner .folio-sigil{width:34px!important;height:34px!important;flex-basis:34px!important}
#game-root.ui-rpg .rpg-window .folio-inscription :is(b,strong){font-size:19px!important;line-height:1.3!important}
#game-root.ui-rpg .rpg-window .folio-inscription small{font-size:11px!important;line-height:1.4!important}
#game-root.ui-rpg .rpg-window .hero-passives{margin:6px 0!important;padding:8px 10px!important}
#game-root.ui-rpg .rpg-window .hero-passives>summary{padding:0!important;min-height:0!important;line-height:1.5!important;display:flex;flex-wrap:wrap;gap:6px!important;align-items:center}
#game-root.ui-rpg .rpg-window .hero-passives>summary small{margin-left:auto;font-size:10px!important}
#game-root.ui-rpg .rpg-window .hero-passives>summary strong{font-size:13px!important}
#game-root.ui-rpg .rpg-window :is(.passive-mini-icons img,.passive-mini-icons canvas){width:21px!important;height:21px!important}
#game-root.ui-rpg .rpg-window :is(.tactical-loadout>*,.bestiary-detail,.bestiary-caption,.bestiary-info,.bestiary-stats,.bestiary-guard,.map-book-head,.map-book-detail,.map-book-info,.collection-explainer){background:var(--ui-surface)!important;border-color:#536859!important;border-radius:2px!important;color:var(--ui-paper)!important;box-shadow:none!important}
#game-root.ui-rpg .rpg-window :is(.tactical-loadout b,.tactical-loadout small,.tactical-loadout span,.bestiary-info p,.bestiary-info small,.bestiary-caption p,.bestiary-stats span){color:var(--ui-muted)!important}
#game-root.ui-rpg .rpg-window :is(.bestiary-detail,.map-book-detail){padding:12px!important}
#game-root.ui-rpg .rpg-window :is(.bestiary-header p,.bestiary-tools label,.bestiary-tools span){color:var(--ui-muted)!important}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-rpg .rpg-window .hero-folio-banner{display:flex!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .hero-folio-banner{display:none!important}
 #game-root.ui-rpg .rpg-window #skillbook-summary{padding:8px!important;gap:6px!important}
 #game-root.ui-rpg .rpg-window #skillbook-summary h3{font-size:18px!important;line-height:1.3!important}
 #game-root.ui-rpg .rpg-window #skillbook-summary p{font-size:12px!important;line-height:1.5!important}
 #game-root.ui-rpg .rpg-window .book-study-points{min-height:0!important}
 #game-root.ui-rpg .rpg-window .book-study-points :is(b,strong){font-size:22px!important;line-height:1!important}
 #game-root.ui-rpg .rpg-window .career-portrait{padding:8px!important;display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;gap:6px!important}
 #game-root.ui-rpg .rpg-window .career-portrait>img{width:40px!important;height:52px!important;object-fit:cover;margin:0!important}
 #game-root.ui-rpg .rpg-window .career-identity h3{font-size:18px!important;margin:0 0 5px!important}
 #game-root.ui-rpg .rpg-window .career-milestones{grid-column:1/-1;display:flex!important;justify-content:space-between}
 #game-root.ui-rpg .rpg-window .career-milestones>*{min-width:0!important}
}

/* Dossier: equipment and stats are primary; identity must not consume the viewport. */
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #bag-roster{padding:0!important;margin:0!important;gap:4px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #bag-roster>button{min-height:38px!important;padding:3px!important;transform:none!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #bag-roster img{width:22px!important;height:26px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .avant-identity>small{letter-spacing:1px!important;font-size:9px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-name h3{font-size:24px!important;margin:3px 0!important;gap:8px!important;letter-spacing:1px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-name h3 em{font-size:11px!important;letter-spacing:0!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .avant-identity>span{font-size:11px!important;letter-spacing:0!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .avant-level>b{font-size:26px!important;font-style:normal!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .avant-level>small{margin-top:4px!important;font-size:9px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-progression{align-self:stretch!important;box-sizing:border-box;width:100%;display:flex!important;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:8px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-progression>button{float:none!important;margin:0!important;min-height:30px!important;padding:5px 8px!important;order:4;width:100%}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-progression>div{display:flex!important;gap:6px;align-items:center;flex:1;font-size:10px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-progression>div span{display:inline!important;font-size:10px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-progression progress{flex:0 0 100%;margin:0!important;height:3px!important}
#game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-progression>small{font-size:9px!important}
@media(min-width:801px) and (pointer:fine){
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal):not(.both-open) :is(#character-panel,#ew-trade-character-panel) .gear-panel-scroll{display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)!important;gap:8px 14px!important;align-items:start}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal):not(.both-open) :is(#character-panel,#ew-trade-character-panel) :is(.rpg-help,#bag-roster,#gear-rule){grid-column:1/-1!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal):not(.both-open) :is(#character-panel,#ew-trade-character-panel) #bag-roster{grid-template-columns:repeat(8,minmax(0,1fr))!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal):not(.both-open) :is(#character-panel,#ew-trade-character-panel) #gear-name{grid-column:1!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal):not(.both-open) :is(#character-panel,#ew-trade-character-panel) #gear-progression{grid-column:2!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal):not(.both-open) :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{grid-column:1!important}
 #game-root.ui-rpg :is(#equipment-modal,#ew-trade-equipment-modal):not(.both-open) :is(#character-panel,#ew-trade-character-panel) .gear-insights{grid-column:2!important}
}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #bag-roster>button{flex-direction:row!important;min-height:32px!important;gap:4px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #bag-roster img{width:18px!important;height:24px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) #gear-name{padding:5px 8px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{height:300px!important;min-height:300px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap canvas{height:280px!important;max-height:280px!important}
 #game-root.ui-rpg :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{min-height:52px!important}
}

/* Connected preparation workspace: native controls, one stable navigation context. */
#game-root.ui-workspace #world-shortcuts>.world-shortcut{display:none!important}
#game-root.ui-workspace #world-shortcuts{display:block!important}
#game-root.ui-workspace .ws-main-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;height:100%;align-content:center}
#game-root.ui-workspace .ws-main-nav button{display:flex;align-items:center;justify-content:center;gap:5px;min-height:40px;min-width:0;padding:4px;border:1px solid #897953;border-bottom:3px solid #101c20;border-radius:1px;background:#1b3030;color:#e3d1a5;font:12px EmberLanternText,sans-serif}
#game-root.ui-workspace .ws-main-nav img{width:24px;height:24px;object-fit:contain;image-rendering:pixelated}
#game-root.ui-workspace .ws-main-nav button:disabled{opacity:.45;cursor:default}
#game-root.ui-workspace .ws-panel{display:flex!important;flex-direction:column!important;height:var(--dialog-height)!important;max-height:var(--dialog-height)!important;gap:0!important;overflow:hidden!important;padding:12px!important}
#game-root.ui-workspace .ws-nav{flex:none;padding:0 0 8px;border-bottom:1px solid #81724f;min-width:0}
#game-root.ui-workspace .ws-title-row{display:flex;align-items:center;gap:8px;min-height:34px;margin-bottom:5px}
#game-root.ui-workspace .ws-title-row>strong{color:#e4c88c;font:20px EmberLanternArt,serif;flex:1;min-width:0}
#game-root.ui-workspace .ws-title-row button{font-size:12px;min-height:32px;padding:5px 9px}
#game-root.ui-workspace .ws-title-row button:last-child{min-width:32px;font-size:20px;padding:0 5px}
#game-root.ui-workspace .ws-tabs{display:flex;gap:5px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;min-width:0}
#game-root.ui-workspace .ws-tabs button{flex:0 0 auto;white-space:nowrap;min-height:34px;padding:5px 12px;font-size:12px}
#game-root.ui-workspace .ws-shell{display:flex;gap:10px;flex:1;min-height:0;min-width:0;padding-top:10px}
#game-root.ui-workspace .ws-content{flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-color:#9a8253 #122329;scrollbar-width:thin}
#game-root.ui-workspace .ws-content>header{margin-bottom:8px}
#game-root.ui-workspace .ws-content>header:has(#party-close),#game-root.ui-workspace .ws-content>.modal-head,#game-root.ui-workspace .ws-content>header:has(#skillbook-close),#game-root.ui-workspace .ws-content>header:has(#development-close),#game-root.ui-workspace .ws-content>header:has(#directory-close){display:none!important}
#game-root.ui-workspace .ws-roster{display:flex;flex-direction:column;gap:5px;flex:0 0 132px;min-height:0;overflow:auto;overscroll-behavior:contain;border-right:1px solid #4c6257;padding-right:9px;scrollbar-width:thin}
#game-root.ui-workspace .ws-roster button{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:2px 7px;text-align:left;min-height:56px;flex-shrink:0;padding:5px}
#game-root.ui-workspace .ws-roster img{width:32px;height:40px;object-fit:cover;image-rendering:pixelated;grid-row:1/3}
#game-root.ui-workspace .ws-roster b{font-size:13px}
#game-root.ui-workspace .ws-roster small{font-size:10px;color:#b9c1b1}
#game-root.ui-workspace .ws-panel :is(.party-menu-tabs,#bag-roster,#career-roster,#skillbook-roster,#ai-rule-roster,.gear-workspace-tools,.gear-access-dock){display:none!important}
#game-root.ui-workspace .ws-panel :is(.career-heading>div:first-child,.career-heading>#career-close,.skillbook-dialog>header){display:none!important}
#game-root.ui-workspace .ws-panel .career-heading{display:block!important}
#game-root.ui-workspace .ws-panel .hero-folio-banner{display:none!important}
#game-root.ui-workspace #party-grid{display:block!important;min-height:0!important;margin:8px 0!important}
#game-root.ui-workspace #party-grid>.hero-card:not(.ws-selected-hero){display:none!important}
#game-root.ui-workspace #party-grid .hero-card{max-width:640px!important;margin:auto!important;display:grid!important;grid-template-columns:minmax(180px,.85fr) minmax(140px,1fr);gap:12px;background:#172b2c!important;border:1px solid #5d6953!important;padding:10px!important}
#game-root.ui-workspace #party-grid .hero-card-art{grid-column:1;grid-row:1/4;height:clamp(240px,43vh,430px)!important;aspect-ratio:auto!important;min-height:0!important}
#game-root.ui-workspace #party-grid .hero-card-actions{grid-column:2;display:flex;flex-direction:column;gap:7px;align-self:start}
#game-root.ui-workspace #party-grid .hero-card p{display:block!important;grid-column:2;margin:0;line-height:1.8;color:#c8cbb7;align-self:start}
#game-root.ui-workspace .ws-hero-tools{grid-column:2;display:grid;grid-template-columns:1fr 1fr;gap:6px;align-self:end}
#game-root.ui-workspace #party-modal .party-footer{padding:8px 0;margin-top:8px;border-top:1px solid #5d6953}
#game-root.ui-workspace #party-modal .party-pager{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-content{display:flex;flex-direction:column;overflow:hidden!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .gear-desktop{display:flex!important;flex:1!important;min-height:0!important;height:100%!important;align-items:stretch!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel{height:100%!important;min-height:0!important;max-height:100%!important;flex:1!important;padding:0!important;overflow:hidden!important;display:flex;flex-direction:column}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel[hidden]{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel>header{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel>footer{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel-scroll{flex:1;min-height:0;max-height:100%;overflow:auto!important;padding:8px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{display:flex!important;overflow:hidden!important;gap:6px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll>:not(.rpg-bag-browser){flex-shrink:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{display:grid!important;grid-template-columns:minmax(180px,.9fr) minmax(220px,1.1fr)!important;flex:1!important;min-height:0!important;gap:10px!important;overflow:hidden}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .bag-storage{display:flex;flex-direction:column;max-height:none!important;min-height:0;overflow:hidden!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items){overflow:auto!important;min-height:0;overscroll-behavior:contain;align-content:start;grid-template-columns:repeat(auto-fill,minmax(145px,1fr))!important;padding-right:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .rpg-bag-detail{min-height:0!important;max-height:100%;overflow:hidden!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-detail,#ew-trade-bag-detail){flex:1;min-height:0!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain;padding:10px!important;font-size:12px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) #bag-action{flex:none;display:flex;flex-wrap:wrap;gap:5px;padding:6px!important;border-top:1px solid #6f7759;background:#203432}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) #bag-action button{flex:1;min-height:38px;font-size:12px;min-width:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-search>small{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-mode-bar{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:thin}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-mode-bar button{flex:none;white-space:nowrap}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-secondary-filters{gap:6px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .rpg-help{flex:none}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) #bag-status{font-size:11px;line-height:1.4;max-height:44px;overflow:auto;margin:0}
#game-root.ui-workspace .ws-building-layout{display:grid;grid-template-columns:170px minmax(0,1fr);gap:12px;min-height:0;flex:1;overflow:hidden}
#game-root.ui-workspace [data-ws-route=buildings]>.ws-shell>.ws-content{display:flex;flex-direction:column;overflow:hidden}
#game-root.ui-workspace .ws-building-list{display:flex;flex-direction:column;gap:6px;overflow:auto;min-height:0}
#game-root.ui-workspace .ws-building-list button{display:grid;grid-template-columns:45px 1fr;gap:4px;text-align:left;min-height:65px;flex-shrink:0;align-items:center;padding:6px}
#game-root.ui-workspace .ws-building-list img{width:42px;height:45px;object-fit:cover;image-rendering:pixelated;grid-row:1/3}
#game-root.ui-workspace .ws-building-list b{font-size:12px}
#game-root.ui-workspace .ws-building-list small{font-size:10px}
#game-root.ui-workspace #development-cards{display:block!important;overflow:auto;min-height:0;overscroll-behavior:contain}
#game-root.ui-workspace #development-cards .development-card:not(.ws-selected-building){display:none!important}
#game-root.ui-workspace #development-cards .development-card{display:flex;flex-wrap:wrap;gap:15px;align-items:start;padding:15px}
#game-root.ui-workspace #development-cards .building-vignette{max-width:190px;flex:1 1 130px}
#game-root.ui-workspace #development-cards .development-card>div{flex:1 1 200px;min-width:0}
#game-root.ui-workspace #development-cards button{width:100%;min-height:42px}
#game-root.ui-workspace #development-status{flex:none;font-size:12px;margin:6px 0}
#game-root.ui-workspace [data-ws-route=buildings] .reward-guide{flex:none;max-height:140px;overflow:auto}
#game-root.ui-workspace .ws-unsaved{flex:none;padding:10px;background:#463a24;border:1px solid #bf9f60;color:#f0dbac}
#game-root.ui-workspace .ws-unsaved p{margin:0 0 6px}
#game-root.ui-workspace .ws-unsaved button{margin-right:6px;min-height:38px;font-size:12px}
#game-root.ui-workspace .ws-busy .ws-shell{opacity:.6;pointer-events:none}
#game-root.ui-workspace .ws-busy .ws-nav{pointer-events:none}
/* Semantic navigation is queued; economic controls still wait for confirmation. */
#game-root.ui-workspace .ws-busy :is(.ws-nav,.ws-shell) [data-ws-go]{pointer-events:auto}
/* The map and its selected destination remain visible together. */
#game-root.ui-workspace [data-ws-group=map] .ws-content{display:flex;flex-direction:column;overflow:hidden}
#game-root.ui-workspace [data-ws-group=map] :is(.world-atlas-header,.regional-header){flex:none}
#game-root.ui-workspace [data-ws-group=map] :is(.world-atlas-layout,.regional-layout){flex:1;min-height:0;overflow:hidden;align-items:stretch!important}
#game-root.ui-workspace [data-ws-group=map] :is(.atlas-info,.regional-detail){min-height:0;overflow:auto!important;max-height:100%!important;overscroll-behavior:contain}
#game-root.ui-workspace [data-ws-group=map] :is(.world-atlas-left,.regional-landscape){min-height:0;overflow:auto;overscroll-behavior:contain}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace .ws-main-nav{gap:3px}
 #game-root.ui-workspace .ws-main-nav button{min-height:29px;font-size:10px;gap:3px;padding:2px}
 #game-root.ui-workspace .ws-main-nav img{width:18px;height:18px}
 #game-root.ui-workspace .ws-panel{padding:8px!important}
 #game-root.ui-workspace .ws-title-row{gap:4px;min-height:30px;margin-bottom:4px}
 #game-root.ui-workspace .ws-title-row>strong{font-size:16px}
 #game-root.ui-workspace .ws-title-row button{font-size:10px;min-height:30px!important;padding:3px 5px!important}
 #game-root.ui-workspace .ws-tabs{gap:4px}
 #game-root.ui-workspace .ws-tabs button{min-height:32px!important;font-size:11px!important;padding:4px 8px!important}
 #game-root.ui-workspace .ws-shell{gap:6px;padding-top:7px}
 #game-root.ui-workspace .ws-roster{flex-basis:61px;padding-right:4px;gap:4px}
 #game-root.ui-workspace .ws-roster button{display:flex;flex-direction:column;gap:2px!important;align-items:center;text-align:center;padding:4px 2px!important;min-height:66px!important}
 #game-root.ui-workspace .ws-roster img{width:24px;height:28px}
 #game-root.ui-workspace .ws-roster b{font-size:11px}
 #game-root.ui-workspace .ws-roster small{font-size:9px}
 #game-root.ui-workspace #party-grid .hero-card{display:flex!important;flex-direction:column;padding:6px!important;gap:7px}
 #game-root.ui-workspace #party-grid .hero-card-art{width:100%;height:280px!important;flex:none}
 #game-root.ui-workspace #party-grid .hero-card-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:5px;width:100%}
 #game-root.ui-workspace #party-grid .hero-card p{font-size:11px;line-height:1.5}
 #game-root.ui-workspace .ws-hero-tools{grid-template-columns:1fr 1fr;gap:5px;width:100%}
 #game-root.ui-workspace .ws-hero-tools button{font-size:11px!important;padding:4px!important;min-height:34px!important}
 #game-root.ui-workspace #party-modal .party-footer button{flex:1;min-width:0;font-size:11px}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{grid-template-columns:minmax(95px,.42fr) minmax(0,.58fr)!important;gap:6px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .gear-panel-scroll{padding:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items){display:flex!important;flex-direction:column;gap:5px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item{flex:none;display:grid!important;grid-template-columns:25px minmax(0,1fr)!important;min-height:61px!important;padding:5px 3px!important;gap:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item :is(img,.gear-pixel-icon){width:25px!important;height:29px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item b{font-size:10px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-item small{font-size:9px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-detail,#ew-trade-bag-detail){padding:7px!important;font-size:11px!important;line-height:1.6}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-detail,#ew-trade-bag-detail) :is(h3,.item-heading h3){font-size:14px!important;line-height:1.45!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-detail,#ew-trade-bag-detail) .item-heading{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-detail,#ew-trade-bag-detail) .item-heading img{height:32px;width:32px}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) #bag-action{padding:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) #bag-action button{min-height:36px!important;font-size:10px!important;padding:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-wallet :is(span,b){font-size:11px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-wallet .resource-icon{width:20px!important;height:20px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-mode-bar button{font-size:11px!important;min-height:30px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-secondary-filters{font-size:10px!important;gap:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-secondary-filters select{font-size:12px!important;max-width:110px}
 #game-root.ui-workspace :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{grid-template-columns:47px minmax(45px,1fr) 47px!important;gap:3px!important}
 #game-root.ui-workspace :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{min-height:48px!important;padding:2px!important;gap:1px!important}
 #game-root.ui-workspace :is(#character-panel,#ew-trade-character-panel) .gear-slot b{font-size:9px!important;overflow-wrap:anywhere}
 #game-root.ui-workspace :is(#character-panel,#ew-trade-character-panel) .gear-slot small{font-size:8px!important;letter-spacing:0!important}
 #game-root.ui-workspace :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{height:270px!important;min-height:270px!important}
 #game-root.ui-workspace :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap canvas{height:250px!important}
 #game-root.ui-workspace :is(#character-panel,#ew-trade-character-panel) .gear-insights{padding:5px!important}
 #game-root.ui-workspace :is(#character-panel,#ew-trade-character-panel) #bag-stats .stat-group{grid-template-columns:1fr!important;padding:7px!important}
 #game-root.ui-workspace .ws-building-layout{grid-template-columns:85px minmax(0,1fr);gap:7px}
 #game-root.ui-workspace .ws-building-list button{display:flex;flex-direction:column;align-items:center;text-align:center;min-height:79px!important;padding:5px!important;gap:3px}
 #game-root.ui-workspace .ws-building-list img{width:48px;height:35px}
 #game-root.ui-workspace .ws-building-list b{font-size:10px}
 #game-root.ui-workspace #development-cards .development-card{padding:8px;gap:8px}
 #game-root.ui-workspace #development-cards .building-vignette{max-width:100%;height:100px;min-width:0;flex-basis:100%}
 #game-root.ui-workspace #development-cards .building-cost{font-size:10px;line-height:1.6}
 #game-root.ui-workspace #development-cards :is(h3,p){font-size:12px;line-height:1.6;margin:5px 0}
 #game-root.ui-workspace #development-wallet .resource-icon{width:20px;height:20px}
 #game-root.ui-workspace #development-wallet{gap:5px;font-size:11px}
 #game-root.ui-workspace .development-lede{font-size:10px;line-height:1.4;margin:0 0 7px}
 #game-root.ui-workspace #development-status{font-size:10px;max-height:44px;overflow:auto}
 #game-root.ui-workspace [data-ws-group=map] :is(.world-atlas-layout,.regional-layout){display:flex!important;flex-direction:column!important;gap:8px}
 #game-root.ui-workspace [data-ws-group=map] :is(.world-atlas-left,.regional-landscape){flex:0 1 42%;min-height:100px!important}
 #game-root.ui-workspace [data-ws-group=map] :is(.atlas-info,.regional-detail){flex:1;min-height:110px!important;padding:8px!important}
 #game-root.ui-workspace [data-ws-group=map] .atlas-regions{display:flex;overflow-x:auto;flex-wrap:nowrap}
 #game-root.ui-workspace [data-ws-group=map] .atlas-regions button{flex:none}
 #game-root.ui-workspace .ws-unsaved{padding:7px;font-size:11px}
 #game-root.ui-workspace .ws-unsaved button{font-size:10px!important;min-height:32px!important;padding:4px!important}
}

#game-root.ui-workspace .ws-panel[data-ws-route=bag] :is(#character-panel,#ew-trade-character-panel){display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#character-panel,#ew-trade-character-panel) #bag-roster{display:none!important}

#game-root.ui-workspace #party-grid .hero-card-art{background-image:var(--ws-portrait)!important;background-size:var(--ws-portrait-size)!important;background-position:var(--ws-portrait-position)!important;background-repeat:no-repeat!important}
#game-root.ui-workspace [data-ws-group=map] :is(.world-atlas-header,.regional-header){display:none!important}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .native-gear-window.ws-panel{flex-wrap:nowrap!important;align-items:stretch!important;align-content:normal!important}
#game-root.ui-workspace .ws-panel>.ws-nav,#game-root.ui-workspace .ws-panel>.ws-shell{width:100%;box-sizing:border-box}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{align-items:stretch!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-detail{height:100%;max-height:100%;min-height:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .bag-mode-bar{flex-wrap:nowrap!important;overflow-x:auto!important;min-width:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .bag-mode-bar button{flex:0 0 auto!important}
#game-root.ui-workspace [data-ws-group=map] .regional-header{display:none!important}
#game-root.ui-workspace [data-ws-group=map] .regional-detail{min-height:0!important;overflow:auto!important;max-height:100%!important;margin:0!important}
#game-root.ui-workspace [data-ws-group=map] .regional-footer{margin:5px 0 0;font-size:10px;line-height:1.4;flex:none}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace [data-ws-group=map] :is(.world-atlas-left,.regional-landscape){flex:0 0 45%;min-height:0!important;overflow:auto!important}
 #game-root.ui-workspace [data-ws-group=map] :is(.atlas-info,.regional-detail){flex:1 1 0;min-height:0!important;overflow:auto!important}
 #game-root.ui-workspace [data-ws-group=map] .regional-summary{padding:4px 0;font-size:10px}
 #game-root.ui-workspace [data-ws-group=map] .regional-legend{font-size:9px;padding:4px}
 #game-root.ui-workspace [data-ws-group=map] #regional-stops{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:3px}
 #game-root.ui-workspace [data-ws-group=map] #regional-stops button{flex:0 0 auto;min-height:30px!important;font-size:10px!important;padding:4px!important}
 #game-root.ui-workspace [data-ws-group=map] .regional-map-note{display:none!important}
}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-detail,#ew-trade-bag-detail){flex:1 1 0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-filters,#ew-trade-bag-filters){display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;scrollbar-width:thin;min-width:0!important;gap:4px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-filters,#ew-trade-bag-filters) button{flex:0 0 auto!important;white-space:nowrap!important}
#game-root.ui-workspace #map-modal #map-cards .regional-node{transform:translate(-50%,-30%)!important}

#game-root.ui-workspace #world-atlas-modal .atlas-pin{transform:translate(-50%,-50%)!important}

#game-root.ui-workspace .ws-bag-filters{display:contents}
@media(min-width:600px) and (max-height:600px){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{display:grid!important;grid-template-columns:165px minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr)!important;gap:7px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .bag-wallet{grid-column:1/-1!important;grid-row:1!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .ws-bag-filters{display:flex;flex-direction:column;grid-column:1!important;grid-row:2!important;gap:6px;min-height:0;overflow:auto!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .ws-bag-filters>*{flex-shrink:0!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .ws-bag-filters .bag-search{display:flex;flex-wrap:wrap}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .ws-bag-filters :is(#bag-filters,#ew-trade-bag-filters){flex-wrap:wrap!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{grid-column:2!important;grid-row:2!important;grid-template-columns:minmax(120px,.9fr) minmax(145px,1.1fr)!important;height:100%!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items){grid-template-columns:1fr!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .bag-secondary-filters{flex-wrap:wrap!important}
}

/* Compact inventory and opt-in guidance. These are presentation preferences only. */
#game-root.lantern-hints-off :is(.rpg-help,.dengtuan-guide){display:none!important}
#game-root #menu-dengtuan{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel)>header,
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel)>footer,
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) #bag-mode-note{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items){display:grid!important;grid-template-columns:repeat(auto-fill,minmax(70px,1fr))!important;grid-auto-rows:max-content!important;gap:5px!important;align-content:start!important;align-items:start!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item{position:relative;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:3px!important;min-height:0!important;height:78px!important;min-width:0!important;width:100%!important;margin:0!important;padding:4px!important;border:1px solid var(--rarity-color,#667c70)!important;border-bottom:3px solid var(--rarity-color,#667c70)!important;overflow:hidden!important;text-align:center!important;box-sizing:border-box!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item :is(img,.gear-pixel-icon,.resource-icon){flex:none!important;width:38px!important;height:38px!important;max-width:100%!important;object-fit:contain!important;margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item b{font-size:11px!important;line-height:13px!important;min-width:0!important;width:100%;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden!important;overflow-wrap:anywhere!important;text-align:center!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item small{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) .bag-item[data-item-count]::after{content:attr(data-item-count);position:absolute;right:2px;top:2px;color:#fff0c9;background:#102328dd;padding:1px 3px;font:10px/12px EmberLanternText,sans-serif;pointer-events:none}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) .ws-item-equipped::before{content:'✓';position:absolute;left:2px;top:2px;color:#b7e8b4;background:#122e24e8;font:12px/14px sans-serif;z-index:1;pointer-events:none}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) .bag-item[aria-pressed=true]{outline:1px solid #f0d79a!important;outline-offset:-3px;background-color:#465542!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-empty-result{grid-column:1/-1}
@media(max-width:800px),(pointer:coarse){
 #game-root kbd{display:none!important}
 #game-root .book-passive-slot kbd,#game-root .career-branch kbd{display:block!important}
 #game-root .career-branch kbd{display:inline!important}
 #game-root .help-keys,#game-root .battle-status .movement{display:none!important}
 #game-root.ui-workspace .rpg-window :is(.ws-tabs,.career-tabs,.codex-tabs,#book-tabs,#help-tabs,#service-tabs,:is(#bag-filters,#ew-trade-bag-filters),.party-menu-tabs,#atlas-region-list,#regional-stops){display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;min-width:0!important;max-width:100%!important;gap:4px!important;scrollbar-width:thin;overscroll-behavior-x:contain}
 #game-root.ui-workspace .rpg-window :is(.ws-tabs,.career-tabs,.codex-tabs,#book-tabs,#help-tabs,#service-tabs,:is(#bag-filters,#ew-trade-bag-filters),.party-menu-tabs,#atlas-region-list,#regional-stops)>button{flex:0 0 auto!important;white-space:nowrap!important;width:auto!important;max-width:none!important}
 #game-root.ui-workspace .ws-panel .party-menu-tabs{display:none!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items){grid-template-columns:repeat(auto-fill,minmax(44px,1fr))!important;gap:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item{height:65px!important;padding:3px!important;gap:2px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item :is(img,.gear-pixel-icon,.resource-icon){width:31px!important;height:31px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item b{font-size:9px!important;line-height:12px!important}
}
/* Expedition loadout: native character slots and shared inventory stay side by side. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-desktop{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr)!important;gap:10px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-panel{min-width:0!important;width:auto!important;flex:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{display:flex!important;flex-direction:column!important;gap:5px!important;padding:6px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(100px,1fr) minmax(100px,.8fr)!important;gap:6px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-detail{border-top:1px solid #7c7754;padding-top:4px}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .ws-bag-filters{display:contents!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{grid-template-columns:80px minmax(60px,1fr) 80px!important;gap:5px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{min-height:58px!important;padding:3px!important;gap:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot b{font-size:10px!important;line-height:1.3!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot img{width:30px!important;height:30px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{height:360px!important;min-height:300px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap canvas{max-width:100%!important;object-fit:contain!important}
#game-root.ui-workspace .ws-drag-hint{display:block;color:#c7c5a8;font-size:11px;line-height:1.5;margin-top:5px}
#game-root .ws-drag-source{cursor:grab!important;user-select:none;-webkit-user-select:none}
#game-root .ws-drag-source :is(img,.gear-pixel-icon,.resource-icon){touch-action:none;-webkit-user-drag:none;user-select:none}
#game-root .ws-drop-target{outline:2px solid #ead292!important;outline-offset:-2px!important;background-color:#375447!important}
.ws-drag-ghost{position:fixed;width:56px;height:56px;z-index:2147483646;pointer-events:none;padding:5px;background:#172f2ef0;border:2px solid #ead292;box-shadow:0 5px 15px #0008}
.ws-drag-ghost :is(img,.gear-pixel-icon){width:100%!important;height:100%!important;object-fit:contain;image-rendering:pixelated}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear]>.ws-shell{flex-direction:column!important;gap:5px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster{flex:0 0 55px!important;flex-direction:row!important;border-right:0;border-bottom:1px solid #4c6257;padding:0 0 3px!important;overflow-y:hidden!important;overflow-x:auto!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster button{min-height:0!important;min-width:42px;gap:1px!important;padding:2px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster img{height:22px;width:22px}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster small{display:none}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-desktop{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)!important;gap:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-panel-scroll{padding:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:4px!important;position:relative}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{display:none!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{min-height:52px!important;width:100%!important;padding:2px!important;display:flex!important;flex-direction:column!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot b{display:none!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot small{font-size:9px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot img{height:28px!important;width:28px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-unequip{min-height:22px!important;padding:1px!important;font-size:9px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{padding:3px!important;gap:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{grid-template-rows:minmax(75px,1fr) minmax(70px,.85fr)!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items){grid-template-columns:repeat(auto-fill,minmax(43px,1fr))!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-search{gap:3px!important;flex-wrap:wrap!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-search input{width:100%!important;min-width:0!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) :is(.bag-secondary-filters,.bag-wallet){font-size:9px!important;gap:2px!important;flex-wrap:wrap!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-secondary-filters select{max-width:84px!important;font-size:10px!important;padding:2px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail){padding:5px!important;font-size:10px!important}
 #game-root.ui-workspace .ws-drag-hint{font-size:10px;line-height:1.4}
}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-panel,
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-panel-scroll{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;justify-self:stretch!important;margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-desktop{justify-content:stretch!important}
#game-root .ws-drag-source :is(img,.gear-pixel-icon,.resource-icon){pointer-events:auto!important}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-search{display:grid!important;grid-template-columns:minmax(0,1fr) 30px!important;gap:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-search :is(input,button){margin:0!important;min-height:32px!important;height:32px!important;padding:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-search button{font-size:9px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-mode-bar{display:none!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-name{padding:5px!important;min-height:54px!important;gap:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-name h3{font-size:18px!important;margin:2px 0!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-name .avant-identity>small{display:none!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-name .avant-level b{font-size:22px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-progression{padding:5px!important;gap:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-progression :is(button,b,span,small){font-size:9px!important;line-height:1.4!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-progression button{min-height:28px!important;padding:3px!important}
}
#game-root.ui-workspace .ws-filter-toggle{display:none!important}
@media(max-height:540px){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear]>.ws-nav{padding-bottom:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-title-row{min-height:26px!important;margin-bottom:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-title-row>strong{font-size:16px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-title-row button{height:26px!important;min-height:26px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-tabs button{min-height:28px!important;padding:3px 6px!important;font-size:11px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-drag-hint{display:none!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear]>.ws-shell{flex-direction:row!important;padding-top:5px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster{flex:0 0 52px!important;flex-direction:column!important;overflow-y:auto!important;overflow-x:hidden!important;border-right:1px solid #4c6257;border-bottom:0;padding-right:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster button{display:flex!important;flex-direction:column!important;text-align:center!important;min-height:48px!important;padding:2px!important;gap:1px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster img{width:22px!important;height:24px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster b{font-size:10px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster small{display:none!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-filter-toggle{display:block!important;min-height:25px!important;padding:2px!important;font-size:10px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-filters=false] :is(#inventory-panel,#ew-trade-inventory-panel) :is(.bag-search,.bag-secondary-filters,.bag-mode-bar){display:none!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{overflow:auto!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{min-height:170px!important;flex:1 0 170px!important;grid-template-rows:minmax(80px,1fr) minmax(70px,.8fr)!important}
}
@media(max-height:540px){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-filters,#ew-trade-bag-filters){display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-filters,#ew-trade-bag-filters) button{flex:0 0 auto!important;white-space:nowrap!important;min-height:27px!important;padding:3px 6px!important;font-size:10px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items){grid-template-columns:repeat(auto-fill,minmax(50px,1fr))!important;gap:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item{height:65px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item img{width:30px!important;height:30px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-name{padding:4px!important;min-height:48px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-name .avant-identity>small{display:none!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-name h3{font-size:18px!important;margin:1px 0!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-name .avant-level b{font-size:22px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-progression{padding:3px!important;gap:2px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-progression :is(button,b,small,span){font-size:9px!important;line-height:1.3!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-progression button{min-height:25px!important;padding:2px!important}
}
@media(max-height:540px){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) .ws-bag-filters :is(#bag-filters,#ew-trade-bag-filters){flex-wrap:nowrap!important;overflow-x:auto!important}
}
/* Compact field HUD and shared recovery theme. Native game controls remain authoritative. */
#game-root #town-ui-actions,#game-root .mission-panel,#game-root .stage-hud .stage-objective,#game-root .item-deck .deck-caption,#game-root .loadout-deck>.deck-caption,#game-root .loadout-deck>.book-manage{display:none!important}
#game-root .stage-hud>:not(.minimap-panel){display:none!important}
#game-root .loadout-deck{grid-template-rows:minmax(0,1fr)!important}
#game-root #mobile-depart,#game-root #combat-quick-actions button{border:1px solid #a38c5b!important;border-bottom:3px solid #101e21!important;border-radius:1px!important;background:#1b3030!important;color:#e9d4a0!important;font:13px/1.4 EmberLanternText,"Microsoft YaHei",sans-serif!important;padding:6px 10px!important;min-height:34px;box-shadow:inset 0 0 0 2px #273f39}
#game-root #next-button{display:none!important}
#game-root #combat-quick-actions{position:absolute;left:8px;display:flex;gap:6px;z-index:55}
#game-root #combat-quick-actions[hidden]{display:none!important}
#game-root .ws-dock-symbol{display:inline-grid;place-items:center;width:24px;height:24px;background:#233f39;color:#e9ce8f;border:1px solid #8a805c;font-size:21px;line-height:1}
#shadow-recovery>section{border:2px solid #93815a!important;border-radius:2px!important;background:#162b2e!important;color:#e3d3ad!important;box-shadow:0 12px 60px #000b,inset 0 0 0 4px #243b38!important;font-family:EmberLanternText,"Microsoft YaHei",sans-serif!important}
#shadow-recovery h2{color:#e6c88e!important;font-family:EmberLanternArt,serif!important}
#shadow-recovery button{border:1px solid #a48c5c!important;border-radius:1px!important;background:#254138!important;color:#ead7ad!important;padding:10px 16px!important}
#shadow-recovery .recovery-steps li{border-radius:0!important;background:#1b3434!important;color:#aabeb1!important}
#shadow-recovery .recovery-steps li[data-state=current]{border-color:#bd9b58!important;color:#f0d795!important}
#connection-status a{display:inline-block;margin-left:10px;color:#f4d183;text-decoration:underline}
@media(max-width:800px),(pointer:coarse){
 #game-root.responsive-combat-hud{--mobile-skill-height:96px!important}
 #game-root .loadout-deck,#game-root .item-deck{height:var(--mobile-skill-height)!important;--skills-height:var(--mobile-skill-height)!important}
 #game-root .player-card{padding:5px 6px 4px 48px!important;overflow:hidden!important}
 #game-root .player-card .fighter-heading>.portrait{left:5px!important;top:9px!important;width:36px!important;height:46px!important;object-fit:contain}
 #game-root .player-card .fighter-info{position:absolute!important;left:48px!important;right:6px!important;top:5px!important;bottom:auto!important;min-width:0!important}
 #game-root .player-card .hero-orb{display:block!important;height:15px!important;min-height:15px!important;font-size:12px!important;line-height:15px!important;padding:0!important;text-align:left!important;background:none!important;border:0!important;border-radius:0!important;white-space:nowrap!important}
 #game-root .player-card .hero-orb>*{font-size:12px!important;line-height:15px!important}
 #game-root .player-card .character-level-hud{position:absolute!important;left:48px!important;right:6px!important;bottom:5px!important;height:15px!important;max-width:calc(100% - 54px)!important;display:flex!important;align-items:center;gap:3px!important;padding:0!important}
 #game-root .player-card .character-level-hud progress{width:0!important;flex:1;min-width:12px;height:5px!important}
 #game-root .player-card .character-level-hud small{display:none!important}
 #game-root #combat-quick-actions button{font-size:11px!important;min-height:29px!important;padding:4px 7px!important}
 #game-root .ws-roster button{min-height:42px!important}
 #game-root .ws-roster :is(b,small){display:none!important}
 #game-root .ws-main-nav button{font-size:9px!important}
}
#game-root #mobile-depart:not([hidden]){display:block!important;position:absolute!important;z-index:51;text-align:center}
#account-modal.game-ready-dialog .wallet-panel{background:#162b2e!important;border:2px solid #93815a!important;border-radius:2px!important;box-shadow:0 12px 60px #000b,inset 0 0 0 4px #243b38!important;color:#e3d3ad!important;font-family:EmberLanternText,"Microsoft YaHei",sans-serif!important}
#account-modal.game-ready-dialog :is(.pass-check,.wallet-address,.account-actions button){border-radius:1px!important;background:#203a35!important;border-color:#8e8059!important;color:#e9d6aa!important}
@media(max-width:800px),(pointer:coarse){
 #game-root .player-card .fighter-heading>div:nth-child(2){position:absolute!important;left:48px!important;right:5px!important;top:5px!important;height:14px!important;text-align:left;line-height:14px!important}
 #game-root .player-card .fighter-heading>div:nth-child(2)>b{display:block!important;font-size:12px!important;line-height:14px!important;white-space:nowrap!important}
 #game-root .player-card .fighter-heading>div:nth-child(2)>small,#game-root .player-card .fighter-state{display:none!important}
 #game-root .player-card .fighter-info{top:22px!important}
 #game-root .player-card .hero-orb,#game-root .player-card .hero-orb>*{font-size:8px!important;line-height:10px!important;height:10px!important;min-height:10px!important}
 #game-root .ws-main-nav button{flex-direction:column!important;gap:1px!important;font-size:8px!important;line-height:10px!important;min-height:0!important;padding:2px!important;white-space:nowrap}
 #game-root .ws-main-nav :is(img,.ws-dock-symbol){height:15px!important;width:15px!important;font-size:13px!important}
}

#game-root.ui-workspace .ws-main-nav{grid-template-columns:repeat(4,minmax(0,1fr))}
#game-root .ws-dock-symbol svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:miter;shape-rendering:crispEdges}

#game-root.ui-workspace .ws-main-nav button{flex-direction:column;gap:2px;white-space:nowrap;font-size:11px}

@media(max-width:800px),(pointer:coarse){#game-root .player-card .fighter-heading>div:nth-child(2){top:10px!important}#game-root .player-card .fighter-info{top:26px!important}}

#game-root #potions,#game-root .bottle-counts{display:none!important}
@media(max-width:800px),(pointer:coarse){
 #game-root.responsive-combat-hud .minimap-panel{padding-top:calc(24px / var(--map-hud-scale,1))!important}
 #game-root.responsive-combat-hud .player-card .fighter-heading>div:nth-child(2){top:2px!important}
 #game-root.responsive-combat-hud .player-card .fighter-info{top:18px!important}
 #game-root.responsive-combat-hud .player-card .hero-orb,#game-root.responsive-combat-hud .player-card .hero-orb>*{height:8px!important;min-height:8px!important;line-height:8px!important;font-size:8px!important}
 #game-root.responsive-combat-hud .player-card .fighting-gauges{gap:1px!important;margin-top:1px!important}
 #game-root.responsive-combat-hud .player-card .fighting-gauges>span{height:8px!important;line-height:8px!important;font-size:7px!important}
}

/* Narrow the seams between HUD regions; the recovered space belongs to the field. */
@media(min-width:801px) and (pointer:fine){#game-root .world-hud.hero-ui{--dock-gap:6px;--dock-edge:10px}}
@media(max-width:800px),(pointer:coarse){
 #game-root.responsive-combat-hud .world-hud.hero-ui{--mobile-dock:calc(var(--status-height) + var(--skills-height) + 8px + env(safe-area-inset-bottom))}
 #game-root.responsive-combat-hud .action-deck.loadout-deck{left:4px!important;right:90px!important;bottom:calc(var(--status-height) + 6px + env(safe-area-inset-bottom))!important}
 #game-root.responsive-combat-hud .item-deck{right:4px!important;bottom:calc(var(--status-height) + 6px + env(safe-area-inset-bottom))!important}
 #game-root.responsive-combat-hud .arena-wrap>.player-card{left:4px!important;width:calc(50% - 6px)!important;bottom:calc(4px + env(safe-area-inset-bottom))!important}
 #game-root.responsive-combat-hud #world-shortcuts{left:calc(50% + 2px)!important;right:4px!important;bottom:calc(4px + env(safe-area-inset-bottom))!important}
}
#game-root #mobile-depart{margin:0!important}
@media(max-height:540px) and (pointer:coarse){
 #game-root.responsive-combat-hud .player-card .fighter-heading>div:nth-child(2){top:0!important;height:12px!important}
 #game-root.responsive-combat-hud .player-card .fighter-heading>div:nth-child(2)>b{font-size:11px!important;line-height:12px!important}
 #game-root.responsive-combat-hud .player-card .fighter-info{top:16px!important}
 #game-root.responsive-combat-hud .player-card .hero-orb,#game-root.responsive-combat-hud .player-card .hero-orb>*{height:6px!important;min-height:6px!important;line-height:6px!important;font-size:6px!important}
 #game-root.responsive-combat-hud .player-card .fighting-gauges>span{height:6px!important;line-height:6px!important;font-size:6px!important}
}

#game-root.responsive-combat-hud .book-controls{grid-row:1!important;align-self:center!important}
#game-root .book-innate>span{display:none!important}
#game-root.responsive-combat-hud .item-deck{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:0!important;--slot:var(--skill-size,26px)}
#game-root.responsive-combat-hud .item-deck .item-row{display:grid!important;grid-template-columns:repeat(2,var(--skill-size,26px))!important;grid-template-rows:repeat(2,var(--skill-size,26px))!important;gap:var(--skill-gap,2px)!important;align-content:center!important;justify-content:center!important;margin:0!important;width:auto!important;height:auto!important}
#game-root.responsive-combat-hud .item-row>:is(button,.supply-empty){width:var(--skill-size,26px)!important;height:var(--skill-size,26px)!important;min-width:0!important;min-height:0!important;max-height:none!important;padding:1px!important;box-sizing:border-box!important}
#game-root.responsive-combat-hud .item-row .skill-icon{width:100%!important;height:100%!important;padding:1px!important}
#game-root.responsive-combat-hud .item-row .skill-icon img{width:100%!important;height:100%!important;object-fit:contain!important}
#game-root.responsive-combat-hud .item-quantity{font-size:clamp(7px,calc(var(--skill-size,26px)*.3),12px)!important;line-height:1!important}

/* Hero pool uses already-loaded game models, never large selection posters. */
#game-root.ui-workspace #party-modal .ws-shell{flex-direction:column;gap:8px}
#game-root.ui-workspace #party-modal .ws-hero-pool{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr));width:100%;max-width:none;flex:none;gap:6px;padding:0;overflow:visible}
#game-root.ui-workspace #party-modal .ws-hero-pool button{display:grid;grid-template-columns:auto 1fr;align-items:center;min-width:0;padding:5px;gap:3px;position:relative}
#game-root.ui-workspace #party-modal .ws-hero-pool img{grid-row:1/3;width:36px;height:36px;object-fit:cover;image-rendering:pixelated}
#game-root.ui-workspace #party-modal .ws-hero-pool b{display:block;font-size:12px}
#game-root.ui-workspace #party-modal .ws-hero-pool small{display:block;font-size:10px;white-space:nowrap}
#game-root.ui-workspace #party-modal .party-lede,#game-root.ui-workspace #party-grid .hero-card-art{display:none!important}
#game-root.ui-workspace #party-grid>.hero-card.ws-selected-hero{display:flex!important;flex-direction:column;max-width:none;gap:8px;padding:10px}
#game-root.ui-workspace #party-grid .hero-card>p{margin:0;font-size:12px;line-height:1.5}
#game-root.ui-workspace #party-grid .hero-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
#game-root.ui-workspace .ws-hero-overview{display:grid;grid-template-columns:minmax(140px,.55fr) minmax(240px,1.45fr);gap:12px;min-width:0}
#game-root.ui-workspace .ws-hero-identity{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;background:radial-gradient(ellipse at center,#53614833,transparent 70%)}
#game-root.ui-workspace #party-model{display:block;width:auto;max-width:100%;height:230px;object-fit:contain;image-rendering:pixelated}
#game-root.ui-workspace .ws-hero-identity h3{margin:0;color:#e1ca91}
#game-root.ui-workspace .ws-hero-identity small{margin-top:4px;text-align:center}
#game-root.ui-workspace .ws-hero-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-width:0;align-content:start}
#game-root.ui-workspace .ws-overview-section{min-width:0;padding:8px;background:#101d20;border:1px solid #536052;display:flex;flex-direction:column;gap:5px}
#game-root.ui-workspace .ws-overview-section>button{text-align:left;color:#e7d4a4;padding:5px 8px;min-height:30px;font-size:13px}
#game-root.ui-workspace .ws-overview-section p{margin:0;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
#game-root.ui-workspace .ws-overview-section small{font-size:11px;line-height:1.6;overflow-wrap:anywhere}
#game-root.ui-workspace .ws-summary-skills{display:grid;grid-template-columns:repeat(auto-fill,minmax(26px,1fr));gap:3px;align-content:start}
#game-root.ui-workspace .ws-summary-skills img{display:block;width:100%;max-width:32px;aspect-ratio:1;object-fit:contain;image-rendering:pixelated;border:1px solid #71633e}
@media(max-width:700px){
 #game-root.ui-workspace #party-modal .ws-hero-pool{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
 #game-root.ui-workspace #party-modal .ws-hero-pool button{padding:3px;gap:2px}
 #game-root.ui-workspace #party-modal .ws-hero-pool img{width:28px;height:28px}
 #game-root.ui-workspace #party-modal .ws-hero-pool b{font-size:11px}
 #game-root.ui-workspace #party-modal .ws-hero-pool small{font-size:9px}
 #game-root.ui-workspace .ws-hero-overview{grid-template-columns:86px minmax(0,1fr);gap:6px}
 #game-root.ui-workspace #party-model{height:132px;width:96px}
 #game-root.ui-workspace .ws-hero-summary{grid-template-columns:1fr;gap:5px}
 #game-root.ui-workspace .ws-overview-section{padding:5px;gap:3px}
 #game-root.ui-workspace #party-grid>.hero-card.ws-selected-hero{padding:6px}
 #game-root.ui-workspace .ws-hero-identity{justify-content:flex-start;position:sticky;top:0;align-self:start}
 #game-root.ui-workspace .ws-hero-identity h3{font-size:16px}
 #game-root.ui-workspace .ws-hero-identity small{font-size:10px}
}

#game-root.ui-workspace #party-modal .rpg-window .party-menu-tabs{display:none!important}
#game-root.ui-workspace #party-grid>.hero-card.ws-selected-hero{max-width:none!important}
#game-root.ui-workspace #party-modal .party-footer{position:sticky;bottom:0;background:#14272a;z-index:2}
@media(max-width:700px){
 #game-root.ui-workspace #party-modal .ws-hero-pool button{min-height:40px!important;height:40px;padding:3px!important}
 #game-root.ui-workspace #party-modal .ws-hero-pool :is(b,small){display:block!important}
 #game-root.ui-workspace #party-modal .ws-hero-pool{border-right:0}
 #game-root.ui-workspace #party-modal .ws-hero-pool small{font-size:8px}
 #game-root.ui-workspace #party-modal .party-footer{display:grid!important;grid-template-columns:1fr 1fr;gap:5px;padding:5px 0}
 #game-root.ui-workspace #party-modal .party-footer button{min-width:0!important;width:auto!important;padding:5px!important;font-size:11px!important}
}

#game-root.ui-workspace #party-modal #party-error{grid-column:1/-1;margin:0}
#game-root.ui-workspace #party-modal #party-error:empty{display:none}

/* Confirmed party first; edit the native draft only on explicit request. */
#game-root.ui-workspace .ws-roster{flex:0 0 52px!important;width:52px!important;max-width:52px!important;padding:0 5px 0 0!important;border-right:1px solid #4c6257}
#game-root.ui-workspace .ws-roster button{width:42px!important;min-width:42px!important;height:44px!important;min-height:44px!important;padding:3px!important;display:grid!important;place-items:center!important;grid-template-columns:1fr!important;gap:0!important;position:relative}
#game-root.ui-workspace .ws-roster img{grid-row:auto!important;width:32px!important;height:34px!important;object-fit:contain!important}
#game-root.ui-workspace .ws-roster :is(b,small){display:none!important}
#game-root.ui-workspace .ws-roster [data-member-role=leader]:after{content:'◆';position:absolute;right:1px;bottom:0;font-size:8px;color:#f5d47c;line-height:10px}
#game-root.ui-workspace #party-modal [data-party-mode=overview] .ws-shell{flex-direction:row!important;gap:8px}
#game-root.ui-workspace #party-modal [data-party-mode=edit] .ws-shell{flex-direction:column!important}
#game-root.ui-workspace #party-modal .ws-party-members{display:flex!important;flex-direction:column!important;align-items:center;overflow-y:auto!important;overflow-x:hidden!important}
#game-root.ui-workspace #party-modal .ws-hero-pool{display:flex!important;flex-direction:row!important;flex-wrap:wrap;flex:0 0 auto!important;max-width:none!important;width:auto!important;border:0;gap:5px;padding:0!important}
#game-root.ui-workspace #party-modal .ws-hero-pool :is(b,small){display:none!important}
#game-root.ui-workspace #party-modal .ws-hero-pool button{min-height:44px!important;height:44px!important;min-width:42px!important;width:42px!important}
#game-root.ui-workspace #party-modal :is(.party-summary,.party-lineup,#party-count,#party-lineup,.hero-guide-entry),#game-root.ui-workspace #party-grid .hero-card>p{display:none!important}
#game-root.ui-workspace #party-modal [data-party-mode=overview] :is(.hero-card-actions,#party-confirm,.party-behavior){display:none!important}
#game-root.ui-workspace #party-modal [data-party-mode=edit] .ws-hero-summary{display:none!important}
#game-root.ui-workspace #party-modal [data-party-mode=overview] .party-footer{display:flex!important;justify-content:flex-end}
#game-root.ui-workspace #party-modal [data-party-mode=edit] .party-footer{display:flex!important;justify-content:flex-end}
#game-root.ui-workspace #party-modal [data-party-mode=edit] #party-depart{display:none!important}
#game-root.ui-workspace #party-grid{margin:0!important}
#game-root.ui-workspace #party-grid>.hero-card.ws-selected-hero{padding:8px!important;gap:6px!important}
#game-root.ui-workspace .ws-hero-overview{grid-template-columns:minmax(150px,.7fr) minmax(220px,1.3fr);gap:8px;align-items:center}
#game-root.ui-workspace .ws-hero-identity{position:static!important;align-self:center!important;gap:2px}
#game-root.ui-workspace .ws-hero-line{font-size:12px;white-space:nowrap;text-align:center;line-height:1.5}
#game-root.ui-workspace #party-model{height:210px;width:auto;max-width:100%}
#game-root.ui-workspace .ws-hero-summary{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px;align-items:stretch}
#game-root.ui-workspace .ws-overview-section{display:flex!important;flex-direction:column!important;justify-content:center;align-items:flex-start;gap:4px!important;text-align:left!important;min-width:0!important;width:100%;min-height:88px!important;padding:8px!important;white-space:normal!important;font-size:12px!important;line-height:1.4!important;border:1px solid #536052!important;background:#122329!important}
#game-root.ui-workspace .ws-overview-section:disabled{opacity:1}
#game-root.ui-workspace .ws-summary-icons{display:flex;flex-wrap:wrap;gap:3px;align-content:center;min-width:0;max-width:100%}
#game-root.ui-workspace .ws-summary-icons img{display:block;width:28px;height:28px;object-fit:contain;image-rendering:pixelated;border:1px solid #756947}
#game-root.ui-workspace .ws-icon-fallback{font-size:11px;line-height:1.4}
#game-root.ui-workspace .ws-summary-count{align-self:flex-end;color:#d2c493}
#game-root.ui-workspace .ws-title-row [data-ws-party]{margin-left:auto;white-space:nowrap;font-size:12px;padding:5px 10px}
#game-root.ui-workspace .ws-title-row [data-ws-party]+button{margin-left:0}
/* Keep content inside the painted edge, not just inside the CSS border box. */
#game-root.responsive-combat-hud :is(.action-deck.loadout-deck,.item-deck,#world-shortcuts){box-sizing:border-box!important;border-image-width:10px!important;padding:10px!important;overflow:hidden}
#game-root.responsive-combat-hud .player-card .character-level-hud{left:var(--level-left)!important;right:var(--level-right)!important;top:var(--level-top)!important;bottom:auto!important;width:auto!important;max-width:none!important;height:14px!important;padding:0!important;gap:3px;display:flex!important;align-items:center;font-size:10px}
#game-root.responsive-combat-hud .player-card .character-level-hud progress{flex:1!important;min-width:0!important;width:0!important;height:5px!important}
#game-root.responsive-combat-hud .player-card .character-level-hud small{display:none!important}
#game-root.responsive-combat-hud .ws-main-nav{min-height:0!important;height:100%!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:3px!important}
#game-root.responsive-combat-hud .ws-main-nav button{box-sizing:border-box!important;min-width:0!important;min-height:0!important;margin:0!important;padding:2px!important}
@media(max-width:800px),(pointer:coarse){
 #game-root.responsive-combat-hud :is(.action-deck.loadout-deck,.item-deck,#world-shortcuts){border-image-width:8px!important;padding:8px!important}
 #game-root.responsive-combat-hud .player-card .character-level-hud{font-size:8px!important;height:12px!important}
 #game-root.ui-workspace #party-modal .ws-shell{gap:5px!important}
 #game-root.ui-workspace #party-grid>.hero-card.ws-selected-hero{padding:5px!important}
 #game-root.ui-workspace .ws-hero-overview{grid-template-columns:1fr!important;gap:5px}
 #game-root.ui-workspace .ws-hero-identity{display:flex!important;flex-direction:row!important;justify-content:flex-start;gap:3px;height:74px}
 #game-root.ui-workspace #party-model{height:74px;width:54px;max-width:54px;flex:none}
 #game-root.ui-workspace .ws-hero-line{font-size:9px;white-space:nowrap;letter-spacing:-.2px}
 #game-root.ui-workspace .ws-overview-section{min-height:74px!important;padding:5px!important;gap:2px!important;font-size:10px!important}
 #game-root.ui-workspace .ws-overview-section small{font-size:9px!important;line-height:1.35!important}
 #game-root.ui-workspace .ws-summary-icons{gap:2px}
 #game-root.ui-workspace .ws-summary-icons img{width:20px;height:20px}
 #game-root.ui-workspace .ws-title-row [data-ws-party]{font-size:10px;padding:4px 7px}
}

#game-root.ui-workspace #party-modal [data-party-mode=overview] .party-behavior-details{display:none!important}

#game-root.ui-workspace #party-modal .ws-panel{height:auto!important;min-height:0!important}
#game-root.ui-workspace #party-modal .ws-shell{flex:0 1 auto!important;max-height:calc(var(--dialog-height) - 110px);overflow:hidden}
#game-root.ui-workspace #party-modal .ws-content{max-height:calc(var(--dialog-height) - 122px)}
#game-root.ui-workspace #party-modal [data-party-mode=edit] .ws-hero-overview{display:flex!important;justify-content:center}
#game-root.ui-workspace #party-modal [data-party-mode=edit] #party-model{height:160px}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace #party-modal .ws-shell{max-height:calc(var(--dialog-height) - 100px)}
 #game-root.ui-workspace #party-modal .ws-content{max-height:calc(var(--dialog-height) - 112px)}
 #game-root.ui-workspace #party-modal [data-party-mode=edit] #party-model{height:74px}
}

/* Compact party editor and click-to-equip workspace (presentation only). */
#game-root.ui-workspace #party-modal .ws-panel{width:min(700px,var(--dialog-width))!important;max-width:var(--dialog-width)!important}
#game-root.ui-workspace #party-modal [data-party-mode=edit]{width:min(480px,var(--dialog-width))!important}
#game-root.ui-workspace #party-modal .ws-roster [data-ws-party=edit]{font-size:10px!important;line-height:1.3!important;height:34px!important;min-height:34px!important;margin-top:5px!important;color:#e8cf8e!important;white-space:normal!important}
#game-root.ui-workspace #party-modal .ws-hero-pool [data-member-role=none]{opacity:.65;border:1px solid #4b5d57!important}
#game-root.ui-workspace #party-modal .ws-hero-pool [data-member-role=companion]{border:2px solid #7aa990!important;background:#294b40!important}
#game-root.ui-workspace #party-modal .ws-hero-pool [data-member-role=leader]{border:2px solid #e1bb65!important;background:#4e452b!important}
#game-root.ui-workspace #party-modal .ws-hero-pool [data-member-role=companion]:after{content:'✓';position:absolute;right:1px;bottom:0;color:#d5ffe1;background:#203b31;font-size:10px;line-height:12px}
#game-root.ui-workspace #party-modal .ws-hero-pool [aria-pressed=true]{outline:2px solid #f0dfb3!important;outline-offset:2px;opacity:1}
#game-root.ui-workspace #party-modal .hero-card-actions{display:flex!important;justify-content:center!important;flex-wrap:wrap;gap:8px!important;width:auto!important;align-self:center!important}
#game-root.ui-workspace #party-modal .hero-card-actions button{flex:none!important;width:auto!important;min-width:82px!important;min-height:32px!important;padding:5px 12px!important;font-size:12px!important;line-height:1.4!important}
#game-root.ui-workspace #party-modal [data-party-mode=overview] .hero-card-actions{display:none!important}
#game-root.ui-workspace #party-modal .party-footer{gap:8px!important;align-items:center!important;flex-wrap:wrap}
#game-root.ui-workspace #party-modal .party-footer button{width:auto!important;flex:none!important;padding:6px 14px!important;min-height:34px!important;font-size:12px!important}
#game-root.ui-workspace .ws-panel :is(.party-footer button,.hero-card-actions button,[data-ws-party],.ws-equipment-tabs button,#bag-action button,.gear-unequip,.ws-filter-toggle){border:1px solid #9b885c!important;border-radius:1px!important;border-bottom:3px solid #101c20!important;background:#243c35!important;color:#e8d4a0!important;box-shadow:inset 0 0 0 1px #456050!important;font-family:inherit!important}
#game-root.ui-workspace .ws-panel :is(.party-footer button,.hero-card-actions button,.ws-equipment-tabs button,#bag-action button):disabled{opacity:.55;cursor:default}
#game-root.ui-workspace .ws-panel #party-confirm{background:#3c5140!important;border-color:#c5aa69!important}
#game-root.ui-workspace .ws-panel [data-ws-party=cancel]{background:#192c2e!important;color:#bdc5b4!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear]{width:min(960px,var(--dialog-width))!important;height:min(650px,var(--dialog-height))!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear]>.ws-shell{flex-direction:row!important;gap:8px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster{flex:0 0 52px!important;width:52px!important;max-width:52px!important;flex-direction:column!important;border-right:1px solid #4c6257;border-bottom:0;padding:0 5px 0 0!important;overflow-y:auto!important;overflow-x:hidden!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster button{height:44px!important;min-height:44px!important;width:42px!important;min-width:42px!important;padding:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster img{width:32px!important;height:34px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-content{overflow:hidden!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-desktop{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)!important;gap:8px!important;height:100%!important;min-height:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(.bag-wallet,#gear-name,#gear-progression,.hero-passives,#gear-rule,.gear-model-wrap>span,.gear-model-wrap:after,.bag-storage-label,.bag-mode-bar,.ws-drag-hint){display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] [data-bag-filter]:not([data-bag-filter=all]):not([data-bag-filter=locked]):not([data-bag-filter=weapon]):not([data-bag-filter=armor]):not([data-bag-filter=jewelry]){display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .bag-secondary-filters label:has(#bag-usable){display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-panel-scroll{padding:5px!important;gap:6px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{display:flex!important;flex-direction:column!important;grid-template-rows:none!important;flex:1 1 0!important;min-height:0!important;overflow:hidden!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-storage{flex:1!important;min-height:0!important;max-height:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-items,#ew-trade-bag-items){grid-template-columns:repeat(auto-fill,minmax(55px,1fr))!important;align-content:start!important;gap:5px!important;padding:2px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-items,#ew-trade-bag-items) .bag-item{height:64px!important;min-height:64px!important;max-height:64px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-bag-filters{display:block!important;flex:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-filter-toggle{display:block!important;width:100%;font-size:12px!important;min-height:30px!important;padding:4px 6px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-filters=false] :is(#inventory-panel,#ew-trade-inventory-panel) .ws-bag-filters{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-filters,#ew-trade-bag-filters){display:flex!important;flex-wrap:wrap!important;gap:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-filters,#ew-trade-bag-filters) button{flex:1!important;font-size:11px!important;min-height:28px!important;padding:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-equipment-tabs{display:flex;gap:4px;flex:none!important;min-width:0;width:100%;margin:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-equipment-tabs button{flex:1;min-width:0!important;min-height:32px!important;font-size:12px!important;padding:4px!important;white-space:nowrap}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-equipment-tabs [aria-pressed=true]{border-color:#debf7a!important;background:#405640!important;color:#fff0bd!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{display:grid!important;grid-template-columns:62px minmax(70px,1fr) 62px!important;flex:1 1 0!important;overflow:auto!important;min-height:0!important;gap:5px!important;align-items:center!important;padding:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slots{gap:5px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{display:flex!important;align-items:center!important;justify-content:center!important;height:auto!important;min-height:0!important;max-height:100%!important;background:none!important;border:0!important;padding:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-model{height:auto!important;max-height:300px!important;width:100%!important;aspect-ratio:240/330;object-fit:contain!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{min-height:48px!important;padding:2px!important;gap:1px!important;display:flex!important;flex-direction:column!important;align-items:center!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot :is(b,.hand-slot-tag){display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot small{font-size:10px!important;line-height:12px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot img{width:28px!important;height:28px!important;object-fit:contain}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-unequip{width:100%;min-height:23px!important;font-size:10px!important;padding:1px!important;margin-top:2px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-insights{display:block!important;flex:1 1 0!important;min-height:0!important;overflow:auto!important;padding:6px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .rpg-bag-detail{display:flex!important;flex:1 1 0!important;min-height:0!important;width:100%;max-height:none!important;overflow:hidden!important;gap:6px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail){flex:1 1 0!important;overflow:auto!important;min-height:0!important;max-height:none!important;padding:5px!important;font-size:12px!important;line-height:1.5!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action{flex:0 0 auto!important;display:flex!important;flex-direction:column!important;gap:5px!important;padding:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action :is(button,select){font-size:12px!important;min-height:30px!important;padding:4px!important;max-width:100%;white-space:normal!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action label{display:flex;align-items:center;gap:4px;font-size:11px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-panel-scroll>[hidden]{display:none!important}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace #party-modal .hero-card-actions button{min-width:76px!important;font-size:11px!important;padding:4px 8px!important}
 #game-root.ui-workspace #party-modal .party-footer button{min-height:32px!important;font-size:11px!important;padding:5px 10px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear]>.ws-shell{gap:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster{flex-basis:34px!important;width:34px!important;max-width:34px!important;padding-right:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster button{width:28px!important;min-width:28px!important;height:32px!important;min-height:32px!important;padding:1px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-roster img{width:24px!important;height:28px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-desktop{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important;gap:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-panel-scroll{padding:2px!important;gap:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-items,#ew-trade-bag-items){grid-template-columns:repeat(auto-fill,minmax(39px,1fr))!important;gap:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-items,#ew-trade-bag-items) .bag-item{height:49px!important;min-height:49px!important;max-height:49px!important;padding:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-items,#ew-trade-bag-items) .bag-item img{width:30px!important;height:30px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-equipment-tabs{gap:2px}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-equipment-tabs button{font-size:10px!important;min-height:30px!important;padding:2px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{order:-1!important;flex:none!important;height:120px!important;max-height:none!important;min-height:120px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-model{width:87px!important;height:120px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slots{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{width:100%!important;min-height:42px!important;max-height:48px!important;min-width:0!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot img{width:24px!important;height:24px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot small{font-size:9px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(.ws-filter-toggle,:is(#bag-filters,#ew-trade-bag-filters) button){font-size:10px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail){font-size:10px!important;padding:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) h3{font-size:13px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action :is(button,select,label){font-size:10px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action button{min-height:30px!important}
}
#game-root.ui-workspace #party-modal .ws-hero-pool [data-member-role=leader]:after{content:attr(data-member-badge);background:#59492a;right:0;bottom:0;color:#fff0b5;font-size:8px;line-height:11px;padding:0 2px}
#game-root.ui-workspace #party-modal .hero-card-actions{flex-direction:row!important}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace #party-modal .ws-hero-pool{display:grid!important;grid-template-columns:repeat(4,42px)!important;justify-content:center!important;gap:6px!important;padding:3px!important}
}
/* Portrait phones: browse above, inspect below; keep the hero rail on the left. */
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-desktop{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(100px,.36fr) minmax(170px,.64fr)!important;gap:6px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-items,#ew-trade-bag-items){grid-template-columns:repeat(auto-fill,minmax(44px,1fr))!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{display:grid!important;grid-template-columns:50px minmax(70px,1fr) 50px!important;align-items:start!important;gap:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slots{display:flex!important;flex-direction:column!important;gap:2px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{min-height:34px!important;max-height:none!important;flex-direction:row!important;gap:1px!important;padding:1px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot img{width:22px!important;height:22px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot small{font-size:8px!important;line-height:10px!important;white-space:normal!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{order:0!important;height:180px!important;min-height:180px!important;align-self:center!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-model{height:180px!important;width:130px!important;max-width:100%!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-unequip{min-height:19px!important;line-height:14px!important;font-size:9px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action{flex-flow:row wrap!important;gap:4px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action label{flex-basis:100%!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action button{flex:1!important}
}

/* Shared status anatomy; native per-hero frame art and external HUD bounds stay intact. */
#game-root .unified-hero-card{container-type:size}
#game-root .unified-hero-card>.fighter-heading,#game-root .unified-hero-card>.fighter-info,#game-root.responsive-combat-hud .unified-hero-card>.character-level-hud,
#game-root #party-vitals .unified-hero-card>.party-portrait,#game-root #party-vitals .unified-hero-card>.party-meter,#game-root #party-vitals .unified-hero-card>div,#game-root #party-vitals .unified-hero-card>small{display:none!important}
#game-root .unified-hero-card>.ew-status{position:absolute!important;inset:12px 18px;display:grid!important;grid-template-columns:27% minmax(0,1fr);gap:8px;min-height:0;overflow:hidden;font:clamp(8px,7cqh,12px)/1.1 system-ui,sans-serif;color:#eee2bf;text-align:left}
#game-root #party-vitals .unified-hero-card>.ew-status{inset:8px 18px 8px 12px;grid-template-columns:48px minmax(0,1fr);gap:7px;font-size:9px}
#game-root .ew-portrait{width:100%;height:100%;min-height:0;object-fit:contain!important;object-position:center;image-rendering:pixelated}
#game-root .ew-status-body{display:grid!important;grid-template-rows:1.12fr repeat(4,1fr);align-content:stretch;min-width:0;min-height:0;gap:2px}
#game-root .ew-name{font-size:1.12em;line-height:1;align-self:center;color:var(--member-color,#f3d69c);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game-root .ew-meter{position:relative;display:flex!important;justify-content:space-between;align-items:center;min-width:0;min-height:0;overflow:hidden;gap:3px;background:#0b161dde;border:1px solid #a6b6a144;padding:0 3px;line-height:1}
#game-root .ew-meter>i{position:absolute;inset:0 auto 0 0;background:linear-gradient(90deg,#275044,#589567);opacity:.85;pointer-events:none}
#game-root .ew-energy>i{background:linear-gradient(90deg,#255369,#4d93ad)}
#game-root .ew-guard>i{background:linear-gradient(90deg,#6a5d31,#a3975e)}
#game-root .ew-meter>span,#game-root .ew-meter>b{position:relative;z-index:1;white-space:nowrap;font-size:1em;font-weight:500;line-height:1;text-shadow:0 1px #000}
#game-root .ew-experience{display:flex;align-items:center;gap:3px;min-width:0;min-height:0;font-size:.9em;white-space:nowrap}
#game-root .ew-experience>b{font-weight:500;color:#ecd59c}
#game-root .ew-experience>progress{min-width:6px;width:0;flex:1;height:5px;accent-color:#c0a165}
#game-root .ew-experience>small{font-size:.9em;color:#d1c7a8}
#game-root #party-vitals .ew-experience>small{display:none}
@media(max-width:800px),(pointer:coarse){
 #game-root .player-card.unified-hero-card>.ew-status{inset:6px 8px;grid-template-columns:26% minmax(0,1fr);gap:4px;font-size:clamp(6px,9cqh,10px)}
 #game-root .player-card .ew-status-body{gap:1px}
 #game-root .player-card .ew-experience>small{display:none}
 #game-root .player-card .ew-meter{padding:0 2px}
}
/* Party: model and a compact stat sheet above the four native configuration links. */
#game-root .ws-panel[data-ws-route=party] .ws-hero-overview{display:flex!important;flex-direction:column!important;gap:8px!important}
#game-root .ws-panel[data-ws-route=party] .ws-hero-identity{display:grid!important;grid-template-columns:128px minmax(0,1fr)!important;align-items:center!important;gap:12px!important}
#game-root .ws-panel[data-ws-route=party] #party-model{width:120px!important;height:160px!important;max-width:100%;justify-self:center;object-fit:contain}
#game-root .ws-panel[data-ws-route=party] .ws-hero-model{display:flex;flex-direction:column;align-items:center;min-width:0}
#game-root .ws-panel[data-ws-route=party] .ws-hero-model>.skin-model-change{max-width:100%;padding:4px 6px}
#game-root .ws-party-meta{min-width:0}
#game-root .ws-party-meta .ws-hero-line{white-space:normal!important;text-align:left!important;line-height:1.5;font-size:13px}
#game-root .ws-basic-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 12px;margin:8px 0 0;font:12px/1.4 system-ui,sans-serif}
#game-root .ws-basic-stats>div{display:flex;justify-content:space-between;gap:5px;border-bottom:1px solid #ae96552b;padding:3px 0;min-width:0}
#game-root .ws-basic-stats dt{color:#b4c4b9;white-space:nowrap;font-size:inherit}
#game-root .ws-basic-stats dd{color:#e8d8ac;margin:0;font-variant-numeric:tabular-nums}
#game-root .ws-panel[data-ws-route=party] .ws-hero-summary{width:100%!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
/* Skills and talents: current build remains beside the independently scrollable catalogue. */
#game-root.ui-rpg .rpg-window.ws-panel:is([data-ws-route=skills],[data-ws-route=career]){width:min(1040px,var(--dialog-width))!important;height:min(690px,var(--dialog-height))!important}
#game-root.ui-rpg .rpg-window.ws-panel:is([data-ws-route=skills],[data-ws-route=career]) .ws-content{display:flex!important;flex-direction:column;overflow:hidden!important;padding:6px!important;min-width:0;min-height:0}
#game-root.ui-rpg .rpg-window.ws-panel:is([data-ws-route=skills],[data-ws-route=career]) .ws-roster{width:46px!important;flex:0 0 46px!important;padding:4px!important}
#game-root.ui-rpg .rpg-window.ws-panel:is([data-ws-route=skills],[data-ws-route=career]) .ws-roster button{width:36px!important;height:38px!important;min-height:0!important;padding:2px!important}
#game-root.ui-rpg .rpg-window.ws-panel:is([data-ws-route=skills],[data-ws-route=career]) .ws-roster button>b,#game-root.ui-rpg .rpg-window.ws-panel:is([data-ws-route=skills],[data-ws-route=career]) .ws-roster button>small{display:none!important}
#game-root.ui-rpg .rpg-window.ws-panel:is([data-ws-route=skills],[data-ws-route=career]) .ws-roster img{width:30px!important;height:30px!important;object-fit:contain}
#game-root #skillbook-summary,#game-root #career-summary,#game-root.ui-rpg .rpg-window.ws-panel[data-ws-route=skills] .ws-content>footer,#game-root.ui-rpg .rpg-window.ws-panel[data-ws-route=career] .career-heading{display:none!important}
#game-root.ui-rpg .rpg-window .ws-study-layout{display:grid;grid-template-columns:minmax(205px,.75fr) minmax(0,1.8fr);gap:10px;flex:1;min-height:0;min-width:0}
#game-root.ui-rpg .rpg-window .ws-study-current,#game-root.ui-rpg .rpg-window .ws-study-options{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:8px;border:1px solid #a48c5450;background:#101e23b8}
#game-root.ui-rpg .rpg-window .ws-study-heading{font-size:13px;line-height:1.5;letter-spacing:.06em;color:#dfc894;margin:0 0 8px;padding:0 0 5px;border-bottom:1px solid #a48c5440}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points{display:flex!important;flex-wrap:wrap;align-items:center;gap:5px 9px;padding:7px!important;min-width:0!important;margin:0 0 7px;text-align:left!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points strong{font-size:20px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points span{font-size:11px;flex-basis:100%}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points button{margin:0!important;min-height:26px;font-size:11px}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-innate-note{display:flex!important;flex-direction:column;align-items:start;gap:3px;padding:6px!important;font-size:11px;line-height:1.4}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout{padding:6px!important;margin:7px 0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-section-title h3{font-size:12px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #book-loadout-slots{grid-template-columns:repeat(auto-fill,minmax(48px,1fr))!important;gap:4px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot{min-height:0!important;padding:3px!important;gap:2px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot>img{width:30px!important;height:30px!important;object-fit:contain}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot>span{font-size:10px;line-height:1.25;word-break:break-word}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot button{padding:1px 5px!important;min-height:22px;font-size:11px}
#game-root.ui-rpg .rpg-window .ws-study-layout #book-growth,#game-root.ui-rpg .rpg-window .ws-study-layout #book-notice,#game-root.ui-rpg .rpg-window .ws-study-layout #career-message{font-size:11px;line-height:1.5;margin:5px 0}
#game-root.ui-rpg .rpg-window .ws-study-layout #book-cards{grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))!important;gap:7px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #book-tabs,#game-root.ui-rpg .rpg-window .ws-study-layout .career-tabs,#game-root.ui-rpg .rpg-window .ws-study-layout #career-filters{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:4px;margin:0 0 6px;padding:0 0 4px;min-width:0}
#game-root.ui-rpg .rpg-window .ws-study-layout #book-tabs>button,#game-root.ui-rpg .rpg-window .ws-study-layout .career-tabs>button,#game-root.ui-rpg .rpg-window .ws-study-layout #career-filters>button{flex:none;min-height:28px;padding:4px 8px!important;font-size:11px}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-tabs>span,#game-root.ui-rpg .rpg-window .ws-study-layout .career-tabs>.book-career-link,#game-root.ui-rpg .rpg-window .ws-study-layout .hero-guide-entry{display:none!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #book-role-description{padding:5px;font-size:11px;line-height:1.5;margin:0 0 6px}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-points{display:grid!important;grid-template-columns:auto 1fr;gap:4px 8px;min-width:0!important;padding:8px!important;margin:8px 0}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-points>b{font-size:20px!important;line-height:1.2}
#game-root.ui-rpg .rpg-window .ws-current-class{display:block;font:13px/1.5 system-ui,sans-serif;color:#f0d6a1;margin-bottom:8px}
#game-root.ui-rpg .rpg-window .ws-learned-talents{display:flex;flex-direction:column;gap:4px}
#game-root.ui-rpg .rpg-window .ws-learned-talents>div{display:flex;align-items:center;gap:5px;font-size:11px;padding:3px;border:1px solid #a48c5430;background:#14272b}
#game-root.ui-rpg .rpg-window .ws-learned-talents img{width:24px;height:24px;object-fit:contain;image-rendering:pixelated}
#game-root.ui-rpg .rpg-window .ws-learned-talents span{flex:1;min-width:0}
#game-root.ui-rpg .rpg-window .ws-learned-talents b{white-space:nowrap;font-weight:500;color:#e2c989}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-footer{display:flex!important;flex-direction:column;align-items:stretch;gap:6px;padding:6px 0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-footer button{margin:0!important;min-height:30px;padding:5px 8px;font-size:12px}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-node-grid{grid-template-columns:repeat(auto-fit,minmax(min(235px,100%),1fr))!important;gap:7px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #career-branches{grid-template-columns:repeat(auto-fit,minmax(min(175px,100%),1fr))!important;gap:7px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #career-guidance{padding:6px!important;font-size:11px}
#game-root.ui-rpg .rpg-window .ws-study-layout #career-pools{gap:5px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #career-pools button{min-width:0;padding:6px!important;font-size:11px}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-group>h3{font-size:13px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-group>h3>small{display:none}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-rpg .rpg-window.ws-panel[data-ws-route=party] .ws-hero-identity{grid-template-columns:74px minmax(0,1fr)!important;gap:6px!important}
 #game-root.ui-rpg .rpg-window.ws-panel[data-ws-route=party] #party-model{width:74px!important;height:108px!important}
 #game-root.ui-rpg .rpg-window .ws-party-meta .ws-hero-line{font-size:10px!important}
 #game-root.ui-rpg .rpg-window .ws-basic-stats{font-size:9px;gap:2px 5px;margin-top:4px}
 #game-root.ui-rpg .rpg-window .ws-basic-stats>div{padding:2px 0}
 #game-root.ui-rpg .rpg-window.ws-panel:is([data-ws-route=skills],[data-ws-route=career]) .ws-roster{width:32px!important;flex-basis:32px!important;padding:2px!important}
 #game-root.ui-rpg .rpg-window.ws-panel:is([data-ws-route=skills],[data-ws-route=career]) .ws-roster button{width:27px!important;height:30px!important}
 #game-root.ui-rpg .rpg-window.ws-panel:is([data-ws-route=skills],[data-ws-route=career]) .ws-roster img{width:23px!important;height:23px!important}
 #game-root.ui-rpg .rpg-window .ws-study-current,#game-root.ui-rpg .rpg-window .ws-study-options{padding:5px}
 #game-root.ui-rpg .rpg-window .ws-study-heading{font-size:11px;margin-bottom:5px}
}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-rpg .rpg-window .ws-study-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(130px,.38fr) minmax(0,1fr);gap:6px}
 #game-root.ui-rpg .rpg-window .ws-study-current{display:grid;grid-template-columns:minmax(0,1fr);align-content:start}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points{display:flex!important;gap:4px;margin-bottom:4px;padding:4px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points span{flex-basis:auto;font-size:10px}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points strong{font-size:15px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points button{margin-left:auto!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-innate-note{display:block!important;font-size:10px}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-innate-note span{margin-left:6px}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot>img{width:25px!important;height:25px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot>span{font-size:9px}
 #game-root.ui-rpg .rpg-window .ws-study-layout .ws-learned-talents{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 #game-root.ui-rpg .rpg-window .ws-study-layout .career-points{grid-template-columns:auto 1fr auto 1fr!important;padding:4px!important}
}

#game-root.ui-rpg .rpg-window.ws-panel #skillbook-summary,#game-root.ui-rpg .rpg-window.ws-panel #career-summary{display:none!important}
#game-root.ui-rpg .rpg-window .ws-study-layout>.ws-study-options>.hero-passives{margin:0 0 7px!important;padding:6px!important;font-size:11px}
#game-root.ui-rpg .rpg-window .ws-study-layout .hero-passives>summary{display:flex;align-items:center;flex-wrap:wrap;gap:4px;font-size:11px}
#game-root.ui-rpg .rpg-window .ws-study-layout .hero-passives>summary>small{display:none}
#game-root.ui-rpg .rpg-window .ws-study-layout .passive-list{grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr))!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .study-shortcuts{display:flex!important;flex-direction:column!important;gap:5px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .study-shortcut{min-width:0;flex-wrap:wrap!important;font-size:11px}

#game-root .player-card.unified-hero-card>.ew-status{font-size:clamp(9px,11cqh,13px)!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points{display:grid!important;grid-template-columns:1fr auto;gap:4px 8px!important;text-align:left!important;align-items:center!important;padding:7px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points strong{font-size:22px!important;grid-column:2;grid-row:1/3}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points span{grid-column:1;font-size:10px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points button{grid-column:1/-1;min-height:26px!important;padding:3px 6px!important;margin:0!important;font-size:11px!important}
@media(max-width:800px),(pointer:coarse){#game-root .player-card.unified-hero-card>.ew-status{font-size:clamp(7px,10cqh,10px)!important}}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-rpg .rpg-window .ws-study-layout{grid-template-rows:minmax(150px,.5fr) minmax(0,1fr)}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points{display:flex!important;flex-wrap:wrap!important;gap:3px 5px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points strong{font-size:14px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points button{margin-left:auto!important}
}

#game-root.ui-rpg .rpg-window.ws-panel[data-ws-route=party] .ws-hero-identity{height:auto!important;min-height:0!important;width:100%;flex-shrink:0}
#game-root.ui-rpg .rpg-window .ws-study-current{display:block!important}
#game-root.ui-rpg #career-modal .ws-study-current .career-points{position:static!important;grid-column:auto!important;grid-row:auto!important;display:grid!important;grid-template-columns:auto 1fr auto 1fr!important;margin:8px 0!important;gap:5px!important;height:auto!important}
#game-root.ui-rpg .rpg-window .ws-study-help{padding:5px 7px;margin:0 0 6px;border:1px solid #9c855042;color:#c7d2c5;font:11px/1.5 system-ui,sans-serif;background:#1a2c30}
#game-root.ui-rpg .rpg-window .ws-study-help>summary{cursor:pointer;color:#d8c28f}
#game-root.ui-rpg .rpg-window .ws-study-help[open]>summary{margin-bottom:5px}
#game-root.ui-rpg .rpg-window.ws-panel[data-ws-route=career] .career-heading{display:none!important}

#game-root.ui-rpg .rpg-window .ws-study-layout :is(#career-filters,#career-talents,#career-professions)[hidden]{display:none!important}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points{flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;text-align:left!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points>span{flex-basis:auto!important}
}

@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-rpg .rpg-window.ws-panel[data-ws-route=skills] .ws-study-layout{grid-template-rows:minmax(190px,.65fr) minmax(0,1fr)}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-innate-note{margin:3px 0!important;padding:3px 4px!important;line-height:14px!important;white-space:nowrap}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-innate-note :is(strong,span){font-size:10px!important;line-height:14px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout{margin:4px 0!important;padding:4px!important}
}

/* Equipment density and a common party rail across expedition preparation. */
#game-root.ui-workspace .ws-panel[data-preparation=true]>.ws-shell{flex-direction:row!important;gap:8px!important}
#game-root.ui-workspace .ws-panel[data-preparation=true] .ws-roster{display:flex!important;flex:0 0 52px!important;width:52px!important;max-width:52px!important;flex-direction:column!important;align-items:center!important;gap:6px!important;padding:2px 5px 2px 0!important;border-right:1px solid #4c6257;border-bottom:0;overflow-y:auto!important;overflow-x:hidden!important}
#game-root.ui-workspace .ws-panel[data-preparation=true] .ws-roster button{position:relative;width:42px!important;min-width:42px!important;height:44px!important;min-height:44px!important;padding:3px!important;flex:none!important}
#game-root.ui-workspace .ws-panel[data-preparation=true] .ws-roster img{width:32px!important;height:34px!important;object-fit:cover}
#game-root.ui-workspace .ws-panel[data-preparation=true] .ws-roster :is(b,small){display:none!important}
#game-root.ui-workspace .ws-panel[data-preparation=true] .ws-roster [data-ws-party=edit]{height:28px!important;min-height:28px!important;margin-top:2px!important;font-size:10px!important;line-height:1.2!important;color:#ead7ad!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-desktop{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-bag-filters{display:flex!important;flex-direction:column;gap:5px}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .bag-search{margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .bag-secondary-filters{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-equipment-filter-row{display:flex;align-items:center;gap:5px;min-width:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-quality,#ew-trade-bag-quality){flex:0 1 85px;width:85px;min-width:0!important;min-height:28px!important;font-size:11px!important;padding:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-filters,#ew-trade-bag-filters){flex:1;flex-wrap:nowrap!important;margin:0!important;min-width:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-filters,#ew-trade-bag-filters) button{white-space:nowrap;min-width:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{grid-template-columns:minmax(72px,.8fr) minmax(90px,1.3fr) minmax(72px,.8fr)!important;gap:7px!important;align-items:center!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slots{display:flex!important;flex-direction:column!important;gap:8px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot{display:grid!important;grid-template-columns:minmax(0,1fr) 22px;gap:4px!important;align-items:center;border:0!important;background:none!important;box-shadow:none!important;padding:0!important;min-width:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{min-height:54px!important;max-height:none!important;width:100%!important;min-width:0!important;border:1px solid #8d805d!important;gap:2px!important;flex-direction:column!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot img{width:34px!important;height:34px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-unequip{position:static!important;inset:auto!important;min-width:0!important;width:22px!important;min-height:30px!important;line-height:12px!important;padding:2px!important;margin:0!important;white-space:normal!important;overflow-wrap:anywhere;font-size:9px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-model{max-height:360px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail){line-height:1.35!important;padding:4px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) :is(p,ul,.gear-set,.item-stat-block,.gear-compare,.weapon-grip){margin:4px 0!important;padding:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) :is(h3,h4){margin:1px 0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) .item-heading img{width:36px!important;height:36px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) .gear-affixes{display:flex;flex-wrap:wrap;gap:2px 12px;list-style-position:inside}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-gear-comparison{border-collapse:collapse;width:100%;font-size:11px;table-layout:auto;text-align:right}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-gear-comparison :is(th,td){padding:2px 3px;border-bottom:1px solid #67755c44;font-weight:400}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-gear-comparison th:first-child{text-align:left}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-gear-comparison caption{text-align:left;font-size:10px;color:#b7c4b8}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action{flex-flow:row wrap!important;gap:4px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action label{flex-basis:100%!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action button{flex:1!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;padding:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats>h4{grid-column:1/-1;margin:0!important;font-size:12px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats .stat-group{margin:0!important;padding:4px!important;display:block!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats .stat-group h5{margin:0 0 3px!important;font-size:11px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats [data-stat]{display:flex!important;justify-content:space-between;gap:3px;padding:2px 0!important;font-size:11px!important;line-height:1.3!important;min-width:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats [data-stat] b{font-size:11px!important;white-space:nowrap}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-insights .hero-passives{display:block!important;font-size:11px!important;padding:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-sets .gear-set{margin:4px 0!important;padding:4px!important;font-size:11px!important;line-height:1.35!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-sets p{margin:2px 0!important}
#game-root .ew-portrait-wrap{position:relative;min-width:0;min-height:0;container-type:inline-size}
#game-root .ew-level{position:absolute;top:0;left:0;font:bold clamp(10px,29cqw,22px)/1.1 EmberLanternText,serif;color:#ffe3a0;text-shadow:1px 1px 2px #000,-1px -1px 2px #000;white-space:nowrap}
@media(min-width:801px) and (pointer:fine){
 #game-root.responsive-combat-hud :is(.arena-wrap>.player-card,.loadout-deck,.item-deck,#world-shortcuts){height:var(--desktop-dock-height,136px)!important;min-height:0!important}
}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace .ws-panel[data-preparation=true]>.ws-shell{gap:4px!important}
 #game-root.ui-workspace .ws-panel[data-preparation=true] .ws-roster{flex-basis:34px!important;width:34px!important;max-width:34px!important;padding-right:3px!important;gap:5px!important}
 #game-root.ui-workspace .ws-panel[data-preparation=true] .ws-roster button{width:28px!important;min-width:28px!important;height:32px!important;min-height:32px!important;padding:1px!important}
 #game-root.ui-workspace .ws-panel[data-preparation=true] .ws-roster img{width:24px!important;height:28px!important}
 #game-root.ui-workspace .ws-panel[data-preparation=true] .ws-roster [data-ws-party=edit]{font-size:9px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-quality,#ew-trade-bag-quality){flex-basis:66px;width:66px;font-size:10px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot img{width:25px!important;height:25px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{min-height:40px!important;padding:1px!important;gap:0!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot{grid-template-columns:minmax(0,1fr) 18px;gap:2px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-unequip{width:18px!important;font-size:8px!important;padding:1px!important;min-height:26px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{display:grid!important;grid-template-columns:67px minmax(50px,1fr) 67px!important;gap:3px!important;align-items:center!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slots{gap:6px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{order:0!important;height:210px!important;min-height:180px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-model{width:153px!important;height:210px!important;max-width:100%!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ws-gear-comparison{font-size:10px}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats :is([data-stat],[data-stat] b){font-size:10px!important}
}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-desktop{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important}
}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats>h4{display:flex!important;align-items:center;justify-content:space-between;min-height:0!important;line-height:20px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats .help-link{width:20px!important;min-width:20px!important;height:20px!important;min-height:20px!important;padding:0!important;margin:0!important;line-height:18px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-model{transform:scale(1.18);transform-origin:center}
#game-root .ws-current-equipment{display:flex;gap:5px;align-items:baseline;flex-wrap:wrap}
#game-root .ws-current-equipment strong{color:#efcf88;font-size:12px}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{overflow:auto!important;align-items:stretch!important;container-type:size}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slots{display:grid!important;height:100%!important;grid-template-columns:1fr!important;grid-auto-rows:minmax(29px,1fr);gap:4px!important;align-content:stretch!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot{min-height:0!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{min-height:0!important;height:100%!important;padding:0!important;justify-content:center!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot img{width:clamp(16px,8cqh,24px)!important;height:clamp(16px,8cqh,24px)!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot small{line-height:9px!important;font-size:8px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{height:100%!important;min-height:0!important;max-height:100%!important;align-self:stretch!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-model{height:100%!important;min-height:0!important;max-height:100%!important;width:100%!important;transform:scale(1.1)}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats [data-stat]{line-height:11px!important;padding:1px 0!important;font-size:9px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats [data-stat] b{font-size:9px!important}
}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{grid-template-rows:minmax(0,1fr)!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slots{min-height:0!important}
}
#game-root #atlas-viewport,#game-root .regional-viewport{flex-shrink:0!important}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats{gap:2px 8px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats .stat-group{display:contents!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-stats .stat-group h5{display:none!important}
}

/* The compact two-row dock provides preparation shortcuts; secondary native
   systems share a dismissible tray instead of taking permanent combat space. */
#game-root.ui-workspace #world-shortcuts{overflow:visible!important}
#game-root.ui-workspace .ws-services{position:absolute;right:0;bottom:calc(100% + 8px);width:min(360px,88vw);box-sizing:border-box;padding:8px;background:#142526f5;border:2px solid #9b885e;box-shadow:0 6px 20px #0009;z-index:80;pointer-events:auto}
#game-root.ui-workspace .ws-services[hidden]{display:none!important}
#game-root.ui-workspace .ws-service-heading{display:flex;align-items:center;justify-content:space-between;color:#e3d1a5;font-size:13px;margin-bottom:6px}
#game-root.ui-workspace .ws-service-heading button{padding:2px 10px;min-height:24px}
#game-root.ui-workspace .ws-service-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
#game-root.ui-workspace .ws-service-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;padding:6px 2px;font-size:11px;white-space:nowrap;border:1px solid #897953;background:#203333;color:#e3d1a5}
#game-root.ui-workspace .ws-service-grid :is(img,.ws-dock-symbol){width:24px;height:24px;object-fit:contain;image-rendering:pixelated}
#game-root.ui-workspace .ws-service-grid button:disabled{opacity:.4}
#game-root.ui-workspace .ws-bag-prepare{width:100%;margin-top:8px;padding:8px;color:#eedaa8;background:#28403c;border:1px solid #a79566}
@media(max-width:800px){#game-root.ui-workspace .ws-services{width:min(310px,88vw)}#game-root.ui-workspace .ws-service-grid button{font-size:10px;padding:5px 1px}}
#game-root.ui-workspace #world-shortcuts:has(.ws-services:not([hidden])){z-index:1200!important}
/* Full inventory keeps the complete native description in one scrolling pane. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-detail,#ew-trade-bag-detail){flex:1 1 0!important;overflow:auto!important;min-height:0!important;padding:7px!important;line-height:1.45!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .rpg-bag-detail{display:flex!important;flex-direction:column!important;gap:4px!important;min-height:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-action,.ws-bag-prepare){flex:0 0 auto!important;margin:0!important;min-height:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] #bag-action:empty{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] #bag-money{padding:3px 5px!important;margin:0!important;font-size:12px!important;min-height:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] #bag-money b{font-size:14px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .bag-mode-bar{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .ws-bag-filters{display:flex;flex-direction:column;gap:4px}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .bag-search{margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .bag-search input{min-height:30px!important;padding:4px 7px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-detail,#ew-trade-bag-detail) :is(p,ul,.gear-set,.gear-compare,.weapon-grip){margin:4px 0!important;padding:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-detail,#ew-trade-bag-detail) .item-heading img{width:40px!important;height:40px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-detail,#ew-trade-bag-detail) :is(h3,h4){font-size:16px!important;margin:2px 0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .item-heading{gap:5px!important;min-height:0!important}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;gap:5px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .rpg-bag-detail{border-top:1px solid #65735c;padding-top:3px}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-filters,#ew-trade-bag-filters){flex-wrap:nowrap!important;overflow-x:auto;min-width:0}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-filters,#ew-trade-bag-filters) button{flex:none;min-height:24px!important;padding:2px 5px!important;font-size:10px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-items,#ew-trade-bag-items){grid-template-columns:repeat(auto-fill,minmax(50px,1fr))!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .bag-item{min-height:53px!important;padding:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .bag-item img{height:28px!important;width:28px!important}
}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-detail,#ew-trade-bag-detail) .item-heading{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important;border-bottom:1px solid #63705a;margin:0 0 4px!important;padding:0 0 4px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-detail,#ew-trade-bag-detail) .item-heading img{flex:none!important;width:32px!important;height:32px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-detail,#ew-trade-bag-detail) .item-heading h3{font-size:14px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] #bag-action{padding:2px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] #bag-action :is(button,select){min-height:28px!important;font-size:11px!important;padding:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .ws-bag-prepare{padding:6px!important;font-size:12px!important}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{grid-template-rows:minmax(0,.8fr) minmax(0,1.2fr)!important}
}
/* Discovery & town workspaces share preparation framing without changing actions. */
#game-root .ws-pixel-frame{border:0;background:none}
#game-root .ws-dock-symbol .ws-pixel-icon{stroke:none;stroke-width:0;fill:initial;image-rendering:pixelated}
#game-root.ui-workspace .ws-codex-note{font-size:11px;color:var(--ui-muted);font-weight:normal;line-height:1.5;flex:1}
#game-root.ui-workspace .ws-panel[data-ws-route=codex]{width:min(1100px,var(--dialog-width));height:var(--dialog-height);padding:12px!important;overflow:hidden!important}
#game-root.ui-workspace .ws-panel[data-ws-route=codex]>.ws-nav>.ws-tabs{display:none!important}
#game-root.ui-workspace .ws-panel[data-ws-route=codex]>.ws-shell{min-height:0;flex:1;overflow:hidden}
#game-root.ui-workspace .ws-panel[data-ws-route=codex] .ws-content{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#game-root.ui-workspace .ws-panel[data-ws-route=codex] .codex-header{display:none!important}
#game-root.ui-workspace .codex-tabs{flex:none;flex-wrap:nowrap!important;overflow-x:auto;gap:6px!important;padding:0 0 8px!important;margin:0!important}
#game-root.ui-workspace .codex-tabs>button{flex:0 0 auto;white-space:nowrap;padding:7px 10px!important;font-size:13px!important}
#game-root.ui-workspace .codex-tabs small{display:none}
#game-root.ui-workspace #codex-pages{min-height:0;flex:1;overflow:hidden}
#game-root.ui-workspace .codex-page:not([hidden]){height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}
#game-root.ui-workspace .codex-page>.modal{height:100%!important;max-height:none!important;min-height:0;display:flex;flex-direction:column;overflow:hidden!important;padding:0!important}
#game-root.ui-workspace .codex-page :is(.bestiary-header,.map-book-header,.hero-guide-head,.collection-header){display:none!important}
#game-root.ui-workspace .codex-page :is(.bestiary-layout,.map-book-layout,.hero-guide-layout){display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:10px!important;flex:1;min-height:0;overflow:hidden}
#game-root.ui-workspace .codex-page :is(.bestiary-sidebar,.map-book-sidebar){display:flex;flex-direction:column;overflow:hidden;min-height:0;min-width:0}
#game-root.ui-workspace .codex-page :is(.bestiary-list,.map-book-list){min-height:0;overflow:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:6px;padding:2px;max-height:none}
#game-root.ui-workspace .codex-page :is(.bestiary-card,.map-book-card,.collection-card){border:1px solid #576957!important;border-radius:0!important;background:#132b2b!important;color:#e8dbb8!important;min-width:0;padding:7px!important}
#game-root.ui-workspace .codex-page :is(.bestiary-card,.map-book-card)[aria-pressed=true]{border-color:#d8b365!important;box-shadow:inset 0 0 0 1px #d8b365}
#game-root.ui-workspace .codex-page :is(.bestiary-detail,.map-book-detail,.hero-guide-content){overflow:auto;min-height:0;min-width:0;border:1px solid #566955;background:#102523!important}
#game-root.ui-workspace .codex-page :is(.bestiary-card,.map-book-card)>canvas{width:100%;height:100px;object-fit:contain}
#game-root.ui-workspace .codex-page :is(#bestiary-chapters,#map-book-chapters,#collection-roster){display:flex;flex-wrap:nowrap;overflow:auto;flex:none;gap:4px;margin:0 0 6px}
#game-root.ui-workspace .codex-page :is(#bestiary-chapters,#map-book-chapters,#collection-roster)>button{white-space:nowrap;flex:none;padding:5px 7px!important;font-size:12px!important}
#game-root.ui-workspace .codex-page :is(.bestiary-tools,.map-book-tools,.collection-tools){padding:5px!important;gap:5px;flex:none;display:flex;flex-wrap:wrap}
#game-root.ui-workspace .codex-page :is(.bestiary-tools,.map-book-tools,.collection-tools) input{min-width:0;width:auto;flex:1}
#game-root.ui-workspace .codex-page .collection-scroll{overflow:auto;min-height:0;flex:1}
#game-root.ui-workspace .codex-page #collection-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px}
#game-root.ui-workspace .codex-page .collection-explainer{display:none}
#game-root.ui-workspace .ws-panel[data-ws-group=town] :is(.service-body,.guild-layout,.directory-grid){min-width:0;gap:10px}
#game-root.ui-workspace .ws-panel[data-ws-group=town] :is(.service-row,.directory-card,.development-card,.guild-keeper,.guild-actions){border-radius:0!important;border:1px solid #586d5b!important;background:#142c2b!important;padding:10px!important;color:#eadcb8!important}
#game-root.ui-workspace .ws-panel[data-ws-group=town] :is(.directory-card,.service-row,.guild-actions) button{min-width:0!important;max-width:100%;white-space:normal}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace .ws-panel[data-ws-route=codex]{padding:8px!important}
 #game-root.ui-workspace .ws-codex-note{font-size:10px}
 #game-root.ui-workspace .codex-tabs>button{font-size:11px!important;padding:7px!important}
 #game-root.ui-workspace .codex-page :is(.bestiary-layout,.map-book-layout,.hero-guide-layout){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;gap:7px!important}
 #game-root.ui-workspace .codex-page :is(.bestiary-card,.map-book-card)>canvas{height:64px}
 #game-root.ui-workspace .codex-page :is(.bestiary-tools,.map-book-tools,.collection-tools){font-size:11px!important}
 #game-root.ui-workspace .codex-page :is(.bestiary-detail,.map-book-detail){padding:8px!important}
 #game-root.ui-workspace .codex-page #collection-list{grid-template-columns:minmax(0,1fr)}
 #game-root.ui-workspace .ws-panel[data-ws-group=town] .service-body{grid-template-columns:minmax(0,1fr)!important}
 #game-root.ui-workspace .ws-panel[data-ws-group=town] .service-body aside{display:none}
}
#game-root.ui-workspace .codex-page>section{height:100%!important;max-height:none!important;min-height:0;display:flex;flex-direction:column;overflow:hidden!important;padding:0!important;border:0!important;background:transparent!important}
#game-root.ui-workspace .codex-page>section>header{display:none!important}
#game-root.ui-workspace .codex-page :is(.collection-scroll,.quality-legend,.collection-new-filter,#collection-roster,#collection-pages,.hero-guide-reading){background:transparent!important;color:var(--ui-text)!important;min-width:0}
#game-root.ui-workspace .codex-page .collection-scroll{display:flex;flex-direction:column;overflow:hidden!important}
#game-root.ui-workspace .codex-page .quality-legend{display:none}
#game-root.ui-workspace .codex-page .collection-tools{display:grid!important;grid-template-columns:minmax(80px,1fr) auto auto;gap:6px!important;align-items:end}
#game-root.ui-workspace .codex-page .collection-tools label:first-child{grid-column:1/-1}
#game-root.ui-workspace .codex-page .collection-tools input[type=search]{width:100%}
#game-root.ui-workspace .codex-page .collection-tools :is(label,select,button){min-width:0!important;font-size:12px!important}
#game-root.ui-workspace .codex-page .collection-new-filter{display:flex;align-items:center;gap:8px;padding:4px 0;font-size:12px}
#game-root.ui-workspace .codex-page .help-link{display:none}
#game-root.ui-workspace .codex-page .ws-collection-browser{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);flex:1;min-height:0;gap:10px}
#game-root.ui-workspace .ws-collection-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:6px;align-content:start;overflow:auto;min-height:0}
#game-root.ui-workspace .ws-collection-picker>button{padding:5px!important;min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px!important;line-height:1.4}
#game-root.ui-workspace .ws-collection-picker img{width:40px;height:40px;object-fit:contain;image-rendering:pixelated}
#game-root.ui-workspace .codex-page #collection-list{display:block!important;overflow:auto;min-height:0}
#game-root.ui-workspace .codex-page #collection-list .collection-card[hidden]{display:none!important}
#game-root.ui-workspace .codex-page #collection-list .collection-card{padding:12px!important;margin:0}
#game-root.ui-workspace .codex-page :is(#map-book-list,#map-book-detail,.hero-guide-reading){overflow:auto;min-height:0}
#game-root.ui-workspace .codex-page #map-book-list{display:grid;align-content:start;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
#game-root.ui-workspace .codex-page #map-book-list>button{display:flex;flex-direction:column;min-width:0;padding:6px!important;background:#152b2a!important}
#game-root.ui-workspace .codex-page #map-book-list img{height:92px;width:100%;object-fit:cover}
#game-root.ui-workspace .codex-page #map-book-list em{display:none}
#game-root.ui-workspace .codex-page #map-book-detail>figure{margin:0}
#game-root.ui-workspace .codex-page #map-book-detail>figure img{width:100%;max-height:180px;object-fit:contain}
#game-root.ui-workspace .codex-page .collection-dialog>footer{font-size:11px;padding:5px!important;flex:none}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace .codex-page .ws-collection-browser{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(80px,.8fr) minmax(0,1fr);gap:6px}
 #game-root.ui-workspace .ws-collection-picker{grid-template-columns:repeat(auto-fill,minmax(58px,1fr))}
 #game-root.ui-workspace .ws-collection-picker img{width:28px;height:28px}
 #game-root.ui-workspace .codex-page #map-book-list img{height:60px}
 #game-root.ui-workspace .codex-page .collection-tools{grid-template-columns:1fr 1fr}
 #game-root.ui-workspace .codex-page .collection-tools :is(input,select){padding:5px!important;height:30px!important}
 #game-root.ui-workspace .codex-page .collection-tools label{font-size:10px!important}
 #game-root.ui-workspace .codex-page #collection-roster>button{font-size:10px!important}
 #game-root.ui-workspace .codex-page #collection-pages{margin:0;padding:2px;flex:none}
 #game-root.ui-workspace .codex-page #collection-pages>button{padding:4px 8px!important}
}
#game-root.ui-workspace .codex-page :is(.collection-tools,.map-book-tools,.bestiary-tools){margin:4px 0!important}
#game-root.ui-workspace .codex-page :is(.collection-new-filter,#bestiary-chapters,#map-book-chapters,#collection-roster){margin:2px 0 5px!important;padding:0 0 4px!important}
#game-root.ui-workspace .codex-page .collection-tools .collection-owned-filter{flex-direction:row;align-items:center;min-height:26px!important}
#game-root.ui-workspace .codex-page .collection-tools input[type=checkbox]{height:16px!important;width:16px!important;min-height:0!important;flex:none}
#game-root.ui-workspace .codex-page :is(.collection-base,.collection-set,.collection-trait,.map-book-note,.map-book-inhabitants,.map-book-route){background:#193330!important;color:#c8d6bf!important;border-color:#596a50!important}
#game-root.ui-workspace .codex-page :is(.collection-base,.collection-set,.collection-trait) {padding:8px!important;line-height:1.55}
#game-root.ui-workspace .codex-page :is(#collection-count,.collection-card p,.collection-card small,.collection-tools label,.collection-possession){color:#bdcbb1!important}
#game-root.ui-workspace .codex-page #map-book-detail{padding:8px!important}
#game-root.ui-workspace .codex-page #map-book-detail :is(.map-book-caption h3,.map-book-caption p){margin:6px 0!important}
#game-root.ui-workspace .town-new-streets{background:#142c2b!important;border:1px solid #586d5b!important;border-radius:0!important;padding:10px!important}
#game-root.ui-workspace .town-new-streets :is(p,small){color:#bdcbb1!important}
#game-root.ui-workspace .town-new-streets h3{margin:0 0 6px!important;color:#e8d8a8!important}
#game-root.ui-workspace .town-new-friends{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px!important}
#game-root.ui-workspace .town-new-friends>button{min-width:0!important;padding:6px!important;gap:6px!important}
#game-root.ui-workspace .town-new-friends>button img{width:32px!important;height:42px!important;object-fit:contain}
#game-root.ui-workspace #directory-list>button{padding:8px!important;gap:8px!important;min-width:0}
#game-root.ui-workspace #directory-list>button>img{width:36px!important;height:48px!important;object-fit:contain}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace .ws-codex-note{display:none}
 #game-root.ui-workspace .codex-page .collection-tools :is(input,select){min-height:28px!important;height:28px!important;max-height:28px!important}
 #game-root.ui-workspace .codex-page .collection-tools label{gap:2px!important}
 #game-root.ui-workspace .codex-page .collection-tools label:first-child{font-size:0!important;gap:0!important}
 #game-root.ui-workspace .codex-page .collection-tools label:first-child input{font-size:12px!important}
 #game-root.ui-workspace .codex-page .collection-tools button{min-height:26px!important;padding:4px!important}
 #game-root.ui-workspace .codex-page :is(.collection-new-filter,#collection-roster,#collection-pages)>button{min-height:26px!important;padding:4px 6px!important;font-size:10px!important}
 #game-root.ui-workspace .codex-page .collection-new-filter{flex-wrap:nowrap!important;gap:5px!important;font-size:10px!important}
 #game-root.ui-workspace .codex-page .collection-dialog>footer{font-size:9px!important;line-height:1.3!important;padding:3px 0!important}
 #game-root.ui-workspace .codex-page :is(.map-book-tools,.bestiary-tools){display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:5px!important}
 #game-root.ui-workspace .codex-page :is(.map-book-tools,.bestiary-tools) label{min-width:0;font-size:10px!important;gap:3px!important}
 #game-root.ui-workspace .codex-page :is(.map-book-tools,.bestiary-tools) :is(input,select){min-height:30px!important;padding:5px!important;max-width:100%;font-size:11px!important}
 #game-root.ui-workspace .codex-page :is(.map-book-tools,.bestiary-tools)>span{grid-column:1/-1;font-size:10px}
 #game-root.ui-workspace .codex-page .ws-collection-browser{grid-template-rows:minmax(80px,.65fr) minmax(0,1fr)}
 #game-root.ui-workspace .town-new-friends{grid-template-columns:repeat(2,minmax(0,1fr))}
 #game-root.ui-workspace .town-new-friends>button small{display:none}
 #game-root.ui-workspace .town-new-streets>nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 #game-root.ui-workspace .town-new-streets>nav button{font-size:11px!important;padding:5px!important;min-width:0!important}
}
#game-root.ui-workspace .ws-panel[data-ws-group=town]>.ws-shell>.ws-content>header{display:none!important}
#game-root.ui-workspace .codex-page :is(.guide-identity,.guide-metrics>div,.guide-note,.guide-careers article,.guide-skill,.guide-growth-current,.guide-capacity span){background:#1a3431!important;color:#d7dfc2!important;border:1px solid #566b54!important;border-radius:0!important;box-shadow:none!important}
#game-root.ui-workspace .codex-page #hero-guide-portrait{display:flex;flex-direction:column;min-height:0;overflow:auto;align-items:center}
#game-root.ui-workspace .codex-page #guide-model{width:auto;max-width:100%;height:70%;object-fit:contain;image-rendering:pixelated;min-height:100px}
#game-root.ui-workspace .codex-page .guide-identity{padding:7px!important;width:100%;box-sizing:border-box;font-size:12px!important}
#game-root.ui-workspace .codex-page .guide-identity :is(p,div){margin:4px 0!important}
#game-root.ui-workspace .codex-page :is(#hero-guide-tabs,#hero-guide-roster){display:flex!important;flex-wrap:nowrap!important;overflow:auto;gap:5px!important;flex:none;margin:4px 0 6px!important}
#game-root.ui-workspace .codex-page #hero-guide-roster>button{flex:none;padding:4px!important;min-width:40px!important}
#game-root.ui-workspace .codex-page #hero-guide-roster span{display:none}
#game-root.ui-workspace .codex-page #hero-guide-roster img{width:32px!important;height:32px!important}
#game-root.ui-workspace .codex-page #hero-guide-tabs button{white-space:nowrap;min-width:0;flex:none;font-size:12px!important;padding:5px 8px!important}
#game-root.ui-workspace .codex-page .hero-guide-footer{margin:0!important;padding:6px 0!important;gap:5px;flex:none}
#game-root.ui-workspace .codex-page .hero-guide-footer>span{display:none}
#game-root.ui-workspace .codex-page .hero-guide-footer>div{display:flex;flex-wrap:nowrap;overflow:auto;gap:5px}
#game-root.ui-workspace .codex-page .hero-guide-footer button{min-width:0!important;white-space:nowrap;font-size:11px!important;padding:6px!important}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace .codex-page .hero-guide-layout{grid-template-rows:minmax(0,.7fr) minmax(0,1fr)!important}
 #game-root.ui-workspace .codex-page #hero-guide-portrait{flex-direction:row;align-items:center;gap:6px}
 #game-root.ui-workspace .codex-page #guide-model{height:100%;width:45%;max-width:45%}
 #game-root.ui-workspace .codex-page .guide-identity{width:55%}
 #game-root.ui-workspace .codex-page #hero-guide-roster img{width:28px!important;height:28px!important}
 #game-root.ui-workspace .ws-panel[data-ws-group=town] .service-body aside{display:block!important;padding:6px!important;max-width:100%}
 #game-root.ui-workspace .ws-panel[data-ws-group=town] .service-body aside>:is(img,h3,p){display:none!important}
 #game-root.ui-workspace .ws-panel[data-ws-group=town] .service-body aside>div{display:flex;flex-wrap:wrap;gap:6px;font-size:11px}
}

#game-root.ui-workspace .ws-collection-picker>button{height:62px!important;min-height:62px!important;overflow:hidden;flex:none}
#game-root.ui-workspace .ws-collection-picker>button>span{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;line-height:13px}
#game-root.ui-workspace .codex-page .guide-identity :is(span,b){color:#e3c88e!important}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){#game-root.ui-workspace .ws-collection-picker>button{height:52px!important;min-height:52px!important}}

/* Explicit native-rule preparation and compact item inspection. */
#game-root .ws-quick-prepare{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;flex:none;padding:5px 0}
#game-root.ui-rpg .ws-quick-prepare button{min-height:30px!important;padding:4px 10px!important;font-size:12px!important;margin:0!important;width:auto!important}
#game-root .ws-quick-prepare small{font-size:10px;line-height:1.3;color:#b8c2b1;flex:1;min-width:110px}
#game-root .ws-rarity-item{position:relative!important;background:linear-gradient(145deg,color-mix(in srgb,var(--item-rarity) 24%,#101e21),#101e21)!important;border-color:color-mix(in srgb,var(--item-rarity) 70%,#273b38)!important}
#game-root.ui-workspace .ws-rarity-item>.ws-item-level,#game-root.ui-workspace .ws-rarity-item>.ws-worn-badge{position:absolute!important;top:1px!important;line-height:12px!important;font-size:9px!important;padding:0 2px!important;background:#101718e8;color:#fff0bd;pointer-events:none;z-index:2}
#game-root .ws-rarity-item>.ws-item-level{left:1px}
#game-root .ws-rarity-item>.ws-worn-badge{right:1px;color:#acdfb6!important}
#game-root .ws-item-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;align-items:start}
#game-root .ws-item-layout>section{min-width:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-item-primary .item-heading{display:flex!important;gap:8px!important;align-items:center!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) .ws-item-primary .item-heading img{width:60px!important;height:60px!important;min-width:60px;object-fit:contain;image-rendering:pixelated}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-item-primary p{margin:4px 0!important;font-size:11px!important;line-height:1.5!important}
#game-root .ws-item-comparison .gear-compare{margin:0!important;padding:5px!important}
#game-root .ws-item-comparison .ws-current-equipment{display:flex;flex-wrap:wrap;gap:3px;font-size:10px}
#game-root .ws-item-extra{border-top:1px solid #65735c;padding-top:6px;margin-top:8px}
#game-root .ws-item-extra>summary{cursor:pointer;color:#e4cf99;font-size:11px;padding:4px 0}
#game-root .ws-item-extra .item-story{margin:4px 0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) #bag-action{display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;gap:5px!important;padding:4px 0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) #bag-action>button{flex:1 1 100px!important;min-width:0!important;min-height:32px!important;height:auto!important;margin:0!important;padding:5px!important;align-self:stretch!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) #bag-action>label{flex:1 1 100%;min-width:0;display:flex;align-items:center;gap:5px}
#game-root #combat-quick-actions[hidden]{display:none!important}
#game-root #combat-quick-actions button,#game-root #mobile-depart{display:inline-flex!important;align-items:center;justify-content:center;gap:4px;min-height:34px!important;padding:3px 8px!important;border:2px solid #917c4d;box-shadow:inset 0 0 0 1px #c4b77b55,2px 2px #071313;background:linear-gradient(#263d3c,#152a2b);color:#f0dba1}
#game-root #combat-quick-actions button[hidden]{display:none!important}
#game-root :is(#combat-quick-actions,#mobile-depart) .ws-pixel-icon{width:24px;height:24px;flex:none}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true] .gear-desktop{grid-template-rows:145px minmax(0,1fr)!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true] :is(#inventory-panel,#ew-trade-inventory-panel){max-height:145px!important}
 #game-root .ws-item-layout{gap:5px}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-item-primary .item-heading{flex-direction:column!important;align-items:flex-start!important;gap:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) .ws-item-primary .item-heading img{width:48px!important;height:48px!important;min-width:48px}
 #game-root .ws-item-comparison .ws-gear-comparison{font-size:9px!important}
 #game-root .ws-item-comparison .ws-gear-comparison :is(th,td){padding:2px 1px!important}
 #game-root .ws-quick-prepare{gap:3px;padding:2px 0}
 #game-root .ws-quick-prepare small{font-size:9px;min-width:90px}
}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) .ws-item-comparison :is(th,td){font-family:EmberLanternText,serif;font-weight:normal;white-space:normal!important;overflow-wrap:anywhere}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) .ws-item-comparison :is(th,td){font-size:10px!important;padding:3px 1px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) .ws-item-comparison caption{font-size:10px!important;line-height:1.35!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) .ws-item-layout{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)}
}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route] :is(:is(#bag-items,#ew-trade-bag-items),.gear-paperdoll) .ws-rarity-item>.ws-item-level,#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route] :is(:is(#bag-items,#ew-trade-bag-items),.gear-paperdoll) .ws-rarity-item>.ws-worn-badge{display:block!important;position:absolute!important;top:1px!important;font-size:9px!important;line-height:12px!important;margin:0!important;padding:0 2px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route] :is(:is(#bag-items,#ew-trade-bag-items),.gear-paperdoll) .ws-rarity-item{background:linear-gradient(145deg,color-mix(in srgb,var(--item-rarity) 24%,#101e21),#101e21)!important;border-color:color-mix(in srgb,var(--item-rarity) 70%,#273b38)!important}

/* One shared tab row; do not spend a second line repeating the window name. */
#game-root.ui-workspace .ws-panel>.ws-nav{display:flex!important;align-items:center!important;gap:6px!important;padding:0 0 6px!important}
#game-root.ui-workspace .ws-panel>.ws-nav>.ws-tabs{order:1;flex:1;min-width:0;margin:0!important}
#game-root.ui-workspace .ws-panel>.ws-nav>.ws-title-row{order:2;flex:0 0 auto;margin:0!important;min-height:0!important;gap:4px!important}
#game-root.ui-workspace .ws-panel>.ws-nav>.ws-title-row>strong{display:none!important}
#game-root.ui-workspace .ws-panel[data-ws-route=codex]>.ws-nav>.ws-title-row{flex:1;min-width:0}
#game-root.ui-workspace .ws-panel[data-ws-route=codex]>.ws-nav>.ws-tabs{display:none!important}
#game-root.ui-workspace .ws-panel[data-ws-route=codex] .ws-codex-note{flex:1;min-width:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{position:relative!important;padding-top:34px!important;box-sizing:border-box;overflow:hidden!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-model-wrap>.ws-quick-prepare{position:absolute;top:0;left:0;right:0;z-index:2;justify-content:center;margin:0;padding:1px 0;white-space:nowrap}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-model-wrap>.ws-quick-prepare small{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-model-wrap>.ws-quick-prepare button{font-size:11px!important;min-height:28px!important;padding:3px 7px!important;max-width:100%}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-model{max-height:calc(100% - 4px)!important;min-height:0!important;object-fit:contain!important}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{padding-top:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-model-stack{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:0;max-height:100%}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-model-stack>.ws-quick-prepare{flex:none;align-self:center;justify-content:center;z-index:2;margin-bottom:-28px;white-space:nowrap}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-model-stack>.ws-quick-prepare small{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-model-stack>.ws-quick-prepare button{max-width:100%;font-size:11px!important;min-height:28px!important;padding:3px 6px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route] :is(:is(#bag-items,#ew-trade-bag-items),.gear-paperdoll) .ws-rarity-item>.ws-item-level{left:1px!important;right:auto!important;bottom:auto!important;width:auto!important;max-width:none!important;transform:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route] :is(:is(#bag-items,#ew-trade-bag-items),.gear-paperdoll) .ws-rarity-item>.ws-worn-badge{right:1px!important;left:auto!important;bottom:auto!important;width:auto!important;max-width:none!important;transform:none!important}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item>small:is(.ws-item-level,.ws-worn-badge){display:block!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item:has(.ws-worn-badge)::before{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item.ws-rarity-item{background:linear-gradient(145deg,color-mix(in srgb,var(--item-rarity) 24%,#101e21),#101e21)!important;border-color:color-mix(in srgb,var(--item-rarity) 70%,#273b38)!important}
#game-root.ui-rpg #pause-modal #menu-title{display:none!important}

/* Loot is a timed corner notice, not a stretched modal. Keep its native timer. */
#game-root #clear-loot{
 top:auto!important;right:auto!important;left:var(--dock-edge,8px)!important;
 bottom:calc(var(--desktop-dock-height,136px) + 56px)!important;transform:none!important;
 width:var(--dock-player,280px)!important;max-width:min(340px,calc(100% - 16px))!important;
 height:auto!important;min-height:0!important;max-height:min(25dvh,260px)!important;
 box-sizing:border-box;padding:6px 8px!important;border-width:6px!important;border-image-width:9px!important;
 overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;
}
#game-root #clear-loot[hidden]{display:none!important}
#game-root #clear-loot>small{display:none!important}
#game-root #clear-loot h3{font-size:12px!important;line-height:1.35!important;margin:0 22px 5px 0!important}
#game-root #clear-loot-close{top:1px!important;right:1px!important;min-width:22px!important;min-height:22px!important;padding:0!important;font-size:14px!important;line-height:20px!important}
#game-root #clear-loot-resources{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px!important;font-size:10px!important;line-height:1.3!important}
#game-root #clear-loot-resources .resource-chip{padding:2px 4px!important;min-width:0;gap:3px}
#game-root #clear-loot-resources .resource-chip img{width:16px!important;height:16px!important}
#game-root #clear-loot-equipment{gap:4px!important;margin-top:5px!important}
#game-root #clear-loot-equipment>span{gap:4px!important;padding:3px!important;min-width:0;font-size:10px!important;flex:1 1 100px}
#game-root #clear-loot-equipment .gear-pixel-icon{width:25px!important;height:25px!important;flex:none}
#game-root #clear-loot-equipment small{margin-top:1px!important;font-size:9px!important}
#game-root #clear-loot-note{margin:5px 0 0!important;font-size:10px!important;line-height:1.4!important}
@media(max-width:800px),(pointer:coarse){
 #game-root #clear-loot{left:6px!important;bottom:calc(var(--mobile-dock) + 48px)!important;width:min(280px,72vw)!important}
}

/* Compact study workspaces: fixed square loadout, native card actions. */
#game-root.ui-workspace .ws-item-extra>h4,#game-root.ui-workspace .item-story>h4{margin:3px 0 5px;color:#e4cf99;font-size:11px}
#game-root.ui-rpg .rpg-window .ws-study-layout{grid-template-columns:minmax(210px,.9fr) minmax(0,1.8fr);gap:7px}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-study-heading{display:none!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;gap:3px 6px!important;padding:4px!important;margin:0 0 4px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points :is(small,span){font-size:10px!important;flex-basis:auto!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-points strong{font-size:15px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout [data-book-reset],#game-root.ui-rpg .rpg-window .ws-study-layout #career-reset,#game-root.ui-rpg .rpg-window .book-innate-note{display:none!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-quick-prepare{flex-wrap:nowrap;gap:5px;margin:3px 0 5px;padding:0}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-quick-prepare small{display:none}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-quick-prepare button{flex:1;white-space:nowrap;font-size:11px!important;padding:4px 6px!important;min-height:30px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout{padding:4px!important;margin:3px 0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-section-title{margin:0 0 4px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-section-title h3,#game-root.ui-rpg .rpg-window .ws-study-layout #book-capacity{font-size:11px!important;margin:0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #book-loadout-slots{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(42px,1fr))!important;grid-auto-rows:auto!important;gap:5px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot{position:relative!important;display:grid!important;place-items:center!important;aspect-ratio:1!important;height:auto!important;min-height:0!important;max-height:none!important;padding:2px!important;box-sizing:border-box!important;overflow:hidden!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot>img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;min-height:0}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot>span,#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot>small,#game-root.ui-rpg .rpg-window .ws-study-layout [data-book-up]{display:none!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot>div{display:contents!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-loadout-slot [data-book-remove]{position:absolute!important;top:0!important;right:0!important;left:auto!important;bottom:auto!important;display:grid!important;place-items:center!important;width:19px!important;height:19px!important;min-height:19px!important;min-width:19px!important;padding:0!important;margin:0!important;border:1px solid #b1a17b!important;background:#172525eb!important;color:#f1d4a2!important;font-size:15px!important;line-height:1!important;z-index:1}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-innate-slot{border-color:#baa365!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-innate-slot>small{display:block!important;position:absolute;left:1px;right:1px;bottom:1px;font-size:9px!important;line-height:12px;background:#101e23dd;text-align:center}
#game-root.ui-rpg .rpg-window .ws-study-layout #book-cards,#game-root.ui-rpg .rpg-window .ws-study-layout .career-node-grid{grid-template-columns:repeat(auto-fill,minmax(min(172px,100%),1fr))!important;gap:6px!important;align-items:stretch!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-skill-card,#game-root.ui-rpg .rpg-window .ws-study-layout .career-node{display:flex!important;flex-direction:column!important;min-width:0!important;min-height:0!important;height:100%!important;box-sizing:border-box!important;padding:7px!important;gap:5px!important;border-width:1px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-heading,.career-node-heading){gap:5px!important;min-height:34px!important;padding:0!important;align-items:center!important}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-heading,.career-node-heading)>img{width:32px!important;height:32px!important;flex:none;object-fit:contain}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-heading,.career-node-heading)>div{min-width:0}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-heading,.career-node-heading) h4{font-size:12px!important;line-height:1.3!important;margin:1px 0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-heading,.career-node-heading) small{font-size:9px!important;line-height:1.3!important}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-card,.career-node)>p{font-size:11px!important;line-height:1.45!important;margin:0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-rank,.book-stats,.book-next,.career-preview,.career-node-bottom){font-size:10px!important;line-height:1.4!important;margin:0!important;padding:3px!important;overflow-wrap:anywhere}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-rank{display:flex;flex-wrap:wrap;gap:2px 5px}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-tier,.career-rank){font-size:12px!important;padding:2px!important;white-space:nowrap}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-study-actions{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:4px!important;margin-top:auto!important}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-card,.career-node) button{min-width:0!important;min-height:28px!important;padding:3px 5px!important;margin:0!important;line-height:1.35!important;font-size:10px!important;white-space:normal!important;overflow-wrap:anywhere}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-node-bottom{margin-top:auto!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:4px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-node-actions{display:flex!important;gap:4px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-node-actions>button:last-child{flex:1}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.career-pips,.passive-pips){height:4px!important;gap:3px!important;margin:1px 0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-pips i{height:4px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-learned-talents{display:grid;grid-template-columns:repeat(auto-fill,minmax(42px,1fr));gap:5px}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-learned-talents>div{aspect-ratio:1;position:relative;display:grid;place-items:center;padding:2px}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-learned-talents img{width:100%;height:100%;object-fit:contain}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-learned-talents span{display:none}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-learned-talents b{position:absolute;bottom:1px;right:1px;background:#14272bd9;padding:0 2px;font-size:10px}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-footer{padding:2px 0!important;margin:2px 0!important}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true]{height:calc(min(650px,var(--dialog-height)) - var(--gear-shrink,0px))!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true] .gear-desktop{grid-template-rows:var(--gear-list-height,170px) minmax(0,1fr)!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true] :is(#inventory-panel,#ew-trade-inventory-panel){max-height:none!important}
 #game-root.ui-rpg .rpg-window.ws-panel:is([data-ws-route=skills],[data-ws-route=career]) .ws-study-layout{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(165px,.7fr) minmax(0,1.3fr)!important;gap:6px}
 #game-root.ui-rpg .rpg-window .ws-study-layout :is(.ws-study-current,.ws-study-options){padding:5px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout #book-loadout-slots{grid-template-columns:repeat(auto-fill,minmax(34px,1fr))!important;gap:4px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout :is(#book-cards,.career-node-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-card,.career-node){padding:5px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-heading,.career-node-heading){flex-wrap:wrap!important;gap:3px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-heading,.career-node-heading)>img{width:28px!important;height:28px!important}
}
/* Native generic grid rule includes an ID selector; match it explicitly. */
#game-root.ui-rpg #career-modal .ws-study-layout .career-node-grid{grid-template-columns:repeat(auto-fill,minmax(min(172px,100%),1fr))!important;grid-auto-rows:1fr!important;gap:6px!important}
#game-root.ui-rpg #career-modal .ws-study-layout .career-node{height:230px!important;overflow:auto;scrollbar-width:thin}
#game-root.ui-rpg #career-modal .ws-study-layout .career-node>p{min-height:0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-innate-slot{opacity:1!important;color:#f1d4a2!important}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-rpg #career-modal .ws-study-layout .career-node-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #game-root.ui-rpg #career-modal .ws-study-layout .career-node{height:280px!important}
}
#game-root.ui-rpg .rpg-window .ws-study-layout .hero-passives{margin:4px 0!important;padding:4px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .hero-passives>summary{min-height:24px!important;padding:2px!important;font-size:10px!important;gap:5px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .passive-mini-icons img{width:18px!important;height:18px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-group>h3{font-size:11px!important;margin:7px 0 5px!important;padding:0!important;min-height:0!important;line-height:1.4!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #career-pools{margin:5px 0!important;gap:4px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #career-pools button{min-height:40px!important;padding:5px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #career-pools button b{font-size:12px!important;line-height:1.3!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #career-pools button span{font-size:9px!important;line-height:1.3!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-current-class{font-size:12px!important;margin:0 0 4px!important}
#game-root.ui-rpg #career-modal .ws-study-current .career-points{padding:4px!important;margin:0 0 4px!important}
#game-root.ui-rpg #career-modal .ws-study-current .career-points b{font-size:15px!important}
#game-root.ui-rpg #career-modal .ws-study-current .career-points span{font-size:10px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout #career-message{font-size:10px!important;line-height:1.4!important;margin:3px 0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-innate-slot>small{top:auto!important;bottom:1px!important;color:#f1d4a2!important;font-weight:500!important}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-rpg .rpg-window.ws-panel[data-ws-route=skills] .ws-study-layout{grid-template-rows:minmax(230px,.85fr) minmax(0,1.15fr)!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout #book-loadout-slots{grid-template-columns:repeat(auto-fill,minmax(30px,1fr))!important;gap:4px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .ws-learned-talents{grid-template-columns:repeat(auto-fill,minmax(30px,1fr))!important;gap:4px}
}

/* Stable study tiles: short rows retain the same card width; never stretch. */
#game-root.ui-workspace .ws-panel:is([data-ws-route=skills],[data-ws-route=career]){width:min(1080px,var(--dialog-width))!important}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(#book-cards,#career-branches),#game-root.ui-rpg #career-modal .ws-study-layout .career-node-grid{grid-template-columns:repeat(auto-fill,minmax(min(168px,100%),168px))!important;justify-content:start!important;align-content:start!important;grid-auto-rows:auto!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .book-skill-card{height:285px!important;overflow:auto;scrollbar-width:thin}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-learned-talents [data-quick-refund]{position:absolute!important;top:0;right:0;width:19px!important;height:19px!important;min-width:19px!important;min-height:19px!important;padding:0!important;margin:0!important;display:grid;place-items:center;font-size:16px!important;line-height:1!important;border:1px solid #b1a17b;background:#172525eb;color:#f1d4a2}
#game-root.ui-rpg .rpg-window #ws-talent-refunds:empty{display:none}
#game-root.ui-rpg .rpg-window .ws-study-books{margin-top:6px;border:1px solid #58634d;padding:5px;font-size:11px}
#game-root.ui-rpg .rpg-window .ws-study-books>summary{cursor:pointer;color:#e5cea0;padding:3px}
#game-root.ui-rpg .rpg-window .ws-study-books .passive-note{font-size:10px;line-height:1.4;margin:5px 0}
#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut img{width:28px;height:28px;object-fit:contain}
#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut button{font-size:10px!important;min-height:28px!important;padding:3px 5px!important}
/* Map and detail share a bottom edge. Details scroll inside the map height. */
#game-root.ui-workspace .ws-panel:is([data-ws-route=map],[data-ws-route=regional]){height:auto!important;min-height:0!important}
#game-root.ui-workspace .ws-panel:is([data-ws-route=map],[data-ws-route=regional])>.ws-shell{flex:none!important;min-height:0!important}
#game-root.ui-workspace .ws-panel:is([data-ws-route=map],[data-ws-route=regional]) .ws-content{flex:1 1 auto;min-height:0}
#game-root.ui-workspace :is([data-ws-route=map],[data-ws-route=regional]) :is(.world-atlas-layout,.regional-layout){flex:none!important;height:var(--map-layout-height,420px)!important;min-height:0!important}
#game-root.ui-workspace :is([data-ws-route=map],[data-ws-route=regional]) :is(.world-atlas-left,.regional-landscape){height:auto!important;min-height:0!important;align-self:start!important;flex:none!important;width:100%;overflow:hidden!important}
#game-root.ui-workspace :is([data-ws-route=map],[data-ws-route=regional]) :is(.atlas-info,.regional-detail){height:100%;box-sizing:border-box;align-self:stretch!important;align-content:start}
#game-root.ui-workspace :is([data-ws-route=map],[data-ws-route=regional]) #atlas-region-list{flex:none}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-rpg .rpg-window .ws-study-layout :is(#book-cards,#career-branches),#game-root.ui-rpg #career-modal .ws-study-layout .career-node-grid{grid-template-columns:repeat(auto-fill,minmax(min(120px,100%),120px))!important;gap:5px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-skill-card{height:335px!important}
 #game-root.ui-workspace :is([data-ws-route=map],[data-ws-route=regional]) :is(.atlas-info,.regional-detail){height:auto;flex:1 1 0!important;min-height:0!important}
 #game-root.ui-workspace :is([data-ws-route=map],[data-ws-route=regional]) :is(.atlas-caption,.regional-legend){font-size:9px!important;line-height:1.3;padding:4px!important}
 #game-root.ui-workspace :is([data-ws-route=map],[data-ws-route=regional]) .atlas-tools{padding:4px!important;font-size:9px!important;gap:3px}
 #game-root.ui-workspace :is([data-ws-route=map],[data-ws-route=regional]) .atlas-tools button{min-height:26px!important;padding:3px!important;font-size:9px!important}
}

#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch{height:350px!important;box-sizing:border-box;min-height:0!important;overflow:auto;padding:8px!important;display:flex;flex-direction:column;font-size:11px;gap:4px}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch>img{width:42px!important;height:42px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch :is(h3,p){margin:3px 0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch h3{font-size:15px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch button{margin-top:auto;min-height:30px;padding:4px;font-size:11px}
/* Native three-card groups span their last card across the row. The workspace
   uses equal tiles, so remove that presentation-only exception. */
#game-root.ui-rpg #career-modal .ws-study-layout .career-node-grid>.career-node{grid-column:auto!important;justify-self:stretch!important;width:auto!important;max-width:none!important}

#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch>*{flex-shrink:0}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch{height:410px!important}}

/* Dungeon navigation: one legend/progress row, back left and challenge right. */
#game-root.ui-workspace [data-ws-route=regional] :is(.regional-summary,.regional-map-note,.regional-footer){display:none!important}
#game-root.ui-workspace [data-ws-route=regional] .regional-legend{align-items:center;gap:4px 10px}
#game-root.ui-workspace [data-ws-route=regional] .ws-map-legend-status{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px}
#game-root.ui-workspace [data-ws-route=regional] #dungeon-progress{color:#e7c990;white-space:nowrap;font-size:inherit}
#game-root.ui-workspace [data-ws-route=regional] .ws-map-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px;clear:both}
#game-root.ui-workspace #map-modal .ws-map-actions>button{width:100%!important;margin:0!important;min-width:0;min-height:34px;box-sizing:border-box;padding:6px 8px;font-size:12px}
#game-root.ui-workspace #map-modal .ws-map-actions>button[hidden]{display:none!important}
#game-root.ui-workspace #map-modal .ws-map-actions:has(>#dungeon-return-town[hidden])>#dungeon-side{grid-column:1/-1}
@media(max-width:800px),(pointer:coarse){#game-root.ui-workspace #map-modal .ws-map-actions>button{padding:5px!important;font-size:11px!important}}

#game-root.ui-workspace #map-modal .regional-detail{display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:0!important}
#game-root.ui-workspace #map-modal .ws-map-detail-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:10px 12px;display:flow-root}
#game-root.ui-workspace #map-modal .ws-map-actions{flex:none;margin:0;padding:7px 10px;border-top:1px solid #58664f;background:#142c2b}
#game-root.ui-workspace #map-modal .ws-map-detail-body>small{font-size:10px;color:#bda577;letter-spacing:1px}
#game-root #mobile-depart:not([hidden]){display:inline-flex!important;width:max-content!important;min-width:116px;max-width:calc(100% - 140px);flex-wrap:nowrap;white-space:nowrap}
#game-root #mobile-depart:not([hidden])>span{white-space:nowrap;min-width:0}
@media(max-width:800px),(pointer:coarse){#game-root.ui-workspace #map-modal .ws-map-detail-body{padding:8px}#game-root #mobile-depart:not([hidden]){font-size:12px!important}}

/* Party departure stays centered, with ordinary button typography. */
#game-root.ui-workspace #party-modal [data-party-mode=overview] .party-footer{justify-content:center!important}
#game-root.ui-workspace #party-modal #party-depart{display:inline-block;font-size:12px!important;font-family:inherit!important;font-weight:400!important;letter-spacing:normal!important;line-height:1.4!important;min-height:32px!important;padding:6px 14px!important}
#game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel .ws-roster [data-ws-party=edit]{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:0;height:39px!important;min-height:39px!important;padding:2px!important;background:#66522b!important;color:#fff1c2!important;border-color:#d5b264!important;box-shadow:inset 0 0 0 1px #927c43!important;line-height:15px!important;font-size:11px!important}
#game-root.ui-workspace .ws-roster [data-ws-party=edit]>span{display:block;white-space:nowrap}
/* Natural card height; description and actions remain adjacent rather than
   stretching to a fixed 280–410px box. Width remains consistent within a grid. */
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-card,.career-branch),#game-root.ui-rpg #career-modal .ws-study-layout .career-node{height:auto!important;min-height:0!important;align-self:start!important;overflow:visible!important}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-card,.career-node)>p{min-height:0!important;flex:none!important}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-study-actions,.career-node-bottom),#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch button{margin-top:0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-card,.career-node)>*{flex-shrink:0}
#game-root.ui-rpg .rpg-window .ws-study-options>.ws-study-books{margin:0 0 5px;padding:2px 5px}
#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut{display:grid!important;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:4px;padding:5px!important}
#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut>span{min-width:0}
#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut>span :is(b,small){display:block;font-size:10px;line-height:1.4}
#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut>button{grid-column:1/-1}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-rpg .rpg-window .ws-study-layout :is(#book-cards,#career-branches),#game-root.ui-rpg #career-modal .ws-study-layout .career-node-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;align-content:start!important;grid-auto-rows:auto!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-heading,.career-node-heading){display:grid!important;grid-template-columns:40px minmax(0,1fr);align-items:center!important;gap:4px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-heading,.career-node-heading)>img{width:40px!important;height:40px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-tier,.career-rank){grid-column:1/-1;justify-self:start;font-size:10px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout #book-loadout-slots,#game-root.ui-rpg .rpg-window .ws-study-layout .ws-learned-talents{grid-template-columns:repeat(auto-fill,minmax(42px,1fr))!important;gap:4px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .career-branch>img{width:58px!important;height:58px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-skill-card,.career-node){gap:4px!important}
}

#game-root.ui-rpg .rpg-window .ws-study-layout .ws-learned-talents>small{grid-column:1/-1;line-height:1.5;white-space:normal}

/* Confirmed revival is a compact picker, not a full-size catalog. */
#game-root.ui-rpg #revival-modal .revival-dialog{width:min(520px,var(--dialog-width,90vw))!important;height:auto!important;min-height:0!important;max-height:var(--dialog-height,85vh)!important;padding:14px!important;overflow:auto!important;box-sizing:border-box}
#game-root.ui-rpg #revival-modal header{display:flex;align-items:center;gap:8px;margin:0 0 10px!important;padding:0!important;flex-wrap:wrap}
#game-root.ui-rpg #revival-title{font-size:18px!important;line-height:1.3;margin:0!important;white-space:nowrap}
#game-root.ui-rpg #revival-modal .revival-auto{margin-left:auto;display:flex;align-items:center;gap:4px;font-size:11px;color:#ebcf94;cursor:pointer}
#game-root.ui-rpg #revival-auto-buy{width:16px;height:16px;margin:0;accent-color:#d8b764}
#game-root.ui-rpg #revival-close{width:30px!important;min-width:30px!important;min-height:30px!important;padding:1px!important;font-size:18px}
#game-root.ui-rpg #revival-stock{font-size:12px;color:#e7cf9c;margin:6px 0 10px}
#game-root.ui-rpg #revival-members{display:grid;grid-template-columns:repeat(auto-fit,minmax(84px,1fr));gap:8px;align-items:start}
#game-root.ui-rpg #revival-members .revival-member{min-width:0;display:flex;flex-direction:column;align-items:center;gap:5px;padding:6px;border:1px solid #63725c;background:#1b302f}
#game-root.ui-rpg #revival-members img{width:58px;height:58px;object-fit:contain}
#game-root.ui-rpg #revival-members b{font-size:12px;line-height:1.4;font-weight:500;white-space:nowrap}
#game-root.ui-rpg #revival-members small{font-size:9px;color:#d7b779}
#game-root.ui-rpg #revival-members button{font-size:11px;width:100%;min-height:28px!important;padding:3px!important}
#game-root.ui-rpg #revival-members button[aria-pressed=true]{background:#66522b!important;border-color:#d5b264!important;color:#fff1c2!important}
#game-root.ui-rpg #revival-cost{font-size:11px;line-height:1.5;margin:10px 0 8px;color:#e6c887}
#game-root.ui-rpg #revival-modal .revival-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0}
#game-root.ui-rpg #revival-modal .revival-actions button{min-height:34px!important;font-size:12px!important;padding:5px!important}
#game-root.ui-rpg #revival-modal .revival-note{font-size:10px;color:#b4bcae;line-height:1.5;margin:8px 0 0}
#game-root.ui-rpg #revival-message{font-size:11px;color:#f0b791;margin:8px 0 0;line-height:1.5}
#game-root.ui-rpg #revival-message:empty{display:none}
#game-root.ui-rpg #revival-buy{margin:8px 0 0;width:100%;font-size:12px!important}
#game-root.ui-rpg #revival-buy[hidden]{display:none!important}
#game-root.ui-rpg #revival-modal .revival-empty{grid-column:1/-1;font-size:13px;text-align:center;margin:10px}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-rpg #revival-modal .revival-dialog{width:min(430px,var(--dialog-width,90vw))!important;padding:10px!important}
 #game-root.ui-rpg #revival-title{font-size:15px!important}
 #game-root.ui-rpg #revival-members{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 #game-root.ui-rpg #revival-members img{width:48px;height:48px}
 #game-root.ui-rpg #revival-modal .revival-auto{font-size:10px}
}

/* Keep one text line of breathing room below all equipment-detail tabs. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-panel-scroll{padding-bottom:18px!important;box-sizing:border-box}

/* Empty HUD slots center their plus independently of the hotkey label. */
#game-root .book-hotbar .book-slot.empty>span{position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:0;line-height:1;pointer-events:none}

/* Independent Class tab retains native change/confirm handles. */
#game-root.ui-workspace #career-modal .ws-study-layout .career-tabs{display:none!important}
#game-root.ui-workspace #career-modal [data-ws-profession=true] .ws-study-current{display:none!important}
#game-root.ui-workspace #career-modal [data-ws-profession=true] .ws-study-layout{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}
#game-root.ui-workspace #career-modal [data-ws-profession=true] .ws-study-books{display:none!important}
/* Every tile in a catalog has a stable size, including the short final row.
   Long descriptions remain scrollable, without stretching sibling cards. */
#game-root.ui-rpg .rpg-window .ws-study-layout .book-skill-card{height:285px!important;align-self:stretch!important;overflow:auto!important}
#game-root.ui-rpg #career-modal .ws-study-layout .career-node{height:230px!important;align-self:stretch!important;overflow:auto!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch{height:350px!important;align-self:stretch!important;overflow:auto!important}
#game-root.ui-rpg .rpg-window .ws-study-layout :is(.book-study-actions,.career-node-bottom),#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch button{margin-top:auto!important}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-rpg .rpg-window .ws-study-layout .book-skill-card{height:335px!important}
 #game-root.ui-rpg #career-modal .ws-study-layout .career-node{height:280px!important}
 #game-root.ui-rpg .rpg-window .ws-study-layout .career-branch{height:410px!important}
}
@media(min-width:801px) and (pointer:fine){
 #game-root.ui-rpg .rpg-window.ws-panel[data-ws-profession=true]{width:min(650px,var(--dialog-width))!important;height:min(560px,var(--dialog-height))!important}
}

/* Profession confirmation follows the same compact dark/gold confirmation surface. */
#game-root.ui-rpg #career-confirm{background:var(--ui-surface,#182f32)!important;color:var(--ui-paper,#eee2bf)!important;border:1px solid #9e8959!important;border-radius:2px!important;padding:12px!important;line-height:1.65;max-width:100%;box-shadow:none!important}
#game-root.ui-rpg #career-confirm p{color:inherit!important;margin:0 0 10px!important}
#game-root.ui-rpg #career-confirm button{min-height:34px!important;margin:4px 8px 0 0!important;padding:6px 12px!important}
#game-root.ui-rpg #career-confirm-yes{border-color:#c2a567!important;background:#495843!important;color:#fff0c8!important}

/* Research-only performance lines; text is updated at 1Hz, resource census reused at 5s. */
#live-performance .runtime-work,#live-performance .runtime-resources{display:block;text-align:right;white-space:nowrap;font-size:9px;line-height:12px;font-weight:400;color:#d8dec7}
@media(max-width:800px),(pointer:coarse){#live-performance .runtime-work,#live-performance .runtime-resources{font-size:8px;line-height:10px}}

/* Compact talent ranks must not inherit a hero folio's stretched rotated pip. */
#game-root.ui-rpg #career-modal .ws-study-layout .career-pips{flex:0 0 5px!important;height:5px!important;max-height:5px!important;align-items:center!important;overflow:hidden!important}
#game-root.ui-rpg #career-modal .ws-study-layout .career-pips i{transform:none!important;position:static!important;flex:0 0 10px!important;width:10px!important;height:4px!important;max-width:10px!important;max-height:4px!important;margin:0!important}
/* Service actions stay within the same scrollable modal on short mobile viewports. */
#game-root.ui-rpg #service-modal .town-service{display:flex!important;flex-direction:column!important;overflow:hidden!important;min-height:0!important}
#game-root.ui-rpg #service-modal #service-list{min-height:0!important;overflow:auto!important;flex:1 1 auto!important;overscroll-behavior:contain;padding-bottom:12px!important}
#game-root.ui-rpg #service-modal :is(header,footer,#service-status,#service-tabs){flex-shrink:0!important}
@media (pointer:coarse) and (orientation:portrait){
 #game-root.ui-rpg .skin-shop-card{grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
 #game-root.ui-rpg .skin-shop-stage{height:150px!important;min-height:0!important}
 #game-root.ui-rpg .skin-shop-stage canvas{height:145px!important;width:106px!important}
}
/* New controls remain inside the existing native workspaces. */
#game-root #formation-presets{display:flex;flex-wrap:wrap;gap:5px;align-items:center;max-width:100%;margin-right:auto}
#game-root #formation-presets :is(input,select){min-width:0;width:112px;background:#15292d;color:#e4d3a6;border:1px solid #857451;padding:5px;font:inherit}
#game-root #formation-presets button{min-width:0;min-height:29px;padding:4px 7px;font-size:11px}
#game-root [data-party-mode=overview] #formation-presets{display:none}
#game-root #white-sale{flex:none;padding:3px 0;line-height:1.4}
#game-root #white-sale button{min-height:28px;padding:4px 8px;font-size:11px;margin-right:5px}
#game-root #white-sale p{margin:4px 0;color:#f0db9f}
#game-root.ui-workspace #career-confirm{position:relative!important;inset:auto!important;transform:none!important;box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-height:0!important;padding:10px!important;background:#172c2e!important;border:1px solid #a69159!important;color:#e9ddb8!important;box-shadow:inset 0 0 0 3px #0d2024!important;grid-column:1/-1;z-index:5}
#game-root.ui-workspace #career-confirm p{font-size:12px!important;line-height:1.6!important;margin:0 0 8px!important}
#game-root.ui-workspace #career-confirm button{display:inline-block!important;min-width:96px!important;padding:6px 10px!important;margin:0 6px 0 0!important;background:#293d3b!important;color:#f1dc9c!important;border:1px solid #a69159!important;font-size:12px!important}
/* Landscape uses a single compact desktop-style HUD row; touch input is unchanged. */
#game-root.mobile-landscape{--land-player:clamp(136px,20vw,190px);--land-menu:clamp(150px,24vw,224px);--land-items:70px;--mobile-dock:0px}
#game-root.mobile-landscape .world-hud.hero-ui{--mobile-dock:0px}
#game-root.mobile-landscape #game{height:100%!important}
#game-root.mobile-landscape :is(.arena-wrap>.player-card,.action-deck.loadout-deck,.item-deck,#world-shortcuts){bottom:calc(5px + env(safe-area-inset-bottom))!important;top:auto!important;height:var(--desktop-dock-height,104px)!important;min-height:0!important;transform:none!important}
#game-root.mobile-landscape .arena-wrap>.player-card{left:5px!important;right:auto!important;width:var(--land-player)!important;max-width:none!important}
#game-root.mobile-landscape #world-shortcuts{left:auto!important;right:5px!important;width:var(--land-menu)!important;max-width:none!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;padding:8px!important;gap:2px!important}
#game-root.mobile-landscape .item-deck{left:auto!important;right:calc(var(--land-menu) + 10px)!important;width:var(--land-items)!important;padding:6px!important}
#game-root.mobile-landscape .action-deck.loadout-deck{left:calc(var(--land-player) + 10px)!important;right:calc(var(--land-menu) + var(--land-items) + 15px)!important;width:auto!important;max-width:none!important;padding:6px!important}
#game-root.mobile-landscape #world-shortcuts button{font-size:9px!important;padding:1px!important;min-height:0!important;min-width:0!important}
#game-root.mobile-landscape #world-shortcuts :is(img,.ws-dock-symbol){width:19px!important;height:19px!important}
#game-root.mobile-landscape .item-deck :is(.item-slot,.tactical-slot){width:22px!important;height:22px!important;min-height:22px!important}
#game-root.mobile-landscape .book-controls{height:100%!important}
#game-root.mobile-landscape .ew-card-body{min-width:0!important}

/* Commerce: bounded confirmation, selection indicators and balanced codex panels. */
#game-root .commerce-confirm[hidden]{display:none!important}
#game-root .commerce-confirm{position:fixed;inset:0;z-index:2200;display:flex;align-items:center;justify-content:center;background:#04130dbb;padding:16px;box-sizing:border-box}
#game-root .commerce-confirm>div{width:min(430px,92vw);max-height:82dvh;display:flex;flex-direction:column;min-height:0;background:#152e2a;color:#e3d6b5;border:2px solid #a18b59;padding:16px;box-shadow:0 10px 40px #0009;box-sizing:border-box}
#game-root .commerce-confirm h3{font-size:18px;margin:0 0 10px;color:#edcf88}
#game-root .commerce-confirm p{white-space:pre-line;overflow:auto;min-height:0;font-size:14px;line-height:1.6;margin:0 0 14px}
#game-root .commerce-confirm footer{display:flex;justify-content:flex-end;gap:10px;flex:none}
#game-root .commerce-confirm button{padding:9px 16px;background:#263e34;color:#ead5a3;border:1px solid #9b865a;min-height:40px;font:inherit;cursor:pointer}
#game-root :is(#multi-sale,#ew-trade-multi-sale){display:flex;flex-wrap:wrap;gap:5px;align-items:center;padding:4px 0}
#game-root :is(#multi-sale,#ew-trade-multi-sale) button{font-size:12px;min-height:30px;padding:4px 7px}
#game-root :is(#multi-sale,#ew-trade-multi-sale) small{font-size:11px;color:#d4c7a1}
#game-root .sale-check,#game-root .skin-worn{position:absolute;right:2px;top:2px;z-index:2;min-width:16px;text-align:center;background:#16322b;color:#f3d899;font-style:normal;font-size:15px}
#game-root [data-sale-selected=true]{outline:2px solid #d6b974;outline-offset:-3px}
#game-root .skin-bag-item{position:relative;aspect-ratio:1;min-width:0}
#game-root .skin-bag-item>.skin-item-art{width:48px;height:58px;max-width:100%}
#game-root .codex-question{display:block;font:38px serif;color:#ad9c77;padding:14px}
#game-root .codex-locked{text-align:center;padding:24px 8px;color:#bdcbb8}
#game-root.ui-workspace .codex-page .bestiary-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;align-items:start;gap:10px!important}
#game-root.ui-workspace .codex-page .bestiary-list{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(106px,1fr));gap:6px;align-content:start;min-width:0}
#game-root.ui-workspace .codex-page .bestiary-card{display:flex;flex-direction:column;align-items:center;padding:5px!important;min-width:0;height:160px!important;overflow:hidden}
#game-root.ui-workspace .codex-page .bestiary-card canvas{width:100%;height:94px;object-fit:contain;flex:none}
#game-root.ui-workspace .codex-page .bestiary-card :is(strong,small){overflow-wrap:anywhere;font-size:12px;line-height:1.3}
#game-root.ui-workspace .codex-page #bestiary-model{width:100%;height:auto;max-height:220px;object-fit:contain}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace .codex-page .bestiary-layout{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(120px,35%) minmax(0,1fr)!important}
 #game-root.ui-workspace .codex-page .bestiary-card{height:112px!important}
 #game-root.ui-workspace .codex-page .bestiary-card canvas{height:62px}
 #game-root.ui-workspace .codex-page .bestiary-list{grid-template-columns:repeat(3,minmax(0,1fr));max-height:100%;overflow:auto}
 #game-root.ui-workspace .codex-page .bestiary-card-type{font-size:9px}
}

/* Keep the codex close control anchored; avoid an empty centered header on phones. */
#game-root.ui-workspace .ws-panel[data-ws-route=codex]>.ws-nav{justify-content:flex-end!important;min-height:34px;padding:0 0 6px!important}
#game-root.ui-workspace .codex-page .bestiary-empty{grid-column:1/-1}
#game-root.ui-workspace .codex-page .bestiary-footer{font-size:10px;line-height:1.4;flex:none;padding-top:5px}
#game-root.ui-workspace .codex-page .bestiary-list{grid-template-columns:repeat(auto-fill,minmax(115px,1fr))}
@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace .ws-panel[data-ws-route=codex]>.ws-nav{min-height:30px}
 #game-root.ui-workspace .codex-page .bestiary-tools{grid-template-columns:minmax(0,1fr) auto!important;align-items:end}
 #game-root.ui-workspace .codex-page .bestiary-tools label:first-child{display:flex;flex-direction:column;align-items:stretch}
 #game-root.ui-workspace .codex-page .bestiary-tools input{width:100%;box-sizing:border-box}
 #game-root.ui-workspace .codex-page .bestiary-list{grid-template-columns:repeat(3,minmax(0,1fr))}
}

#game-root.ui-workspace .ws-panel[data-ws-route=codex]>.ws-nav>.ws-title-row{margin-left:auto!important;justify-content:flex-end!important;flex:1!important}

/* Shared search / multi-sale row; preserve filter selections and native actions. */
#game-root.ui-workspace .ws-bag-search-row{display:flex;align-items:center;gap:6px;min-width:0;width:100%}
#game-root.ui-workspace .ws-bag-search-row .bag-search{flex:1;min-width:0;margin:0!important;width:auto!important}
#game-root.ui-workspace .ws-bag-search-row input{width:100%;min-width:0;box-sizing:border-box}
#game-root.ui-workspace :is(#multi-sale-toggle,#ew-trade-multi-sale-toggle){flex:none;white-space:nowrap;min-height:30px;font-size:12px;padding:4px 7px}
#game-root :is(#multi-sale,#ew-trade-multi-sale):empty{display:none}

#game-root.mobile-landscape .interact-hint{bottom:calc(var(--desktop-dock-height,104px) + 18px + env(safe-area-inset-bottom))!important}
#game-root.mobile-landscape #clear-loot{bottom:calc(var(--desktop-dock-height,104px) + 50px + env(safe-area-inset-bottom))!important}

#game-root #skin-equipment-slot.skin-current-name{text-align:center;color:#e8d6aa;font:15px/1.4 EmberLanternText,serif;padding:4px 0;margin:4px auto 8px;background:none;border:0;box-shadow:none;cursor:default}

/* Inventory shares preparation filters; keep original controls and native handlers. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(.bag-wallet,.bag-storage-label){display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row{display:flex!important;align-items:center;gap:5px;min-width:0;max-width:100%}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row :is(#bag-quality,#ew-trade-bag-quality){flex:0 0 auto;max-width:100px;min-width:0;margin:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row :is(#bag-filters,#ew-trade-bag-filters){display:flex!important;flex:1 1 0;min-width:0;width:auto!important;flex-wrap:nowrap!important;overflow-x:auto;gap:4px;margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row :is(#bag-filters,#ew-trade-bag-filters) button{flex:0 0 auto!important;white-space:nowrap}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .bag-secondary-filters>label:first-child{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is([data-ws-route=bag],[data-ws-route=gear]) #bag-action{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:stretch!important;gap:6px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is([data-ws-route=bag],[data-ws-route=gear]) #bag-action>button{flex:1 1 0!important;min-width:0!important;width:auto!important;max-width:none!important;margin:0!important;white-space:normal!important;overflow-wrap:anywhere}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] #bag-action:has(.ws-bag-prepare)>#bag-equip{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) #bag-action>.ws-bag-prepare{order:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) #bag-action>#bag-sell{order:2}

/* Keep entry actions visible; mobile landscape follows the desktop two-column map. */
#game-root.ui-workspace #world-atlas-modal .atlas-info{display:flex!important;flex-direction:column!important;padding:0!important;overflow:hidden!important}
#game-root.ui-workspace #world-atlas-modal .ws-map-detail-body{flex:1;min-height:0;overflow:auto;padding:8px;overscroll-behavior:contain}
#game-root.ui-workspace #world-atlas-modal .ws-map-actions{flex:none;padding:6px;border-top:1px solid #58664f;background:#142c2b}
#game-root.ui-workspace #world-atlas-modal .ws-map-actions button{width:100%;min-height:30px;font-size:12px;margin:0;padding:5px}
#game-root.ui-workspace #world-atlas-modal .ws-map-detail-body #atlas-region-art{float:right;width:76px!important;height:55px!important;margin:0 0 5px 6px}
#game-root.ui-workspace.mobile-landscape [data-ws-group=map] :is(.world-atlas-layout,.regional-layout){display:grid!important;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr)!important;flex-direction:row!important;gap:6px!important;align-items:stretch!important}
#game-root.ui-workspace.mobile-landscape [data-ws-group=map] :is(.world-atlas-left,.regional-landscape){width:100%;min-width:0;overflow:hidden!important;align-self:start!important}
#game-root.ui-workspace.mobile-landscape [data-ws-group=map] :is(.atlas-info,.regional-detail){height:100%!important;min-width:0;min-height:0!important;overflow:hidden!important;padding:0!important}
#game-root.ui-workspace.mobile-landscape [data-ws-group=map] .atlas-tools{font-size:10px!important;padding:4px!important;gap:4px}
#game-root.ui-workspace.mobile-landscape [data-ws-group=map] .atlas-tools button{font-size:10px!important;min-height:25px!important;padding:3px!important}
#game-root.ui-workspace.mobile-landscape [data-ws-group=map] :is(.atlas-caption,.regional-legend){font-size:9px!important;padding:3px!important}
#game-root.ui-workspace.mobile-landscape [data-ws-group=map] .ws-map-detail-body{font-size:11px!important;padding:6px!important;line-height:1.4}
#game-root.ui-workspace.mobile-landscape [data-ws-group=map] .ws-map-detail-body h3{font-size:18px!important;margin:3px 0!important}
#game-root.ui-workspace.mobile-landscape [data-ws-group=map] .ws-map-actions{padding:4px!important}
#game-root.ui-workspace.mobile-landscape [data-ws-group=map] .ws-map-actions button{font-size:10px!important;min-height:28px!important;padding:4px!important}
#game-root.ui-workspace.mobile-landscape [data-ws-group=map] :is(#atlas-region-view,.regional-detail-image){float:right!important;width:76px!important;height:54px!important;min-height:0!important;margin:0 0 5px 6px!important;overflow:hidden}

/* Merchant cards, native menu close, and bounded codex columns. */
#game-root.ui-rpg #pause-modal [role=dialog]{position:relative!important;padding-top:48px!important}
#game-root.ui-rpg #pause-modal #menu-resume.ws-menu-close{position:absolute!important;inset:8px 8px auto auto!important;width:36px!important;min-width:36px!important;height:36px!important;min-height:0!important;padding:0!important;display:grid!important;place-items:center!important;font-size:24px!important;border:1px solid #9f9166;background:#203638;color:#f1dfb0;box-shadow:inset 2px 2px #ffffff12}
#game-root.ui-rpg #directory-list{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(225px,1fr));gap:10px;overflow:auto;min-height:0}
#game-root.ui-rpg .ws-merchant-card{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:10px;padding:10px;border:1px solid #776d4d;background:#132c32;min-width:0}
#game-root.ui-rpg .ws-merchant-card>img{width:76px;height:105px;object-fit:contain;image-rendering:pixelated}
#game-root.ui-rpg .ws-merchant-card>div{display:grid;gap:5px;min-width:0}
#game-root.ui-rpg .ws-merchant-card strong{color:#f0d797;font-size:15px}
#game-root.ui-rpg .ws-merchant-card small,#game-root.ui-rpg .ws-merchant-card p{margin:0;font-size:12px;line-height:1.4;color:#b8c6bd}
#game-root.ui-rpg .ws-merchant-card button{justify-self:end;min-height:32px;padding:4px 18px}
#game-root.ui-rpg #codex-modal .bestiary-layout{align-items:start!important;min-height:0;gap:10px!important}
#game-root.ui-rpg #codex-modal .bestiary-list{max-height:52vh!important;min-height:0!important;overflow:auto!important;grid-template-columns:repeat(auto-fill,minmax(100px,1fr))!important}
#game-root.ui-rpg #codex-modal .bestiary-card{min-height:0!important;height:156px!important;gap:2px;padding:5px!important;overflow:hidden}
#game-root.ui-rpg #codex-modal .bestiary-card canvas{height:85px!important;max-width:100%;object-fit:contain;flex-shrink:0}
#game-root.ui-rpg #codex-modal .bestiary-card strong{font-size:11px;line-height:1.35}
#game-root.ui-rpg #bestiary-detail{max-height:52vh!important;overflow:auto!important;padding:8px!important}
#game-root.ui-rpg .ws-creature-preview{min-width:0}
#game-root.ui-rpg .ws-creature-data{min-width:0}
#game-root.ui-rpg .ws-creature-data .bestiary-stats{gap:5px}
#game-root.ui-rpg .ws-creature-data .bestiary-caption h3{font-size:16px}
@media(pointer:coarse){
 #game-root.ui-rpg kbd,#game-root.ui-rpg .slot-key,#game-root.ui-rpg .book-key,#game-root.ui-rpg .key-hint{display:none!important}
}
@media(orientation:portrait) and (max-width:900px){
 #game-root.ui-rpg #directory-list{grid-template-columns:1fr}
 #game-root.ui-rpg #codex-modal .bestiary-layout{display:flex!important;flex-direction:column!important}
 #game-root.ui-rpg #codex-modal .bestiary-list{width:100%;max-height:25vh!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
 #game-root.ui-rpg #codex-modal .bestiary-card{height:116px!important}
 #game-root.ui-rpg #codex-modal .bestiary-card canvas{height:55px!important}
 #game-root.ui-rpg #bestiary-detail{width:100%;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:7px;max-height:36vh!important;box-sizing:border-box;align-items:start}
 #game-root.ui-rpg #bestiary-model{width:100%;height:auto;max-height:180px!important}
 #game-root.ui-rpg #bestiary-actions{display:flex;flex-wrap:wrap;gap:3px}
 #game-root.ui-rpg #bestiary-actions button{min-height:28px!important;padding:3px 5px!important;font-size:11px!important}
 #game-root.ui-rpg .ws-creature-data h3{font-size:14px!important;margin:3px 0!important}
 #game-root.ui-rpg .ws-creature-data .bestiary-stats{grid-template-columns:1fr!important;font-size:11px}
 #game-root.ui-rpg .ws-creature-data .bestiary-stats>div{display:flex;justify-content:space-between}
 #game-root.ui-rpg .ws-creature-data .bestiary-info{font-size:11px;line-height:1.5}
}

#game-root.ui-rpg #codex-modal .bestiary-card{color:#d6dfca!important}
#game-root.ui-rpg #codex-modal .bestiary-card strong{color:#e4d4a7!important}
#game-root.ui-rpg #codex-modal .bestiary-stats dt{color:#adbbb5!important}
#game-root.ui-rpg #codex-modal .bestiary-stats dd{color:#e7d6a5!important}

/* Codex categories share the close row; phone filters stay on one compact line. */
#game-root.ui-workspace .ws-panel[data-ws-route=codex]>.ws-nav>.ws-title-row{justify-content:space-between!important;margin:0!important;gap:8px;width:100%}
#game-root.ui-workspace .ws-panel[data-ws-route=codex] #codex-tabs{display:flex!important;align-items:center;flex-wrap:nowrap!important;gap:5px;margin:0!important;padding:0!important;min-width:0;overflow-x:auto;flex:1}
#game-root.ui-workspace .ws-panel[data-ws-route=codex] #codex-tabs button{flex:none;min-width:0!important;margin:0!important;white-space:nowrap;padding:6px 10px!important}
#game-root.ui-workspace .ws-panel[data-ws-route=codex]>.ws-nav [data-ws-go=close]{flex:none;margin:0!important}
@media(pointer:coarse){
 #game-root.ui-workspace .codex-page .bestiary-tools{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:6px!important;padding:3px 0!important;min-height:0}
 #game-root.ui-workspace .codex-page .bestiary-tools label:first-child{display:none!important}
 #game-root.ui-workspace .codex-page .bestiary-tools label:nth-child(2){display:flex!important;flex-direction:row!important;align-items:center;gap:5px;flex:1;min-width:0;white-space:nowrap;font-size:11px}
 #game-root.ui-workspace .codex-page #bestiary-kind{flex:1;width:0;min-width:0!important;height:30px!important;padding:3px 5px!important;font-size:11px}
 #game-root.ui-workspace .codex-page #bestiary-count{white-space:nowrap;font-size:10px;flex:none}
 #game-root.ui-workspace .ws-panel[data-ws-route=codex] #codex-tabs button{padding:5px 7px!important;font-size:12px!important}
}
#game-root.ui-workspace .ws-panel[data-ws-route=codex] #codex-tabs{justify-content:flex-start!important;border-bottom:0!important;width:0!important;flex:1 1 0!important}

@media(min-width:900px) and (pointer:fine){
 #game-root.ui-rpg #codex-modal #bestiary-detail{display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)!important;align-items:start;gap:10px}
 #game-root.ui-rpg #codex-modal .ws-creature-preview{position:sticky;top:0}
 #game-root.ui-rpg #codex-modal #bestiary-model{width:100%!important;height:auto!important;max-height:360px!important;object-fit:contain}
 #game-root.ui-rpg #codex-modal .ws-creature-data .bestiary-stats{grid-template-columns:1fr!important;gap:4px}
 #game-root.ui-rpg #codex-modal .ws-creature-data .bestiary-stats>div{display:flex;justify-content:space-between;gap:5px}
}
#game-root.ui-rpg #pause-modal #menu-codex img{display:none!important}
@media(min-width:900px) and (pointer:fine){
 #game-root.ui-rpg #codex-modal .bestiary-layout{grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr)!important}
 #game-root.ui-rpg #codex-modal #bestiary-detail{grid-template-columns:minmax(0,1.25fr) minmax(0,.9fr)!important}
}

/* Read-only combat indicators are information, not disabled menu actions.
   Retain all cooldown masks/counts and do not alter gameplay availability. */
#game-root[data-readonly-combat-indicators=true] :is(.action-deck,.item-deck,.party-skills) :is(button,[aria-disabled=true]){opacity:1!important;cursor:default}
#game-root[data-readonly-combat-indicators=true] :is(.action-deck,.item-deck,.party-skills) :is(img,.skill-icon,.book-slot,.party-skill){opacity:1!important;filter:none!important}
/* One compact resource row; exact amounts remain in accessible labels / tooltip. */
#player-resources{display:flex;flex-flow:row nowrap;align-items:center;gap:7px;padding:5px 7px;background:#122329ed;border:1px solid #a48b55;color:#eadbb5;font:12px/17px sans-serif;pointer-events:auto;white-space:nowrap}
#player-resources>div{display:flex;align-items:center;gap:3px;min-width:0}
#player-resources .resource-art{display:flex;width:17px;height:17px;align-items:center;justify-content:center;color:#d6b65b;flex:none}
#player-resources img,#player-resources svg{width:100%;height:100%;object-fit:contain}
#player-resources .resource-name{display:none}
#player-resources b{color:#fff1c9;font-variant-numeric:tabular-nums}
#game-root #bag-action{display:flex!important;flex-wrap:wrap;gap:6px;align-items:stretch}
#game-root #bag-action>button{flex:1 1 0!important;min-width:70px;width:auto!important;margin:0!important;min-height:34px}
#game-root #bag-action>label{flex:1 0 100%;display:flex;align-items:center;gap:8px}
#game-root #forge-shortcut{display:none}
#forge-modal .forge-window{width:min(960px,96vw);max-height:90vh}
#forge-modal .forge-header{display:flex;align-items:center;justify-content:space-between}
#forge-modal .forge-workspace{display:grid;grid-template-columns:minmax(160px,30%) minmax(0,1fr);gap:14px;min-height:0;height:100%;overflow:hidden}
#forge-modal .forge-browser,#forge-modal .forge-detail{overflow:auto;min-height:0;padding:8px}
#forge-modal .forge-items{display:grid;gap:6px}
#forge-modal .forge-item{display:flex;align-items:center;gap:8px;text-align:left;min-height:56px;width:100%;padding:6px;color:#ebd5a0}
#forge-modal .forge-item[aria-pressed=true]{border-color:#ebc778;background:#304449}
#forge-modal .forge-item img{width:40px;height:40px;object-fit:contain;image-rendering:pixelated}
#forge-modal .forge-detail h3{margin:4px 0 8px;color:#f3cd85}
#forge-modal .forge-wallet{padding:9px;background:#14252c;border:1px solid #756547;line-height:1.7}
#forge-modal #upstream-affix-forge .service-row{display:grid;gap:8px;padding:12px;margin:8px 0;border:1px solid #786b51;background:#1c2d31}
#forge-modal #upstream-affix-forge small{display:block;color:#b9c6bb;font-size:12px;line-height:1.6}
#forge-modal .book-study-actions{display:flex;gap:6px;flex-wrap:wrap}
#forge-modal .book-study-actions button{flex:1;min-height:36px}

@media(max-width:900px){#forge-modal .forge-workspace{grid-template-columns:minmax(125px,28%) minmax(0,1fr);gap:5px}#forge-modal .forge-browser,#forge-modal .forge-detail{padding:3px}#forge-modal .forge-item{font-size:11px;gap:4px}#forge-modal .forge-item img{width:28px;height:28px}#player-resources{font-size:11px;padding:4px 5px;gap:5px}}

#forge-modal .forge-browser{display:flex;flex-direction:column;gap:6px;overflow:hidden}#forge-modal .forge-items{overflow:auto;min-height:0}#forge-modal .forge-pager{display:flex;flex-wrap:wrap;gap:4px;align-items:center;flex:none}#forge-modal .forge-pager button{min-height:30px;font-size:12px}#forge-modal .forge-pager span{font-size:11px;margin-left:auto}#forge-modal input{box-sizing:border-box;width:100%;min-height:32px;flex:none}

/* Unscaled row; fitNativeLayout aligns the map and companion lower edges. */
#game-root #player-resources{position:absolute;top:8px;right:8px;z-index:51;box-sizing:border-box;width:max-content;max-width:calc(100% - 16px);margin:0}
@media(max-width:900px){#game-root #player-resources{font-size:11px;line-height:15px}#game-root #player-resources .resource-art{width:15px;height:15px}}

/* Career: keep native actions separate from the scrollable description. */
#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch{display:grid!important;grid-template-rows:42px auto auto minmax(0,1fr) auto 44px!important;align-content:stretch!important;overflow:hidden!important;position:relative!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch>:is(img,small,h3,p,div,button){position:static!important;transform:none!important;float:none!important;min-width:0!important;max-height:none!important;box-sizing:border-box!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch>p{height:auto!important;min-height:0!important;overflow:auto!important;line-height:1.6!important;align-self:stretch!important;padding-right:5px!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch>div{height:auto!important;overflow:visible!important;line-height:1.65!important;margin:0!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch>button{margin:0!important;width:100%!important;height:44px!important;min-height:44px!important;align-self:end!important;z-index:1}

#game-root.ui-rpg .rpg-window .ws-study-layout .career-branch>img{width:42px!important;height:42px!important;min-height:0!important;object-fit:contain!important}

/* Equipment previews occupy their own cell; never paint over equipment slots. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{overflow:hidden!important;min-width:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #gear-model{transform:none!important;margin-inline:auto!important;display:block!important}
/* Study and respec cards: two equal actions and explicit batch quantities. */
#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcuts{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important}
#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut{grid-template-columns:repeat(2,minmax(0,1fr))!important}
#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut>img{grid-column:1}
#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut>span{grid-column:1/-1}
#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut>button{grid-column:auto!important;min-width:0!important;white-space:normal!important}
#game-root .study-quantity{grid-column:1/-1;display:flex;justify-content:space-between;gap:5px}

#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut[hidden]{display:none!important}

#game-root.ui-rpg .rpg-window .ws-study-books .study-shortcut>button{align-self:stretch!important;min-height:36px!important;height:auto!important}

/* Book controls belong to current setup, above auto allocation, collapsed on open. */
#game-root.ui-rpg .rpg-window .ws-study-current .ws-study-books{margin:5px 0;min-width:0}
#game-root.ui-rpg .rpg-window .ws-study-current .study-shortcuts{grid-template-columns:minmax(0,1fr)!important;gap:6px!important}
#game-root.ui-rpg .rpg-window .ws-study-current .study-shortcut{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:stretch}
#game-root.ui-rpg .rpg-window .ws-study-current .study-shortcut>img{grid-row:1;grid-column:1;width:24px;height:24px}
#game-root.ui-rpg .rpg-window .ws-study-current .study-shortcut>span{grid-row:1;grid-column:1/-1;padding-left:30px}
#game-root.ui-rpg .rpg-window .ws-study-current .study-quantity{grid-column:1/-1!important;display:flex!important;align-items:center;justify-content:space-between;gap:8px;margin:0}
#game-root.ui-rpg .rpg-window .ws-study-current .study-quantity select{min-width:70px;max-width:65%;height:28px}
#game-root.ui-rpg .rpg-window .ws-study-current .study-shortcut>button{grid-row:3;min-height:34px!important;font-size:10px!important}

/* Compact resources: FAB, gold and copper; keep companion cards in place. */
#game-root #player-resources{display:flex;flex-flow:row nowrap;width:max-content;gap:6px}
@media (max-width: 700px) and (orientation: portrait){#game-root #player-resources>div:not([data-resource=fab]):not([data-resource=gold]):not([data-resource=coins]){display:none}}

/* Shared public/research preparation fixes, 2026-11-04. */
#game-root .ws-leader-actions{display:flex;gap:8px;align-items:stretch}#game-root .ws-leader-actions>button{flex:1;min-width:0}
#game-root .ws-drop-preview{margin:8px 0;padding:8px;border:1px solid #817447;color:#e6ddba}#game-root .ws-drop-preview summary{cursor:pointer;font-weight:700}#game-root .ws-drop-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:200px;overflow:auto;margin-top:8px}#game-root .ws-drop-list>div{display:flex;align-items:center;gap:6px;font-size:12px}#game-root .ws-drop-list img{width:30px;height:30px;object-fit:contain}

#game-root .forge-batch-controls{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}#game-root .forge-batch-controls label{display:flex;align-items:center;gap:6px}#game-root .forge-select-row{display:flex;align-items:center;gap:8px}#game-root .forge-select-row .forge-item{flex:1;min-width:0}#game-root [data-potion-quantity]{max-width:75px;margin-right:6px}

/* Quality is readable without distinguishing colors; keep icon/level/worn markers separate. */
#game-root .ws-rarity-item{border-color:var(--item-rarity)!important;box-shadow:inset 0 -3px var(--item-rarity)!important}
#game-root .ws-rarity-item[data-rarity=legendary]{background:linear-gradient(135deg,#584018,#1b231e 72%)!important}
#game-root .ws-rarity-item>.ws-rarity-badge{position:absolute!important;left:2px!important;bottom:2px!important;top:auto!important;display:block!important;color:var(--item-rarity)!important;background:#071619eb!important;font-size:9px!important;line-height:12px!important;padding:0 3px!important;z-index:3;pointer-events:none}
#game-root .ws-sale-rarity{color:var(--item-rarity)!important;font-weight:bold;display:inline-block;padding:2px 6px;border:1px solid currentColor;margin:2px 0}
#game-root .ws-equipment-eligibility{padding:7px 8px;border:1px solid #6c7157;background:#10252b;line-height:1.5}
#game-root .ws-equipment-eligibility p{margin:3px 0!important;font-size:12px!important;overflow-wrap:anywhere}
#game-root .ws-quality-label{font-size:13px!important}.ws-wearable{color:#9dd3ac}
#game-root .quantity-stepper{display:inline-flex;align-items:center;justify-content:center;gap:4px;flex:0 0 auto;min-width:0;vertical-align:middle}
#game-root .quantity-stepper>button{width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;padding:0!important;margin:0!important;font-size:20px!important;line-height:1!important;touch-action:manipulation}
#game-root .quantity-stepper>select{width:58px!important;min-width:58px!important;max-width:58px!important;height:34px!important;margin:0!important;padding:2px!important;font-size:16px!important;text-align:center}
#game-root .study-quantity{flex-wrap:wrap;justify-content:center;gap:5px}
#game-root .service-row{min-width:0;flex-wrap:wrap}
#game-root .revival-actions{position:sticky;bottom:0;background:#132b30;padding:8px 0 2px;z-index:2}
@media(pointer:coarse){#game-root .quantity-stepper>button{width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important}#game-root .quantity-stepper>select{height:40px!important}}

/* Rarity remains legible above the compact inventory's generic small-text rule. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item.ws-rarity-item>.ws-rarity-badge{display:block!important;left:2px!important;right:auto!important;bottom:2px!important;top:auto!important;max-width:calc(100% - 4px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item.ws-rarity-item>b{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-detail,#ew-trade-bag-detail)>.ws-equipment-eligibility{flex:none;display:block;margin:0 0 5px;padding:4px 6px;font-size:11px;line-height:1.35}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-detail,#ew-trade-bag-detail)>.ws-equipment-eligibility p{font-size:11px!important;line-height:1.35!important;margin:2px 0!important}
/* Preparation: one item art, four quiet corner badges; same grid in inventory. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) .bag-item.ws-rarity-item{position:relative;overflow:hidden;border-color:var(--item-rarity)!important;background:linear-gradient(145deg,color-mix(in srgb,var(--item-rarity) 24%,#12232a),#101b20)!important;box-shadow:inset 0 0 8px color-mix(in srgb,var(--item-rarity) 23%,transparent);padding:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) .bag-item.ws-rarity-item .gear-pixel-icon{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) .bag-item.ws-rarity-item>.ws-item-level{left:2px!important;top:2px!important;right:auto!important;bottom:auto!important;line-height:1.2;background:#0c151cba;font-size:10px!important;color:#fff1c9}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) .bag-item.ws-rarity-item>.ws-rarity-badge{color:var(--item-rarity)!important;background:#0c151cba;font-size:10px!important;line-height:1.2;padding:1px 2px}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) :is(.ws-worn-badge,.skin-worn){position:absolute!important;right:2px!important;top:2px!important;left:auto!important;bottom:auto!important;z-index:3;background:#10261ed9;color:#c0f8cf;font-size:12px}
#game-root :is(#bag-items,#ew-trade-bag-items) .skin-bag-item .skin-item-art{width:100%!important;height:100%!important;position:absolute;inset:0;margin:0!important}
#game-root :is(#bag-items,#ew-trade-bag-items) .skin-bag-item>b,#game-root :is(#bag-items,#ew-trade-bag-items) .skin-bag-item>small:not(.ws-rarity-badge){display:none!important}
#game-root :is(#bag-detail,#ew-trade-bag-detail) .item-heading p{display:none}
#game-root .forge-inline{min-width:0;padding:4px 0 12px}.forge-inline[hidden]{display:none!important}
#game-root .forge-inline>.forge-browser{display:none!important}
#game-root .forge-inline .forge-detail{padding:0;min-width:0}
#game-root .forge-inline .forge-detail>h3{font-size:15px;margin:6px 0}
#game-root .forge-inline .forge-summary{font-size:12px;margin:4px 0}
#game-root .forge-inline .forge-upgrade,#game-root .forge-inline #upstream-affix-forge .service-row{padding:7px;gap:5px;border:1px solid #69735b;background:#142b30}
#game-root .forge-inline .forge-upgrade h4,#game-root .forge-inline #upstream-affix-forge h4{font-size:13px;margin:3px 0}
#game-root .forge-inline .book-study-actions{display:flex;flex-wrap:wrap;gap:4px}
#game-root .forge-inline .book-study-actions>button{flex:1 1 80px;padding:6px 3px;min-width:0}
#game-root .forge-inline .forge-wallet{font-size:11px;margin:5px 0}
#game-root .forge-result{border:1px solid #d9b766;color:#ffe4a4;background:#2c3525;padding:8px;text-align:center;animation:forge-reveal .5s ease-out}
@keyframes forge-reveal{from{box-shadow:inset 0 0 28px #f5d78c;transform:scale(.98)}to{box-shadow:none;transform:none}}
@media(prefers-reduced-motion:reduce){#game-root .forge-result{animation:none}}
#game-root .ws-quick-prepare{display:flex;flex-wrap:wrap;gap:5px}#game-root .ws-quick-prepare>button{flex:1 1 100px;min-width:0}
#game-root .ws-collection-picker{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(58px,1fr))!important;align-content:start;gap:5px}
#game-root .ws-collection-picker>button{position:relative;aspect-ratio:1;min-width:0!important;padding:3px!important;display:grid;place-items:center;overflow:hidden}
#game-root .ws-collection-picker>button>img{width:100%!important;height:100%!important;object-fit:contain;image-rendering:pixelated}
#game-root .ws-collection-picker>button>span{display:none!important}
#game-root .collection-card .collection-possession{display:none!important}
#game-root .collection-card .item-heading img{width:80px;height:80px;object-fit:contain}
@media(max-width:700px) and (orientation:portrait){#game-root .forge-inline .service-row>small{font-size:11px}#game-root .ws-equipment-tabs>button{padding:6px 8px!important;min-width:0!important}#game-root .ws-collection-picker{max-height:24dvh;overflow:auto}}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) [data-sale-selected="true"]::after{content:'✓';position:absolute;right:2px;top:2px;z-index:4;background:#d5ba78;color:#132523;padding:0 3px;font-size:13px;line-height:17px}
#game-root .collection-tools{display:flex;flex-wrap:wrap;gap:5px;align-items:center;padding:5px}
#game-root .collection-tools input{flex:1 1 130px;min-width:80px}
#game-root .collection-tools select{min-width:0;max-width:140px}

#game-root.ui-workspace .codex-page .collection-tools{display:flex!important;flex-wrap:wrap!important;gap:5px!important;align-items:center!important;padding:5px!important}
#game-root.ui-workspace .codex-page .collection-tools input{flex:1 1 130px;min-width:80px!important;width:auto!important}
#game-root.ui-workspace .codex-page .collection-tools select{min-width:0!important;max-width:140px!important;width:auto!important}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-quick-prepare{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;width:100%;box-sizing:border-box}
#game-root.ui-rpg .rpg-window .ws-study-layout .ws-quick-prepare>button{position:static!important;transform:none!important;width:100%!important;min-width:0!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;height:auto!important;line-height:1.3!important;box-sizing:border-box}

/* The scoped mobile inventory rules must not shrink the central equipment artwork. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item.ws-rarity-item .gear-pixel-icon{position:absolute!important;inset:3px!important;width:calc(100% - 6px)!important;height:calc(100% - 6px)!important;max-width:none!important;max-height:none!important;object-fit:contain!important;margin:0!important}

/* Override the old list layout so badges never occupy artwork space. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item.ws-rarity-item>.ws-rarity-badge{position:absolute!important;left:2px!important;bottom:2px!important;top:auto!important;right:auto!important;white-space:nowrap!important;font-size:8px!important;line-height:11px!important;width:auto!important;max-width:calc(100% - 4px)!important;margin:0!important;padding:0 2px!important;transform:none!important;z-index:3!important}

#game-root.ui-workspace .codex-page .collection-tools{display:grid!important;grid-template-columns:minmax(100px,1fr) minmax(90px,.65fr) minmax(80px,.6fr) auto!important;gap:5px!important;align-items:center!important}
#game-root.ui-workspace .codex-page .collection-tools label:first-child{grid-column:auto!important}
#game-root.ui-workspace .codex-page .collection-tools label{display:block!important;margin:0!important;padding:0!important}
#game-root.ui-workspace .codex-page .collection-tools :is(input,select){max-width:100%!important;width:100%!important;box-sizing:border-box;min-width:0!important;margin:0!important}
#game-root.ui-workspace .codex-page .collection-tools .collection-owned-filter{display:none!important}
#game-root.ui-workspace .codex-page .collection-tools #collection-reset{width:auto!important;padding:6px!important}
@media(max-width:700px) and (orientation:portrait){#game-root.ui-workspace .codex-page .collection-tools{grid-template-columns:repeat(2,minmax(0,1fr))!important}#game-root.ui-workspace .codex-page .collection-tools label:first-child{grid-column:1!important;grid-row:1}#game-root.ui-workspace .codex-page .collection-tools #collection-reset{grid-column:2;grid-row:1}}

/* Short landscape windows scroll the catalog rather than collapsing its picker under paging controls. */
@media(orientation:landscape) and (max-height:600px){#game-root.ui-workspace .codex-page .collection-scroll{overflow:auto!important}#game-root.ui-workspace .codex-page .ws-collection-browser{flex:1 0 180px!important;min-height:180px!important}#game-root.ui-workspace .codex-page #collection-pages{flex:none!important}#game-root.ui-workspace .codex-page .collection-new-filter{padding:0!important;margin:0 0 3px!important}#game-root.ui-workspace .codex-page #collection-roster{margin:0 0 3px!important;padding:0!important}}
@media(orientation:landscape) and (max-height:600px){
 #game-root.ui-workspace .codex-page .collection-tools :is(input,select,button){height:28px!important;min-height:28px!important;max-height:28px!important;padding:3px 5px!important;font-size:12px!important}
 #game-root.ui-workspace .codex-page :is(.collection-new-filter,#collection-roster,#collection-pages)>button{height:26px!important;min-height:26px!important;padding:3px 5px!important;font-size:11px!important}
 #game-root.ui-workspace .codex-page .collection-dialog>footer{display:none!important}
}

/* Occupied equipment slots use the same art/badges as the inventory; empty slots keep labels. */
:is(#character-panel,#ew-trade-character-panel) .gear-slot>button.ws-occupied-slot>span:not(.ew-gem-marks):not(.ew-item-lock-mark){display:none!important}
:is(#character-panel,#ew-trade-character-panel) .gear-slot>button.ws-occupied-slot{position:relative;padding:2px!important;overflow:hidden;aspect-ratio:1;min-height:0!important}
:is(#character-panel,#ew-trade-character-panel) .gear-slot>button.ws-occupied-slot>img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain;image-rendering:pixelated}
:is(#character-panel,#ew-trade-character-panel) .gear-slot>button.ws-occupied-slot .ws-item-level{font-size:clamp(7px,1.15cqw,10px)!important;left:2px!important;top:1px!important}
:is(#character-panel,#ew-trade-character-panel) .gear-slot>button.ws-occupied-slot .ws-rarity-badge{font-size:clamp(7px,1.15cqw,10px)!important;left:2px!important;bottom:1px!important}
:is(#character-panel,#ew-trade-character-panel) .gear-slot>button.ws-occupied-slot .ws-worn-badge{font-size:10px!important;right:2px!important;top:1px!important}
.forge-item-header{display:grid;grid-template-columns:64px minmax(0,1fr);gap:10px;align-items:center;border-bottom:1px solid #756c45;padding-bottom:10px;margin-bottom:10px}
.forge-item-header>img{width:64px;height:64px;object-fit:contain;image-rendering:pixelated;background:#10272a;border:1px solid #9c8958}
.forge-item-header h3{margin:0 0 4px;font-size:15px;color:#efd59a}.forge-item-header small{color:#b9cbbd}.forge-item-header p{margin:5px 0 0;font-size:12px;line-height:1.4}
#forge-inline .forge-detail{min-width:0;padding:8px!important}
#forge-inline .forge-upgrade{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:8px;border:1px solid #516467;background:#142d32}
#forge-inline .forge-upgrade h4{margin:0}#forge-inline .forge-upgrade p{grid-column:1;margin:0;font-size:11px;line-height:1.4}#forge-inline .forge-upgrade button{grid-column:2;grid-row:1/3;align-self:center}
#upstream-affix-forge .service-row{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;padding:10px!important;margin:8px 0!important}
#upstream-affix-forge .book-study-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:6px!important}
#upstream-affix-forge .forge-affix-action{display:flex;flex-direction:column;justify-content:space-between;min-width:0;gap:6px;background:#12282b;padding:6px;border:1px solid #354c4b}
#upstream-affix-forge .forge-affix-action small{font-size:10px;line-height:1.5;color:#c1c7b6;overflow-wrap:anywhere}
#upstream-affix-forge .forge-affix-action button{width:100%;min-width:0!important;padding:7px 2px!important;font-size:12px;white-space:normal}
#forge-inline .forge-batch-controls{display:flex;justify-content:flex-end;flex-wrap:wrap;align-items:center;padding:4px 0}.forge-wallet{font-size:11px;line-height:1.5}
@media(max-width:600px) and (orientation:portrait){
 .forge-item-header{grid-template-columns:52px minmax(0,1fr);gap:8px}.forge-item-header>img{width:52px;height:52px}.forge-item-header h3{font-size:13px}
 #forge-inline .forge-upgrade{grid-template-columns:minmax(0,1fr) auto}#forge-inline .forge-upgrade button{font-size:11px;padding:7px!important}
 #upstream-affix-forge .forge-affix-action{padding:4px;gap:4px}#upstream-affix-forge .book-study-actions{gap:4px!important}
}

/* Inline forging must not inherit the NPC service-row's two-column layout. */
#game-root.ui-rpg .rpg-window #upstream-affix-forge .service-row{display:grid!important;grid-template-columns:minmax(0,1fr)!important;min-width:0!important}
#game-root.ui-rpg .rpg-window #upstream-affix-forge .book-study-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;min-width:0!important;width:100%;box-sizing:border-box}
#game-root.ui-rpg .rpg-window #upstream-affix-forge .forge-affix-action button{position:static!important;transform:none!important;min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box;white-space:normal!important;overflow-wrap:anywhere}
#game-root.ui-rpg .rpg-window .forge-item-header{display:grid!important;grid-template-columns:64px minmax(0,1fr)!important;justify-content:start!important;text-align:left!important;gap:10px!important;min-height:0!important;padding:0 0 10px!important}
#game-root.ui-rpg .rpg-window .forge-item-header>div{min-width:0;text-align:left!important}
@media(max-width:600px) and (orientation:portrait){#game-root.ui-rpg .rpg-window .forge-item-header{grid-template-columns:52px minmax(0,1fr)!important;gap:8px!important}}

#game-root.ui-rpg .rpg-window .forge-item-header small{display:block!important;font-size:11px!important;line-height:1.4!important;color:#b9cbbd!important;margin:3px 0!important}

/* Equipment artwork is centered in its own square; overlays remain on the frame. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot button.ws-occupied-slot{position:relative!important;display:block!important;aspect-ratio:1;overflow:hidden;padding:3px!important;box-sizing:border-box;}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot button.ws-occupied-slot>img{position:absolute!important;inset:3px!important;width:calc(100% - 6px)!important;height:calc(100% - 6px)!important;max-width:none!important;max-height:none!important;object-fit:contain!important;object-position:center!important;margin:0!important;transform:none!important;}
.ws-element-summary .ws-learned-talents{display:flex;flex-wrap:wrap;gap:5px}.ws-element-summary .ws-learned-talents>div{width:42px;height:48px;position:relative;display:flex;align-items:center;justify-content:center;background:#10272b;border:1px solid #796e4c}.ws-element-summary .ws-learned-talents img{width:36px;height:36px;object-fit:contain}.ws-element-summary .ws-learned-talents b{position:absolute;bottom:0;right:1px;font-size:10px;color:#f5dfa5}.ws-element-summary h4{margin:8px 0 4px;font-size:12px}.ws-element-actions{display:flex;gap:6px;flex-wrap:wrap}.ws-element-actions button{flex:1;min-width:100px}.ws-element-points{font-size:14px;color:#f5dfa5;padding:6px 0}.ws-element-tabs{display:flex;gap:5px;margin-bottom:8px}.ws-element-tabs button{flex:1}.ws-main-nav [data-ember-exchange]{opacity:.45;filter:grayscale(1)}

#game-root.ui-workspace .ws-panel[data-ws-elements=true] .ws-study-current>:not(.ws-element-summary),#game-root.ui-workspace .ws-panel[data-ws-elements=true] .ws-study-options>.ws-study-heading{display:none!important}
#game-root.ui-workspace .ws-panel[data-ws-elements=false] .ws-element-summary,#game-root.ui-workspace .ws-panel[data-ws-elements=false] .ws-element-tabs,#game-root.ui-workspace .ws-study-layout [hidden]{display:none!important}

/* Documentation is a local overlay. Only the active article is mounted. */
.ew-handbook{position:fixed;inset:0;z-index:2147483000;display:grid;place-items:center;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:rgba(3,10,13,.9);color:#dfdfd0;font:14px/1.85 system-ui,-apple-system,"PingFang SC",sans-serif;box-sizing:border-box;text-align:left}
.ew-handbook *{box-sizing:border-box}.ew-handbook button,.ew-handbook input{font:inherit;color:inherit}.ew-handbook button{cursor:pointer;border:1px solid #716547;background:#1c3033;border-radius:4px;padding:7px 12px}.ew-handbook button:hover,.ew-handbook button:focus-visible{background:#304146;outline:2px solid #c5ac72;outline-offset:2px}.ew-handbook input:focus-visible{outline:2px solid #c5ac72}.hb-box{width:min(1120px,100%);height:min(850px,94dvh);border:1px solid #a28c59;background:#14262a;box-shadow:0 14px 65px #000a;display:flex;flex-direction:column;min-height:0;overflow:hidden}.hb-header{display:flex;gap:12px;align-items:center;padding:12px 22px;border-bottom:1px solid #4e5143;flex:none}.hb-header>div{margin-right:auto}.hb-header h1{font-size:20px;line-height:1.4;margin:0;color:#ead6a5}.hb-brand{letter-spacing:3px;font-size:10px;color:#a18c5f}.hb-body{display:grid;grid-template-columns:250px minmax(0,1fr);flex:1;min-height:0}.hb-sidebar{padding:16px 12px;border-right:1px solid #3f4c47;display:flex;flex-direction:column;min-height:0;background:#102024}.ew-handbook .hb-search{width:100%;min-width:0;background:#203337;border:1px solid #5e6651;border-radius:4px;padding:8px 10px;flex:none}.hb-count{font-size:11px;color:#a8b8af;padding:7px 4px}.hb-directory{overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;padding:0 3px 12px}.hb-directory h3{margin:16px 7px 5px;color:#ccb47f;font-size:12px;letter-spacing:1px}.ew-handbook .hb-link{display:block;width:100%;border-color:transparent;background:transparent;text-align:left;border-radius:3px;padding:6px 8px;margin:2px 0;font-size:13px;white-space:normal;line-height:1.6}.ew-handbook .hb-link[aria-current=true]{background:#324039;border-color:#a18b58;color:#ffdfa0}.hb-link[data-read="1"]:after{content:' ✓';color:#83b599}.hb-article{overflow:auto;overscroll-behavior:contain;min-width:0;padding:24px 30px 36px;outline:none;overflow-wrap:anywhere}.hb-kicker{font-size:12px;color:#b29e71;letter-spacing:1px}.hb-article h2{font-size:26px;color:#f4dfa8;line-height:1.4;margin:8px 0 12px}.hb-article h3{font-size:18px;line-height:1.5;color:#e2c38a;margin:28px 0 10px}.hb-summary{font-size:15px;color:#c4d3ca}.hb-entry{font-size:12px;color:#9db5ac;border-bottom:1px solid #40504a;padding-bottom:17px}.hb-article p{margin:10px 0}.hb-article ul,.hb-article ol{padding-left:24px}.hb-article li{margin:9px 0}.hb-callout{padding:12px 16px;margin:17px 0;border-left:3px solid #bda471;background:#1d3234}.hb-callout strong{color:#ead3a0}.hb-callout p{margin:6px 0 0}.hb-callout.warning{border-color:#c88663;background:#332e27}.hb-table-wrap{margin:14px 0;overflow-x:auto}.hb-table-wrap table{width:100%;border-collapse:collapse;table-layout:auto;font-size:13px}.hb-table-wrap th{color:#e0c58e;background:#253839;text-align:left;vertical-align:top}.hb-table-wrap td,.hb-table-wrap th{border:1px solid #40514d;padding:9px 11px;vertical-align:top}.hb-table-wrap td:first-child{color:#e0d5b5}.hb-article-footer{display:flex;flex-wrap:wrap;gap:12px;align-items:center;border-top:1px solid #40514d;margin-top:28px;padding-top:20px;color:#a6b3a8;font-size:12px}.hb-catalog{display:none}.hb-empty{font-size:13px;color:#adbdb6}
#game-root.ui-workspace .ws-main-nav:has([data-ws-go="help"]){grid-template-columns:repeat(4,minmax(0,1fr))!important}
@media(max-width:700px){.ew-handbook{padding:8px}.hb-box{height:calc(100dvh - 16px)}.hb-header{padding:9px 12px;gap:8px}.hb-header h1{font-size:16px}.hb-brand{font-size:9px}.hb-header button{padding:6px 9px;font-size:12px}.hb-catalog{display:block}.hb-body{display:block;position:relative}.hb-sidebar{display:none;position:absolute;inset:0;z-index:1;width:100%;padding:15px}.ew-handbook[data-directory=open] .hb-sidebar{display:flex}.hb-article{height:100%;padding:18px 16px 28px}.hb-article h2{font-size:22px}.hb-table-wrap table,.hb-table-wrap tbody,.hb-table-wrap tr,.hb-table-wrap td{display:block;width:100%}.hb-table-wrap thead{display:none}.hb-table-wrap tr{border:1px solid #506057;margin:10px 0;background:#192e30}.hb-table-wrap td{border:0;border-bottom:1px solid #304440;padding:7px 10px}.hb-table-wrap td:last-child{border-bottom:0}.hb-table-wrap td:before{content:attr(data-label);display:block;color:#9eae9f;font-size:11px;margin-bottom:2px}.hb-table-wrap td:first-child{color:#f2d49e;background:#243839}.hb-article h3{font-size:17px}}
@media(max-height:450px) and (min-width:701px){.hb-box{height:calc(100dvh - 20px)}.hb-header{padding:5px 16px}.hb-header h1{font-size:16px}.hb-brand{display:none}.hb-body{grid-template-columns:210px minmax(0,1fr)}.hb-article{padding:12px 20px}.hb-article h2{font-size:21px}}

@media(max-width:600px){
 #game-root.ui-workspace .ws-main-nav:has([data-ws-go="help"]){grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:2px!important}
 #game-root .ws-main-nav:has([data-ws-go="help"]) button{font-size:8px!important;line-height:9px!important;padding:1px!important;gap:0!important}
 #game-root .ws-main-nav:has([data-ws-go="help"]) :is(img,.ws-dock-symbol){width:12px!important;height:12px!important}
}
@media(max-width:700px){
 .hb-table-wrap table[data-columns="2"] tr{padding:8px 11px}
 .hb-table-wrap table[data-columns="2"] td{border:0;padding:0;background:transparent}
 .hb-table-wrap table[data-columns="2"] td:before{display:none}
 .hb-table-wrap table[data-columns="2"] td:first-child{font-weight:650;color:#d4ba87;margin-bottom:3px}
}

.quantity-stepper input[type=number]{box-sizing:border-box;min-width:3.3em;width:4em;max-width:5em;text-align:center;font:inherit;appearance:textfield;-moz-appearance:textfield;} .quantity-stepper input::-webkit-inner-spin-button,.quantity-stepper input::-webkit-outer-spin-button{appearance:none;margin:0} .quantity-stepper input[aria-invalid=true]{outline:1px solid #d98769}@media(pointer:coarse){.quantity-stepper input[type=number]{font-size:16px;min-height:32px;}}

/* Separate intrinsic enhancement from one selected affix, within the existing detail scroller. */
#game-root .forge-inline[data-tab=forge] #upstream-affix-forge,#game-root .forge-inline[data-tab=affixes] .forge-upgrade{display:none!important}
#game-root .forge-inline #upstream-affix-forge .service-row[hidden]{display:none!important}
#game-root .forge-inline,#game-root .forge-inline .forge-detail{height:auto!important;max-height:none!important;overflow:visible!important;min-height:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-panel-scroll{overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#game-root .forge-affix-tabs{display:flex;flex-wrap:wrap;gap:4px;margin:6px 0}#game-root .forge-affix-tabs button[aria-pressed=true]{background:#655634}
#game-root .forge-inline .book-study-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
#game-root .forge-detail{position:relative}#game-root .forge-result{position:relative;box-sizing:border-box;width:100%;padding:20px 12px;background:radial-gradient(ellipse at top,#645530,#13292a 80%);border:1px solid #c7ab67;text-align:center;min-height:120px;animation:forge-feedback .4s ease-out}#game-root .forge-result strong{font-size:16px;color:#f5dca0}#game-root .forge-result p{font-size:12px}#game-root .forge-result button{min-width:90px}@keyframes forge-feedback{from{filter:brightness(1.6)}to{filter:brightness(1)}}

/* One square icon size in the inventory and worn slots. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear]{--ws-equip-size:60px}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items){grid-template-columns:repeat(auto-fill,var(--ws-equip-size))!important;justify-content:center}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item,#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button:first-child{width:var(--ws-equip-size)!important;min-width:var(--ws-equip-size)!important;max-width:var(--ws-equip-size)!important;height:var(--ws-equip-size)!important;min-height:var(--ws-equip-size)!important;max-height:var(--ws-equip-size)!important;flex:none!important;justify-self:center;box-sizing:border-box}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item img{width:calc(var(--ws-equip-size) - 6px)!important;height:calc(var(--ws-equip-size) - 6px)!important}
@media(max-width:700px){#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear]{--ws-equip-size:48px}}
#live-performance #live-dungeon-progress{display:block;text-align:right;white-space:nowrap;font-size:10px;line-height:13px;font-weight:400;color:#e9d9a9}#live-dungeon-progress[hidden]{display:none!important}

/* Center the content-sized menu within both visual viewport orientations. */
@media(pointer:coarse),(max-width:800px){
 #pause-modal.modal-backdrop{align-items:center!important;justify-content:center!important;justify-items:center!important}
 #game-root.ui-rpg #pause-modal .menu-avant{margin:auto!important;inset:auto!important;transform:none!important;min-width:0!important;width:min(920px,var(--dialog-width),90vw)!important;max-width:90vw!important;box-sizing:border-box!important}
}

#game-root.ui-rpg #pause-modal .fab-sync-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;max-width:100%;flex-shrink:0}
/* Bounded inventory presentation; pagination stays outside the item grid. */
#game-root .ew-inventory-pages{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;flex:0 0 auto;padding:10px 4px;color:#dfd6ba;font-size:13px;clear:both}
#game-root .ew-inventory-pages button{min-width:72px;min-height:36px;padding:6px 10px;cursor:pointer;border:1px solid #817343;background:#263c3b;color:#f5e6b4;touch-action:manipulation}
#game-root .ew-inventory-pages button:disabled{opacity:.38;cursor:default}
#game-root .ew-inventory-page-label{white-space:nowrap;font-variant-numeric:tabular-nums}

@media(max-width:640px),(max-height:500px){
 #game-root .ew-inventory-pages{gap:5px;padding:6px 0;font-size:12px;flex-wrap:nowrap}
 #game-root .ew-inventory-pages button{min-width:32px;width:32px;min-height:36px;max-height:36px;padding:0;font-size:0!important;line-height:0!important;flex:0 0 32px}
 #game-root .ew-inventory-pages button::before{font-size:22px!important;line-height:1!important}
 #game-root .ew-inventory-pages button:first-child::before{content:"‹"}
 #game-root .ew-inventory-pages button:last-child::before{content:"›"}
}

@media(max-width:640px),(max-height:500px){
 /* Scroll the bounded page as a group; selection controls must never squeeze
    the grid to zero height on a small screen. */
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-storage:has(:is(#bag-items,#ew-trade-bag-items)[data-inventory-paged]){overflow-y:auto!important;overscroll-behavior:contain}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items)[data-inventory-paged]{flex:none!important;min-height:min-content!important;max-height:none!important;height:auto!important;overflow:visible!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ew-inventory-pages{position:sticky;bottom:0;background:#102024;z-index:5}
}

@media(max-width:640px),(max-height:500px){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route]:has(.ew-inventory-pages) :is(#multi-sale,#ew-trade-multi-sale){gap:4px;padding:2px 0;flex-shrink:0}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route]:has(.ew-inventory-pages) :is(#multi-sale,#ew-trade-multi-sale) button{font-size:11px!important;min-height:28px!important;padding:3px 5px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route]:has(.ew-inventory-pages) #multi-sale-scope{display:none}
}

/* Page controls belong beside category filters, never beside search or over items. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.ew-inventory-pages{position:static!important;display:flex!important;flex:0 0 auto!important;flex-wrap:nowrap!important;align-items:center;gap:4px;margin:0 0 0 auto!important;padding:0!important;background:none;clear:none;font-size:12px;line-height:1.2}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.ew-inventory-pages button{width:30px!important;min-width:30px!important;max-width:30px!important;height:32px!important;min-height:32px!important;max-height:32px!important;flex:0 0 30px!important;padding:0!important;font-size:0!important;line-height:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.ew-inventory-pages button::before{font-size:21px!important;line-height:1!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.ew-inventory-pages button:first-child::before{content:"‹"}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.ew-inventory-pages button:last-child::before{content:"›"}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.ew-inventory-pages .ew-inventory-page-label{font-size:11px!important;line-height:1.2!important;min-width:34px;text-align:center}
@media(max-width:640px),(max-height:500px){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row:has(.ew-inventory-pages) :is(#bag-quality,#ew-trade-bag-quality){max-width:68px!important;font-size:11px!important;padding-left:2px!important;padding-right:2px!important}
}

@media(min-width:600px) and (max-height:600px){
 /* A landscape inventory uses its full width for the filter/pager row. */
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr)!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .ws-bag-filters{grid-column:1!important;grid-row:1!important;overflow:visible!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{grid-column:1!important;grid-row:2!important}
}

/* Confirmed forge result spans the game viewport, not the equipment column. */
.forge-result {position:fixed!important;z-index:19000!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:min(520px,88vw)!important;max-height:80dvh!important;overflow:auto!important;box-sizing:border-box!important;padding:22px!important;border:2px solid #c8a968!important;background:#122b2e!important;box-shadow:0 0 0 200vmax #020a0bd9,0 0 30px #d9b35466!important;animation:forge-result-arrive .4s ease-out 1;}
.forge-result>strong{display:block;font-size:18px;color:#ffe3a5;margin:10px 0}.forge-result[data-outcome=mixed]{border-color:#d59b74!important}.forge-result button{display:block;min-width:100px;margin:12px auto 0}.forge-result-change{font-size:13px;line-height:1.6;margin:8px 0}body[data-ui-preview="1"] .forge-result,body[data-ui-pending="1"] .forge-result{visibility:hidden!important}.ws-hand-note{font-size:10px;text-align:center;display:block}
@keyframes forge-result-arrive{from{filter:brightness(1.7);opacity:.5}to{filter:brightness(1);opacity:1}}@media(prefers-reduced-motion:reduce){.forge-result{animation:none}}

.forge-result::before{content:'';position:fixed;inset:-100vmax;z-index:-1;pointer-events:auto}.forge-result{isolation:isolate}

/* Compact optional equipment-level bounds, alongside quality in both inventory views. */
.ws-equipment-filter-row .ws-level-range{display:inline-flex;flex:0 0 auto;align-items:center;gap:3px;white-space:nowrap;font-size:11px}
.ws-equipment-filter-row .ws-level-range[hidden]{display:none}
.ws-equipment-filter-row .ws-level-range input{box-sizing:border-box;width:48px;min-width:0;height:28px;padding:3px;text-align:center;font:inherit;color:#e8dab6;background:#11272c;border:1px solid #657266;appearance:textfield}
.ws-level-range input::-webkit-inner-spin-button,.ws-level-range input::-webkit-outer-spin-button{appearance:none;margin:0}
.ws-equipment-filter-row .ws-level-range[data-invalid=true] input{border-color:#e99a7c}
/* Keep category tabs usable when level bounds and pager compete on narrow screens. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row{flex-wrap:wrap}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row :is(#bag-filters,#ew-trade-bag-filters){flex:1 1 130px;min-width:100px!important}

/* Search and level interval share one compact row; quality/categories/paging below. */
#game-root .ws-bag-search-row{display:flex;align-items:center;gap:5px;min-width:0;flex-wrap:nowrap}
#game-root .ws-bag-search-row .bag-search{flex:1 1 100px;min-width:50px;width:auto}
#game-root .ws-bag-search-row .ws-level-range{display:inline-flex;align-items:center;gap:3px;flex:0 0 auto;font-size:11px}
#game-root .ws-bag-search-row .ws-level-range[hidden]{display:none}
#game-root .ws-bag-search-row .ws-level-range input{box-sizing:border-box;width:44px!important;min-width:0!important;height:28px;padding:3px;font-size:12px}
#game-root .ws-bag-search-row :is(#multi-sale-toggle,#ew-trade-multi-sale-toggle){flex:0 0 auto;padding:5px 7px;white-space:nowrap}
#game-root .ws-equipment-filter-row{flex-wrap:nowrap!important}
#game-root .ws-equipment-filter-row :is(#bag-filters,#ew-trade-bag-filters){flex:1 1 80px;min-width:0!important}
@media(max-width:640px){#game-root .ws-bag-search-row{gap:3px}#game-root .ws-bag-search-row .ws-level-range input{width:34px!important;font-size:11px}#game-root .ws-bag-search-row :is(#multi-sale-toggle,#ew-trade-multi-sale-toggle){font-size:10px;padding:5px 3px}}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row .bag-search{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row .bag-search input{flex:1 1 50px;width:50px!important;min-width:0!important;max-width:100%;height:30px!important;min-height:30px!important;padding:4px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row .bag-search button{flex:0 0 auto;padding:4px!important;min-width:0!important;height:30px!important;margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row .ws-level-range input{height:30px!important;min-height:30px!important}

/* Equipped icons share the inventory's quality tiles; hands form one compact row. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-hands{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:8px;padding:5px;border:1px solid #596257;background:#102024;min-width:0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-hands-label{font-size:11px;color:#cdb984;margin-right:4px}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot[hidden]{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button.ws-equipped-icon{position:relative!important;display:block!important;overflow:hidden!important;padding:3px!important;border:1px solid #657266!important;background:#12232a!important;box-shadow:none!important;text-align:center!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button.ws-equipped-icon.ws-rarity-item{border-color:var(--item-rarity)!important;background:linear-gradient(145deg,color-mix(in srgb,var(--item-rarity) 24%,#12232a),#101b20)!important;box-shadow:inset 0 0 8px color-mix(in srgb,var(--item-rarity) 23%,transparent)!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-icon .gear-pixel-icon{position:absolute!important;inset:3px!important;width:calc(100% - 6px)!important;height:calc(100% - 6px)!important;max-width:none!important;max-height:none!important;object-fit:contain!important;margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-icon.ws-rarity-item>:is(span,b,small):not(.ws-item-level):not(.ws-rarity-badge):not(.ws-worn-badge):not(.ws-enhancement):not(.ew-gem-marks):not(.ew-item-lock-mark){display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-icon>.ws-rarity-badge{position:absolute!important;left:2px!important;bottom:2px!important;top:auto!important;right:auto!important;display:block!important;width:auto!important;max-width:calc(100% - 4px)!important;font-size:8px!important;line-height:11px!important;background:#0c151cba!important;color:var(--item-rarity)!important;white-space:nowrap!important;padding:0 2px!important;margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-icon>.ws-item-level{position:absolute!important;left:2px!important;top:2px!important;right:auto!important;bottom:auto!important;display:block!important;width:auto!important;font-size:9px!important;line-height:12px!important;margin:0!important;padding:0 2px!important;background:#0c151cba!important}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{display:grid!important;grid-template-columns:var(--ws-equip-size) minmax(0,1fr) var(--ws-equip-size)!important;grid-template-rows:max-content!important;gap:8px!important;align-items:start!important;align-content:start!important;container-type:normal!important;padding:6px!important;box-sizing:border-box!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slots{display:flex!important;flex-direction:column!important;height:auto!important;gap:6px!important;min-height:0!important;align-items:center!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot{flex:none!important;width:var(--ws-equip-size)!important;min-height:var(--ws-equip-size)!important;height:var(--ws-equip-size)!important;margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-icon.empty .slot-ghost{display:block!important;position:absolute!important;inset:5px!important;width:auto!important;height:auto!important;opacity:.4}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-icon.empty>span:not(.slot-ghost){display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{min-width:0!important}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slots{min-height:max-content!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-hands{flex-wrap:wrap;margin-top:8px;gap:5px;box-sizing:border-box;max-width:100%}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-hands-label{flex-basis:100%;margin:0;text-align:center}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot{display:block!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot .gear-unequip{position:absolute!important;right:1px!important;bottom:13px!important;left:auto!important;top:auto!important;width:auto!important;padding:1px 2px!important;font-size:8px!important;line-height:12px!important;min-height:0!important}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{justify-content:flex-start!important;min-height:0!important;height:auto!important;align-self:start!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) #gear-model{height:180px!important;max-height:180px!important;width:100%!important;object-fit:contain!important}
@media(max-width:700px),(max-height:500px){#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) #gear-model{height:140px!important;max-height:140px!important}}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .skin-model-change{position:static!important;transform:none!important;inset:auto!important;display:block!important;margin:4px auto!important;width:min(160px,100%)!important;max-width:100%!important}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-model-stack{display:flex!important;flex-direction:column!important;align-items:center!important;min-height:0!important;height:auto!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-quick-prepare{display:flex!important;flex-direction:column!important;position:static!important;height:auto!important;min-height:max-content!important;max-height:none!important;flex:none!important;width:100%!important;gap:4px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-quick-prepare button{position:static!important;margin:0!important;flex:none!important;transform:none!important}

#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-hands{margin-top:22px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-hands-label{display:none!important}

/* Equipment-complete: ten balanced positions surrounding the hero. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{--unequip-width:24px;display:grid!important;grid-template-columns:calc(var(--ws-equip-size) + var(--unequip-width) + 4px) minmax(0,1fr) calc(var(--ws-equip-size) + var(--unequip-width) + 4px)!important;grid-template-rows:minmax(0,1fr)!important;align-items:stretch!important;align-content:stretch!important;gap:6px!important;padding:6px!important;overflow:hidden!important;flex:1 1 0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slots{display:flex!important;flex-direction:column!important;justify-content:space-between!important;align-items:center!important;align-self:stretch!important;position:static!important;inset:auto!important;transform:none!important;gap:3px!important;height:100%!important;min-height:0!important;padding:0!important;margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot{position:relative!important;display:grid!important;grid-template-columns:var(--ws-equip-size) var(--unequip-width)!important;align-items:center!important;gap:4px!important;width:calc(var(--ws-equip-size) + var(--unequip-width) + 4px)!important;height:var(--ws-equip-size)!important;min-height:0!important;margin:0!important;padding:0!important;flex:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot>button.ws-equipped-icon{width:var(--ws-equip-size)!important;height:var(--ws-equip-size)!important;min-height:0!important;min-width:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot .gear-unequip{position:static!important;inset:auto!important;transform:none!important;grid-column:2!important;width:var(--unequip-width)!important;min-width:0!important;max-width:var(--unequip-width)!important;height:auto!important;min-height:24px!important;padding:2px 1px!important;margin:0!important;font-size:10px!important;line-height:12px!important;white-space:normal!important;overflow-wrap:anywhere!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-hands{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;width:100%!important;height:var(--ws-equip-size)!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:none!important;gap:3px!important;flex:none!important;flex-wrap:nowrap!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-hands:has(.gear-slot:not([hidden])+ .gear-slot:not([hidden]))>.gear-slot{--ws-equip-size:calc((var(--equip-row-size,60px) - 3px)/2)}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-model-wrap{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;align-self:stretch!important;height:100%!important;min-height:0!important;max-height:100%!important;padding:0!important;margin:0!important;overflow:hidden!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-model-stack{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;height:auto!important;max-height:calc(100% - 24px)!important;min-height:0!important;width:100%!important;gap:5px!important;flex:0 1 auto!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipment-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important;max-width:190px!important;width:100%!important;margin:0!important;padding:0!important;flex:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipment-actions>small{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipment-actions button{display:block!important;position:static!important;inset:auto!important;width:100%!important;min-width:0!important;max-width:none!important;min-height:26px!important;height:auto!important;transform:none!important;padding:3px!important;margin:0!important;white-space:nowrap!important;box-sizing:border-box!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) #gear-model{width:min(100%,240px)!important;height:auto!important;max-height:330px!important;min-height:0!important;aspect-ratio:240/330;object-fit:contain!important;margin:0!important;flex:0 1 auto!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-model-name{display:block!important;text-align:center;font-size:14px;line-height:20px;color:#e8d4a0;margin:0;flex:none}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .bag-search[hidden]{display:none!important}
:is(#bag-hero-filter,#ew-trade-bag-hero-filter){min-width:0;flex:1 1 70px;height:30px;background:#142c2c;color:#e8d4a0;border:1px solid #657266;padding:3px}
:is(#bag-hero-filter,#ew-trade-bag-hero-filter)[hidden]{display:none!important}
@media(max-width:700px),(max-height:500px){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-paperdoll{--unequip-width:18px;gap:3px!important;padding:3px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-slot .gear-unequip{font-size:9px!important;line-height:10px!important;min-height:20px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipment-actions button{font-size:10px!important;padding:2px!important;min-height:24px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-model-name{font-size:12px;line-height:18px}
}
/* Multiselect checkboxes are not quantity inputs. Keep item art visible. */
#game-root .forge-select-row{display:grid!important;grid-template-columns:20px minmax(0,1fr);gap:6px;align-items:center;margin:3px 0}
#game-root .forge-select-row input[type=checkbox]{width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;margin:0!important;accent-color:#d4b875}
#game-root .forge-select-row .forge-item{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
#game-root .forge-item img{flex:0 0 40px;object-fit:contain}
#game-root .forge-preview{font-size:12px;line-height:1.6;overflow-wrap:anywhere;color:#dce6cc}
#game-root .forge-result{width:min(460px,calc(100vw - 32px))!important;max-height:min(520px,calc(100dvh - 40px))!important;padding:16px!important;overflow-x:hidden!important;overflow-y:auto!important;overflow-wrap:anywhere;contain:layout paint}
#game-root .forge-result::before{display:none!important}
#game-root .forge-result-change{max-width:100%;white-space:normal}
#commerce-confirm>div{position:relative;padding-top:42px}
#commerce-confirm .confirm-daily{position:absolute;right:14px;top:12px;display:flex;align-items:center;gap:5px;font-size:12px;white-space:nowrap;color:#dfcda5}
#commerce-confirm .confirm-daily input{width:16px!important;height:16px!important;min-height:0!important;accent-color:#cbaa65}
/* Codex paging stays beside the horizontally scrollable hero categories. */
#game-root.ui-workspace .ws-collection-controls{display:flex;align-items:center;gap:6px;min-width:0;flex:none;width:100%}
#game-root.ui-workspace .ws-collection-controls #collection-roster{display:flex!important;flex:1 1 0;min-width:0;overflow-x:auto;white-space:nowrap;flex-wrap:nowrap!important;margin:0!important}
#game-root.ui-workspace .ws-collection-controls #collection-roster>button{flex:none}
#game-root.ui-workspace .ws-collection-controls #collection-pages{display:flex;flex:0 0 auto;align-items:center;gap:3px;padding:0;margin:0;white-space:nowrap;font-size:11px}
#game-root.ui-workspace .ws-collection-controls #collection-pages button{padding:4px!important;font-size:11px!important;min-width:0!important}
#game-root.ui-workspace .ws-collection-picker{max-height:none!important;min-height:0;align-content:start!important}
@media(max-width:700px) and (orientation:portrait){
 #game-root.ui-workspace .codex-page .ws-collection-browser{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;grid-template-rows:minmax(0,1fr)!important}
 #game-root.ui-workspace .ws-collection-picker{grid-template-columns:repeat(auto-fill,minmax(42px,1fr))!important}
 #game-root.ui-workspace .ws-collection-picker>button{height:46px!important;min-height:46px!important}
 #game-root.ui-workspace .codex-page #collection-list .collection-card{padding:6px!important;font-size:11px}
}

#game-root .ws-bag-search-row :is(#bag-upgrade-filter,#ew-trade-bag-upgrade-filter){width:78px!important;min-width:0!important;max-width:78px!important;height:30px;padding:2px;font-size:11px} @media(max-width:640px){#game-root .ws-bag-search-row :is(#bag-upgrade-filter,#ew-trade-bag-upgrade-filter){width:65px!important;font-size:10px}#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row .bag-search{flex-basis:35px;min-width:25px}#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row .bag-search button{display:none!important}#game-root .ws-bag-search-row .ws-level-range input{width:28px!important}}
/* Keep the item list reachable in short mobile viewports. */
#game-root #forge-modal .forge-browser{overflow:auto!important;min-width:0}
#game-root #forge-modal .forge-browser>*{flex:none}
#game-root #forge-modal .forge-items{overflow:visible!important;min-height:min-content}
#game-root #forge-modal .forge-pager{position:sticky;bottom:0;background:#142b2c;padding:4px 0;z-index:2}
#game-root #forge-modal .forge-batch-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:4px 0;min-width:0}
#game-root #forge-modal .forge-batch-controls>button{min-width:0!important;min-height:28px!important;padding:4px!important;font-size:11px!important;white-space:normal}
#game-root #forge-modal .forge-batch-controls>label{grid-column:1/-1;display:flex;flex-wrap:wrap;min-width:0;gap:4px;font-size:11px}
#game-root #forge-modal .forge-batch-controls .quantity-control{min-width:0;max-width:100%}
#game-root #forge-modal #forge-repeat{width:44px!important;min-width:0!important;max-width:44px!important;min-height:28px!important;padding:2px!important}
#game-root #forge-modal [data-quantity-step]{min-width:28px!important;width:28px!important;min-height:28px!important;padding:2px!important}
#game-root #upstream-affix-forge .service-row[hidden]{display:none!important}

/* Equipment filters wrap by available pane width; native handles stay intact. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row.ew-gear-filter-row{display:flex!important;flex-wrap:wrap!important;align-items:center;gap:5px!important;width:100%;min-width:0;box-sizing:border-box}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>.bag-search{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>:is(:is(#bag-hero-filter,#ew-trade-bag-hero-filter),:is(#bag-upgrade-filter,#ew-trade-bag-upgrade-filter)){flex:1 1 92px!important;width:auto!important;max-width:none!important;min-width:90px!important;min-height:32px!important;height:32px!important;margin:0!important;padding:3px 18px 3px 5px!important;box-sizing:border-box;font-size:12px!important;line-height:1.3;white-space:nowrap;font-family:system-ui,sans-serif;overflow:hidden;text-overflow:ellipsis;background-color:#142c2c;color:#e8d4a0;border:1px solid #657266}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>:is(#bag-level-range,#ew-trade-bag-level-range){display:grid!important;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr);gap:3px;flex:1.3 1 120px!important;min-width:120px!important;max-width:100%;width:auto!important;align-items:center;white-space:nowrap;font:12px/1.3 system-ui,sans-serif}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>:is(#bag-level-range,#ew-trade-bag-level-range)[hidden],#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>select[hidden]{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row :is(#bag-level-range,#ew-trade-bag-level-range) input{width:100%!important;min-width:0!important;max-width:none!important;height:32px!important;min-height:32px!important;box-sizing:border-box;padding:3px 1px!important;text-align:center;font:12px/1.3 system-ui,sans-serif;color:#e8dab6;background:#11272c;border:1px solid #657266;appearance:textfield}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row :is(#bag-level-range,#ew-trade-bag-level-range)[data-invalid=true] input{border-color:#e99a7c}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>:is(#multi-sale-toggle,#ew-trade-multi-sale-toggle){flex:0 0 auto!important;width:auto!important;min-width:62px!important;min-height:32px!important;height:32px!important;margin:0!important;padding:3px 6px!important;white-space:nowrap;font-size:12px!important}

/* Short closed labels, full native picker choices, one equipment filter row. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row.ew-gear-filter-row{display:grid!important;grid-template-columns:minmax(41px,1fr) minmax(41px,1fr) minmax(94px,1.5fr) auto;gap:3px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>.ew-compact-select{position:relative;min-width:0;width:100%;height:32px;box-sizing:border-box;border:1px solid #657266;background:#142c2c;color:#e8d4a0;font:12px/30px system-ui,sans-serif;overflow:hidden}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-compact-select>.ew-compact-select-label{display:block;min-width:0;padding:0 13px 0 4px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;pointer-events:none}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-compact-select::after{content:"";position:absolute;right:5px;top:12px;width:4px;height:4px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg);pointer-events:none}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>.ew-compact-select>select{position:absolute!important;inset:0!important;width:100%!important;min-width:0!important;max-width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;opacity:0;cursor:pointer;font:12px system-ui,sans-serif}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-compact-select:focus-within{outline:1px solid #e4c778;outline-offset:1px}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-compact-select[data-disabled=true]{opacity:.55}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>.ew-compact-select[hidden]{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>:is(#bag-level-range,#ew-trade-bag-level-range){min-width:0!important;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr);gap:2px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>:is(#multi-sale-toggle,#ew-trade-multi-sale-toggle){min-width:34px!important;padding:3px 4px!important}
/* Shop presentation, scoped so other merchants keep their layout. */
.limited-skin-confirm .limited-skin-actions{display:flex;gap:10px;justify-content:flex-end;flex:0 0 auto}
.limited-skin-confirm .limited-skin-actions button{flex:1 1 0;min-height:42px;height:auto;max-height:none;margin:0;padding:10px 12px;font-size:14px;line-height:1.4}
.limited-skin-confirm .ex-panel h3,.limited-skin-confirm .ex-panel p{margin:0;flex:0 0 auto}
#game-root.ui-rpg #service-modal.skin-store .ws-content{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#game-root.ui-rpg #service-modal.skin-store .ws-content>header,#game-root.ui-rpg #service-modal.skin-store .ws-content>.rpg-help{display:none!important}
#game-root.ui-rpg #service-modal.skin-store .service-body{display:grid!important;grid-template-columns:72px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr);gap:12px;min-height:0;flex:1;margin-top:8px;overflow:hidden}
#game-root.ui-rpg #service-modal.skin-store .skin-store-merchant{display:none!important}
#game-root.ui-rpg #service-modal.skin-store .skin-store-rail{display:flex!important;flex-direction:column;gap:8px;width:auto;min-width:0;min-height:0;align-self:stretch;padding:0 8px 0 0!important;border-right:1px solid #8c7b50;overflow:hidden;overscroll-behavior:contain;background:none}
#game-root.ui-rpg #service-modal.skin-store #service-tabs{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;overflow:visible!important;flex-wrap:nowrap!important}
#game-root.ui-rpg #service-modal.skin-store #service-tabs button{min-width:0;width:100%!important;padding:9px 4px;margin:0;font-size:14px}
#game-root.ui-rpg #service-modal.skin-store .skin-store-heroes{display:flex;flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;flex-direction:column;gap:7px;border-top:1px solid #8c7b50;padding-top:10px}
#game-root.ui-rpg #service-modal.skin-store .skin-store-heroes[hidden]{display:none!important}
#game-root.ui-rpg #service-modal.skin-store .skin-store-heroes button{position:relative;display:grid;place-items:center;padding:2px;width:100%;min-width:0;aspect-ratio:1;flex:0 0 auto;overflow:hidden}
#game-root.ui-rpg #service-modal.skin-store .skin-store-heroes img{width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
#game-root.ui-rpg #service-modal.skin-store .skin-store-heroes span{position:absolute;bottom:0;left:0;right:0;background:#0c211ee0;font-size:10px;line-height:1.4}
#game-root.ui-rpg #service-modal.skin-store .service-main{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
#game-root.ui-rpg #service-modal.skin-store #service-list{display:flex;flex-direction:column;gap:14px;max-height:none!important;padding:0 4px 10px 0!important}
#game-root.ui-rpg #service-modal.skin-store .skin-choices{display:flex;flex-wrap:wrap;gap:8px;margin:0;flex:0 0 auto}
#game-root.ui-rpg #service-modal.skin-store .skin-choices>button{flex:0 1 155px;min-width:0;grid-template-columns:44px minmax(0,1fr);padding:6px;min-height:66px;margin:0}
#game-root.ui-rpg #service-modal.skin-store .skin-choices>button[hidden]{display:none!important}
#game-root.ui-rpg #service-modal.skin-store .skin-choices b{white-space:normal;font-size:14px}
#game-root.ui-rpg #service-modal.skin-store .skin-choices small{font-size:11px}
#game-root.ui-rpg #service-modal.skin-store .skin-shop-card{flex:1 0 auto;min-height:380px;grid-template-columns:minmax(0,48%) minmax(0,1fr);padding:20px;gap:20px;margin:0;align-items:center}
#game-root.ui-rpg #service-modal.skin-store .skin-shop-stage{min-width:0;min-height:330px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}
#game-root.ui-rpg #service-modal.skin-store #skin-shop-model{width:min(100%,290px);height:auto;aspect-ratio:240/330;object-fit:contain}
#game-root.ui-rpg #service-modal.skin-store .skin-shop-card>section{min-width:0}
#game-root.ui-rpg #service-modal.skin-store .skin-shop-card h3{font-size:26px;margin:12px 0}
#game-root.ui-rpg #service-modal.skin-store .skin-shop-card p{line-height:1.6;font-size:13px;overflow-wrap:anywhere}
#game-root.ui-rpg #service-modal.skin-store .skin-shop-card button{display:block;width:100%;min-height:40px;margin:10px 0 0;padding:8px;font-size:14px}
#game-root.ui-rpg #service-modal.skin-store .skin-price{font-size:24px;display:block}
@media(max-width:600px){
 #game-root.ui-rpg #service-modal.skin-store .service-body{grid-template-columns:52px minmax(0,1fr)!important;gap:7px}
 #game-root.ui-rpg #service-modal.skin-store .skin-store-rail{padding-right:5px!important}
 #game-root.ui-rpg #service-modal.skin-store #service-tabs button{font-size:12px;padding:8px 2px}
 #game-root.ui-rpg #service-modal.skin-store .skin-store-heroes span{font-size:9px}
 #game-root.ui-rpg #service-modal.skin-store .skin-choices{gap:5px}
 #game-root.ui-rpg #service-modal.skin-store .skin-choices>button{flex:1 1 90px;grid-template-columns:30px minmax(0,1fr);gap:3px;padding:4px;min-height:52px}
 #game-root.ui-rpg #service-modal.skin-store .skin-choices .skin-item-art{width:28px;height:36px}
 #game-root.ui-rpg #service-modal.skin-store .skin-choices b{font-size:11px}
 #game-root.ui-rpg #service-modal.skin-store .skin-choices small{font-size:9px}
 #game-root.ui-rpg #service-modal.skin-store .skin-shop-card{grid-template-columns:minmax(0,1fr);gap:8px;padding:10px;min-height:0}
 #game-root.ui-rpg #service-modal.skin-store .skin-shop-stage{min-height:190px!important;height:230px!important}
 #game-root.ui-rpg #service-modal.skin-store #skin-shop-model{width:auto!important;max-width:100%;height:210px!important}
 #game-root.ui-rpg #service-modal.skin-store .skin-shop-card h3{font-size:20px;margin:4px 0}
 #game-root.ui-rpg #service-modal.skin-store .skin-shop-card p{font-size:12px;margin:6px 0}
 #game-root.ui-rpg #service-modal.skin-store .skin-price{font-size:21px}
}

/* Forge result: viewport top layer, including iOS keyboard/browser viewport. */
#game-root .forge-result{
 inset:auto!important;left:var(--forge-visible-x,50vw)!important;top:var(--forge-visible-y,50dvh)!important;
 width:min(460px,var(--forge-visible-width,calc(100vw - 32px)))!important;
 max-width:calc(100vw - 24px)!important;max-height:min(520px,var(--forge-visible-height,calc(100dvh - 32px)))!important;
 margin:0!important;transform:translate(-50%,-50%)!important;overscroll-behavior:contain;
 -webkit-overflow-scrolling:touch;scroll-padding-block:16px;animation:none!important;
}
#game-root .forge-result[popover]{box-shadow:0 12px 50px #000b,0 0 24px #d9b35444!important}
#game-root .forge-result::backdrop{background:#020a0bd9;pointer-events:auto}
#game-root .forge-result>button{position:sticky;bottom:0;z-index:1;min-height:40px;max-width:100%;background:#233f3c;color:#f4e3b1;border:1px solid #c8a968}

/* Loadout inventory: whole-game confirmations and selected equipment. */
.ew-world-confirm[popover]{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:16px!important;border:0!important;box-sizing:border-box!important;background:rgba(0,0,0,.64)!important;color:#eee3c6;overflow:auto!important}
.ew-world-confirm[popover]:popover-open{display:flex!important;align-items:center;justify-content:center}
.ew-world-confirm[hidden]{display:none!important}.ew-world-confirm::backdrop{background:transparent}
.ws-unsaved.ew-world-confirm{flex-wrap:wrap;align-content:center;gap:12px}.ws-unsaved.ew-world-confirm p{flex-basis:100%;text-align:center}.ws-unsaved.ew-world-confirm button{flex:none;width:auto;max-width:32%;min-height:44px}
.ws-enhancement{position:absolute!important;right:2px!important;bottom:2px!important;z-index:3!important;left:auto!important;top:auto!important;color:#ffe28b!important;background:#132227ee;padding:1px 3px;font-size:11px;line-height:1.2;font-weight:bold;pointer-events:none}
[data-equipment-id],[data-forge-item]{position:relative}
.ew-selected-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:8px;overflow:auto;min-height:0;max-height:48dvh}
.ew-selected-item{min-width:0;text-align:center;display:grid;gap:4px}.ew-selected-item>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ew-selected-item>b{font-size:11px;color:#e7c877}
.ew-selected-art{position:relative;height:64px;border:1px solid var(--item-rarity);background:#10292c}.ew-selected-art img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.ew-selected-actions{display:flex;gap:8px;margin-top:12px}.ew-selected-actions>button{flex:1;min-height:40px;width:auto!important}.ew-multi-items{padding:10px;min-height:0}.ew-multi-items[hidden]{display:none}
:is(#equipment-modal,#ew-trade-equipment-modal)[data-ws-route=bag] .rpg-bag-browser{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,.85fr);gap:12px}:is(#equipment-modal,#ew-trade-equipment-modal)[data-ws-route=bag] .rpg-bag-browser>.rpg-bag-detail{min-width:0;max-height:65dvh;overflow:auto}
@media(max-width:650px){:is(#equipment-modal,#ew-trade-equipment-modal)[data-ws-route=bag] .rpg-bag-browser{grid-template-columns:1fr}:is(#equipment-modal,#ew-trade-equipment-modal)[data-ws-route=bag] .rpg-bag-browser>.rpg-bag-detail{max-height:40dvh}}

/* Enhancement is readable on every equipment tile, including legacy hidden small labels. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item small.ws-enhancement,
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-icon.ws-rarity-item>small.ws-enhancement{display:block!important;position:absolute!important;right:2px!important;bottom:2px!important;top:auto!important;left:auto!important;margin:0!important;grid-column:auto!important}
.ws-summary-gear{position:relative;display:inline-flex}.ws-summary-gear .ws-enhancement{font-size:9px!important}

/* 20261110: fixed eight shortcuts; compact consistent equipment and elemental identity. */
body #world-shortcuts .ws-main-nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;grid-auto-flow:row!important}
body #world-shortcuts .ws-main-nav>button{min-width:0;grid-column:auto!important;grid-row:auto!important}
body .ui-workspace .ws-rarity-item .ws-rarity-badge,body .ui-workspace .ws-rarity-item .ws-enhancement{font-size:9px!important;line-height:1.15!important}
body .ws-summary-icons{display:flex;flex-wrap:wrap;gap:4px;align-content:start}
body .ws-summary-icons>.ws-summary-gear,body .ws-summary-icons>.ws-summary-skill{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 42px;width:42px;height:42px;box-sizing:border-box;overflow:hidden;background:#0c2026;border:1px solid #68776c}
body .ws-summary-icons>.ws-summary-gear{flex-basis:44px;width:44px;height:44px;border-color:var(--item-rarity);background:linear-gradient(145deg,#102127 45%,color-mix(in srgb,var(--item-rarity) 25%,#102127))}
body .ws-summary-icons>span>img{width:100%!important;height:100%!important;object-fit:contain;box-sizing:border-box;padding:2px}
body .ws-summary-gear .ws-item-level{position:absolute;left:1px;top:1px;font-size:9px;line-height:1.1;background:#102127b8}
body .ws-summary-gear .ws-rarity-badge{position:absolute;bottom:1px;left:1px;color:var(--item-rarity);background:#102127b8}
body .ws-summary-gear .ws-enhancement{position:absolute;bottom:1px;right:1px;background:#102127b8}
body .ws-summary-gear .ws-worn-badge{position:absolute;right:1px;top:1px;font-size:10px;color:#c0f4a2}
body .ws-summary-rank{position:absolute;right:1px;bottom:1px;font-size:9px;background:#102127c9}
body .ui-workspace .ew-element-art{border:2px solid #bb7aee!important;box-sizing:border-box;box-shadow:inset 0 0 6px #9b4fde38}
body .ui-workspace [data-upstream-forge]:disabled{background:#333b3d!important;border-color:#687172!important;color:#9babab!important;opacity:.65;cursor:not-allowed}
@media(max-width:600px){body .ws-summary-icons>.ws-summary-skill{flex-basis:32px;width:32px;height:32px}body .ws-summary-icons>.ws-summary-gear{flex-basis:36px;width:36px;height:36px}}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item.ws-rarity-item>:is(.ws-rarity-badge,.ws-enhancement),
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipped-icon.ws-rarity-item>:is(.ws-rarity-badge,.ws-enhancement){font-size:9px!important;line-height:11px!important}
body .ex-item-art .ex-quality,body .ex-item-art .ex-upgrade{font-size:9px!important;line-height:11px!important}

body .ws-overview-section .ws-summary-icons{max-height:144px;overflow:auto;scrollbar-width:thin;justify-content:center;width:100%}body .ws-overview-section[data-overview=career] .ws-summary-icons{max-height:100px}
@media(max-width:600px){body .ws-overview-section .ws-summary-icons{max-height:116px}body .ws-summary-gear .ws-item-level,body .ws-summary-gear .ws-rarity-badge,body .ws-summary-gear .ws-enhancement{font-size:8px!important}}

#game-root.ui-workspace .ws-overview-section .ws-summary-icons{align-content:start}
#game-root.ui-workspace .ws-summary-gear>small{width:auto!important;height:auto!important;min-height:0!important;max-width:100%;white-space:nowrap!important;margin:0!important;padding:0 1px!important;line-height:10px!important;font-size:8px!important}
#game-root.ui-workspace .ws-summary-gear>.ws-item-level{top:1px!important;bottom:auto!important;left:1px!important;right:auto!important}
#game-root.ui-workspace .ws-summary-gear>.ws-rarity-badge{top:auto!important;bottom:1px!important;left:1px!important;right:auto!important}
#game-root.ui-workspace .ws-summary-gear>.ws-enhancement{top:auto!important;bottom:1px!important;left:auto!important;right:1px!important}
#game-root.ui-workspace .ws-summary-gear>.ws-worn-badge{top:1px!important;bottom:auto!important;left:auto!important;right:1px!important}
@media(max-width:600px){#game-root.ui-workspace .ws-overview-section[data-overview=gear] .ws-summary-icons{max-height:154px}}

/* Equipment visual language: identical tiles; separate monetary caption. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ew-multi-items{display:flex;flex-direction:column;flex:1 1 0;min-height:0;padding:4px;overflow:hidden}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ew-selected-grid{display:grid;grid-template-columns:repeat(auto-fill,var(--ws-equip-size));grid-auto-rows:max-content;justify-content:center;align-content:start;flex:1;gap:6px;max-height:none;overflow:auto;padding:2px}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ew-selected-item{width:var(--ws-equip-size);gap:2px}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .ew-selected-art{width:var(--ws-equip-size);height:var(--ws-equip-size);box-sizing:border-box;position:relative;overflow:hidden;border:1px solid var(--item-rarity);background:linear-gradient(145deg,#102127 45%,color-mix(in srgb,var(--item-rarity) 25%,#102127))}
#game-root.ui-workspace .ew-selected-art img{width:calc(100% - 6px);height:calc(100% - 6px);margin:3px;object-fit:contain;image-rendering:pixelated}
#game-root.ui-workspace .ew-selected-art>.ws-item-level{position:absolute;top:2px;left:2px;right:auto;bottom:auto;font-size:9px;line-height:11px;background:#0c151cba;padding:0 1px}
#game-root.ui-workspace .ew-selected-art>.ws-rarity-badge{position:absolute;bottom:2px;left:2px;right:auto;top:auto;font-size:9px!important;line-height:11px!important;color:var(--item-rarity);background:#0c151cba;padding:0 1px}
#game-root.ui-workspace .ew-selected-art>.ws-enhancement{font-size:9px!important;line-height:11px!important}
.ew-equipment-price{display:flex;justify-content:center;align-items:center;gap:2px;white-space:nowrap;font-size:10px!important;line-height:16px;color:#edcc85;background:#11282c}
.ew-equipment-price>img{width:12px;height:12px;object-fit:contain;image-rendering:pixelated}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-panel-scroll:has(.ew-multi-items){overflow:hidden!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-selected-actions{flex:none;margin:0;padding:6px 2px;position:sticky;bottom:0;z-index:6;background:#162e31}
#game-root.ui-workspace .ws-study-current .book-loadout-slot.ew-element-art,#game-root.ui-workspace .ws-study-current .ws-learned-talents>.ew-element-art{border:2px solid #bb7aee!important;box-shadow:inset 0 0 6px #9b4fde38!important}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .rpg-bag-detail{flex:1 1 0;min-height:0;overflow-y:auto!important;scroll-padding-bottom:55px}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .gear-panel-scroll:has(.rpg-bag-detail:not([hidden])){overflow:hidden!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action{position:sticky!important;bottom:0!important;z-index:6;background:#162e31;padding:6px 2px!important;display:flex!important;gap:4px;flex-wrap:wrap}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] #bag-action>button{min-height:34px!important;flex:1 1 0;width:auto!important;white-space:nowrap}
}

@media(max-width:800px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear]{height:var(--dialog-height)!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true]{height:calc(var(--dialog-height) - var(--gear-shrink,0px))!important}
}

/* Compact shared equipment controls and icon-led inventory. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row.ew-gear-filter-row{grid-template-columns:48px 48px 48px minmax(80px,1fr) auto!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-compact-select[data-filtered=true]{border-color:#cfb76e;color:#ffe1a0}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.bag-search{display:flex!important;flex:1 1 76px!important;min-width:48px!important;max-width:160px!important;margin:0!important;padding:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.bag-search>span{display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.bag-search input{width:100%!important;min-width:0!important;height:30px!important;min-height:30px!important;padding:3px 5px!important;box-sizing:border-box}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipment-actions{display:flex!important;justify-content:center!important;gap:5px!important;flex-wrap:nowrap!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipment-actions>button{flex:0 0 auto!important;width:auto!important;min-width:44px!important;max-width:none!important;padding:3px 8px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal):has(.ws-panel[data-ws-route=bag])>.native-gear-window{width:min(var(--dialog-width,90vw),920px)!important;height:auto!important;max-height:var(--dialog-height,85dvh)!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-panel[data-ws-route=bag]{--ws-equip-size:60px;height:auto!important;max-height:var(--dialog-height,85dvh)!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .gear-desktop{height:auto!important;min-height:0!important;max-height:calc(var(--dialog-height,85dvh) - 65px)!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel){height:auto!important;min-height:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important;overflow:auto!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{display:grid!important;grid-template-columns:minmax(0,var(--bag-list-width,1fr)) minmax(0,1fr)!important;grid-template-rows:auto!important;align-items:start!important;gap:8px!important;min-height:0!important;flex:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-storage{min-height:0!important;height:auto!important;max-height:380px!important;overflow:auto!important;padding:4px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items){display:grid!important;grid-template-columns:repeat(auto-fill,var(--ws-equip-size))!important;justify-content:center!important;align-content:start!important;gap:5px!important;min-height:0!important;height:auto!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item{position:relative!important;display:block!important;box-sizing:border-box!important;width:var(--ws-equip-size)!important;height:var(--ws-equip-size)!important;min-width:var(--ws-equip-size)!important;max-width:var(--ws-equip-size)!important;min-height:var(--ws-equip-size)!important;max-height:var(--ws-equip-size)!important;margin:0!important;padding:3px!important;border:1px solid #718b7d!important;overflow:hidden!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item[aria-pressed=true]{border-color:#e6c679!important;box-shadow:inset 0 0 0 1px #e6c679!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item img{position:absolute!important;inset:3px!important;max-width:none!important;max-height:none!important;width:calc(100% - 6px)!important;height:calc(100% - 6px)!important;object-fit:contain!important;margin:0!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item>b,#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item>small:not(.ws-stack-count){display:none!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item>.ws-stack-count{display:block!important;position:absolute!important;right:2px!important;bottom:2px!important;z-index:3;font:600 10px/13px system-ui,sans-serif!important;color:#fff2c7!important;background:#102326de;padding:0 2px!important;width:auto!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-detail{max-height:380px!important;overflow:auto!important;border-left:1px solid #65735c;padding:4px 6px!important}
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#bag-detail,#ew-trade-bag-detail){flex:none!important;overflow:visible!important}
#game-root.ui-workspace .inventory-purchase{display:flex;align-items:center;gap:6px;margin-top:8px;flex-wrap:wrap}
#game-root.ui-workspace .inventory-purchase>.quantity-stepper{flex:0 1 120px;min-width:100px}
#game-root.ui-workspace .inventory-purchase>button{flex:1 1 110px;min-width:0;padding:5px;font-size:12px}
#game-root.ui-workspace .inventory-purchase input{width:60px;min-width:0;box-sizing:border-box;text-align:center}
@media(max-width:700px){#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-panel[data-ws-route=bag]{--ws-equip-size:48px}}
@media(orientation:portrait) and (max-width:800px){
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-storage{max-height:180px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-detail{max-height:300px!important;border-left:0;border-top:1px solid #65735c}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.bag-search{max-width:90px!important;flex-basis:58px!important}
 #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row.ew-gear-filter-row{grid-template-columns:44px 44px 44px minmax(60px,1fr) auto!important;gap:2px!important}
}

body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.bag-search{font-size:0!important;flex:0 1 90px!important;min-width:65px!important;max-width:90px!important;gap:0!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.bag-search input{font-size:11px!important;flex:1 1 0!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipment-actions>button{flex:0 0 auto!important;width:auto!important;min-width:42px!important;max-width:88px!important;padding:3px 7px!important}

body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipment-actions{display:flex!important;width:auto!important;justify-self:center!important;justify-content:center!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item>.ws-stack-count{left:auto!important;top:auto!important;transform:none!important;margin:0!important}

body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipment-actions{flex-direction:row!important;align-items:center!important}

/* Portrait preparation: roster across the top, readable horizontal tabs down the left. */
@media (max-width:800px) and (orientation:portrait){
 body #game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]{display:grid!important;grid-template-columns:52px minmax(0,1fr) 30px!important;grid-template-rows:auto minmax(0,1fr)!important;gap:6px!important;overflow:hidden!important}
 body #game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]>.ws-nav,
 body #game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]>.ws-shell{display:contents!important}
 body #game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]>.ws-nav>.ws-title-row{grid-column:3;grid-row:1;align-self:start;padding:0!important}
 body #game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]>.ws-nav>.ws-tabs{grid-column:1;grid-row:2;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:4px!important;width:52px!important;min-width:0!important;max-height:100%;overflow-y:auto!important;overflow-x:hidden!important;padding:0!important;margin:0!important}
 body #game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]>.ws-nav>.ws-tabs>button{width:52px!important;min-width:0!important;min-height:34px!important;flex:none!important;padding:6px 2px!important;font-size:12px!important;white-space:normal!important;word-break:normal!important;writing-mode:horizontal-tb!important;line-height:1.25!important}
 body #game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]>.ws-shell>.ws-roster{grid-column:1/3;grid-row:1;display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;width:auto!important;max-width:none!important;min-width:0!important;gap:5px!important;padding:0 0 4px!important;border-right:0!important;border-bottom:1px solid #4c6257!important;overflow-x:auto!important;overflow-y:hidden!important}
 body #game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]>.ws-shell>.ws-roster button{width:32px!important;min-width:32px!important;height:36px!important;min-height:36px!important;padding:2px!important;margin:0!important;flex:none!important}
 body #game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]>.ws-shell>.ws-roster img{width:26px!important;height:30px!important;object-fit:cover!important}
 body #game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]>.ws-shell>.ws-roster [data-ws-party=edit]{font-size:10px!important;line-height:13px!important}
 body #game-root.ui-workspace :is(#party-modal,:is(#equipment-modal,#ew-trade-equipment-modal),#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]>.ws-shell>.ws-content{grid-column:2/4;grid-row:2;min-width:0!important;min-height:0!important;max-width:100%!important;overflow:auto!important}
}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row :is(#bag-level-range,#ew-trade-bag-level-range){min-width:0!important;gap:2px!important;justify-content:flex-start!important;flex:0 0 auto!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row :is(#bag-level-range,#ew-trade-bag-level-range) input{width:32px!important;min-width:0!important;max-width:32px!important;padding:3px 1px!important;flex:none!important;text-align:center!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row.ew-gear-filter-row{grid-template-columns:48px 48px 48px max-content auto!important;gap:4px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:4px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.bag-search{flex:1 1 140px!important;width:180px!important;min-width:110px!important;max-width:180px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row :is(#bag-search,#ew-trade-bag-search){width:100%!important;min-width:0!important;max-width:none!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#multi-sale,#ew-trade-multi-sale){display:grid!important;grid-template-columns:1fr auto auto 1fr!important;align-items:center!important;gap:6px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#multi-sale,#ew-trade-multi-sale)[hidden]{display:none!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#multi-sale-all,#ew-trade-multi-sale-all){grid-column:2!important;min-width:44px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#multi-sale-clear,#ew-trade-multi-sale-clear){grid-column:3!important;min-width:44px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#multi-sale,#ew-trade-multi-sale)>small{grid-column:4!important;text-align:right!important;justify-self:end!important;font-size:10px!important}
@media(max-width:800px) and (orientation:portrait){
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row.ew-gear-filter-row{grid-template-columns:42px 42px 42px max-content auto!important;gap:2px!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row :is(#bag-level-range,#ew-trade-bag-level-range) input{width:25px!important;max-width:25px!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-compact-select{width:42px!important;min-width:42px!important;max-width:42px!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.bag-search{flex:1 1 100px!important;width:140px!important;min-width:85px!important;max-width:150px!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#multi-sale-toggle,#ew-trade-multi-sale-toggle){min-width:0!important;padding:4px 2px!important;font-size:10px!important}
}

body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-compact-select>.ew-compact-select-label{padding:0 10px 0 2px!important;font-size:11px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-compact-select::after{right:3px!important;width:3px!important;height:3px!important}

/* Inventory actions: compact filters, list footer and native purchases. */
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row :is(#multi-sale-toggle,#ew-trade-multi-sale-toggle){width:max-content!important;min-width:0!important;justify-self:end!important;padding:4px 6px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.bag-search{flex:0 1 120px!important;width:120px!important;min-width:60px!important;max-width:120px!important;margin-left:auto!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#multi-sale,#ew-trade-multi-sale){display:flex!important;justify-content:center!important;gap:6px!important;align-items:center!important;flex-wrap:wrap}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#multi-sale,#ew-trade-multi-sale)>small{margin-left:4px!important;justify-self:start!important;text-align:left!important;flex:none!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-storage+.ew-inventory-pages{display:flex!important;justify-content:center!important;align-items:center!important;gap:8px;margin:18px 0 4px!important;flex:none!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-storage+.ew-inventory-pages button{width:30px;min-width:30px;height:28px;padding:0;font-size:0}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-storage+.ew-inventory-pages button:first-child::before{content:'‹';font-size:20px}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .bag-storage+.ew-inventory-pages button:last-child::before{content:'›';font-size:20px}
body #game-root.ui-workspace .ws-purchase-price{display:inline-flex!important;align-items:center;justify-content:center;gap:5px;white-space:nowrap}
body #game-root.ui-workspace .ws-purchase-price img{width:18px!important;height:18px!important;object-fit:contain}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .inventory-purchase .quantity-stepper,
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-book-purchase .quantity-stepper{width:130px!important;min-width:130px!important;flex:0 0 130px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(.inventory-purchase,.ws-book-purchase) .quantity-stepper input{width:70px!important;min-width:64px!important;flex:1 1 70px!important;font-size:14px!important;padding:4px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-book-purchase{display:flex!important;align-items:center;gap:6px;flex-wrap:wrap;margin-top:6px}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-book-purchase>img,
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-book-purchase>span,
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-book-purchase>[data-study=use]{display:none!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-book-purchase>.study-quantity{flex:0 0 130px!important;width:130px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-book-purchase>[data-study=buy]{flex:1 1 90px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-book-use{display:block;width:100%;margin:8px 0 4px;min-height:32px}
@media(max-width:800px) and (orientation:portrait){
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal):has(.ws-panel[data-ws-route=bag])>.native-gear-window{width:100vw!important;max-width:100vw!important;box-sizing:border-box!important;margin-inline:0!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-equipment-filter-row>.bag-search{width:105px!important;max-width:105px!important;min-width:60px!important;flex-basis:105px!important}
}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(.inventory-purchase,.ws-book-purchase) .quantity-stepper{display:flex!important;gap:3px!important;box-sizing:border-box!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(.inventory-purchase,.ws-book-purchase) .quantity-stepper button{width:26px!important;min-width:26px!important;max-width:26px!important;padding:0!important;flex:0 0 26px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-book-purchase>.study-quantity{font-size:0!important;display:block!important;margin:0!important;padding:0!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-book-purchase{position:sticky;bottom:0;background:#152e32;padding:5px 0;z-index:1}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ws-bag-search-row.ew-gear-filter-row{display:flex!important;flex-wrap:wrap!important;align-items:center!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>.ew-compact-select{width:48px!important;min-width:48px!important;flex:0 0 48px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row :is(#multi-sale-toggle,#ew-trade-multi-sale-toggle){margin-left:auto!important;flex:none!important}
@media(max-width:800px) and (orientation:portrait){body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-gear-filter-row>.ew-compact-select{width:40px!important;min-width:40px!important;flex-basis:40px!important}}
@media(max-width:800px) and (orientation:portrait){
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel){min-height:240px!important;max-height:none!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-storage{min-height:58px!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .bag-storage+.ew-inventory-pages{margin-top:10px!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-desktop{grid-template-rows:minmax(240px,1fr) minmax(200px,1fr)!important;min-height:450px!important}
}
@media(max-width:360px) and (orientation:portrait){
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel){min-height:280px!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] .gear-desktop{grid-template-rows:minmax(280px,1fr) minmax(200px,1fr)!important;min-height:490px!important}
}

/* Compact inventory footer: selection above pagination, no reserved item row. */
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-inventory-footer{flex:0 0 auto;display:flex;flex-direction:column;gap:2px;padding:2px 0 0;margin:0;min-height:0}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-inventory-footer :is(#multi-sale,#ew-trade-multi-sale){margin:0!important;padding:2px 0!important;min-height:0!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-inventory-footer :is(#multi-sale,#ew-trade-multi-sale)[hidden]{display:none!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-inventory-pages{margin:2px 0!important;padding:0!important;gap:5px!important;min-height:22px!important;height:22px!important;flex:0 0 22px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-inventory-pages button{width:24px!important;min-width:24px!important;max-width:24px!important;height:22px!important;min-height:22px!important;padding:0!important;line-height:20px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-inventory-pages button::after{font-size:16px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-inventory-pages .ew-inventory-page-label{font-size:11px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-inventory-footer :is(#multi-sale,#ew-trade-multi-sale) button{min-height:24px!important;height:24px!important;padding:1px 8px!important}

body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-inventory-pages button{font-size:16px!important;flex:0 0 24px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-inventory-pages button::before,body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) .ew-inventory-pages button::after{content:none!important}
/* A one-row inventory still needs room for the bottom selection controls. */
@media(max-width:800px) and (orientation:portrait){
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true] .gear-desktop{grid-template-rows:max-content minmax(200px,1fr)!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true] :is(#inventory-panel,#ew-trade-inventory-panel){min-height:0!important;max-height:none!important;height:auto!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true] :is(#inventory-panel,#ew-trade-inventory-panel) .gear-panel-scroll{flex:none!important;height:auto!important;max-height:none!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true] :is(#inventory-panel,#ew-trade-inventory-panel) .rpg-bag-browser{flex:none!important;height:auto!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true] :is(#inventory-panel,#ew-trade-inventory-panel) .bag-storage{flex:none!important;height:auto!important;min-height:58px!important}
 body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear][data-ws-sparse=true] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items){min-height:0!important;height:auto!important}
}

/* Equipment identity and selection, shared across native item contexts. */
body #game-root .bag-item.selected,body #game-root .bag-item.active,body #game-root .bag-item.sale-selected,body #game-root .gear-slot button.selected{outline:2px solid #fff2a6!important;outline-offset:1px;box-shadow:inset 0 0 0 2px #33290a,0 0 9px #e9c354!important;position:relative}
body #game-root .bag-item.selected::after,body #game-root .bag-item.active::after,body #game-root .bag-item.sale-selected::after{content:'◆';position:absolute;right:1px;top:1px;color:#fff6ba;background:#44310d;font-size:11px;line-height:14px;padding:0 2px;z-index:8;pointer-events:none}
body #game-root .gear-slot button.ws-occupied-slot>.ws-enhancement{display:block!important;visibility:visible!important;position:absolute!important;bottom:2px!important;right:2px!important;left:auto!important;top:auto!important;font-size:9px!important;line-height:11px!important;z-index:5!important}
body #game-root .ew-detail-equipment{display:inline-flex!important;position:relative!important;flex:none;width:var(--ws-equip-size,60px)!important;height:var(--ws-equip-size,60px)!important;border:1px solid var(--item-rarity);background:#102127;box-sizing:border-box}
body #game-root .ew-detail-equipment img{width:100%!important;height:100%!important;object-fit:contain}
body #game-root .ew-detail-equipment>.ws-item-level{display:block!important;position:absolute;left:2px;top:2px;bottom:auto;right:auto;font-size:10px!important;background:#102127cc}
body #game-root .ew-detail-equipment>.ws-rarity-badge{display:block!important;position:absolute;bottom:2px;left:2px;top:auto;right:auto;font-size:9px!important;color:var(--item-rarity);background:#102127cc}
body #game-root .ew-compare-hero{display:flex;align-items:center;justify-content:flex-start;gap:6px;margin:0 0 7px;font-size:12px}
body #game-root .ew-compare-hero select{width:auto;max-width:110px;min-height:26px;padding:2px 5px}

body #game-root [data-sale-selected="true"]{outline:2px solid #fff2a6!important;outline-offset:1px;box-shadow:inset 0 0 0 2px #33290a,0 0 9px #e9c354!important}

body #game-root :is(#bag-items,#ew-trade-bag-items) button.selected,body #game-root :is(#bag-items,#ew-trade-bag-items) button[aria-pressed="true"],body #game-root :is(#bag-items,#ew-trade-bag-items) [data-equipment-selected="true"]{outline:2px solid #fff2a6!important;outline-offset:1px;box-shadow:inset 0 0 0 2px #33290a,0 0 9px #e9c354!important;position:relative}
body #game-root :is(#bag-items,#ew-trade-bag-items) button.selected::after,body #game-root :is(#bag-items,#ew-trade-bag-items) button[aria-pressed="true"]::after,body #game-root :is(#bag-items,#ew-trade-bag-items) [data-equipment-selected="true"]::after{content:'◆';position:absolute;right:1px;top:1px;color:#fff6ba;background:#44310d;font-size:11px;line-height:14px;padding:0 2px;z-index:8;pointer-events:none}

/* Shared, explicit selection language. Outranks the legacy rarity reset. */
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) :is(.ew-equipment-picked,.ex-tile[aria-pressed="true"],.ex-picked){border-color:#fff0a2!important;outline:2px solid #fff0a2!important;outline-offset:1px!important;box-shadow:inset 0 0 0 2px #745b20,0 0 7px #d4a548!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) :is(.ew-equipment-selection-mark,.ex-selection-mark){position:absolute!important;display:block!important;top:1px!important;right:1px!important;bottom:auto!important;left:auto!important;width:16px!important;height:16px!important;padding:0!important;line-height:14px!important;text-align:center!important;font:normal 12px/14px sans-serif!important;background:#71571c!important;color:#fff5bd!important;border:1px solid #ffe9a5!important;z-index:9!important;pointer-events:none}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) :is(.ew-equipment-selection-mark,.ex-selection-mark)[hidden]{display:none!important}

body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item.ws-rarity-item:is(.ew-equipment-picked,.ex-tile[aria-pressed=true],.ex-picked){border-color:#fff0a2!important;outline:2px solid #fff0a2!important;outline-offset:1px!important;box-shadow:inset 0 0 0 2px #745b20,0 0 7px #d4a548!important}

/* Preparation portrait windows use the available phone width, retaining safe edges. */
@media(orientation:portrait) and (max-width:800px){
 body #game-root.ui-workspace :is(#party-modal,#equipment-modal,#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal){padding-left:3px!important;padding-right:3px!important}
 body #game-root.ui-workspace :is(#party-modal,#equipment-modal,#skillbook-modal,#career-modal,#ai-rules-modal,#world-atlas-modal,#map-modal) .ws-panel[data-preparation=true]{width:calc(100vw - 6px)!important;max-width:calc(100vw - 6px)!important;box-sizing:border-box!important;margin-left:auto!important;margin-right:auto!important}
}

/* Market terminal 2: preparation typography and compact finance controls. */
body #game-root .ew-exchange .ex-panel[data-main="equipment"],body #game-root .ew-exchange .ex-panel:not([data-main]){width:min(1420px,98vw)!important;max-width:98vw!important}
body #game-root :is(#cm-resource,#fg-resource){grid-template-columns:116px minmax(300px,1fr) 222px!important;gap:10px!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-assets{padding:5px!important}body #game-root :is(#cm-resource,#fg-resource) .cm-pools button{padding:8px 4px!important;gap:6px}
body #game-root :is(#cm-resource,#fg-resource) .cm-resource-icon{width:32px;height:32px;flex:none;display:inline-flex;align-items:center;justify-content:center;object-fit:contain;image-rendering:pixelated}
body #game-root :is(#cm-resource,#fg-resource) .cm-resource-icon svg{width:100%;height:100%}
body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header{display:flex;align-items:center;gap:18px;padding:8px 2px;border-bottom:1px solid #59634e;flex-wrap:wrap}
body #game-root :is(#cm-resource,#fg-resource) .cm-asset-title{display:flex;align-items:center;gap:6px}body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header h3{font-size:19px;margin:0}
body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header b{font-size:17px;line-height:1.3}body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header small,body #game-root :is(#cm-resource,#fg-resource) .cm-metric small{display:block;font-size:11px;color:#adbaa8}
body #game-root :is(#cm-resource,#fg-resource) .cm-money{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}body #game-root :is(#cm-resource,#fg-resource) .cm-money img{width:13px;height:13px;object-fit:contain;image-rendering:pixelated}
body #game-root :is(#cm-resource,#fg-resource) .cm-green{color:#75d7a4!important}body #game-root :is(#cm-resource,#fg-resource) .cm-red{color:#ed8b8b!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-terminal-chart{border:1px solid #425950;background:#0b2026;padding:5px;margin:8px 0}
body #game-root :is(#cm-resource,#fg-resource) .cm-chart-options{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:0;padding:0 0 5px;border-bottom:1px solid #344a47}
body #game-root :is(#cm-resource,#fg-resource) .cm-chart-options>div{display:flex;gap:2px;flex-wrap:wrap}body #game-root :is(#cm-resource,#fg-resource) .cm-chart-options :is(button,select){padding:4px 6px!important;font-size:12px!important;min-height:26px!important;background:#152e32;color:#c9d6c2;border:1px solid transparent}
body #game-root :is(#cm-resource,#fg-resource) .cm-chart-options [aria-pressed=true]{border-color:#c7ac69;background:#514c32;color:#f5e1a1}
body #game-root :is(#cm-resource,#fg-resource) .cm-chart-options select{margin-left:auto;max-width:106px}
body #game-root :is(#cm-resource,#fg-resource) .cm-record-tabs,body #game-root :is(#cm-resource,#fg-resource) .cm-ticket-tabs,body #game-root :is(#cm-resource,#fg-resource) .cm-modes{display:flex;gap:5px;margin:0 0 8px}
body #game-root :is(#cm-resource,#fg-resource) .cm-record-tabs button{padding:5px 10px;min-height:30px}body #game-root :is(#cm-resource,#fg-resource) .cm-record-tabs [aria-pressed=true],body #game-root :is(#cm-resource,#fg-resource) .cm-ticket-tabs [aria-pressed=true]{background:#514c32;border-color:#cfb578;color:#fff0bd}
body #game-root :is(#cm-resource,#fg-resource) .cm-ticket-tabs button,body #game-root :is(#cm-resource,#fg-resource) .cm-modes button{flex:1;padding:7px 4px!important;min-height:34px}
body #game-root :is(#cm-resource,#fg-resource) .cm-modes .positive[aria-pressed=true]{background:#225843;border-color:#6da782;color:#c6f5d8}body #game-root :is(#cm-resource,#fg-resource) .cm-modes .negative[aria-pressed=true]{background:#613438;border-color:#ba7278;color:#ffdcda}
body #game-root :is(#cm-resource,#fg-resource) .cm-table-scroll{overflow:auto;max-height:320px;min-width:0}body #game-root :is(#cm-resource,#fg-resource) .cm-record-table{border-collapse:collapse;width:100%;font-size:12px;text-align:left;white-space:nowrap}
body #game-root :is(#cm-resource,#fg-resource) .cm-record-table :is(th,td){padding:7px 5px;border-bottom:1px solid #334b49}body #game-root :is(#cm-resource,#fg-resource) .cm-record-table th{font-weight:normal;color:#aebbad;position:sticky;top:0;background:#142b30;z-index:1}
body #game-root :is(#cm-resource,#fg-resource) .cm-user{font-size:12px;padding:0!important;border:0!important;background:transparent!important;color:#dbc58d;max-width:130px;overflow:hidden;text-overflow:ellipsis}
body #game-root :is(#cm-resource,#fg-resource) .cm-holder-pages{display:flex;gap:6px;align-items:center;margin-top:6px;font-size:12px}body #game-root :is(#cm-resource,#fg-resource) .cm-holder-pages small{margin-left:auto}
body #game-root :is(#cm-resource,#fg-resource) .cm-ticket{padding:10px!important}body #game-root :is(#cm-resource,#fg-resource) .cm-summary{font-size:12px;display:grid;gap:8px;margin:14px 0}body #game-root :is(#cm-resource,#fg-resource) .cm-note{font-size:11px;line-height:1.5;color:#a9b8a6}
body #game-root :is(#cm-resource,#fg-resource) .cm-inputs{display:flex;flex-direction:column;gap:10px}body #game-root :is(#cm-resource,#fg-resource) .cm-inputs label{width:100%}body #game-root :is(#cm-resource,#fg-resource) .cm-inputs input{width:100%;box-sizing:border-box}
@media(max-width:1050px) and (orientation:landscape){body #game-root :is(#cm-resource,#fg-resource){grid-template-columns:92px minmax(250px,1fr) 170px!important;gap:5px!important}body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header{gap:8px}body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header b{font-size:14px}body #game-root :is(#cm-resource,#fg-resource) .cm-ticket{padding:5px!important}}
@media(orientation:portrait) and (max-width:800px){body #game-root :is(#cm-resource,#fg-resource){display:flex!important;flex-direction:column}body #game-root :is(#cm-resource,#fg-resource) .cm-assets .cm-pools{display:flex;flex-wrap:nowrap;overflow:auto}body #game-root :is(#cm-resource,#fg-resource) .cm-pools button{flex:1;min-width:66px;flex-direction:column}body #game-root :is(#cm-resource,#fg-resource) .cm-assets>[data-cm=refresh]{display:none}body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header{gap:9px}body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header b{font-size:14px}body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header h3{font-size:16px}body #game-root :is(#cm-resource,#fg-resource) .cm-ticket{position:static}body #game-root :is(#cm-resource,#fg-resource) .cm-table-scroll{max-height:200px}body #game-root :is(#cm-resource,#fg-resource) .cm-record-table{font-size:11px}body #game-root :is(#cm-resource,#fg-resource) .cm-holder-pages small{display:none}}

body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header{display:flex;align-items:baseline;gap:10px;white-space:nowrap}
body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header>b{font-size:27px!important;line-height:1.2;color:#f4dfa0!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header>small{font-size:12px!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header>.cm-green{color:#75d7a4!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header>.cm-red{color:#ed8b8b!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-modes .positive[aria-pressed=true]{background:#225843!important;border-color:#6da782!important;color:#c6f5d8!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-modes .negative[aria-pressed=true]{background:#613438!important;border-color:#ba7278!important;color:#ffdcda!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-summary>span:first-child{display:block!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-user{border:0!important;background:transparent!important;padding:2px!important;min-height:22px!important}
@media(orientation:portrait) and (max-width:800px){body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header>b{font-size:23px!important}body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header{gap:6px}}
@media(max-width:800px),(pointer:coarse) and (max-width:1100px){
 body #game-root :is(#cm-resource,#fg-resource) .cm-pools button>span{display:none!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-pools button{min-width:46px!important;min-height:42px!important;padding:5px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-pools .cm-resource-icon{display:flex!important;width:27px!important;height:27px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-asset-title h3{display:none!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header{flex-wrap:nowrap!important;gap:7px!important;justify-content:space-between;min-width:0}
 body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header .cm-resource-icon{width:24px!important;height:24px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header{gap:4px!important;flex-wrap:nowrap!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header>b{font-size:20px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header>small{font-size:10px!important;max-width:47px;overflow:hidden;white-space:nowrap}
 body #game-root :is(#cm-resource,#fg-resource) .cm-metric{white-space:nowrap;min-width:0}
 body #game-root :is(#cm-resource,#fg-resource) .cm-metric small{font-size:9px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-metric b{font-size:12px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-money img{width:10px!important;height:10px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-chart-options{flex-wrap:nowrap!important;gap:3px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-chart-options>div{flex-wrap:nowrap!important;gap:1px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-chart-options :is(button,select){padding:3px!important;font-size:10px!important;min-height:25px!important;white-space:nowrap!important}
 /* All chart periods remain available on mobile; controls wrap within their existing toolbar. */
 body #game-root :is(#cm-resource,#fg-resource) .cm-chart-options select{max-width:65px!important;min-width:0}
}

/* Compact market: one trading form, moved into the portrait tab strip. */
body #game-root :is(#cm-resource,#fg-resource) .cm-mobile-trade-tab{display:none!important}
body #game-root :is(#cm-resource,#fg-resource) :is(.cm-ticket-slot,.cm-record-content)[hidden]{display:none!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-table-scroll{max-height:165px!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header{justify-content:flex-start!important;gap:12px!important;margin-bottom:5px}
body #game-root :is(#cm-resource,#fg-resource) .cm-executions{margin-top:7px;padding-top:5px}
body #game-root :is(#cm-resource,#fg-resource) .cm-chart-options{margin-bottom:2px}
@media(max-width:800px),(pointer:coarse) and (max-width:1100px){
 body #game-root :is(#cm-resource,#fg-resource) .cm-asset-title h3{display:block!important;font-size:12px!important;white-space:nowrap}
 body #game-root :is(#cm-resource,#fg-resource) .cm-asset-title{gap:3px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header{gap:8px!important;padding:4px 0!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header{gap:3px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header>b{font-size:17px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header>small{max-width:none!important;overflow:visible;font-size:9px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-change-basis{display:none}
 body #game-root :is(#cm-resource,#fg-resource) .cm-metric b{font-size:11px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header .cm-resource-icon{width:20px!important;height:20px!important}
}
@media(orientation:portrait) and (max-width:800px){
 body #game-root :is(#cm-resource,#fg-resource) .cm-mobile-trade-tab{display:block!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-record-tabs{gap:3px;flex-wrap:nowrap}
 body #game-root :is(#cm-resource,#fg-resource) .cm-record-tabs button{flex:1;min-width:0;padding:5px 3px!important;font-size:12px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-ticket-slot .cm-ticket{border:0;padding:5px 0!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-summary{margin:7px 0;gap:4px;padding-bottom:6px}
 body #game-root :is(#cm-resource,#fg-resource) .cm-inputs{flex-direction:row;align-items:end;margin:7px 0;gap:7px}
 body #game-root :is(#cm-resource,#fg-resource) .cm-inputs label{flex:1;min-width:0;width:auto}
 body #game-root :is(#cm-resource,#fg-resource) .cm-inputs>button{flex:none;min-height:36px;font-size:12px}
 body #game-root :is(#cm-resource,#fg-resource) .cm-note{margin:5px 0}
 body #game-root :is(#cm-resource,#fg-resource) .cm-table-scroll{max-height:135px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-terminal-main{padding:4px!important}
}
@media(orientation:portrait) and (max-width:360px){
 body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header{gap:5px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-quote-header>b{font-size:15px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-asset-title h3{font-size:11px!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-metric small{font-size:8px!important}
}
/* Selection is distinct from rarity and wearing status, across item grids. */
body #game-root.ui-workspace :is(#bag-items,#ew-trade-bag-items) .bag-item.ew-equipment-picked,
body #game-root :is([data-skin-choice],[data-skin-pick],[data-forge-item],.codex-card)[aria-pressed=true]{position:relative!important;border-color:#fff0a2!important;outline:2px solid #fff0a2!important;outline-offset:1px!important;box-shadow:inset 0 0 0 2px #745b20,0 0 7px #d4a548!important}
body #game-root :is([data-skin-choice],[data-skin-pick],[data-forge-item],.codex-card)[aria-pressed=true]::after{content:'◆';position:absolute;right:1px;top:1px;width:16px;height:16px;background:#71571c;color:#fff5bd;border:1px solid #ffe9a5;font:12px/14px sans-serif;text-align:center;z-index:9;pointer-events:none}
body #game-root #bag-items .ew-equipment-picked::after{display:none!important}

.ew-item-lock-mark{position:absolute;right:2px;top:17px;z-index:3;font-size:12px;line-height:1;background:#13262be6;border-radius:2px;pointer-events:none}.skin-detail{display:grid;grid-template-columns:minmax(100px,1fr) minmax(120px,1fr);gap:12px;align-items:center}.skin-detail canvas{width:100%;height:auto;max-height:45dvh;object-fit:contain}#item-lock-toggle{flex:0 0 auto!important;min-width:3.5em}.ew-list-limit{color:#e8c173;max-width:220px}
/* Owned-skin valuation uses the same compact currency mark outside market panels. */
[data-owned-skin-value]{font-size:12px;line-height:1.5!important;overflow-wrap:anywhere}
[data-owned-skin-value] .cm-money{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
[data-owned-skin-value] .cm-money img{display:inline-block;width:14px!important;height:14px!important;object-fit:contain;vertical-align:middle}

/* Equipment and inventory use the same warm-gold thin scrollbars as circuits/elements. */
body #game-root :is(#equipment-modal,#ew-trade-equipment-modal) *{scrollbar-width:thin;scrollbar-color:#9a8253 #122329}
body #game-root :is(#equipment-modal,#ew-trade-equipment-modal) ::-webkit-scrollbar{width:7px;height:7px}
body #game-root :is(#equipment-modal,#ew-trade-equipment-modal) ::-webkit-scrollbar-track{background:#122329}
body #game-root :is(#equipment-modal,#ew-trade-equipment-modal) ::-webkit-scrollbar-thumb{background:#9a8253;border:1px solid #122329;border-radius:2px}
body #game-root #equipment-modal [data-ws-route=gear] #bag-action button:disabled,body #game-root #equipment-modal [data-ws-route=gear] .ws-gear-actions button:disabled{display:none!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is([data-ws-route=gear],[data-ws-route=bag]) :is(#bag-items,#ew-trade-bag-items){grid-template-columns:repeat(auto-fill,var(--ws-equip-size,60px))!important;justify-content:center!important;column-gap:5px!important;padding-left:3px!important;padding-right:3px!important;box-sizing:border-box!important}

@media(min-width:700px) and (orientation:landscape){body #game-root.ui-workspace #equipment-modal [data-ws-route=bag],body #game-root.ui-workspace #ew-trade-equipment-modal .ex-panel{width:var(--item-window-width,min(1240px,97vw))!important;max-width:97vw!important}}

body #game-root #equipment-modal [data-ws-route=gear] #character-panel button:disabled{display:none!important}
.cm-lp-performance{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 0;border-top:1px solid #6f7151;border-bottom:1px solid #6f7151}.cm-lp-performance>div{display:flex;flex-direction:column;min-width:0}.cm-lp-performance small{opacity:.75;font-size:11px}.cm-lp-performance b{font-size:13px;overflow-wrap:anywhere}.cm-lp-performance details{grid-column:1/-1;font-size:11px}.cm-lp-performance p{line-height:1.5;margin:5px 0}

/* Mobile resource forms stay reachable; long fee details scroll below controls. */
@media (max-width:800px), (pointer:coarse) and (max-width:1100px), (max-height:600px) {
 body #game-root #ew-trade-equipment-modal:has(.ex-resources:not([hidden]),.ex-fab-account:not([hidden])) .ex-panel{box-sizing:border-box!important;max-height:100dvh!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
 body #game-root #ew-trade-equipment-modal .ex-resources{min-height:0!important;overflow-y:auto!important;overscroll-behavior-y:contain;touch-action:pan-y;scroll-padding-bottom:16px;padding-bottom:12px;box-sizing:border-box;-webkit-overflow-scrolling:touch}
 body #game-root :is(#cm-resource,#fg-resource) .cm-ticket{display:flex;flex-direction:column;min-height:0}
 body #game-root :is(#cm-resource,#fg-resource) .cm-ticket>.cm-inputs{order:1;position:relative;bottom:auto;z-index:2;background:#10262c;box-shadow:0 -5px 0 #10262c;padding:8px 0;flex-shrink:0}
 body #game-root :is(#cm-resource,#fg-resource) .cm-ticket>.cm-lp-performance{order:2;flex-shrink:0}
 body #game-root :is(#cm-resource,#fg-resource) .cm-ticket>.cm-note{order:3;flex-shrink:0}
 body #game-root :is(#cm-resource,#fg-resource) .cm-inputs>button{white-space:normal;min-height:40px}
 body #game-root :is(#cm-resource,#fg-resource) .cm-lp-performance{gap:7px;padding:9px 0}
}
@media (orientation:portrait) and (max-width:800px){
 body #game-root :is(#cm-resource,#fg-resource) .cm-terminal-chart .cm-chart svg{height:clamp(110px,22dvh,170px);width:100%;object-fit:contain}
 body #game-root :is(#cm-resource,#fg-resource) .cm-inputs{flex-wrap:wrap}
 body #game-root :is(#cm-resource,#fg-resource) .cm-inputs label{flex:1 1 75px}
 body #game-root :is(#cm-resource,#fg-resource) .cm-inputs>button{flex:0 1 auto;max-width:100px}
}

/* Resource terminal fills the window; record height follows the available viewport. */
body #game-root #ew-trade-equipment-modal:has(.ex-resources:not([hidden]),.ex-fab-account:not([hidden])) .ex-panel{display:flex!important;flex-direction:column!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
body #game-root #ew-trade-equipment-modal .ex-resources{display:block;flex:1 1 0!important;min-height:0!important;max-height:none!important;padding-bottom:0!important;box-sizing:border-box}
body #game-root #ew-trade-equipment-modal .ex-resources[hidden]{display:none!important}
body #game-root :is(#cm-resource,#fg-resource){position:relative;box-sizing:border-box;height:100%;min-height:100%;align-items:stretch!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-terminal-main{display:flex;flex-direction:column;min-height:0}
body #game-root :is(#cm-resource,#fg-resource) .cm-asset-header,body #game-root :is(#cm-resource,#fg-resource) .cm-terminal-chart,body #game-root :is(#cm-resource,#fg-resource) .cm-record-tabs{flex-shrink:0}
body #game-root :is(#cm-resource,#fg-resource) .cm-executions{display:flex;flex-direction:column;flex:1 1 0;min-height:120px}
body #game-root :is(#cm-resource,#fg-resource) .cm-record-content{display:flex;flex-direction:column;flex:1 1 0;min-height:0}
body #game-root :is(#cm-resource,#fg-resource) .cm-table-scroll{flex:1 1 0;min-height:70px;max-height:none!important;overflow:auto;overscroll-behavior:contain}
body #game-root :is(#cm-resource,#fg-resource):has(.cm-record-content:not([hidden]) .cm-holder-pages){padding-bottom:40px}
body #game-root :is(#cm-resource,#fg-resource) .cm-holder-pages{position:absolute;bottom:3px;left:0;right:0;margin:0;display:flex;align-items:center;justify-content:center;gap:8px;height:32px}
body #game-root :is(#cm-resource,#fg-resource) .cm-holder-pages small{position:absolute;right:10px;margin:0;font-size:10px;max-width:30%;text-align:right}
body #game-root :is(#cm-resource,#fg-resource) .cm-holder-pages button{padding:3px 9px!important;min-height:28px}
@media(orientation:portrait) and (max-width:800px){
 body #game-root :is(#cm-resource,#fg-resource){height:auto;min-height:100%}
 body #game-root :is(#cm-resource,#fg-resource)>.cm-assets{flex-shrink:0}
 body #game-root :is(#cm-resource,#fg-resource) .cm-terminal-main{flex:1 1 auto}
 body #game-root :is(#cm-resource,#fg-resource) .cm-executions{flex:1 0 160px}
 body #game-root :is(#cm-resource,#fg-resource) .cm-table-scroll{flex:1 1 0;max-height:none!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-holder-pages small{display:none}
}
@media(orientation:landscape) and (max-height:600px){
 body #game-root :is(#cm-resource,#fg-resource){height:auto;min-height:max(100%,440px)}
 body #game-root :is(#cm-resource,#fg-resource) .cm-terminal-main{min-height:400px}
 body #game-root :is(#cm-resource,#fg-resource):has(.cm-record-content:not([hidden]) .cm-holder-pages) .cm-terminal-main{min-height:360px}
 body #game-root :is(#cm-resource,#fg-resource) .cm-holder-pages small{display:none}
}

/* Equipment locks occupy the standard top-right status corner. */
body #game-root.ui-rpg.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items) .bag-item .ew-item-lock-mark,
body #game-root.ui-rpg.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#character-panel,#ew-trade-character-panel) .ws-rarity-item .ew-item-lock-mark,
body #game-root .ws-rarity-item .ew-item-lock-mark,
body #game-root [data-owned-skin] .ew-item-lock-mark{
 display:inline-flex!important;position:absolute!important;inset:2px 2px auto auto!important;
 width:14px;height:14px;align-items:center;justify-content:center;z-index:8;
 font-family:system-ui,sans-serif!important;font-size:12px!important;line-height:1!important;
 color:#f4d78c;background:#12282bee;border:1px solid #bca264;border-radius:2px;pointer-events:none;
}
body #game-root [data-item-locked="true"]>.ws-worn-badge,
body #game-root [data-item-locked="true"]>.sale-check{display:none!important}
body #game-root [data-item-locked="true"][data-equipment-selected="true"]::after{display:none!important}

body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is(#bag-items,#ew-trade-bag-items) [data-item-locked="true"] .ew-equipment-selection-mark{display:none!important}

/* Blueprint paper and gear remain one icon inside compact inventory tiles. */
#game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=bag] .bag-item>.v357-blueprint-icon{position:absolute!important;inset:3px!important;width:calc(100% - 6px)!important;height:calc(100% - 6px)!important;max-width:none!important;max-height:none!important}

#game-root.ui-workspace #ew-trade-equipment-modal .bag-item>.ex-blueprint-art{position:absolute!important;inset:3px!important;width:calc(100% - 6px)!important;height:calc(100% - 6px)!important}

/* Workshop reuses loadout geometry, icon corners and detail hierarchy. */
#game-root #forge-modal .forge-header{display:none!important}
#game-root #forge-modal .ws-tabs:empty{display:none!important}
#game-root #forge-modal .forge-window{width:min(1240px,97vw)!important;height:94dvh!important;max-height:94dvh!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
#game-root #forge-modal .ws-shell,#game-root #forge-modal .ws-content{min-height:0;flex:1;overflow:hidden!important}
#game-root #forge-modal .ws-content{display:flex;flex-direction:column}
#game-root #forge-modal .ws-panel>.ws-nav{display:block!important;width:100%}
#game-root #forge-modal .ws-title-row{display:flex!important;justify-content:space-between!important;width:100%}
#game-root #forge-modal .ws-title-row>.forge-v357-tabs{display:flex;flex-wrap:nowrap;gap:6px;flex:1}
#game-root #forge-modal .ws-title-row>#forge-close{margin-left:8px;flex:0 0 36px}
#game-root #forge-modal #forge-workspace{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr);gap:8px!important;flex:1;min-height:0;overflow:hidden!important;padding:4px}
#game-root #forge-modal #forge-workspace:not(:has(>.workshop-subtabs)){grid-template-rows:minmax(0,1fr)}
#game-root #forge-modal .forge-v357-tabs{grid-column:1/-1;display:flex;gap:5px;margin:0;flex-wrap:wrap}
#game-root #forge-modal .forge-v357-tabs button{width:auto;min-height:34px;padding:6px 14px;font-size:14px!important;line-height:1.2!important}
#game-root #forge-modal .forge-v357-tabs button[aria-pressed=true],#game-root #forge-modal .workshop-categories button[aria-pressed=true]{background:#655d36;border-color:#e8cb7c}
#game-root #forge-modal .forge-browser,#game-root #forge-modal .forge-detail{min-width:0;min-height:0;max-height:none;padding:6px;border:1px solid #586e60;background:#102329;overflow:hidden!important;display:flex;flex-direction:column;gap:5px}
#game-root #forge-modal button,#game-root #forge-modal input,#game-root #forge-modal select{box-sizing:border-box;max-width:100%;font-size:12px;min-height:30px}
#game-root #forge-modal .workshop-filter-row{display:flex;flex-wrap:nowrap;align-items:center;gap:4px;flex:none;min-width:0}
#game-root #forge-modal .ew-compact-select{position:relative;display:block;flex:0 0 48px;width:48px;height:32px;min-width:0;border:1px solid #657266;background:#142c2c;color:#ead59b;line-height:30px;font-size:12px;box-sizing:border-box}
#game-root #forge-modal .ew-compact-select-label{display:block;padding:0 13px 0 4px;pointer-events:none;white-space:nowrap}
#game-root #forge-modal .ew-compact-select:after{content:'⌄';position:absolute;right:3px;top:0;pointer-events:none}
#game-root #forge-modal .ew-compact-select select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;min-width:0}
#game-root #forge-modal .ew-compact-select:focus-within{outline:1px solid #eedb9e}
#game-root #forge-modal .ew-compact-select[data-filtered=true]{border-color:#dbbe70;background:#3d4934}
#game-root #forge-modal .workshop-level-range{display:flex;align-items:center;gap:3px;white-space:nowrap;flex:0 1 auto;min-width:0;font-size:12px}
#game-root #forge-modal .workshop-level-range input{width:32px;min-width:0;padding:2px;text-align:center;appearance:textfield}
#game-root #forge-modal .workshop-level-range input::-webkit-inner-spin-button{appearance:none}
#game-root #forge-modal #workshop-selection-toggle{width:auto;flex:0 0 auto;margin-left:auto;padding:4px 7px}
#game-root #forge-modal .workshop-filter-types{display:flex;align-items:center;gap:4px;flex:none;min-width:0}
#game-root #forge-modal .workshop-categories{display:flex;align-items:center;gap:3px;min-width:0;overflow-x:auto;flex:1 1 auto;scrollbar-width:thin}
#game-root #forge-modal .workshop-categories button{flex:none;white-space:nowrap;padding:3px 5px;min-height:28px;width:auto}
#game-root #forge-modal .workshop-filter-types>input{width:86px;min-width:40px;flex:0 1 86px;padding:4px}
#game-root #forge-modal .workshop-filter-clear{width:auto;flex:none;padding:3px 5px}
#game-root #forge-modal .workshop-catalog{--ws-equip-size:60px;display:grid!important;grid-template-columns:repeat(auto-fill,var(--ws-equip-size));grid-auto-rows:var(--ws-equip-size);gap:5px;justify-content:center;align-content:start;flex:1 1 0;min-height:0;overflow:auto;padding:3px;overscroll-behavior:contain}
#game-root #forge-modal .workshop-icon{position:relative;display:block;box-sizing:border-box;width:60px;height:60px;border:1px solid var(--item-rarity);border-radius:2px;background:#193135;flex:none;overflow:hidden;padding:0;margin:0}
#game-root #forge-modal .workshop-tile{width:var(--ws-equip-size);height:var(--ws-equip-size);min-height:0;min-width:0;max-width:none}
#game-root #forge-modal .workshop-icon img{position:absolute;inset:3px;width:calc(100% - 6px);height:calc(100% - 6px);max-width:none;object-fit:contain;image-rendering:pixelated}
#game-root #forge-modal .workshop-icon small{position:absolute;font-size:10px!important;line-height:1.15!important;white-space:nowrap;background:#102329c9;grid-column:auto;pointer-events:none;color:#c8d8d0}
#game-root #forge-modal .workshop-icon .ws-item-level{left:2px;top:1px;right:auto;bottom:auto}
#game-root #forge-modal .workshop-icon .ws-rarity-badge{left:2px;bottom:2px;top:auto;color:var(--item-rarity)}
#game-root #forge-modal .workshop-icon .ws-enhancement{right:2px;bottom:2px;left:auto;top:auto;color:#ecdfb0;display:block!important}
#game-root #forge-modal .workshop-icon .ws-worn-badge{right:2px;top:1px;left:auto;bottom:auto;color:#d8ead6}
#game-root #forge-modal .workshop-tile[aria-pressed=true]{outline:2px solid #ffdf83;outline-offset:1px;background:#33453b;box-shadow:inset 0 0 0 2px #ffe6a0}
#game-root #forge-modal .ew-equipment-selection-mark{position:absolute;right:2px;top:1px;line-height:14px;font-size:12px;color:#fff1b5;background:#8e7739;z-index:9;pointer-events:none}
#game-root #forge-modal .workshop-empty{grid-column:1/-1;font-size:12px;color:#a6b7ad}
#game-root #forge-modal .forge-pager,#game-root #forge-modal .workshop-selection-actions{display:flex;align-items:center;justify-content:center;gap:6px;flex:none;position:static;margin:0}
#game-root #forge-modal .forge-pager button,#game-root #forge-modal .workshop-selection-actions button{width:auto;padding:3px 8px}
#game-root #forge-modal .forge-pager span{margin:0}
#game-root #forge-modal .workshop-detail-scroll{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:3px}
#game-root #forge-modal .ws-item-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px}
#game-root #forge-modal .ws-item-layout>section{min-width:0}
#game-root #forge-modal .ws-item-layout.workshop-no-comparison{grid-template-columns:minmax(0,1fr)}
#game-root #forge-modal .forge-item-header{display:flex;align-items:center;gap:8px;padding:0;border:0;min-width:0}
#game-root #forge-modal .forge-item-header h3{font-size:16px;line-height:1.5;margin:0;overflow-wrap:anywhere;color:#eedaa0}
#game-root #forge-modal .forge-detail p{font-size:12px;line-height:1.5;margin:6px 0;white-space:normal;overflow-wrap:anywhere}
#game-root #forge-modal .forge-detail .item-bonus{padding:6px;background:#193033;color:#bbcdbd}
#game-root #forge-modal .ew-compare-hero{display:flex;justify-content:space-between;align-items:center;gap:5px;font-size:12px}
#game-root #forge-modal .ew-compare-hero select{width:auto;min-width:60px;padding:3px;flex:0 1 auto}
#game-root #forge-modal .ws-current-equipment{font-size:11px;color:#e5d198;margin:6px 0}
#game-root #forge-modal .workshop-stats{width:100%;table-layout:auto;border-collapse:collapse;font-size:11px;line-height:1.4;margin:0 0 6px}
#game-root #forge-modal .workshop-stats caption{font-size:11px;text-align:left;color:#acbdb4;padding:4px 0}
#game-root #forge-modal .workshop-stats th,#game-root #forge-modal .workshop-stats td{padding:4px 2px;text-align:right;border-bottom:1px solid #3c5448;white-space:nowrap}
#game-root #forge-modal .workshop-stats td:first-child,#game-root #forge-modal .workshop-stats th:first-child{text-align:left;white-space:normal}
#game-root #forge-modal .ws-item-extra{border-top:1px solid #65735c;padding-top:6px;margin-top:8px}
#game-root #forge-modal .forge-v357-section{border-top:1px solid #65735c;margin-top:8px;padding-top:6px}
#game-root #forge-modal .forge-v357-section:first-child{margin-top:0;border:0}
#game-root #forge-modal .forge-v357-section h4{margin:3px 0 6px;font-size:13px;color:#eed29b}
#game-root #forge-modal .workshop-chance{font-size:16px;padding:7px;color:#f0cf7a;border:1px solid #a08640;display:block}
#game-root #forge-modal .workshop-risk{color:#e4ad92}
#game-root #forge-modal .workshop-materials{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
#game-root #forge-modal .workshop-material{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:3px;align-items:center;padding:5px;font-size:12px;background:#193033}
#game-root #forge-modal .workshop-material img{width:28px;height:28px;grid-row:span 2;image-rendering:pixelated}
#game-root #forge-modal .workshop-material small{grid-column:2/4;font-size:10px;color:#a5baac}
#game-root #forge-modal .forge-v357-actions{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin:7px 0}
#game-root #forge-modal .forge-v357-actions input[type=number]{width:58px!important;min-width:0!important;flex:0 0 58px}
#game-root #forge-modal input[type=checkbox]{width:16px!important;height:16px!important;min-width:16px!important;flex:none;margin:0 4px 0 0}
#game-root #forge-modal .forge-v357-actions label{display:flex;align-items:center;gap:4px;flex-basis:100%}
#game-root #forge-modal .forge-v357-actions button{width:auto;flex:0 1 auto;padding:5px 9px}
#game-root #forge-modal .workshop-detail-actions{display:flex;flex:none;gap:6px;border-top:1px solid #65735c;padding-top:6px}
#game-root #forge-modal .workshop-detail-actions>button{width:auto;flex:1;min-height:34px;margin:0;padding:6px;background:#354b3b;border:1px solid #bca66b}
#game-root #forge-modal .workshop-sockets{gap:7px;margin:8px 0}
#game-root #forge-modal .workshop-socket{gap:4px}
#game-root #forge-modal .workshop-socket-tile{width:60px;height:60px;min-height:0;padding:2px}
#game-root #forge-modal .workshop-socket-tile img{width:34px;height:34px}
#game-root #forge-modal .workshop-socket-tile small{font-size:10px}
@media(max-width:800px){
 #game-root #forge-modal .workshop-catalog{--ws-equip-size:48px}
 #game-root #forge-modal .workshop-icon small{font-size:8px!important}
 #game-root #forge-modal .workshop-filter-row{gap:3px}
 #game-root #forge-modal .ew-compact-select{width:42px;flex-basis:42px;font-size:11px}
 #game-root #forge-modal .workshop-level-range{gap:2px;font-size:10px}
 #game-root #forge-modal .workshop-level-range input{width:30px;font-size:11px!important;line-height:normal}
 #game-root #forge-modal #workshop-selection-toggle{padding:3px 4px;font-size:11px}
 #game-root #forge-modal .workshop-filter-types>input{flex-basis:62px;width:62px;font-size:11px}
 #game-root #forge-modal .workshop-categories button,#game-root #forge-modal .workshop-filter-clear{font-size:11px;padding:3px}
 #game-root #forge-modal .forge-item-header h3{font-size:14px}
 #game-root #forge-modal .workshop-stats{font-size:10px}
}
@media(orientation:portrait) and (max-width:800px){
 #game-root #forge-modal .forge-window{height:96dvh!important;max-height:96dvh!important;width:98vw!important}
 #game-root #forge-modal #forge-workspace{display:flex!important;flex-direction:column;overflow:hidden!important;padding:2px}
 #game-root #forge-modal .forge-browser{height:auto;min-height:220px;max-height:none;flex:0 0 38%}
 #game-root #forge-modal .forge-detail{height:auto;min-height:150px;max-height:none;flex:1 1 0}
 #game-root #forge-modal .forge-v357-tabs button{min-height:30px;padding:5px 10px;font-size:12px!important}
 #game-root #forge-modal .ws-item-layout{gap:6px}
 #game-root #forge-modal .workshop-icon.ew-detail-equipment{width:48px;height:48px}
 #game-root #forge-modal .forge-item-header{gap:5px}
 #game-root #forge-modal .workshop-materials{grid-template-columns:minmax(0,1fr)}
}
@media(orientation:portrait) and (max-width:380px){
 #game-root #forge-modal .workshop-filter-row{gap:2px}
 #game-root #forge-modal .ew-compact-select{width:37px;flex-basis:37px;font-size:10px}
 #game-root #forge-modal .workshop-level-range{flex:none;gap:1px;font-size:9px}
 #game-root #forge-modal .workshop-level-range input{width:22px;padding:1px;font-size:10px!important}
 #game-root #forge-modal #workshop-selection-toggle{min-width:0;padding:2px 3px;font-size:10px}
}
@media(orientation:landscape) and (max-height:600px){
 #game-root #forge-modal .forge-window{height:98dvh!important;max-height:98dvh!important}
 #game-root #forge-modal .forge-v357-tabs button{min-height:26px;padding:4px 9px;font-size:12px!important}
 #game-root #forge-modal .forge-browser,#game-root #forge-modal .forge-detail{padding:4px}
 #game-root #forge-modal .workshop-catalog{--ws-equip-size:48px}
 #game-root #forge-modal .workshop-stats{font-size:10px}
}

/* Market picker release: equipment categories precede compact native filters. */
body #game-root.ui-workspace #equipment-modal .ew-equipment-category-row{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:5px;min-width:0}
body #game-root.ui-workspace #equipment-modal .ew-equipment-category-row #bag-filters{display:flex!important;flex:none;gap:3px;margin:0}
body #game-root.ui-workspace #equipment-modal .ew-equipment-category-row #bag-filters [hidden]{display:none!important}
body #game-root.ui-workspace #equipment-modal .ew-equipment-category-row>.bag-search{display:flex!important;flex:1!important;min-width:0!important;margin:0!important}
body #game-root.ui-workspace #equipment-modal .ew-equipment-category-row>.bag-search input{width:100%!important;min-width:0!important}
body #game-root.ui-workspace #equipment-modal .ew-equipment-dropdown-row{display:flex!important;flex-wrap:wrap!important;gap:4px!important}
body #game-root.ui-workspace #equipment-modal .ew-equipment-dropdown-row>.ew-compact-select{flex:1 1 48px!important;width:auto!important;max-width:110px}
body #game-root.ui-workspace #equipment-modal .ew-equipment-dropdown-row>#bag-level-range{flex:1 1 82px!important;max-width:150px}
body #game-root.ui-workspace #equipment-modal .ew-book-footer{margin-top:auto;padding:10px 0 0;border-top:1px solid #72684b;display:flex!important;flex-wrap:wrap;gap:8px;align-items:center}
body #game-root.ui-workspace #equipment-modal .ew-book-footer>img,body #game-root.ui-workspace #equipment-modal .ew-book-footer>span{display:none!important}
body #game-root.ui-workspace #equipment-modal .ew-book-footer>button{flex:1;min-width:90px;width:auto!important}
body #game-root.ui-workspace #equipment-modal .ew-book-footer>[hidden]{display:none!important}
@media(max-width:450px){body #game-root.ui-workspace #equipment-modal .ew-equipment-category-row #bag-filters button{padding:5px!important;min-width:0!important}body #game-root.ui-workspace #equipment-modal .ew-equipment-category-row #bag-search-clear{display:none!important}body #game-root.ui-workspace #equipment-modal .ew-equipment-dropdown-row>.ew-compact-select{flex-basis:42px!important;max-width:74px}}

/* Four consumables share the tactical frame, including the base red potion. */
#game-root .item-deck .item-row :is(.skill-icon,.tactical-quick){background:#172d35!important;border:1px solid #a18c61!important;border-image:none!important;box-shadow:inset 0 0 0 2px #2e4448!important;border-radius:0!important}
#game-root.ui-workspace #bag-items{justify-content:start!important;column-gap:5px!important;padding-left:0!important;padding-right:0!important}

/* Market controls share one compact search/clear/select row, including narrow phones. */
#game-root.ui-workspace #ew-trade-equipment-modal [data-ws-route="gear"] #ew-trade-inventory-panel .ex-tabs .bag-search{display:grid!important;grid-template-columns:minmax(40px,1fr) auto auto!important;gap:4px!important;align-items:center!important}
#game-root.ui-workspace #ew-trade-equipment-modal [data-ws-route="gear"] #ew-trade-inventory-panel .ex-tabs .bag-search>button{width:auto!important;min-width:0!important;grid-column:auto!important;padding:5px!important;white-space:nowrap!important}
#game-root.ui-workspace #equipment-modal .ew-equipment-category-row #bag-search-clear{display:inline-flex!important;width:auto!important;min-width:0!important;padding:4px!important}
#game-root.ui-workspace #equipment-modal .ew-equipment-category-row .bag-search{min-width:0!important;flex:1 1 110px!important}

/* Gear/market parity: read-only trade panels use the preparation window geometry. */
body #game-root.ui-workspace #ew-trade-equipment-modal .ex-panel.native-gear-window{width:min(960px,var(--dialog-width))!important;max-width:97vw!important}
body #game-root.ui-workspace #equipment-modal :is(#loadout-enhance,#loadout-ascend){display:block!important;width:100%!important;min-height:40px!important;padding:9px 16px!important;background:linear-gradient(#766437,#534628)!important;border:1px solid #d0ad62!important;color:#fff0b5!important;font-weight:bold!important}
body #game-root.ui-workspace #equipment-modal .ew-gem-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body.ew-trade-shop #game-root #service-modal .ws-nav > .ws-tabs{display:none!important}
body #game-root.ui-workspace #equipment-modal .ew-equipment-dropdown-row>#bag-level-range{display:flex!important;flex:0 0 auto!important;gap:0!important;width:auto!important;max-width:none!important;justify-content:flex-start!important}
body #game-root.ui-workspace #equipment-modal #bag-level-range input{flex:none!important;width:36px!important;min-width:0!important;margin:0!important}
@media(max-width:700px),(orientation:portrait){
 body #game-root.ui-workspace #ew-trade-equipment-modal .ex-panel.native-gear-window{width:calc(100vw - 6px)!important;max-width:calc(100vw - 6px)!important}
 body #game-root.ui-workspace #equipment-modal .ew-equipment-category-row>.bag-search{margin-left:auto!important;flex:1 1 190px!important;width:auto!important;max-width:none!important;justify-content:flex-end!important}
 body #game-root.ui-workspace #equipment-modal .ew-equipment-category-row #multi-sale-toggle{min-width:45px!important;padding:5px 9px!important}
 body #game-root.ui-workspace #equipment-modal .ew-equipment-category-row #bag-search{flex:1 1 80px!important;width:100%!important;min-width:40px!important}
}

/* Craft catalog: fixed compact filters and a genuinely shrinkable search. */
#game-root #forge-modal .workshop-filter-row>.ew-compact-select{flex:0 1 70px;min-width:48px;max-width:70px}
#game-root #forge-modal .workshop-filter-row>input[type=search]{flex:1 1 0;width:0;min-width:44px;max-width:none;box-sizing:border-box}
/* Item panels: canonical fixed icon sizes. */
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) :is([data-ws-route=gear],[data-ws-route=bag]) :is(#inventory-panel,#ew-trade-inventory-panel) :is(#bag-items,#ew-trade-bag-items){justify-content:space-between!important;column-gap:4px!important;padding-inline:0!important;grid-template-columns:repeat(auto-fill,var(--ws-equip-size,60px))!important}
body #game-root.ui-workspace #ew-trade-equipment-modal .ex-browser .gear-panel-scroll{padding-inline:6px!important}
body #game-root.ui-workspace #ew-trade-equipment-modal .ex-panel>header{display:flex!important;align-items:center;gap:8px;min-width:0;overflow:hidden}
body #game-root.ui-workspace #ew-trade-equipment-modal .ex-main-tabs{display:flex!important;flex:1 1 0!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;scrollbar-width:thin}
body #game-root.ui-workspace #ew-trade-equipment-modal .ex-main-tabs>button{flex:0 0 auto!important}
body #game-root.ui-workspace #ew-trade-equipment-modal .ex-close{flex:0 0 38px!important;position:static!important;margin-left:auto!important;width:38px!important;min-width:38px!important}
.ew-material-art{display:inline-flex!important;position:relative;align-items:center;justify-content:center;width:60px;height:60px;box-sizing:border-box;border:2px solid var(--item-rarity,#899692);background:#213638;flex:0 0 60px}
.ew-material-art>img{width:48px!important;height:48px!important;object-fit:contain;image-rendering:pixelated}
.ew-material-art .ws-rarity-badge{position:absolute;left:2px;bottom:1px;font-size:11px;background:#102528;color:var(--item-rarity,#d7dfd2)}
body #game-root.ui-workspace [data-ws-route=bag] .bag-item .ws-rarity-badge{position:absolute!important;left:1px!important;bottom:1px!important;z-index:2;font-size:10px!important;line-height:12px!important;background:#102528;display:block!important;max-width:50%}
body #game-root.ui-workspace [data-ws-route=bag] .bag-item>small{right:1px!important;left:auto!important;bottom:1px!important;width:auto!important;font-size:10px!important}
/* Dialog art lives outside #game-root: keep it square and independent of heading/image rules. */
.ex-confirm .ex-item-art,.ex-detail .item-heading>.ex-item-art{display:block!important;position:relative!important;box-sizing:border-box!important;width:60px!important;height:60px!important;min-width:60px!important;max-width:60px!important;flex:0 0 60px!important;overflow:hidden;transform:none!important;padding:0!important;border:2px solid var(--item-rarity,#899692);background:#203436}
.ex-confirm .ex-item-art>img,.ex-detail .item-heading>.ex-item-art>img{position:absolute!important;inset:8%!important;width:84%!important;height:84%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;transform:none!important;image-rendering:pixelated}
.ex-confirm .ew-list-row{min-width:0;grid-template-columns:60px minmax(80px,1fr) minmax(80px,120px)!important;align-items:center}
.ex-confirm .ew-list-row input{max-width:100%;box-sizing:border-box}
.ex-confirm .ex-duration-row .ex-duration{grid-column:2/-1}
.ex-confirm .ex-reprice-row{grid-template-columns:60px minmax(65px,1fr) minmax(65px,100px) minmax(65px,100px)!important}
.ex-confirm{max-width:calc(100vw - 24px)!important;box-sizing:border-box}
:is(.ex-confirm,.ex-detail) .ex-item-art>:is(.ws-item-level,.ws-rarity-badge,.ws-enhancement){position:absolute!important;z-index:3!important;margin:0!important;font-size:10px!important;line-height:12px!important;background:#102528d9;padding:0 1px!important;width:auto!important;transform:none!important}
:is(.ex-confirm,.ex-detail) .ex-item-art>.ws-item-level{left:1px!important;top:1px!important;bottom:auto!important;right:auto!important}
:is(.ex-confirm,.ex-detail) .ex-item-art>.ws-rarity-badge{left:1px!important;bottom:1px!important;top:auto!important;right:auto!important;color:var(--item-rarity,#d7dfd2)!important}
:is(.ex-confirm,.ex-detail) .ex-item-art>.ws-enhancement{right:1px!important;bottom:1px!important;left:auto!important;top:auto!important}

body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel #bag-items .bag-item.ws-rarity-item{border-color:var(--item-rarity)!important}

/* Inventory keeps its original 5px gap; fitItemWindow trims container width. */
body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel #bag-items{justify-content:start!important;column-gap:5px!important;row-gap:5px!important;padding-inline:0!important}

/* Canonical inventory artwork inside marketplace cards; do not stretch tile gaps. */
#game-root.ui-workspace .ex-detail .ws-item-primary .item-heading>.ex-item-art>img,
#game-root .ex-detail .item-heading>.ex-item-art>img,
#ew-trade-equipment-modal .ex-detail .item-heading>.ex-item-art>img{
 min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;margin:0!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;width:84%!important;height:84%!important;transform:translate(-50%,-50%)!important;object-fit:contain!important;
}
.ex-item-art>.v357-blueprint-icon,.ex-tile>.v357-blueprint-icon{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;pointer-events:none}
.ex-item-art .ex-count,.ex-tile .ex-count{position:absolute;right:2px;bottom:1px;font-size:10px;line-height:12px;color:#fff3c7;background:#10272cde;z-index:4}

/* Compact workshop: canonical 60/48px icons and unchanged 5px grid spacing. */
body #game-root #forge-modal .forge-window{width:min(920px,96vw)!important;height:min(570px,90dvh)!important;max-height:90dvh!important}
body #game-root #forge-modal .ws-title-row>.forge-v357-tabs{min-width:0;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
body #game-root #forge-modal .ws-title-row>.forge-v357-tabs>button{flex:none;white-space:nowrap}
body #game-root #forge-modal .forge-pager{margin-top:auto}
body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] .bag-item>.ws-item-level{position:absolute!important;display:block!important;left:2px!important;top:1px!important;right:auto!important;bottom:auto!important;font-size:10px!important;line-height:1.15!important;background:#102329c9;z-index:4;color:#dfdfcc}
@media(orientation:portrait) and (max-width:800px){
 body #game-root #forge-modal .forge-window{width:98vw!important;height:90dvh!important;max-height:90dvh!important}
 body #game-root #forge-modal .forge-browser{min-height:150px!important;flex:0 0 35%!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] .bag-storage+.ew-inventory-pages{margin:0!important;padding:0!important;align-self:stretch!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel .rpg-bag-browser{row-gap:0!important;align-items:stretch!important}
}
@media(orientation:landscape) and (max-height:600px){body #game-root #forge-modal .forge-window{height:96dvh!important;max-height:96dvh!important}}

/* Inventory page controls belong below the independently scrolling item grid. */
body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel .bag-storage{display:flex!important;flex-direction:column!important;overflow:hidden!important;padding-bottom:0!important}
body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel #bag-items{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;padding-bottom:0!important}
body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel .bag-storage>.ew-inventory-pages{position:static!important;inset:auto!important;transform:none!important;order:2;flex:0 0 22px!important;margin:0!important;padding:0!important;align-self:stretch!important;background:#152a2d!important;z-index:1}

/* A shortage link is navigation only; retain compact material and icon geometry. */
#game-root .workshop-material:has(.ew-material-buy){position:relative;padding-right:51px}
#game-root .workshop-material:has(.ew-material-buy)>span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game-root #forge-modal .workshop-material .ew-material-buy,#game-root #equipment-modal .workshop-material .ew-material-buy{position:absolute!important;right:5px!important;top:4px!important;transform:none!important;width:42px!important;min-width:0!important;height:18px!important;min-height:0!important;padding:0 2px!important;font-size:10px!important;line-height:16px!important;white-space:nowrap!important;margin:0!important}
#game-root #forge-modal .workshop-material:has(.ew-material-buy){padding-right:5px}
#game-root #forge-modal .workshop-material:has(.ew-material-buy)>small{padding-right:46px;white-space:nowrap}
#game-root #forge-modal .workshop-material .ew-material-buy{top:auto!important;bottom:3px!important;transform:none}

/* Installed gem inspection stays in the equipment list. */
#game-root .ew-socket-inspect-heading{display:flex;align-items:center;gap:8px}
#game-root #equipment-modal .ew-socket-inspect-heading>button{flex:0 0 auto;min-width:48px;width:auto;min-height:26px;padding:3px 10px;font-size:inherit}

/* Consumable button shells must not retain browser/native heal outlines. */
#game-root .item-deck .item-row>.skill{border:0!important;border-image:none!important;background:transparent!important;box-shadow:none!important;outline:none;padding:0!important;border-radius:0!important}
#game-root .item-deck .item-row .skill-icon{box-sizing:border-box!important;padding:2px!important}
#game-root .item-deck .item-row>.skill:focus-visible{outline:1px solid #e9c887;outline-offset:2px}
.workshop-affix-pool{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 12px}.workshop-gem-pool{border-top:1px solid #6d775e;margin-top:10px;padding-top:8px}.workshop-gem-pool p{margin:6px 0}.workshop-affix-pool span{overflow-wrap:anywhere}

/* XP stays readable across hero skins without rebuilding HUD nodes. */
#game-root .ew-experience{display:flex!important;align-items:center;gap:4px;min-width:0}
#game-root .ew-experience progress,#game-root #hud-xp{height:8px!important;min-width:22px;flex:1 1 20px;accent-color:#f5cd69;background:#111d21;border:1px solid #a58b50;border-radius:0}
#game-root .ew-experience progress::-webkit-progress-bar,#game-root #hud-xp::-webkit-progress-bar{background:#111d21}
#game-root .ew-experience progress::-webkit-progress-value,#game-root #hud-xp::-webkit-progress-value{background:#f5cd69}
#game-root .ew-experience progress::-moz-progress-bar,#game-root #hud-xp::-moz-progress-bar{background:#f5cd69}
#game-root .ew-experience small,#game-root #hud-xp-text{display:inline!important;visibility:visible!important;color:#fff4ce!important;opacity:1!important;font-size:10px!important;line-height:1.15;text-shadow:0 1px 2px #000;white-space:nowrap;flex:0 0 auto}
#live-dungeon-timer{display:block;color:#ffe0a0;font-variant-numeric:tabular-nums;line-height:1.2}
#live-dungeon-timer[hidden]{display:none}

#live-dungeon-timer{text-align:right;width:100%;box-sizing:border-box}

/* One compact confirmation for the dungeon result. */
#result-modal.br-unified-victory #result-kicker,#result-modal.br-unified-victory #result-story,#result-modal.br-unified-victory #result-stats,#result-modal.br-unified-victory #result-memory,#result-modal.br-unified-victory #result-map{display:none!important}
#result-modal.br-unified-victory #result-button,.br-return-card .br-return-done{width:auto!important;min-width:78px!important;padding:7px 22px!important;align-self:center;margin:8px auto!important;font-size:14px!important}
/* Material help shares the inventory's two-column, fixed-icon layout. */
.mg-token{display:inline-flex;align-items:center;gap:4px;vertical-align:middle;flex-wrap:wrap}.mg-token>img{width:22px;height:22px;object-fit:contain;image-rendering:pixelated}.mg-help{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 19px!important;width:19px!important;min-width:19px!important;height:19px!important;padding:0!important;font-size:12px!important;border:1px solid #bca576!important;border-radius:50%!important;background:#203736!important;color:#e9d69e!important;line-height:1!important}
.mg-overlay{position:fixed;inset:0;z-index:20000;background:#031015bc;display:grid;place-items:center;padding:12px;color:#dfdec7}.mg-card{display:flex;flex-direction:column;width:min(1060px,96vw);height:min(720px,90dvh);min-height:0;background:#122a30;border:2px solid #b3a16a;padding:10px;box-shadow:inset 0 0 0 3px #263b3c}.mg-heading{display:flex;justify-content:space-between;align-items:center;flex:none;border-bottom:1px solid #726b49;margin-bottom:8px}.mg-heading h3{margin:4px;color:#e0c489}.mg-heading button{background:#283f3c;border:1px solid #9f936a;color:#eddfb4;font-size:22px;width:36px;height:36px}.mg-browser{display:grid!important;grid-template-columns:1fr 1fr;gap:10px;flex:1;min-height:0;height:100%;overflow:hidden;color:#dce2cc}.mg-card>.mg-browser{height:0}.mg-left,.mg-detail{min-width:0;min-height:0;border:1px solid #526e6b;padding:8px;background:#102429}.mg-left{display:flex;flex-direction:column;gap:8px}.mg-tools{display:flex;gap:5px;flex-wrap:wrap}.mg-tools input{flex:1 1 100%;min-width:0}.mg-tools select{flex:1;min-width:0}.mg-tools input,.mg-tools select{background:#1b3538;color:#e4dbbe;border:1px solid #7b896b;border-radius:0;padding:6px;box-sizing:border-box}.mg-grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(auto-fill,58px);grid-auto-rows:58px;gap:5px;align-content:start;justify-content:center;overflow:auto;scrollbar-width:thin;scrollbar-color:#ad9c64 #193336}.mg-item{position:relative;width:58px!important;height:58px!important;min-width:0!important;padding:3px!important;background:#183238!important;border:1px solid var(--mg-quality)!important}.mg-item img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.mg-item[aria-pressed=true]{outline:2px solid #f3d985;outline-offset:-3px;box-shadow:inset 0 0 12px #e3c35b50}.mg-item[aria-pressed=true]:after{content:'◆';position:absolute;right:1px;top:0;color:#ffe6a0;font-size:12px}.mg-pager{display:flex;justify-content:center;gap:8px;flex:none}.mg-pager button{background:#253d3a;border:1px solid #8e8a62;color:#e2d6ad;padding:4px 9px}.mg-detail{overflow:auto;scrollbar-width:thin;scrollbar-color:#ad9c64 #193336;line-height:1.65}.mg-detail header{display:flex;align-items:center;gap:10px}.mg-art{width:64px;height:64px;flex:none;border:1px solid var(--mg-quality);background:#19353a}.mg-art img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.mg-detail h3{font-size:20px;color:#e5c783;margin:0}.mg-detail h4{font-size:15px;color:#dfc587;margin:15px 0 5px}.mg-detail p{font-size:14px;margin:6px 0}.mg-meta{color:#a9bfba}.mg-probability{color:#bacebc}#v357-materials-codex{height:100%;min-height:0}#codex-pages:has([data-material-guide]){min-height:0;overflow:hidden}
@media(max-width:600px) and (orientation:portrait){.mg-overlay{padding:3px}.mg-card{width:100%;max-width:100%;height:94dvh;box-sizing:border-box;padding:7px}.mg-browser{grid-template-columns:1fr;grid-template-rows:minmax(180px,45%) minmax(0,1fr);gap:6px}.mg-left,.mg-detail{padding:6px}.mg-grid{grid-template-columns:repeat(auto-fill,52px);grid-auto-rows:52px}.mg-item{width:52px!important;height:52px!important}.mg-detail p{font-size:13px}.mg-detail h3{font-size:17px}}

/* Inventory halves follow whole fixed-size icon columns; no empty trailing column. */
body #game-root.ui-workspace #equipment-modal:has(.ws-panel[data-ws-route=bag])>.native-gear-window{width:min(var(--bag-window-fit,920px),var(--dialog-width,90vw))!important}
body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel .rpg-bag-browser{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;align-items:stretch!important}
body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel #bag-items{justify-content:center!important}
body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] .gear-panel-scroll{max-height:calc(var(--dialog-height,85dvh) - 85px)!important}
@media(orientation:portrait) and (max-width:800px){
 body #game-root.ui-workspace #equipment-modal:has(.ws-panel[data-ws-route=bag])>.native-gear-window{width:calc(100vw - 6px)!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel .rpg-bag-browser{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel #bag-items{min-height:var(--ws-equip-size,48px)!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel .bag-storage{min-height:158px!important;flex:none!important}
}

/* Native Codex: workshop-shaped, read-only catalog. */
#codex-pages{min-height:0;flex:1;overflow:hidden}#codex-pages>div:not([hidden]){height:100%;min-height:0}
#codex-tabs{flex-wrap:nowrap!important;overflow-x:auto;flex-shrink:0}
#codex-tabs button{white-space:nowrap;flex:none}
.mg-browser .mg-art{display:block;position:relative;box-sizing:border-box;overflow:hidden}
.mg-item .mg-art{width:100%;height:100%;border:0}
.mg-browser .mg-level,.mg-browser .mg-rarity{position:absolute;left:1px;font-size:10px;line-height:12px;padding:0 1px;background:#09191ccc;color:#e4debd;pointer-events:none}
.mg-browser .mg-level{top:0}.mg-browser .mg-rarity{bottom:0;color:var(--mg-quality)}
.mg-stats{display:grid;grid-template-columns:1fr auto;font-size:13px;gap:4px;margin:8px 0}.mg-stats dt,.mg-stats dd{margin:0}.mg-stats dd{color:#b9d9b5;text-align:right}
.mg-link{display:inline-flex;align-items:center;flex-direction:row-reverse;justify-content:flex-end;gap:5px;padding:4px 6px;margin:2px;border:1px solid #667f74;background:#203b3c;color:#dfd5ae;max-width:100%;text-align:left;white-space:normal;font:inherit;font-size:13px;cursor:pointer}
.mg-link img{width:26px;height:26px;object-fit:contain;image-rendering:pixelated;flex:none}
.mg-cost{margin:6px 0}.mg-cost>b{display:block}.mg-cost>span{display:block}
.mg-related input{box-sizing:border-box;max-width:100%;background:#10292e;color:#e0d7bb;border:1px solid #64776a;padding:5px}
.mg-links{display:flex;flex-direction:column;margin:5px 0}.mg-links .mg-link{margin:2px 0}
.mg-detail header .mg-art{width:58px;height:58px}.mg-detail header h3{flex:1;min-width:0}
@media(max-width:600px) and (orientation:portrait){#codex-modal .codex-dialog{width:98vw!important;max-width:98vw!important}.mg-browser{grid-template-rows:minmax(150px,42%) minmax(0,1fr)}.mg-tools{gap:3px}.mg-tools input,.mg-tools select{padding:4px}.mg-detail header .mg-art{width:52px;height:52px}}

/* Defeat inherited window button padding without altering native icon dimensions. */
body #game-root #codex-modal .mg-grid>.mg-item{display:block!important;box-sizing:border-box!important;padding:2px!important;min-height:0!important;max-width:none!important;max-height:none!important;line-height:1!important;align-self:start!important}
body #game-root #codex-modal .mg-grid .mg-art{display:block!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:none!important;margin:0!important;padding:0!important}
body #game-root #codex-modal .mg-art>img{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;margin:0!important}
body #game-root #codex-modal .mg-rarity{white-space:nowrap!important;font-size:9px!important;line-height:11px!important;max-width:100%;overflow:hidden}

/* Inline material links follow the label/quantity without a separate badge. */
.mg-token{display:inline-flex;align-items:center;gap:3px;vertical-align:middle;max-width:100%;flex-wrap:wrap}
.mg-help{flex:0 0 17px!important;width:17px!important;min-width:17px!important;height:20px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#a6b4a5!important;box-shadow:none!important;font-size:12px!important;opacity:.8}
.mg-help:hover,.mg-help:focus-visible{color:#f1d58e!important;opacity:1;outline:1px solid #8f805a;outline-offset:1px}
.v357-dungeon-mode{display:inline-flex;align-items:center;margin:0 5px;min-width:0;flex:1;max-width:190px}.v357-dungeon-mode select{width:100%;min-width:0;font:inherit;font-size:12px;padding:7px 3px;background:#203638;color:#e9d9b2;border:1px solid #8a805d}

body.br-settlement-visible #result-modal[data-result-kind="victory"]{visibility:hidden;pointer-events:none}

#game-root.ui-workspace #map-modal .ws-map-actions:has(.v357-dungeon-mode){grid-template-columns:minmax(0,.85fr) minmax(0,1.3fr) minmax(0,.85fr);gap:4px}
#game-root.ui-workspace #map-modal .ws-map-actions .v357-dungeon-mode{margin:0;max-width:none;width:100%}
#game-root.ui-workspace #map-modal .ws-map-actions .v357-dungeon-mode select{height:100%;padding:4px 1px;font-size:11px}

/* Quick-slot markers share equipment placement; selection remains independently visible. */
body #game-root #bag-items .bag-item .ws-bag-equipped-check{position:absolute;right:1px;top:1px;z-index:9;padding:0 2px;color:#f5edc8;background:#253e36e8;font:normal 12px/14px EmberLanternText,sans-serif;pointer-events:none}
body #game-root #bag-items .bag-item[data-quick-equipped="true"]::after{right:1px!important;top:17px!important}
/* Codex connections use compact item tiles, not full-width navigation rows. */
.mg-related .mg-links{display:grid;grid-template-columns:repeat(auto-fill,minmax(74px,1fr));gap:8px 6px;align-content:start;margin:8px 0}
.mg-related .mg-related-item{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;max-width:100%;margin:0;padding:3px;border:1px solid transparent;background:transparent;color:#ded6b6;font:inherit;font-size:12px;line-height:1.35;cursor:pointer}
.mg-related .mg-related-item:is(:hover,:focus-visible){border-color:#c8ae70;background:#23403e;outline:1px solid #c8ae70;outline-offset:0}
.mg-related .mg-related-item .mg-art{width:58px;height:58px;flex:none;border:1px solid var(--mg-quality,#879f95);background:#122a2d}
.mg-related .mg-related-item .mg-art>img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.mg-related-name{max-width:100%;overflow-wrap:anywhere;text-align:center}

body #game-root.ui-workspace #equipment-modal #inventory-panel #bag-items .bag-item[data-quick-equipped="true"] .ew-equipment-selection-mark{right:1px!important;top:17px!important;width:10px!important;height:10px!important;font-size:9px!important;line-height:9px!important}
body #game-root.ui-workspace #equipment-modal #inventory-panel #bag-items.inventory-selecting .bag-item.inventory-picked[data-quick-equipped="true"]:after{right:1px!important;top:17px!important;width:12px!important;height:12px!important;font-size:10px!important;line-height:12px!important}

/* Resource help shares the compact material-guide affordance, not the trade action size. */
.ew-exchange :is(#cm-resource,#fg-resource) .cm-asset-header .cm-resource-help{flex:0 0 17px!important;min-width:17px!important;max-width:17px!important;width:17px!important;min-height:20px!important;max-height:20px!important;height:20px!important;align-self:center;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;color:#a6b4a5!important;font-size:12px!important;line-height:1!important}

/* Per-dungeon records stay with the selected dungeon, clear of the action row. */
#map-modal .v357-dungeon-record{display:flex;flex-direction:column;gap:3px;border:1px solid #716b4f;background:#132b2e;padding:6px 8px;margin:0 0 8px;min-width:0;font-size:12px;line-height:1.4;color:#e7d4a4}
#map-modal .v357-dungeon-record small{font:inherit;margin:0;white-space:normal}
#map-modal .v357-dungeon-record small+small{font-size:11px;color:#abb9ad}

/* Resource help belongs to its name, with a separate valid button hit target. */
.cm-resource-name{display:inline-flex;align-items:center;gap:3px;white-space:nowrap;min-width:0}
:is(#cm-resource,#fg-resource) .cm-pool-choice{display:flex;align-items:center;gap:5px;flex:none;border:1px solid #536257;padding:5px;background:#182e30}
:is(#cm-resource,#fg-resource) .cm-pool-choice[data-active=true]{border-color:#dfc078;background:#364235}
:is(#cm-resource,#fg-resource) .cm-pool-choice button,:is(#cm-resource,#fg-resource) .cm-asset-cluster .cm-asset-trigger,.map-dialog .map-name,.map-dialog .map-art{border:0;background:transparent;box-shadow:none;margin:0;padding:0;min-width:0;min-height:0;width:auto;color:inherit;font:inherit}
:is(#cm-resource,#fg-resource) .cm-pool-copy{min-width:0}:is(#cm-resource,#fg-resource) .cm-pool-copy>small{display:block}
:is(#cm-resource,#fg-resource) .cm-asset-cluster{display:flex;align-items:center;gap:4px}
:is(#cm-resource,#fg-resource) .cm-resource-name .cm-resource-help,.map-dialog .cm-resource-name .cm-resource-help{display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;width:18px;height:20px;min-width:18px;min-height:20px;padding:0;margin:0;border:0;border-radius:50%;background:transparent;box-shadow:none;color:#b9b398;font:12px/1 Georgia,serif;cursor:pointer}
:is(#cm-resource,#fg-resource) .cm-resource-help:hover,.map-dialog .cm-resource-help:hover{color:#ffe4a0;background:#d3b26922}
.map-dialog .map-name b{display:inline}.map-dialog .map-art{display:flex;flex:none}
:is(#cm-resource,#fg-resource) .cm-asset-cluster .cm-asset-trigger{font-weight:700}
.gem-quality-options{display:flex;gap:6px;flex:none;margin-bottom:6px}
.gem-quality-options [aria-pressed=true]{border-color:#e4bd6a;background:#504930;color:#ffe6aa}
@media(max-width:800px){:is(#cm-resource,#fg-resource) .cm-pool-choice{gap:3px;padding:3px}:is(#cm-resource,#fg-resource) .cm-pool-choice .cm-resource-name>button[data-cm=pool]{display:inline;font-size:10px}:is(#cm-resource,#fg-resource) .cm-pool-choice .cm-resource-help{display:inline-flex}:is(#cm-resource,#fg-resource) .cm-pool-choice .cm-pool-copy>small{display:none}}

/* Override inherited trade button sizing only for the resource picker. */
body #game-root :is(#cm-resource,#fg-resource) .cm-pool-choice{display:grid;grid-template-columns:26px minmax(0,1fr);gap:3px;padding:5px 2px;box-sizing:border-box;width:100%;min-width:0}
body #game-root :is(#cm-resource,#fg-resource) .cm-pool-copy{min-width:0}
body #game-root :is(#cm-resource,#fg-resource) .cm-pool-choice button,body #game-root :is(#cm-resource,#fg-resource) .cm-asset-cluster button{padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;background:transparent!important;min-width:0!important;min-height:0!important;max-width:100%;width:auto!important;flex:none!important;font-size:12px;line-height:1.4;color:inherit}
body #game-root :is(#cm-resource,#fg-resource) .cm-pool-choice .cm-resource-icon{width:26px!important;height:26px!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-pool-choice .cm-resource-name{white-space:normal;gap:1px;max-width:100%;align-items:center}
body #game-root :is(#cm-resource,#fg-resource) .cm-pool-choice .cm-resource-name>button[data-cm=pool]{display:block;max-width:calc(100% - 13px);overflow-wrap:anywhere}
body #game-root :is(#cm-resource,#fg-resource) .cm-pool-choice .cm-resource-help,body #game-root :is(#cm-resource,#fg-resource) .cm-asset-cluster .cm-resource-help{display:inline-flex!important;width:13px!important;min-width:13px!important;height:22px!important;align-items:center;justify-content:center;color:#b9b398!important}
body #game-root :is(#cm-resource,#fg-resource) .cm-asset-cluster .cm-asset-trigger{font-weight:700;font-size:15px!important}
@media(max-width:800px){body #game-root :is(#cm-resource,#fg-resource) .cm-pool-choice{width:92px;flex:0 0 92px}body #game-root :is(#cm-resource,#fg-resource) .cm-pool-choice .cm-resource-name>button[data-cm=pool]{font-size:11px!important}}

/* Dungeon records belong to their map marker, not the right-hand description. */
#game-root #map-modal #map-cards .regional-node:has(.v357-dungeon-record)>i{display:none}
#game-root #map-modal #map-cards .regional-node .v357-dungeon-record{display:flex;flex-direction:column;align-items:center;gap:0;min-width:68px;width:max-content;max-width:110px;padding:2px 5px;margin:0 0 3px;border:1px solid #8d865a;background:#132b2ef2;color:#e7d4a4;line-height:1.3;font-size:10px;font-weight:normal;white-space:nowrap;box-sizing:border-box}
#game-root #map-modal #map-cards .regional-node .v357-dungeon-record .v357-record-time{font-variant-numeric:tabular-nums;color:#f3e4bd;font-size:11px}
#game-root #map-modal .v357-dungeon-mode>small{display:block;max-width:150px;white-space:normal;font-size:10px;line-height:1.3;color:#b8bca8}
[data-equipment-guide]>.mg-equipment-help{display:inline-grid!important;vertical-align:middle!important;margin-inline-start:4px!important;font-size:12px!important;line-height:1!important}

/* Empty consumables keep the same framed square as loaded consumables. */
#game-root.responsive-combat-hud .item-row .skill-icon{display:flex!important;align-items:center!important;justify-content:center!important;width:var(--skill-size,36px)!important;height:var(--skill-size,36px)!important;min-width:var(--skill-size,36px)!important;min-height:var(--skill-size,36px)!important;box-sizing:border-box!important;flex:none!important}
/* Portrait inventory uses two equal, independently scrollable halves, like equipment. */
@media(orientation:portrait) and (max-width:800px){
 body #game-root.ui-workspace #equipment-modal:has(.ws-panel[data-ws-route=bag])>.native-gear-window{height:var(--dialog-height,96dvh)!important}
 body #game-root.ui-workspace #equipment-modal .ws-panel[data-ws-route=bag]{height:100%!important;min-height:0!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] .gear-desktop{flex:1!important;height:auto!important;min-height:0!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel{height:100%!important;min-height:0!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel .gear-panel-scroll{height:100%!important;max-height:none!important;min-height:0!important;overflow:hidden!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel .rpg-bag-browser{height:100%!important;flex:1!important;min-height:0!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel .bag-storage{height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel .rpg-bag-detail{height:100%!important;min-height:0!important;max-height:none!important;box-sizing:border-box!important;overflow:auto!important}
}

/* Single-item details must yield to the inventory multi-selection summary.
   Keep the same workspace scope as the native item-heading display rules. */
body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel #bag-detail.inventory-multi > :not([data-inventory-selection]){display:none!important}

/* Preserve the selection controls above the scrolling inventory. */
body #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #inventory-panel .bag-storage > .ws-bag-filters{flex:0 0 auto!important}

@media (max-width:800px) and (orientation:portrait){
 body #game-root.ui-workspace #party-modal .ws-panel[data-preparation=true].has-party-access{grid-template-rows:auto auto minmax(0,1fr)!important}
 body #game-root.ui-workspace #party-modal .ws-panel.has-party-access>.ws-party-access{grid-column:1/-1;grid-row:1;padding:0 2px;line-height:16px}
 body #game-root.ui-workspace #party-modal .ws-panel.has-party-access>.ws-nav>.ws-title-row,
 body #game-root.ui-workspace #party-modal .ws-panel.has-party-access>.ws-shell>.ws-roster{grid-row:2}
 body #game-root.ui-workspace #party-modal .ws-panel.has-party-access>.ws-nav>.ws-tabs,
 body #game-root.ui-workspace #party-modal .ws-panel.has-party-access>.ws-shell>.ws-content{grid-row:3}
}

/* Auto-repeat dropdown: the help remains clickable when selection is locked. */
#game-root #map-modal .ew-loop-control{position:relative;display:flex;align-items:stretch}
#game-root #map-modal .ew-loop-control:has(.ew-loop-help) select{padding-right:40px!important;appearance:none}
#game-root #map-modal .ew-loop-control.ew-loop-locked select{background:#293334!important;color:#89928c!important;border-color:#52605a!important;opacity:1;cursor:not-allowed}
#game-root #map-modal .ew-loop-control .ew-loop-help{position:absolute;right:2px;top:0;bottom:0;transform:none!important;min-width:22px!important;width:22px!important;height:100%!important;min-height:0!important;padding:0!important;border:0;border-left:1px solid #65715f;background:transparent;color:#d8c694;line-height:24px;font:inherit;font-size:14px;cursor:pointer}
.ew-loop-help-dialog{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);margin:0;box-sizing:border-box;width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:16px;background:#142c31;color:#e5d5ac;border:2px solid #93865d;box-shadow:0 0 0 3px #172a2a,0 12px 45px #0009;font:14px/1.6 sans-serif}
.ew-loop-help-dialog::backdrop{background:#0008}
.ew-loop-help-dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#efcf8e}
.ew-loop-help-dialog p{white-space:pre-line;margin:14px 0}
.ew-loop-help-dialog button{background:#283e3a;color:#e5d5ac;border:1px solid #958761;font:inherit;padding:4px 14px;cursor:pointer}
.ew-loop-help-dialog header button{padding:0 9px;font-size:20px}
.ew-loop-help-dialog footer{display:flex;justify-content:center}

#game-root #map-modal .ew-loop-control:has(.ew-loop-help)::after{content:"⌄";position:absolute;right:27px;top:50%;transform:translateY(-50%);pointer-events:none;color:#cabb93;font:14px sans-serif}

#live-dungeon-loop{display:block;text-align:right;font-size:10px;line-height:1.25;font-variant-numeric:tabular-nums;color:#dfc88c}#live-dungeon-loop[hidden]{display:none}

.mg-source-routes{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 10px}.mg-source-routes button{font:inherit;font-size:12px;padding:5px 9px;background:#243c3b;color:#e5d6ac;border:1px solid #8f815a}.mg-source-routes button:disabled{opacity:.5}

/* Shared workshop output cards in inventory and trade details. */
body .ew-craft-output .workshop-icon{display:block!important;position:relative!important;width:60px!important;height:60px!important;min-width:60px!important;padding:0!important;border:1px solid var(--item-rarity);background:#142b2c;box-sizing:border-box}body .ew-craft-output .workshop-icon img{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain;image-rendering:pixelated;margin:0!important}body .ew-craft-output .forge-item-header{display:grid;grid-template-columns:60px minmax(0,1fr);gap:8px;align-items:center}body .ew-craft-output .ws-item-level{position:absolute;left:2px;top:1px;margin:0;font-size:10px;line-height:1.1}body .ew-craft-output .ws-rarity-badge{position:absolute;left:2px;bottom:1px;margin:0;font-size:10px;line-height:1.1}body .ew-craft-output .workshop-affix-pool{display:flex;flex-wrap:wrap;gap:5px 10px}

/* Only the FAB terminal hides the popularity rail; resources retain their asset list. */
body #game-root #fg-resource>.cm-assets{display:none!important}
body #game-root #fg-resource{grid-template-columns:minmax(0,1fr) 240px!important}
@media(orientation:portrait) and (max-width:800px){body #game-root #fg-resource{grid-template-columns:minmax(0,1fr)!important}}

/* Shared ownership marker; the selected marker takes its place, never a second corner. */
body #game-root.ui-workspace :is(.ws-worn-badge,.ws-equipped-check){position:absolute!important;right:1px!important;top:1px!important;width:17px!important;height:17px!important;box-sizing:border-box!important;display:grid!important;place-items:center!important;padding:0!important;font:900 13px/1 sans-serif!important;color:#fff9d7!important;background:#276e4e!important;border:1px solid #e5d797!important;border-radius:0!important;box-shadow:0 1px 3px #000b!important;z-index:8!important;text-shadow:0 1px #143b2a!important}
:is([data-equipment-selected="true"],[data-bag-selected="true"],.bag-item.active,.bag-item.selected,.gear-item.selected,.gear-item.active):is(.ws-rarity-item,.bag-item,.gear-item) :is(.ws-worn-badge,.ws-equipped-check){visibility:hidden!important}
.bag-item[data-quick-equipped="true"]::after{top:1px!important;right:1px!important;z-index:10!important}
.ew-equipment-selection-mark{z-index:12!important}

body #game-root .ew-equipment-picked :is(.ws-worn-badge,.ws-equipped-check),body #game-root [data-owned-skin][aria-pressed=true] .ws-equipped-check{visibility:hidden!important}
body #game-root [data-owned-skin][aria-pressed=true]::after{content:'◆';position:absolute;right:1px;top:1px;width:17px;height:17px;background:#71571c;color:#fff5bd;border:1px solid #ffe9a5;font:13px/17px sans-serif;text-align:center;z-index:12;pointer-events:none}

/* FAB terminal: constrain the grid to its window; only the right ticket scrolls. */
body #game-root #fg-resource{height:100%!important;min-height:0!important;max-height:100%!important;grid-template-rows:minmax(0,1fr);overflow:hidden!important}
body #game-root #fg-resource>.cm-terminal-main{min-height:0!important;height:100%;overflow:hidden;box-sizing:border-box}
body #game-root #fg-resource .cm-ticket{min-height:0!important;height:100%;max-height:100%;box-sizing:border-box;overflow-y:auto!important;overscroll-behavior:contain}
body #game-root #fg-resource .cm-executions{min-height:0!important;flex:1 1 0!important;overflow:hidden}
body #game-root #fg-resource .cm-ticket-slot{min-height:0;flex:1 1 0;overflow:hidden}
@media(orientation:portrait) and (max-width:800px){body #game-root #fg-resource>.cm-terminal-main{flex:1 1 0!important}body #game-root #fg-resource .cm-terminal-chart{max-height:38%;overflow:hidden}body #game-root #fg-resource .cm-chart{max-height:20dvh!important}}
@media(orientation:landscape) and (max-height:600px){body #game-root #fg-resource .cm-chart{height:110px!important;min-height:90px!important}body #game-root #fg-resource .cm-terminal-chart{margin:3px 0}}

body #game-root #fg-resource .cm-chart{overflow:hidden;min-height:0!important}body #game-root #fg-resource .cm-chart>svg{width:100%!important;height:100%!important;max-height:100%;display:block}body #game-root #fg-resource .cm-asset-header{flex-shrink:0}

body #game-root #fg-resource .cm-chart{height:clamp(110px,28dvh,300px)!important}@media(orientation:landscape) and (max-height:600px){body #game-root #fg-resource .cm-chart{height:110px!important}}

/* Give the FAB terminal a definite flex height, including short landscape windows.
   Its mobile ticket slot is hidden whenever records occupy this space. */
body #game-root #ew-trade-equipment-modal .ex-fab-account{display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:hidden}
body #game-root #ew-trade-equipment-modal .ex-fab-account[hidden]{display:none!important}
body #game-root #fg-resource{flex:1 1 0;height:0!important;max-height:none!important}
body #game-root.ui-workspace #ew-trade-equipment-modal:has(.ex-fab-account:not([hidden])) .ex-panel{height:min(860px,94dvh)!important}
@media(max-width:999px){body #game-root.ui-workspace #ew-trade-equipment-modal:has(.ex-fab-account:not([hidden])) .ex-panel{height:100dvh!important;max-height:100dvh!important}}
@media(max-width:999px){
 body #game-root #ew-trade-equipment-modal:has(.ex-fab-account:not([hidden])){padding:0!important}
 body #game-root.ui-workspace #ew-trade-equipment-modal:has(.ex-fab-account:not([hidden])) .ex-panel{width:100vw!important;max-width:100vw!important}
}
@media(orientation:landscape) and (max-height:500px){
 body #game-root #fg-resource>.cm-terminal-main{overflow-y:auto;overscroll-behavior:contain}
 body #game-root #fg-resource .cm-executions{flex:1 0 190px!important}
}

/* Keep an active boss readable in narrow/tall HUDs; never force hidden bosses visible. */
#game-root.responsive-combat-hud #boss-bar:not([hidden]){z-index:75;max-width:calc(100% - 16px);min-width:140px}
@media(max-width:700px){#game-root.responsive-combat-hud #boss-bar{width:calc(100% - 24px)!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important}}

html[lang="ja"] body{font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif}html[lang="ko"] body{font-family:"Noto Sans KR","Apple SD Gothic Neo",sans-serif}html[lang="zh-Hant"] body{font-family:"PingFang TC","Microsoft JhengHei",sans-serif}

/* Localized names may wrap, but a comparison value must stay on one line. */
html:is([lang="en"],[lang="ja"],[lang="ko"]) #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) .ws-item-comparison td{white-space:nowrap!important;overflow-wrap:normal;font-variant-numeric:tabular-nums}
@media(max-width:550px) and (orientation:portrait){
 html:is([lang="en"],[lang="ja"],[lang="ko"]) #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#bag-detail,#ew-trade-bag-detail) .ws-item-layout{grid-template-columns:minmax(0,1fr)!important}
}

/* My assets uses the same market window, without a second authority menu. */
.ex-my{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.my-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}.my-tabs button{font:inherit;padding:7px 12px}.my-body{min-height:0;overflow:auto;flex:1}.my-asset-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border-bottom:1px solid #566960}.my-asset-row>div{min-width:0}.my-asset-row strong{overflow-wrap:anywhere}.my-asset-row p{margin:5px 0;color:#c9c8b2}.my-asset-row button{flex:none;font:inherit;padding:6px 12px}.ex-my[hidden]{display:none!important}

/* Five-column shortcuts: the frame follows the icon grid, without side gutters. */
#game-root.responsive-combat-hud.ui-workspace #world-shortcuts{left:auto!important;right:4px!important;width:max-content!important;max-width:calc(100% - 8px)!important;padding-inline:4px!important;border-left-width:2px!important;border-right-width:2px!important}
body #game-root #world-shortcuts .ws-main-nav{width:max-content!important;grid-template-columns:repeat(5,36px)!important}
@media(max-width:800px),(pointer:coarse){body #game-root #world-shortcuts .ws-main-nav{grid-template-columns:repeat(5,22px)!important}}
body #game-root.mobile-landscape #world-shortcuts .ws-main-nav{grid-template-columns:repeat(5,30px)!important}
.my-pages{display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 0}

#world-shortcuts .ws-dock-label{display:block;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* activity-profile.1: complete labels and visible boss poise, without scaling icons. */
body #game-root #world-shortcuts .ws-main-nav{grid-template-columns:repeat(5,40px)!important}
body #game-root #world-shortcuts .ws-main-nav>button{min-width:0!important;width:100%!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;padding:2px!important}
body #game-root #world-shortcuts .ws-dock-label{font-family:Arial,"PingFang SC","Microsoft YaHei",sans-serif!important;display:block!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;font-size:11px!important;line-height:14px!important;letter-spacing:0!important}
@media(max-width:800px),(pointer:coarse){body #game-root #world-shortcuts .ws-main-nav{grid-template-columns:repeat(5,30px)!important}body #game-root #world-shortcuts .ws-dock-label{font-size:10px!important;line-height:12px!important}}
body #game-root.mobile-landscape #world-shortcuts .ws-main-nav{grid-template-columns:repeat(5,32px)!important}
body #game-root.ui-workspace #ew-trade-equipment-modal .ex-main-tabs[hidden]{display:none!important}
body #game-root.ui-workspace #ew-trade-equipment-modal.ew-my-panel .ex-panel>header{justify-content:flex-end!important}
.ew-my-panel .ex-my{min-height:0;overflow:auto;flex:1}.my-tabs{position:sticky;top:0;z-index:2;background:#14292d;padding:8px 0}.my-profile-host{position:relative;color:#e6ddbc;padding:12px;min-height:180px}.my-profile-host .arena-profile-portrait{float:right;margin:0 12px}.my-profile-host textarea{display:block;width:min(100%,480px);min-height:64px;margin:12px 0}.my-profile-host .arena-profile-history,.my-profile-host .arena-privacy,.my-profile-host .arena-resources{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}.my-profile-host .arena-profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.my-profile-host .arena-profile-grid>div{padding:12px;background:#20373a}.my-profile-host small,.my-profile-host strong{display:block}.my-profile-host .arena-note{color:#edca89}.my-profile-tools{padding:10px 12px;border-top:1px solid #62716b}
#game-root #boss-poise-row{position:relative!important;display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 10px;margin-top:5px!important;padding:5px 8px!important;background:#08171ff2!important;border:1px solid #eacb75!important;box-shadow:0 0 0 1px #182b2c,0 1px 5px #0008;color:#fff0bc!important;font:700 12px/16px Arial,"PingFang SC",sans-serif!important;text-shadow:1px 1px 2px #000!important}
#game-root #boss-poise-row[hidden]{display:none!important}#game-root #boss-poise-row .bar{grid-column:1/-1;height:9px!important;min-height:9px;background:#1b2b30!important;padding:0!important;border:1px solid #6c7a75}
#game-root #boss-poise-fill{display:block!important;height:100%!important;background:linear-gradient(90deg,#c58c35,#ffe7a2)!important;box-shadow:0 0 5px #e6bf7660}
#game-root #boss-poise-value{font-size:13px!important;font-variant-numeric:tabular-nums;white-space:nowrap;color:#fff4c9!important}
#game-root #boss-poise-row.broken{border-color:#ff9576!important;color:#ffd1bc!important}#game-root #boss-poise-row.broken #boss-poise-fill{background:#f29b78!important}
@media(max-width:600px){#game-root #boss-poise-row{font-size:10px!important;line-height:13px!important;padding:4px 6px!important}#game-root #boss-poise-value{font-size:11px!important}}
#game-root #boss-poise-row .boss-poise-track{grid-column:1/-1;grid-row:2;height:9px!important;min-height:9px!important;background:#172c32!important;border:1px solid #a69358!important;width:100%}#game-root #boss-poise-label{grid-row:1;grid-column:1;white-space:nowrap}#game-root #boss-poise-value{grid-row:1;grid-column:2}

/* A hidden diagnostic shortcut must not cover the second HUD row. */
body #white-screen-diagnostics[hidden],body.playing #white-screen-diagnostics{display:none!important}

/* Personal tabs share the window header. Portfolio tables keep scroll inside. */
body #game-root.ui-workspace #ew-trade-equipment-modal.ew-my-panel .ex-panel>header{justify-content:space-between!important}
#ew-trade-equipment-modal .ex-panel>header>.my-tabs{position:static;padding:0;margin:0;flex:1;min-width:0;flex-wrap:nowrap;overflow-x:auto;background:transparent}
#ew-trade-equipment-modal .ex-panel>header>.my-tabs button{flex:none}
#ew-trade-equipment-modal .ew-my-panel .ex-my,.ew-my-panel .ex-my{overflow:hidden}
#cm-resource .cm-record-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:4px;flex-shrink:0;scrollbar-width:thin}
#cm-resource .cm-record-tabs>button{flex:0 0 auto!important;white-space:nowrap!important;min-width:max-content!important}
#cm-resource .cm-portfolio-asset{display:inline-flex;align-items:center;gap:7px;padding:3px 5px;border:0;background:transparent;color:inherit;font:inherit;text-align:left;white-space:nowrap}
#cm-resource .cm-portfolio-asset:hover{background:#d7b86a22;color:#ffe3a0}
#cm-resource .cm-portfolio-asset .cm-resource-icon{width:28px;height:28px;flex:none;object-fit:contain}
#cm-resource .cm-portfolio-pages{display:flex;justify-content:center;align-items:center;gap:9px;flex-shrink:0;padding:5px}
#cm-resource .cm-portfolio-content .cm-money svg{width:16px;height:16px;vertical-align:middle}
#cm-resource .cm-portfolio-content{display:flex;flex-direction:column;min-height:0;flex:1}
#cm-resource .cm-portfolio-content[hidden]{display:none!important}
#cm-resource .cm-portfolio-content>.cm-table-scroll{flex:1;min-height:0;overflow:auto}

/* Compact account navigation only where the trading ticket is merged below. */
body #game-root #cm-resource .cm-mobile-mine-tab{display:none!important}
body #game-root #cm-resource .cm-own-subtabs{display:flex;gap:4px;flex:0 0 auto;overflow-x:auto;margin:0 0 7px}
body #game-root #cm-resource .cm-own-subtabs[hidden]{display:none!important}
body #game-root #cm-resource .cm-own-subtabs button{white-space:nowrap;flex:1 0 auto;padding:5px 8px;font:inherit;font-size:12px}
body #game-root #cm-resource .cm-own-subtabs [aria-pressed=true]{background:#625437;border-color:#d6be72;color:#fff0ba}
@media(orientation:portrait) and (max-width:800px){body #game-root #cm-resource .cm-mobile-mine-tab{display:block!important}body #game-root #cm-resource .cm-desktop-own-tab{display:none!important}}

/* Portfolio rows follow trade-row density; FAB and resources share the book. */
body #game-root #cm-resource .cm-portfolio-asset{display:flex!important;width:max-content;min-height:0!important;height:16px!important;padding:0!important;line-height:16px!important;vertical-align:middle;font-size:12px!important;border:0!important;gap:5px}
body #game-root #cm-resource .cm-portfolio-asset .cm-resource-icon,body #game-root #cm-resource .cm-portfolio-asset .cm-resource-icon :is(img,svg){width:16px!important;height:16px!important;min-width:16px!important;max-height:16px!important}
body #game-root #fg-resource .fg-chart-book{min-height:0;flex-shrink:0;overflow:hidden}
body #game-root #fg-resource .fg-depth-slot{display:contents}
body #game-root #fg-resource .fg-depth-slot[hidden]{display:none!important}
body #game-root #fg-resource .cm-chart-book .cm-terminal-chart{max-height:none!important}
body #game-root #fg-resource .cm-chart-book .cm-order-depth{height:100%;max-height:340px;min-height:180px;box-sizing:border-box}
body #game-root #fg-resource .cm-record-tabs{flex-wrap:nowrap!important;overflow-x:auto}
body #game-root #fg-resource .cm-record-tabs>button{flex:0 0 auto!important;white-space:nowrap!important;min-width:max-content!important}
body #game-root #fg-resource .cm-order-types [aria-pressed=true]{background:#625437;border-color:#d6be72;color:#fff0ba}
@media(orientation:portrait) and (max-width:800px){body #game-root #fg-resource .fg-chart-book{max-height:42%;flex:0 0 auto}body #game-root #fg-resource .fg-chart-book .cm-terminal-chart{max-height:none!important}body #game-root #fg-resource .cm-chart-book{height:clamp(190px,32dvh,290px)}body #game-root #fg-resource .cm-chart-book .cm-chart{height:clamp(130px,24dvh,225px)!important}}

/* Portfolio links and tabs remain identifiable on desktop and touch screens. */
.cm-record-tabs button,.cm-own-subtabs button{border:1px solid #99864f!important;background:#263f42!important;color:#f2e4b7!important;padding:7px 10px!important;min-height:32px;font-weight:600}
.cm-record-tabs button.active,.cm-own-subtabs button.active{background:#685b32!important;border-color:#e6ca78!important;box-shadow:inset 0 -3px #e6ca78;color:#fff5ce!important}
.cm-portfolio-asset{border:1px solid #687c70!important;background:#203b3d!important;border-radius:3px;padding:2px 6px!important;cursor:pointer}
.cm-portfolio-asset::after{content:'›';color:#e3c978;margin-left:5px;font-size:17px}
.cm-portfolio-asset:hover,.cm-portfolio-asset:focus-visible{border-color:#e6ca78!important;background:#3d5148!important}
/* Give close its own column: it must never sit on the last tab. */
.ew-exchange .ex-panel>header{display:grid!important;grid-template-columns:minmax(0,1fr) 38px;gap:6px;align-items:center;position:relative;padding-right:0!important;flex:none}
.ew-exchange .ex-panel>header>.ex-main-tabs{min-width:0;width:auto!important;max-width:100%;margin:0!important;padding:0!important;display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.ew-exchange .ex-panel>header>.ex-main-tabs button{flex:none}
.ew-exchange .ex-panel>header>.ex-close{position:static!important;inset:auto!important;grid-column:2;grid-row:1;width:38px!important;height:38px!important;margin:0!important;z-index:2}
.ew-exchange .ex-panel>header>[hidden]{display:none!important}
.ew-exchange .ex-panel>header>.my-tabs{grid-column:1;grid-row:1;min-width:0}
#party-modal .ws-panel{max-height:calc(100dvh - 16px)!important}
#party-modal .ws-hero-identity{align-items:start!important}
#party-modal .ws-party-meta{min-width:0;overflow:visible}
#party-modal .ws-basic-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px!important}
#party-modal .ws-basic-stats>div{display:flex;justify-content:space-between;gap:5px;min-width:0}
#party-modal .ws-basic-stats dt{font-size:11px;white-space:normal}
#party-modal .ws-basic-stats dd{font-size:12px;white-space:nowrap;margin:0}
@media(max-width:600px){#party-modal .ws-basic-stats{gap:3px 7px!important}#party-modal .ws-hero-identity{grid-template-columns:80px minmax(0,1fr)!important}#party-modal #party-model{max-width:80px!important;height:auto!important}}

.cm-record-tabs button[aria-pressed=true],.cm-own-subtabs button[aria-pressed=true]{background:#685b32!important;border-color:#e6ca78!important;box-shadow:inset 0 -3px #e6ca78;color:#fff5ce!important}
.quantity-ratio{display:flex!important;align-items:center;gap:6px;min-width:0;width:100%;margin:5px 0;flex-basis:100%}
.quantity-ratio input[type=range]{flex:1 1 60px!important;min-width:40px!important;width:60px!important;padding:0!important;height:22px!important;accent-color:#c7ad60;touch-action:pan-y;cursor:pointer}
.quantity-ratio input[type=number]{flex:0 0 48px!important;min-width:48px!important;width:48px!important;max-width:48px!important;padding:3px!important;height:25px!important;text-align:center}
.quantity-ratio>span{font-size:11px;color:#d4c59a}
.ex-transfer-batch{margin:12px 0;border-top:1px solid #607772;padding-top:10px}
.ex-transfer-batch-controls{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.ex-transfer-materials{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:5px;max-height:280px;overflow:auto;margin:8px 0}
.ex-transfer-materials label{display:flex;align-items:center;gap:5px;border:1px solid #526863;padding:6px;min-width:0;font-size:12px}
.ex-transfer-materials label:has(input:checked){background:#4b5035;border-color:#e0c579}
.ex-transfer-materials input{width:18px!important;min-width:18px!important;flex:none}
.ex-transfer-materials small{margin-left:auto;white-space:nowrap}
.ex-transfer-fields{flex-wrap:wrap}.ex-confirm{max-height:90dvh;overflow:auto}
@media(max-width:800px) and (orientation:portrait){
 body #game-root :is(#cm-resource,#fg-resource) .cm-inputs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start!important}
 body #game-root :is(#cm-resource,#fg-resource) .cm-inputs>label{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0}
 body #game-root :is(#cm-resource,#fg-resource) .cm-inputs>button,body #game-root :is(#cm-resource,#fg-resource) .cm-inputs>small{grid-column:1/-1;width:100%;max-width:none}
}

/* Portfolio navigation uses the same framed controls as resource cards. */
.cm-record-tabs button,.cm-own-subtabs button{border:2px solid #b9a56a!important;border-radius:2px!important;background:#294348!important;color:#fff0c3!important;box-shadow:inset 0 1px 0 #ffffff24,0 2px 0 #07171b!important;min-height:34px!important;padding:6px 11px!important;font-weight:700!important;opacity:1!important}
.cm-record-tabs button[aria-pressed="true"],.cm-own-subtabs button[aria-pressed="true"]{background:#74643a!important;border-color:#f4d479!important;box-shadow:inset 0 -3px 0 #f4d479,0 2px 0 #07171b!important;color:#fff9df!important}
.cm-portfolio-asset{border:2px solid #a99b70!important;background:#294348!important;box-shadow:inset 0 1px 0 #ffffff20!important;color:#fff0c3!important;padding:2px 6px!important}
@media(min-width:901px){body #game-root.ui-workspace #party-modal .ws-panel[data-preparation=true]{height:auto!important;max-height:calc(100dvh - 20px)!important}#party-modal .ws-body{min-height:0;flex:1}#party-modal .ws-hero-overview{min-height:0;max-height:none}}

@media(min-width:901px){body #game-root.ui-workspace #party-modal .ws-shell{flex:0 1 auto!important;max-height:calc(100dvh - 110px)!important}body #game-root.ui-workspace #party-modal .ws-content{max-height:none!important;display:flex;flex-direction:column}body #game-root.ui-workspace #party-modal .ws-selected-hero{flex:0 0 auto;min-height:0}body #game-root.ui-workspace #party-modal .ws-content>.ws-actions{margin-top:auto}}

/* Limited traits use a distinct readable accent; inactive set bonuses stay muted. */
.ew-limited-effect,.ew-limited-effect p,.ew-limited-effect b{color:#ffe49b!important;font-weight:600}.ew-limited-effect{border-left:3px solid #ed8e91;background:#47352766;padding:8px 10px;line-height:1.6;opacity:1!important}

#game-root.ui-workspace #equipment-modal #bag-detail .ew-limited-effect,#game-root.ui-workspace #equipment-modal #bag-detail .ew-limited-effect :is(p,b),#game-root #codex-modal .ew-limited-effect,#game-root .ew-exchange .ew-limited-effect{color:#ffe49b!important;font-weight:600;opacity:1!important}

/* Read-only skin collection uses the existing portrait/sprite assets. */
#game-root #codex-modal .mg-skin-sprite{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:left top;image-rendering:pixelated}
#game-root #codex-modal .mg-skin-poster{display:grid;place-items:center;width:min(100%,240px);aspect-ratio:1;margin:0 auto 14px;background:radial-gradient(ellipse,#2b4947,#12272b 72%);border:1px solid #827958}
#game-root #codex-modal .mg-skin-poster>img{width:100%;height:100%;object-fit:contain;min-height:0}
#game-root #codex-modal .mg-skin-detail header .mg-art{display:none}

/* One active event remains after the beta reset. */
#world-shortcuts [data-ws-go=activities]{position:relative}
#world-shortcuts [data-ws-go=activities]::after{content:"2";position:absolute;right:2px;top:2px;min-width:22px;height:22px;padding:0 5px;box-sizing:border-box;border-radius:12px;background:#e52f39;color:#fff;border:2px solid #ffe2a0;box-shadow:0 0 0 2px #39130e,0 0 8px #ed3b4080;font:bold 12px/18px sans-serif;text-align:center;pointer-events:none;z-index:2}

.fatigue-hud-controls{display:flex;gap:4px;align-items:center;justify-content:flex-end;pointer-events:auto;font:11px sans-serif}.fatigue-hud-controls label{display:flex;align-items:center;white-space:nowrap}.fatigue-hud-controls input{width:13px;height:13px}.fatigue-hud-controls button{padding:2px 5px;min-height:23px;font-size:11px}#live-dungeon-fatigue{display:block;text-align:right;color:#dfcc94}

/* Relic equipment uses the same red rarity in every inventory and result view. */
.ws-rarity-item[data-rarity="limited"],.ws-rarity-item.limited{--item-rarity:#ec6469;border-color:#ec6469!important}
.ws-rarity-item[data-rarity="limited"] .ws-rarity-badge,.ws-rarity-item.limited .ws-rarity-badge{color:#ec6469}

.fatigue-hud-controls #live-dungeon-fatigue{white-space:nowrap}.fatigue-hud-controls .fatigue-auto-buy{gap:2px;flex:none}.fatigue-hud-controls{flex-wrap:wrap;row-gap:2px}

.pool-skin-preview{display:block;width:min(240px,45%);max-height:330px;object-fit:contain;margin:auto}.skin-item-art img{image-rendering:pixelated}

.pool-skin-detail .pool-skin-preview{border:1px solid #efc459;background:#efc4590b}.pool-skin-detail h3{color:#efc459}

.mg-skin-poster[data-quality=legendary]{border:1px solid #efc459}

/* Short viewports reserve party actions; only the character overview scrolls. */
#game-root.ui-workspace #party-modal .ws-shell,#game-root.ui-workspace #party-modal .ws-content,#game-root.ui-workspace #party-modal .ws-body,#game-root.ui-workspace #party-modal #party-grid{min-height:0!important;overflow:hidden}
#game-root.ui-workspace #party-modal .ws-content{display:flex;flex-direction:column}
#game-root.ui-workspace #party-modal #party-grid{flex:1 1 auto;display:flex;flex-direction:column}
#game-root.ui-workspace #party-modal #party-grid .hero-card.ws-selected-hero{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden;flex:1 1 auto}
#game-root.ui-workspace #party-modal #party-grid .ws-hero-overview{min-height:0!important;overflow:auto;overscroll-behavior:contain;flex:1 1 auto!important;max-height:100%}
#game-root.ui-workspace #party-modal #party-grid .hero-card-actions,#game-root.ui-workspace #party-modal .party-footer{flex:0 0 auto!important;position:relative;min-height:min-content;margin-top:6px}
#game-root.ui-workspace #party-modal .ws-panel[data-preparation=true]{max-height:calc(100dvh - 16px)!important}
#game-root .world-hud .item-quantity,#game-root .tactical-quick .item-quantity{top:2px!important;bottom:auto!important;right:2px!important;z-index:3;background:#102126d9;padding:1px 2px;max-width:calc(100% - 4px);box-sizing:border-box}
#game-root .ew-quality-multi{position:relative;flex:0 0 auto;min-width:52px;font-size:12px;z-index:20}
/* Keep worn/selected badges inside the inventory layer, below open filters. */
#game-root #bag-items,#game-root #ew-trade-bag-items{isolation:isolate;position:relative;z-index:0}
#game-root .ws-bag-search-row.ew-gear-filter-row{position:relative;z-index:20}
#game-root .ew-quality-multi>summary{list-style:none;cursor:pointer;background:#243c35;border:1px solid #9b885c;padding:7px;color:#ead5a4;white-space:nowrap}
#game-root .ew-quality-multi>summary:after{content:' ▾'}
#game-root .ew-quality-options{position:absolute;top:100%;left:0;display:grid;grid-template-columns:repeat(2,minmax(65px,1fr));gap:4px;min-width:160px;padding:6px;border:1px solid #9b885c;background:#12282b;box-shadow:0 4px 14px #0008}
#game-root .ew-quality-options button{white-space:nowrap;min-width:0;width:auto!important;padding:6px!important;font-size:12px!important}
#game-root .ew-quality-options button[aria-pressed=true]{border-color:#f5d68e;background:#5d5735;color:#fff3cb;box-shadow:inset 0 0 0 1px #e9c46a}
#game-root .ew-quality-options button[aria-pressed=true]:before{content:'✓ ';}

#game-root.ui-workspace #party-modal .ws-content{display:flex!important;flex-direction:column!important;max-height:none!important;flex:1 1 0!important}
#game-root.ui-workspace #party-modal .ws-shell{flex:1 1 auto!important;min-height:0!important}
#game-root.ui-workspace #party-modal #party-grid{display:flex!important;flex:1 1 0!important}
#game-root.ui-workspace #party-modal #party-grid .hero-card.ws-selected-hero{flex:1 1 0!important;max-height:100%!important}
#game-root.ui-workspace #party-modal .party-behavior-details{flex:0 0 auto!important}

body #game-root.ui-workspace #party-modal .ws-panel[data-party-mode=edit][data-preparation=true]{height:min(680px,calc(100dvh - 20px))!important}
#game-root.ui-workspace #party-modal .ws-panel[data-party-mode=edit] .ws-shell{flex:1 1 0!important;max-height:none!important}
#game-root.ui-workspace #party-modal .ws-panel[data-party-mode=edit] .ws-content{flex:1 1 0!important;max-height:none!important}

/* Party overview fills its normal preparation window; editor dimensions remain unchanged. */
body #game-root.ui-workspace #party-modal .ws-panel[data-party-mode=overview][data-preparation=true]{height:var(--dialog-height)!important;max-height:calc(100dvh - 16px)!important}
#game-root.ui-workspace #party-modal .ws-panel[data-party-mode=overview] .ws-shell{max-height:none!important;flex:1 1 0!important}
#game-root.ui-workspace #party-modal .ws-panel[data-party-mode=overview] #party-grid .ws-hero-overview{overflow:auto;max-height:none;flex:1 1 auto!important}

#game-root.ui-workspace #party-modal .ws-panel[data-party-mode=overview] #party-grid>.hero-card.ws-selected-hero{width:100%!important;box-sizing:border-box;margin:0!important;align-self:stretch}
#game-root.ui-workspace #party-modal .ws-panel[data-party-mode=overview] .ws-hero-summary{flex:0 0 auto!important}

/* Keep character controls visible in two rows. */
.ws-equipment-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:4px}.ws-equipment-actions #loadout-remove-hero{grid-column:1/-1;position:static!important;width:100%}

.ex-transfer-asset{display:grid;grid-template-columns:22px 24px minmax(75px,1fr) auto 90px;align-items:center;gap:6px;padding:5px;border-bottom:1px solid #46605b}.ex-transfer-asset>input[type=text]{width:100%;min-width:0}.ex-transfer-asset>span{overflow-wrap:anywhere}.ex-transfer-materials{max-height:36vh;overflow:auto}.ex-transfer-batch-controls{display:flex;gap:6px;flex-wrap:wrap}.ex-transfer-batch-controls input{min-width:80px;flex:1}.ex-transfer-history{overflow-wrap:anywhere}
@media(max-width:520px){.ex-transfer-asset{grid-template-columns:20px minmax(80px,1fr) 65px}.ex-transfer-asset>img,.ex-transfer-asset>.ex-transfer-icon{display:none}.ex-transfer-asset>small{grid-column:2;grid-row:auto}.ex-transfer-asset>input[type=text]{grid-column:3;grid-row:span 2}}

.ws-equipment-actions #quick-prepare-equipment,.ws-equipment-actions #skin-change-equipment{grid-row:1}.ws-equipment-actions #loadout-remove-hero{grid-row:2}.skin-unavailable-reason{color:#f2c87d}
/* Hero gem action remains on its own second row at every viewport. */
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipment-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important;justify-items:stretch!important;max-width:180px!important}
body #game-root.ui-workspace :is(#equipment-modal,#ew-trade-equipment-modal) [data-ws-route=gear] :is(#character-panel,#ew-trade-character-panel) .ws-equipment-actions>button{width:100%!important;max-width:none!important;min-width:0!important}
body #game-root.ui-workspace .ws-equipment-actions>#quick-prepare-equipment{grid-area:1/1/2/2!important}
body #game-root.ui-workspace .ws-equipment-actions>#skin-change-equipment{grid-area:1/2/2/3!important}
body #game-root.ui-workspace .ws-equipment-actions>#loadout-unequip-hero{grid-area:2/1/3/2!important}
body #game-root.ui-workspace .ws-equipment-actions>#loadout-remove-hero{grid-area:2/2/3/3!important}

/* Temporary pre-beta disabled actions remain visible. */
button[data-pre-beta-paused=true]{display:inline-flex!important;opacity:.45!important;cursor:not-allowed!important}

/* Keep gem actions discoverable when their authoritative quote is unavailable. */
body #game-root #equipment-modal [data-ws-route=gear] #character-panel #bag-detail.ew-loadout-detail button:disabled{display:inline-block!important}
body #game-root #equipment-modal #bag-detail #loadout-remove-all:disabled::after{content:attr(title);display:block;margin-top:3px;font-size:11px;line-height:1.4;white-space:normal;color:#f0c88b}

/* Socket overlays follow the available icon size, including four-slot mobile rows. */
body #game-root .ew-socket .ew-detail-equipment{container-type:inline-size}
body #game-root .ew-socket .ew-detail-equipment .ws-item-level{font-size:min(11px,17cqw)!important;line-height:1.15!important;top:1px!important;left:2cqw!important;padding:0!important;white-space:nowrap!important}
body #game-root .ew-socket .ew-detail-equipment .ws-worn-badge{width:min(14px,21cqw)!important;height:min(14px,21cqw)!important;min-width:0!important;min-height:0!important;font-size:min(12px,18cqw)!important;line-height:1!important;top:1px!important;right:1px!important;padding:0!important;box-sizing:border-box!important;display:flex!important;align-items:center;justify-content:center}
body #game-root .ew-socket .ew-detail-equipment .ws-rarity-badge{font-size:min(10px,17cqw)!important;line-height:1.1!important;padding:0!important;left:2cqw!important}
body #game-root .ew-socket .ew-detail-equipment .ew-affix-marks{left:3cqw;gap:3cqw}
body #game-root .ew-socket .ew-detail-equipment .ew-affix-marks i{width:7cqw;height:7cqw}
body :is(#game-root,.ew-exchange) .ex-tile,body :is(#game-root,.ew-exchange) .ex-tile .ex-item-art{container-type:inline-size}
body #game-root.ui-workspace #ew-trade-equipment-modal #ew-trade-bag-items button.ex-tile .ws-item-level{font-size:min(11px,17cqw)!important;line-height:1.15!important;padding:0!important;left:2cqw!important}
body #game-root.ui-workspace #ew-trade-equipment-modal #ew-trade-bag-items button.ex-tile .ex-selection-mark{width:min(14px,21cqw)!important;height:min(14px,21cqw)!important;font-size:min(12px,18cqw)!important;line-height:1!important;padding:0!important;box-sizing:border-box;display:flex;align-items:center;justify-content:center}
body #game-root.ui-workspace #ew-trade-equipment-modal #ew-trade-bag-items button.ex-tile .ex-selection-mark[hidden]{display:none!important}

/* Keep formation identity in the document flow; headings must not sit under
   the workspace navigation or be clipped by older compact-card rules. */
#game-root #party-modal .ws-party-meta .ws-hero-line{display:block!important;position:static!important;height:auto!important;min-height:1.5em;max-height:none!important;overflow:visible!important;visibility:visible!important;color:#eddeb7!important;padding:3px 0 6px;margin:0;flex:none}
#game-root #party-modal .ws-hero-overview{min-height:min-content;flex-shrink:0}
#game-root .ws-summary-gear .ew-item-lock-mark,#game-root button[data-bag-slot] .ew-item-lock-mark{position:absolute;left:1px;bottom:1px;z-index:6;font-size:10px;line-height:12px;pointer-events:none;background:#142527d9}
#game-root .ws-nav{isolation:isolate}
#game-root .ws-title-row>[data-ws-go=close]{position:relative;z-index:5;flex-shrink:0;pointer-events:auto;touch-action:manipulation}

/* Edit mode must start at the top; centering overflowing stats clips the hero name. */
#game-root.ui-workspace #party-modal [data-party-mode=edit] #party-grid .ws-hero-overview{justify-content:flex-start!important;align-items:stretch!important;padding-top:8px;box-sizing:border-box}
#game-root.ui-workspace #party-modal [data-party-mode=edit] .ws-hero-identity{align-self:stretch!important;align-items:start!important}
.ex-skin-sprite{pointer-events:none}

/* Keep the destructive action last; extra controls wrap instead of crushing labels. */
body #game-root.ui-workspace #equipment-modal [data-inventory-discard]{order:10000!important}
body #game-root.ui-workspace #equipment-modal :is([data-ws-route=gear],[data-ws-route=bag]) #bag-action:has([data-inventory-discard])>button{flex:1 1 76px!important;min-width:68px!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important}

/* Keep mobile text controls readable before focus; prevent browser focus zoom. */
@media(max-width:900px),(any-pointer:coarse){
 body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=button]):not([type=submit]):not([type=reset]):not([type=color]):not([type=file]):not([type=hidden]),body textarea,body select,body [contenteditable=true]{font-size:max(16px,1em)!important}
 .town-telegram .town-chat-form input{line-height:20px!important;height:100%}
}

/* Keep handbook controls below the persistent research notice. */
body:has(#research-development-notice) .ew-handbook{padding-top:calc(54px + env(safe-area-inset-top))}

/* Chapter detail and preparation share the available window height; the map keeps its ratio. */
#game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .regional-landscape{height:100%!important;display:flex!important;flex-direction:column!important;align-self:stretch!important;min-height:0!important;gap:4px}
#game-root.ui-workspace #map-modal .regional-legend,#game-root.ui-workspace #map-modal #regional-stops,#game-root.ui-workspace #map-modal .regional-map-note{flex:none}
#game-root.ui-workspace #map-modal .regional-map-note{margin:2px 0;font-size:12px}
#game-root .ws-dungeon-preparation{min-height:0;flex:1 1 auto;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border-top:1px solid #8b815f;padding:8px 6px 4px}
#game-root .ws-dungeon-preparation[hidden]{display:none}
#game-root .ws-preparation-title{font-size:16px;color:#efce83;margin:0 0 6px}
#game-root .ws-dungeon-preparation #dungeon-difficulty{margin:4px 0 8px;font-size:13px}
#game-root .ws-dungeon-preparation #v457-preparation{margin:0}
@media(max-width:800px) and (orientation:portrait){
 #game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .regional-layout{display:flex!important;flex-direction:column!important;gap:8px!important}
 #game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .regional-landscape{height:55%!important;flex:0 0 55%!important}
 #game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .regional-viewport{max-height:50%!important;overflow:auto!important}
 #game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .regional-detail{flex:1 1 0!important;min-height:0!important}
}

@media(max-height:520px) and (orientation:landscape){
 #game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .regional-landscape{overflow:auto!important;overscroll-behavior:contain}
 #game-root.ui-workspace #map-modal .ws-dungeon-preparation{flex:none;min-height:150px;overflow:visible}
}

/* Explicit left-bottom preparation panel, matching the chapter layout reference. */
#game-root.ui-workspace #map-modal .ws-dungeon-preparation{border:1px solid #657968;background:#152b2d;padding:8px;margin-top:4px}
#game-root.ui-workspace #map-modal .ws-preparation-title{display:block!important;font-size:15px!important;line-height:1.4!important;margin:0 0 6px!important;color:#efce83}

/* Compact departure: map keeps aspect ratio; supplies never hide below a desktop scroll. */
#game-root .ws-panel[data-ws-route=regional] .ws-dungeon-preparation{flex:0 0 auto;overflow:visible;padding:6px;margin:0;}
#game-root .ws-dungeon-preparation #v457-preparation{border:0;margin:0;padding:0;gap:5px;background:transparent;}
#game-root .v457-mode-row{display:flex;flex-wrap:nowrap;gap:10px;align-items:center;}
#game-root .v457-mode-row select{width:94px;min-width:75px;min-height:30px;padding:3px 6px;}
#game-root .v457-rewards{font-size:13px;}
#game-root .v457-supply-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;column-gap:10px;min-height:34px;font-size:13px;}
#game-root .v457-supply-name{display:flex;align-items:center;gap:4px;min-width:0;}
#game-root .v457-supply-name img{width:26px;height:26px;object-fit:contain;}
#game-root .v457-supply-row label{white-space:nowrap;gap:3px;}
#game-root .v457-supply-row .material-info{min-width:20px;padding:0;min-height:24px;}
#game-root .ws-dungeon-preparation .v457-fatigue-item{border:0;margin:0;padding:0;}
#game-root .ws-map-mobile-summary{display:none;}
#game-root .ws-route-details{margin:8px 0;}
#game-root .ws-route-details summary{cursor:pointer;color:#e8d09a;}
#game-root .ws-panel[data-ws-route=regional] .regional-landscape{overflow:visible;}
@media(max-width:800px) and (orientation:portrait),(max-width:1000px) and (max-height:520px){
 #game-root .ws-panel[data-ws-route=regional] .regional-layout{overflow-y:auto;display:flex;flex-direction:column;}
 #game-root .ws-panel[data-ws-route=regional] .regional-landscape{flex:0 0 auto;height:auto;min-height:0;overflow:visible;}
 #game-root .ws-panel[data-ws-route=regional] .regional-viewport{max-height:none;}
 #game-root .ws-panel[data-ws-route=regional] .regional-detail{flex:0 0 auto;min-height:0;height:auto;overflow:visible;}
 #game-root .ws-panel[data-ws-route=regional] .ws-map-detail-body{overflow:visible;flex:none;}
 #game-root .ws-map-mobile-summary{display:block;margin:4px 0;font-size:12px;line-height:1.35;}
 #game-root .ws-panel[data-ws-route=regional] .regional-detail-image,#game-root .ws-panel[data-ws-route=regional] #regional-selected-label,#game-root .ws-panel[data-ws-route=regional] #regional-selected-name,#game-root .ws-panel[data-ws-route=regional] #regional-selected-note{display:none;}
 #game-root .v457-supply-row{font-size:12px;column-gap:5px;min-height:32px;}
 #game-root .v457-rewards{font-size:12px;}
 #game-root .ws-dungeon-preparation{margin-top:3px;}
}

@media(max-width:800px) and (orientation:portrait),(max-width:1000px) and (max-height:520px){
 #game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .regional-layout{height:var(--map-layout-height)!important;overflow:auto!important;display:flex!important;flex-direction:column!important;}
 #game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .regional-landscape{height:auto!important;flex:0 0 auto!important;overflow:visible!important;}
 #game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .regional-detail{height:auto!important;flex:0 0 auto!important;overflow:visible!important;}
 #game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .ws-map-detail-body{height:auto!important;max-height:none!important;overflow:visible!important;flex:none!important;}
}

/* Departure supplies: compact action rows with full-width mobile artwork. */
#game-root .v457-supply-row{grid-template-columns:minmax(120px,1fr) auto auto;gap:6px;}
#game-root .v457-supply-actions,#game-root .v457-supply-options{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap;}
#game-root .v457-supply-actions button{font-size:12px;min-height:29px;padding:3px 7px;white-space:nowrap;}
#game-root .v457-supply-row .v457-supply-name img{width:26px;height:26px;flex:none;image-rendering:pixelated;}
#game-root .v457-supply-options{font-size:12px;}
@media(max-width:800px) and (orientation:portrait),(max-width:1000px) and (max-height:520px){
 #game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .regional-viewport{height:var(--fitted-map-height)!important;min-height:0!important;max-height:none!important;width:100%!important;overflow:hidden!important;flex:none!important;}
 #game-root .v457-supply-row{grid-template-columns:minmax(0,1fr) auto;gap:3px 5px;padding:4px 0;}
 #game-root .v457-supply-options{grid-column:1/-1;justify-content:flex-end;}
 #game-root .v457-supply-actions button{font-size:11px;padding:2px 5px;min-height:26px;}
 #game-root .v457-supply-name{font-size:12px;gap:3px;}
 #game-root .v457-supply-row+.v457-supply-row{border-top:1px solid #52645c66;}
 #game-root .ws-map-mobile-summary{margin:4px 0!important;line-height:1.35!important;}
 #game-root .ws-dungeon-preparation #v457-preparation{padding:6px;gap:4px;}
}
@media(max-width:800px) and (orientation:portrait),(max-width:1000px) and (max-height:520px){
 #game-root #map-modal .v457-supply-row{grid-template-columns:auto minmax(0,1fr)!important;min-height:0!important;row-gap:4px!important;}
 #game-root #map-modal .v457-supply-name{grid-column:1/-1!important;white-space:nowrap!important;}
 #game-root #map-modal .v457-supply-name>span{white-space:nowrap!important;}
 #game-root #map-modal .v457-supply-actions{justify-content:flex-start!important;gap:3px!important;}
 #game-root #map-modal .v457-supply-actions button{font-size:10px!important;min-height:26px!important;padding:2px 4px!important;}
 #game-root #map-modal .v457-supply-options{grid-column:2!important;font-size:10px!important;gap:3px!important;flex-wrap:nowrap!important;}
 #game-root #map-modal .v457-supply-options label{font-size:10px!important;gap:2px!important;}
 #game-root #map-modal .v457-supply-name .material-info{min-height:24px!important;height:24px!important;}
 #game-root #map-modal .ws-map-detail-body>#regional-selected-note,#game-root #map-modal .ws-map-detail-body>#regional-entry-hint{display:none!important;}
}

#game-root .v457-name-short,#game-root .v457-auto-short{display:none;}
#game-root .v457-supply-count{white-space:nowrap;}
@media(max-width:800px) and (orientation:portrait),(max-width:1000px) and (max-height:520px){
 #game-root #map-modal .v457-supply-row{grid-template-columns:minmax(0,1fr) auto auto!important;column-gap:4px!important;padding:5px 0!important;}
 #game-root #map-modal .v457-supply-name{grid-column:auto!important;gap:2px!important;font-size:10px!important;}
 #game-root #map-modal .v457-supply-name img{width:20px!important;height:20px!important;}
 #game-root #map-modal .v457-name-full,#game-root #map-modal .v457-auto-full{display:none!important;}
 #game-root #map-modal .v457-name-short,#game-root #map-modal .v457-auto-short{display:inline!important;}
 #game-root #map-modal .v457-supply-options{grid-column:auto!important;}
 #game-root #map-modal .v457-supply-options input[type=checkbox]{width:12px!important;min-width:12px!important;height:12px!important;}
 #game-root #map-modal .v457-supply-actions button{min-width:0!important;min-height:26px!important;padding:2px 3px!important;font-size:10px!important;}
 #game-root #map-modal .v457-supply-name .material-info{min-width:16px!important;width:16px!important;font-size:10px!important;padding:0!important;}
}

/* Compact departure information, small-screen world atlas only. */
@media(max-width:800px) and (orientation:portrait),(max-width:1000px) and (max-height:520px){
 #world-atlas-modal #atlas-region-type,#world-atlas-modal #atlas-region-name,#world-atlas-modal #atlas-region-subtitle,#world-atlas-modal #atlas-region-state{display:none!important}
 .v457-supply-name .material-info{flex:0 0 18px;width:18px;min-width:18px;min-height:20px;padding:0;font-size:13px;line-height:18px}
}
.v457-supply-name .material-info{flex-shrink:0;font-family:system-ui,sans-serif}
.workshop-kit-group summary{cursor:pointer;font-size:13px;padding:5px 0}.workshop-kit-group .missing{color:#efa18d}

/* Reserve the same three-row preparation height across difficulty switches. */
@media(min-width:801px) and (min-height:521px){
 #game-root .ws-panel[data-ws-route=regional] .ws-dungeon-preparation{box-sizing:border-box;min-height:168px;height:168px;flex:0 0 168px;}
 #game-root .ws-dungeon-preparation #v457-preparation{height:100%;grid-template-rows:32px;grid-auto-rows:minmax(34px,1fr);align-content:stretch;}
 #game-root .ws-panel[data-ws-route=regional] .regional-detail{min-height:0;}
 #game-root .ws-panel[data-ws-route=regional] .ws-map-detail-body{min-height:0;overflow-y:auto;}
}

/* Short desktop windows keep all supplies reachable; artwork yields first. */
@media(min-width:801px) and (min-height:521px){
 #game-root.ui-workspace #map-modal .ws-panel[data-ws-route=regional] .regional-landscape{overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;}
}

/* Chapter selection keeps its two explicit destinations side by side. */
#game-root.ui-workspace #world-atlas-modal .ws-map-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
#game-root.ui-workspace #world-atlas-modal .ws-map-actions button{min-width:0;white-space:normal;overflow-wrap:anywhere;}
#game-root.ui-workspace #world-atlas-modal .ws-map-actions:has(#atlas-town[hidden]){grid-template-columns:minmax(0,1fr);}

/* Status overlays the original map geometry, including after a full view. */
#live-performance{text-align:right}
#live-performance .circuit-energy{display:block!important;text-align:right}
#live-performance .circuit-energy[hidden]{display:none!important}
#live-dungeon-preparation{display:block;text-align:right;color:#dfcc94;white-space:nowrap}
#fatigue-hud-controls{display:none!important}
.ws-reward-drops{margin-top:8px;min-width:0}
.ws-reward-drop-list{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;max-height:240px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:4px}
.ws-reward-drop{display:flex;align-items:center;gap:7px;min-width:0;padding:4px;background:#11282b;border-left:2px solid var(--drop-color,#b5c1b9)}
.ws-reward-drop img{width:30px;height:30px;flex:none;object-fit:contain;image-rendering:pixelated}
.ws-reward-drop span{min-width:0;overflow-wrap:anywhere;line-height:1.4}
.ws-reward-drop small{display:block;color:#b5c1b9;font-size:11px}

.ws-reward-drop-list{scrollbar-width:thin;scrollbar-color:#9e8b55 #122729}
.ws-reward-drop-list::-webkit-scrollbar{width:8px}
.ws-reward-drop-list::-webkit-scrollbar-track{background:#122729}
.ws-reward-drop-list::-webkit-scrollbar-thumb{background:#9e8b55;border:2px solid #122729}

/* Empty skin results span the inventory grid on desktop and narrow screens. */
#bag-items>.skin-empty{grid-column:1/-1;min-width:0;white-space:normal;overflow-wrap:anywhere;margin:0;align-self:start}

/* Skin details share the equipment pane, with no reserved empty sockets. */
#bag-detail .skin-equipment-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;min-width:0;align-items:start}
#bag-detail .skin-detail-heading{min-width:0;display:grid;gap:8px}.skin-detail-heading .skin-item-art{float:left;width:54px;height:54px;margin:0 9px 6px 0}.skin-detail-heading small{color:var(--item-rarity)}.skin-detail-heading h3{margin:5px 0}.skin-activation{display:grid;grid-template-columns:20px minmax(0,1fr);gap:3px 6px;font-size:12px;border:1px solid #536469;border-radius:8px;padding:9px;clear:both}.skin-activation small{grid-column:2;color:#a7b9b7}.skin-activation-mark{grid-row:span 3;color:#8c9c9d}.skin-activation[data-activation=met] .skin-activation-mark{color:#88dfad}.skin-attribute-preview{border-left:1px solid #536469;padding-left:12px;min-width:0}.skin-attribute-preview h4,.skin-detail-description h4{margin:0 0 8px}.skin-attribute-preview strong{color:#adc4c0}.skin-attribute-preview p,.skin-detail-description p{font-size:12px;line-height:1.6}.skin-detail-description{grid-column:1/-1;border-top:1px solid #536469;padding-top:12px;min-width:0}#bag-detail .skin-detail-description canvas,#bag-detail .skin-detail-description .pool-skin-preview{display:block;width:144px;height:198px;object-fit:contain;margin:8px auto}.skin-equipment-detail :is(p,strong,small,span){overflow-wrap:anywhere}

/* Shop categories retain native controls and stay below the market navigation. */
#game-root.ui-rpg #service-modal.skin-store #service-tabs{flex-direction:row!important;align-items:center;gap:6px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:6px 0 2px;flex-wrap:nowrap!important;width:100%;min-width:0;border-top:1px solid #46564d}
#game-root.ui-rpg #service-modal.skin-store #service-tabs button{width:auto!important;flex:0 0 auto!important;min-width:88px;padding:8px 12px;margin:0;white-space:nowrap}
#game-root.ui-rpg #service-modal.skin-store .store-wargod-balance{margin-left:auto;flex:0 0 auto;padding:0 8px;color:#ecd394;font-size:12px;white-space:nowrap}
#game-root.ui-rpg #service-modal.skin-store .skin-store-heroes{border-top:0;padding-top:0}
#game-root.ui-rpg #service-modal.skin-store .service-body[data-shop-category=equipment]{grid-template-columns:minmax(0,1fr)!important}
#game-root.ui-rpg #service-modal.skin-store .service-body[data-shop-category=equipment]>.skin-store-rail{display:none!important}
#game-root.ui-rpg #service-modal.store-wargod-active .service-body{display:none!important}
#game-root.ui-rpg #service-modal.store-wargod-active #service-tabs :is(#skin-shop-tab,#skin-equipment-tab){background:#152f32!important;border-color:#536559!important;color:#c7d3c9!important;box-shadow:none!important}
#game-root.ui-rpg #service-modal.skin-store .store-wargod-host{position:relative;min-height:0;flex:1;overflow:auto;padding:12px 2px;overscroll-behavior:contain}
#game-root.ui-rpg #service-modal.skin-store .store-wargod-host[hidden]{display:none!important}
@media(max-width:600px){#game-root.ui-rpg #service-modal.skin-store #service-tabs{flex-wrap:wrap!important;gap:4px!important}#game-root.ui-rpg #service-modal.skin-store #service-tabs button{flex:1 1 auto!important;min-width:0;font-size:12px;padding:7px 6px}#game-root.ui-rpg #service-modal.skin-store .store-wargod-balance{width:100%;text-align:right;padding:2px 4px;box-sizing:border-box}}

#game-root.ui-rpg #service-modal.skin-store .ws-nav{display:flex!important;flex-direction:column!important;align-items:stretch!important;flex-shrink:0;gap:4px!important;min-width:0}
#game-root.ui-rpg #service-modal.skin-store .ws-nav>.ex-shop-tabs{flex:none!important;width:100%;min-width:0;min-height:44px}
#game-root.ui-rpg #service-modal.skin-store .ws-nav>#service-tabs{flex:none!important;box-sizing:border-box;min-height:44px}

/* Chapter cost guidance spans the action row, including narrow WebKit layouts. */
#game-root #map-modal .ew-loop-control select{min-inline-size:0;max-width:100%;box-sizing:border-box;height:32px!important}
#game-root #map-modal .ew-loop-control [data-chapter-supply-enable]{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}

/* Equipped title stays above the paired loadout/skin controls. */
body #game-root.ui-workspace .ws-equipment-actions.ws-has-title>#title-equipment-slot{grid-area:1/1/2/3!important}
body #game-root.ui-workspace .ws-equipment-actions.ws-has-title>#quick-prepare-equipment{grid-area:2/1/3/2!important}
body #game-root.ui-workspace .ws-equipment-actions.ws-has-title>#skin-change-equipment{grid-area:2/2/3/3!important}
body #game-root.ui-workspace .ws-equipment-actions.ws-has-title>#loadout-unequip-hero{grid-area:3/1/4/2!important}
body #game-root.ui-workspace .ws-equipment-actions.ws-has-title>#loadout-remove-hero{grid-area:3/2/4/3!important}

/* The floating hall entry must not cover the open More menu or its close control. */
#game-root:has(.ws-services:not([hidden])) .game-hall-entry{visibility:hidden!important;pointer-events:none!important}

/* Full skin silhouette remains visible while only its information pane scrolls. */
#game-root.ui-rpg #service-modal.skin-store .service-body[data-shop-category=skins] #service-list{flex:1;min-height:0;overflow:hidden!important;gap:8px;padding-bottom:0!important}
#game-root.ui-rpg #service-modal.skin-store .service-body[data-shop-category=skins] .skin-choices{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;max-height:74px}
#game-root.ui-rpg #service-modal.skin-store .service-body[data-shop-category=skins] .skin-choices>button{flex:0 0 135px}
#game-root.ui-rpg #service-modal.skin-store .service-body[data-shop-category=skins] .skin-shop-card{flex:1 1 0;min-height:0;overflow:hidden;grid-template-columns:minmax(0,40%) minmax(0,1fr);align-items:stretch;padding:12px;gap:12px}
#game-root.ui-rpg #service-modal.skin-store .service-body[data-shop-category=skins] .skin-shop-stage{min-height:0!important;height:auto!important;overflow:hidden;position:relative;padding-bottom:24px;box-sizing:border-box}
#game-root.ui-rpg #service-modal.skin-store .service-body[data-shop-category=skins] #skin-shop-model{width:100%!important;height:100%!important;max-width:290px;max-height:100%;object-fit:contain;min-height:0}
#game-root.ui-rpg #service-modal.skin-store .service-body[data-shop-category=skins] .skin-shop-card>section{min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:5px}
#game-root.ui-rpg #service-modal.skin-store .skin-shop-card:not(.ring-shop-card) h3{font-size:21px;margin:6px 0}
#game-root.ui-rpg #service-modal.skin-store .skin-shop-card:not(.ring-shop-card) .skin-price{font-size:20px;margin:10px 0}
#game-root.ui-rpg #service-modal.skin-store .skin-shop-card:not(.ring-shop-card) .cm-series-terms{font-size:11px;line-height:1.4}
#bag-detail:has(.skin-equipment-detail){min-height:0;overflow:hidden!important;display:flex;flex-direction:column}
#bag-detail .skin-equipment-detail{flex:1;min-height:0;width:100%;display:grid;grid-template-columns:minmax(0,38%) minmax(0,1fr);gap:12px;overflow:hidden;align-items:stretch}
#bag-detail .skin-detail-stage{min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse,#ba53241c,transparent 70%)}
#bag-detail .skin-detail-stage :is(canvas,img){display:block;width:100%;height:100%;max-height:100%;object-fit:contain;image-rendering:pixelated;margin:0}
#bag-detail .skin-detail-copy{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;padding-right:5px}
#bag-detail .skin-detail-heading{display:block;margin-bottom:8px}#bag-detail .skin-detail-heading h3{margin:5px 0}
#bag-detail .skin-attribute-preview{border:0;border-bottom:1px solid #536469;padding:10px 0}
#bag-detail .skin-detail-description{border:0;padding-top:10px}
#bag-detail .skin-detail-description p{margin:6px 0}
@media(max-width:600px){
 #game-root.ui-rpg #service-modal.skin-store .service-body[data-shop-category=skins] .skin-shop-card{grid-template-columns:minmax(0,36%) minmax(0,1fr);padding:6px;gap:6px}
 #game-root.ui-rpg #service-modal.skin-store .service-body[data-shop-category=skins] .skin-choices>button{flex-basis:110px}
 #game-root.ui-rpg #service-modal.skin-store .skin-shop-card:not(.ring-shop-card) h3{font-size:16px}
 #game-root.ui-rpg #service-modal.skin-store .skin-shop-card:not(.ring-shop-card) :is(p,small){font-size:11px;line-height:1.45}
 #game-root.ui-rpg #service-modal.skin-store .skin-shop-card:not(.ring-shop-card) button{font-size:12px;padding:5px;min-height:36px}
 #bag-detail .skin-equipment-detail{grid-template-columns:minmax(0,32%) minmax(0,1fr);gap:8px}
 .skin-detail-copy .skin-activation{padding:6px;font-size:11px}
}

/* Keep a usable full-figure stage when the equipment panes stack on phones. */
@media(max-width:800px) and (orientation:portrait){
 body #game-root.ui-workspace #equipment-modal [data-ws-route=gear]:has(.skin-equipment-detail) .gear-desktop{grid-template-rows:minmax(160px,40%) minmax(260px,1fr)!important;min-height:0!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=gear]:has(.skin-equipment-detail) #inventory-panel{min-height:0!important;height:100%!important;overflow:hidden!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=gear]:has(.skin-equipment-detail) #inventory-panel .gear-panel-scroll{flex:1 1 0!important;height:100%!important;min-height:0!important;overflow:hidden!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=gear]:has(.skin-equipment-detail) #inventory-panel .rpg-bag-browser{flex:1 1 0!important;height:100%!important;min-height:0!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=gear]:has(.skin-equipment-detail) #inventory-panel .bag-storage{flex:1 1 0!important;height:auto!important;min-height:0!important;overflow:auto!important}
 body #game-root.ui-workspace #equipment-modal [data-ws-route=gear]:has(.skin-equipment-detail) #bag-detail{flex:1 1 0!important;min-height:140px!important;max-height:none!important;overflow:hidden!important}
}
