/* 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:calc(100% - var(--mobile-dock));width:100%;touch-action:none}
 .world-hud.hero-ui .arena-wrap{background:#101b22}
 .world-hud.hero-ui .arena-wrap:after{bottom:var(--mobile-dock)}
 .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 #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 #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 #equipment-modal .native-gear-window .gear-panel-scroll{min-height:0;overflow:auto!important}
#game-root #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 #equipment-modal .gear-panel h2{font-size:20px!important;letter-spacing:2px!important;line-height:1.35!important}#game-root #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 #equipment-modal .native-gear-window{width:min(1180px,var(--dialog-width))!important;padding:12px!important;gap:10px}
#game-root.ui-rpg #equipment-modal .gear-workspace-tools{gap:6px;margin:0;padding:0 0 8px;border-bottom:1px solid var(--ui-line)}
#game-root.ui-rpg #equipment-modal .gear-desktop{min-height:0!important;gap:12px!important;align-items:start}
#game-root.ui-rpg #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 #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 #equipment-modal .gear-panel>header::before,#game-root.ui-rpg #equipment-modal .gear-panel>header::after{display:none!important}
#game-root.ui-rpg #equipment-modal .gear-panel h2{font-size:22px!important;letter-spacing:2px!important;color:var(--ui-gold)!important}
#game-root.ui-rpg #equipment-modal .gear-panel header small{font-size:10px!important;letter-spacing:1px!important;color:var(--ui-muted)!important}
#game-root.ui-rpg #equipment-modal .gear-panel-scroll{background:none!important;padding:12px!important;scrollbar-color:#8d7c55 #122125}
#game-root.ui-rpg #equipment-modal #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 #equipment-modal #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 #equipment-modal .bag-wallet{padding:8px 0!important;color:var(--ui-paper)!important;border-color:#4f6257!important}
#game-root.ui-rpg #equipment-modal .bag-search{display:flex!important;flex-wrap:wrap;gap:6px;padding:0!important}
#game-root.ui-rpg #equipment-modal .bag-search input{flex:1 1 160px!important;min-width:0!important}
#game-root.ui-rpg #equipment-modal .bag-search>small{flex:1 1 150px;color:var(--ui-muted)!important;font-size:11px}
#game-root.ui-rpg #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 #equipment-modal .bag-mode-bar button{min-height:32px;font-size:12px!important;padding:5px 10px!important}
#game-root.ui-rpg #equipment-modal .bag-storage{grid-column:1!important;grid-row:auto!important;min-width:0!important}
#game-root.ui-rpg #equipment-modal .bag-storage-label{color:var(--ui-muted)!important;font-size:11px!important;margin:0 0 8px!important}
#game-root.ui-rpg #equipment-modal #bag-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
#game-root.ui-rpg #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 #equipment-modal .bag-item[aria-pressed=true]{border-color:#dbc18b!important;background:#3a4c3a!important}
#game-root.ui-rpg #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 #equipment-modal .bag-item small{color:var(--ui-muted)!important;font-size:11px!important;line-height:1.5!important}
#game-root.ui-rpg #equipment-modal .bag-item .gear-pixel-icon{width:42px!important;height:42px!important;flex:0 0 42px!important}
#game-root.ui-rpg #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 #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 #equipment-modal .bag-curator{padding:5px 8px!important;max-width:240px;font-size:11px}
#game-root.ui-rpg #equipment-modal :is(.gear-paperdoll,.gear-model-wrap){background-color:#11252a!important;border-color:#526458!important;border-radius:2px!important}
#game-root.ui-rpg #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 #equipment-modal .native-gear-window{padding:8px!important;gap:8px}
 #game-root.ui-rpg #equipment-modal .gear-panel{height:auto!important;min-height:0!important;overflow:visible!important}
 #game-root.ui-rpg #equipment-modal .gear-panel-scroll{overflow:visible!important;padding:8px!important}
 #game-root.ui-rpg #equipment-modal #inventory-panel .gear-panel-scroll{grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
 #game-root.ui-rpg #equipment-modal :is(.bag-storage,.gear-item-detail){grid-column:1!important;grid-row:auto!important}
 #game-root.ui-rpg #equipment-modal .gear-panel>header{padding:8px!important}
 #game-root.ui-rpg #equipment-modal .gear-panel h2{font-size:20px!important}
 #game-root.ui-rpg #equipment-modal .bag-curator{max-width:130px;padding:4px!important}
 #game-root.ui-rpg #equipment-modal .bag-curator img{width:28px!important;height:28px!important}
 #game-root.ui-rpg #equipment-modal .bag-curator span{display:none}
 #game-root.ui-rpg #equipment-modal .bag-search>small{flex-basis:100%}
 #game-root.ui-rpg #equipment-modal .bag-item{min-height:68px!important;gap:5px!important;padding:6px!important}
 #game-root.ui-rpg #equipment-modal .bag-item .gear-pixel-icon{width:32px!important;height:32px!important;flex-basis:32px!important}
 #game-root.ui-rpg #equipment-modal .bag-item :is(b,strong){font-size:12px!important}
 #game-root.ui-rpg #equipment-modal .bag-item small{font-size:10px!important}
 #game-root.ui-rpg #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 #equipment-modal #inventory-panel .gear-panel-scroll{display:flex!important;flex-direction:column!important;gap:8px!important;overflow:auto!important}
#game-root.ui-rpg #equipment-modal #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 #equipment-modal #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 #equipment-modal .rpg-bag-detail{min-width:0;display:flex;flex-direction:column;gap:8px}
#game-root.ui-rpg #equipment-modal #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 #equipment-modal #bag-action{display:flex!important;flex-wrap:wrap;gap:6px;grid-area:auto!important;padding:0!important}
#game-root.ui-rpg #equipment-modal #bag-action button{flex:1 1 120px}
#game-root.ui-rpg #equipment-modal #bag-items{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;overflow:visible!important}
#game-root.ui-rpg #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 #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 #equipment-modal .bag-item>:is(b,small){grid-column:2;position:static!important;margin:0!important;white-space:normal!important}
#game-root.ui-rpg #equipment-modal #bag-filters{display:flex;flex-wrap:wrap;gap:5px!important;margin:0!important;padding:0!important}
#game-root.ui-rpg #equipment-modal #bag-filters button{min-height:30px!important;padding:4px 8px!important}
#game-root.ui-rpg #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 #equipment-modal #bag-detail :is(p,small,.gear-affinity,.gear-compare){color:var(--ui-muted)!important}
#game-root.ui-rpg #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 #character-panel .gear-panel-scroll{display:flex!important;flex-direction:column!important;gap:10px!important}
#game-root.ui-rpg #character-panel .gear-panel-scroll>*{flex-shrink:0;grid-area:auto!important;order:0!important;min-width:0}
#game-root.ui-rpg #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 #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 #character-panel #bag-roster>button img{width:27px;height:33px;object-fit:cover}
#game-root.ui-rpg #character-panel .hero-folio-banner{display:none!important}
#game-root.ui-rpg #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 #character-panel .avant-identity{padding:0!important;border:0!important;background:none!important}
#game-root.ui-rpg #character-panel .avant-identity :is(strong,h3,b){font-size:24px!important;line-height:1.2!important;margin:0!important}
#game-root.ui-rpg #character-panel .avant-level{border:0!important;padding:0!important;min-width:0!important}
#game-root.ui-rpg #character-panel .avant-level strong{font-size:24px!important}
#game-root.ui-rpg #character-panel #gear-progression{padding:8px 10px!important;background:#172c2e!important;margin:0!important}
#game-root.ui-rpg #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 #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 #character-panel .gear-model-wrap::before{display:none!important}
#game-root.ui-rpg #character-panel .gear-model-wrap canvas{height:300px!important;max-height:300px!important}
#game-root.ui-rpg #character-panel .gear-model-wrap>span{letter-spacing:0!important}
#game-root.ui-rpg #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 #equipment-modal.both-open #inventory-panel .rpg-bag-browser{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-rpg #equipment-modal #inventory-panel .rpg-bag-browser{grid-template-columns:minmax(0,1fr)}
 #game-root.ui-rpg #equipment-modal .bag-storage{max-height:275px;overflow:auto;overscroll-behavior:contain}
 #game-root.ui-rpg #equipment-modal #bag-items{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #game-root.ui-rpg #equipment-modal .bag-item{grid-template-columns:30px minmax(0,1fr)!important;gap:1px 4px!important}
 #game-root.ui-rpg #equipment-modal .bag-item>img{max-width:30px;max-height:34px}
 #game-root.ui-rpg #equipment-modal .gear-workspace-tools button{min-height:36px!important;font-size:11px!important;padding:5px 8px!important}
 #game-root.ui-rpg #character-panel #bag-roster{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 #game-root.ui-rpg #character-panel #bag-roster>button{flex-direction:column;gap:2px;font-size:11px!important}
 #game-root.ui-rpg #character-panel .gear-paperdoll{grid-template-columns:68px minmax(65px,1fr) 68px!important;gap:4px!important}
 #game-root.ui-rpg #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 #character-panel .gear-slot b{font-size:10px!important}
 #game-root.ui-rpg #character-panel .gear-slots{gap:5px!important}
 #game-root.ui-rpg #character-panel .gear-model-wrap{height:360px!important;min-height:360px!important}
 #game-root.ui-rpg #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 #equipment-modal .bag-wallet{min-height:0!important;height:auto!important;padding:3px 0!important;line-height:1.5!important}
#game-root.ui-rpg #equipment-modal .bag-wallet .resource-icon{height:25px!important;width:25px!important}
#game-root.ui-rpg #equipment-modal .bag-wallet :is(b,span){margin:0!important;padding:0!important}
#game-root.ui-rpg #equipment-modal .bag-mode-bar{padding:0!important;min-height:0!important}
#game-root.ui-rpg #equipment-modal .bag-mode-bar button{min-height:32px!important}
#game-root.ui-rpg #equipment-modal .bag-secondary-filters{padding:0!important}
#game-root.ui-rpg #equipment-modal .bag-secondary-filters select{font-size:12px!important;min-height:32px!important;padding:5px!important}
#game-root.ui-rpg #equipment-modal .bag-storage{overflow:visible!important}
#game-root.ui-rpg #equipment-modal .gear-panel header .bag-curator{max-height:54px}
#game-root.ui-rpg #equipment-modal .gear-panel header .bag-curator img{height:42px;width:34px;object-fit:cover}
#game-root.ui-rpg #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 #equipment-modal .bag-storage{max-height:245px!important;overflow:auto!important}
 #game-root.ui-rpg #equipment-modal #bag-mode-note{font-size:10px!important}
 #game-root.ui-rpg #equipment-modal #inventory-panel .gear-panel-scroll{gap:6px!important}
 #game-root.ui-rpg #equipment-modal .rpg-help{margin:0!important}
 #game-root.ui-rpg #equipment-modal .gear-workspace-tools{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important}
 #game-root.ui-rpg #equipment-modal .gear-workspace-tools button{font-size:11px!important;min-height:32px!important;padding:4px!important}
 #game-root.ui-rpg #equipment-modal .gear-access-dock{display:none!important}
 #game-root.ui-rpg #character-panel #gear-name{padding:6px 8px!important}
 #game-root.ui-rpg #character-panel #gear-progression{align-self:stretch!important;width:auto!important}
 #game-root.ui-rpg #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 #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 #character-panel #bag-roster{padding:0!important;margin:0!important;gap:4px!important}
#game-root.ui-rpg #character-panel #bag-roster>button{min-height:38px!important;padding:3px!important;transform:none!important}
#game-root.ui-rpg #character-panel #bag-roster img{width:22px!important;height:26px!important}
#game-root.ui-rpg #character-panel .avant-identity>small{letter-spacing:1px!important;font-size:9px!important}
#game-root.ui-rpg #character-panel #gear-name h3{font-size:24px!important;margin:3px 0!important;gap:8px!important;letter-spacing:1px!important}
#game-root.ui-rpg #character-panel #gear-name h3 em{font-size:11px!important;letter-spacing:0!important}
#game-root.ui-rpg #character-panel .avant-identity>span{font-size:11px!important;letter-spacing:0!important}
#game-root.ui-rpg #character-panel .avant-level>b{font-size:26px!important;font-style:normal!important}
#game-root.ui-rpg #character-panel .avant-level>small{margin-top:4px!important;font-size:9px!important}
#game-root.ui-rpg #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 #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 #character-panel #gear-progression>div{display:flex!important;gap:6px;align-items:center;flex:1;font-size:10px!important}
#game-root.ui-rpg #character-panel #gear-progression>div span{display:inline!important;font-size:10px!important}
#game-root.ui-rpg #character-panel #gear-progression progress{flex:0 0 100%;margin:0!important;height:3px!important}
#game-root.ui-rpg #character-panel #gear-progression>small{font-size:9px!important}
@media(min-width:801px) and (pointer:fine){
 #game-root.ui-rpg #equipment-modal:not(.both-open) #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 #equipment-modal:not(.both-open) #character-panel :is(.rpg-help,#bag-roster,#gear-rule){grid-column:1/-1!important}
 #game-root.ui-rpg #equipment-modal:not(.both-open) #character-panel #bag-roster{grid-template-columns:repeat(8,minmax(0,1fr))!important}
 #game-root.ui-rpg #equipment-modal:not(.both-open) #character-panel #gear-name{grid-column:1!important}
 #game-root.ui-rpg #equipment-modal:not(.both-open) #character-panel #gear-progression{grid-column:2!important}
 #game-root.ui-rpg #equipment-modal:not(.both-open) #character-panel .gear-paperdoll{grid-column:1!important}
 #game-root.ui-rpg #equipment-modal:not(.both-open) #character-panel .gear-insights{grid-column:2!important}
}
@media(max-width:800px),(pointer:coarse){
 #game-root.ui-rpg #character-panel #bag-roster>button{flex-direction:row!important;min-height:32px!important;gap:4px!important}
 #game-root.ui-rpg #character-panel #bag-roster img{width:18px!important;height:24px!important}
 #game-root.ui-rpg #character-panel #gear-name{padding:5px 8px!important}
 #game-root.ui-rpg #character-panel .gear-model-wrap{height:300px!important;min-height:300px!important}
 #game-root.ui-rpg #character-panel .gear-model-wrap canvas{height:280px!important;max-height:280px!important}
 #game-root.ui-rpg #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 #equipment-modal .ws-content{display:flex;flex-direction:column;overflow:hidden!important}
#game-root.ui-workspace #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 #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 #equipment-modal .gear-panel[hidden]{display:none!important}
#game-root.ui-workspace #equipment-modal .gear-panel>header{display:none!important}
#game-root.ui-workspace #equipment-modal .gear-panel>footer{display:none!important}
#game-root.ui-workspace #equipment-modal .gear-panel-scroll{flex:1;min-height:0;max-height:100%;overflow:auto!important;padding:8px!important}
#game-root.ui-workspace #equipment-modal #inventory-panel .gear-panel-scroll{display:flex!important;overflow:hidden!important;gap:6px!important}
#game-root.ui-workspace #equipment-modal #inventory-panel .gear-panel-scroll>:not(.rpg-bag-browser){flex-shrink:0}
#game-root.ui-workspace #equipment-modal #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 #equipment-modal #inventory-panel .bag-storage{display:flex;flex-direction:column;max-height:none!important;min-height:0;overflow:hidden!important}
#game-root.ui-workspace #equipment-modal #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 #equipment-modal .rpg-bag-detail{min-height:0!important;max-height:100%;overflow:hidden!important}
#game-root.ui-workspace #equipment-modal #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 #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 #equipment-modal #bag-action button{flex:1;min-height:38px;font-size:12px;min-width:0}
#game-root.ui-workspace #equipment-modal .bag-search>small{display:none!important}
#game-root.ui-workspace #equipment-modal .bag-mode-bar{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:thin}
#game-root.ui-workspace #equipment-modal .bag-mode-bar button{flex:none;white-space:nowrap}
#game-root.ui-workspace #equipment-modal .bag-secondary-filters{gap:6px!important}
#game-root.ui-workspace #equipment-modal .rpg-help{flex:none}
#game-root.ui-workspace #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}
/* 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 #equipment-modal #inventory-panel .rpg-bag-browser{grid-template-columns:minmax(95px,.42fr) minmax(0,.58fr)!important;gap:6px!important}
 #game-root.ui-workspace #equipment-modal .gear-panel-scroll{padding:4px!important}
 #game-root.ui-workspace #equipment-modal #bag-items{display:flex!important;flex-direction:column;gap:5px!important}
 #game-root.ui-workspace #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 #equipment-modal .bag-item :is(img,.gear-pixel-icon){width:25px!important;height:29px!important}
 #game-root.ui-workspace #equipment-modal .bag-item b{font-size:10px!important}
 #game-root.ui-workspace #equipment-modal .bag-item small{font-size:9px!important}
 #game-root.ui-workspace #equipment-modal #bag-detail{padding:7px!important;font-size:11px!important;line-height:1.6}
 #game-root.ui-workspace #equipment-modal #bag-detail :is(h3,.item-heading h3){font-size:14px!important;line-height:1.45!important}
 #game-root.ui-workspace #equipment-modal #bag-detail .item-heading{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
 #game-root.ui-workspace #equipment-modal #bag-detail .item-heading img{height:32px;width:32px}
 #game-root.ui-workspace #equipment-modal #bag-action{padding:4px!important}
 #game-root.ui-workspace #equipment-modal #bag-action button{min-height:36px!important;font-size:10px!important;padding:4px!important}
 #game-root.ui-workspace #equipment-modal .bag-wallet :is(span,b){font-size:11px!important}
 #game-root.ui-workspace #equipment-modal .bag-wallet .resource-icon{width:20px!important;height:20px!important}
 #game-root.ui-workspace #equipment-modal .bag-mode-bar button{font-size:11px!important;min-height:30px!important}
 #game-root.ui-workspace #equipment-modal .bag-secondary-filters{font-size:10px!important;gap:4px!important}
 #game-root.ui-workspace #equipment-modal .bag-secondary-filters select{font-size:12px!important;max-width:110px}
 #game-root.ui-workspace #character-panel .gear-paperdoll{grid-template-columns:47px minmax(45px,1fr) 47px!important;gap:3px!important}
 #game-root.ui-workspace #character-panel .gear-slot>button:first-child{min-height:48px!important;padding:2px!important;gap:1px!important}
 #game-root.ui-workspace #character-panel .gear-slot b{font-size:9px!important;overflow-wrap:anywhere}
 #game-root.ui-workspace #character-panel .gear-slot small{font-size:8px!important;letter-spacing:0!important}
 #game-root.ui-workspace #character-panel .gear-model-wrap{height:270px!important;min-height:270px!important}
 #game-root.ui-workspace #character-panel .gear-model-wrap canvas{height:250px!important}
 #game-root.ui-workspace #character-panel .gear-insights{padding:5px!important}
 #game-root.ui-workspace #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] #character-panel{display:none!important}
#game-root.ui-workspace #equipment-modal #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 #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 #equipment-modal #inventory-panel .rpg-bag-browser{align-items:stretch!important}
#game-root.ui-workspace #equipment-modal #inventory-panel .rpg-bag-detail{height:100%;max-height:100%;min-height:0!important}
#game-root.ui-workspace #equipment-modal #inventory-panel .bag-mode-bar{flex-wrap:nowrap!important;overflow-x:auto!important;min-width:0!important}
#game-root.ui-workspace #equipment-modal #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 #equipment-modal #bag-detail{flex:1 1 0!important}
#game-root.ui-workspace #equipment-modal #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 #equipment-modal #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 #equipment-modal #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 #equipment-modal #inventory-panel .bag-wallet{grid-column:1/-1!important;grid-row:1!important}
 #game-root.ui-workspace #equipment-modal #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 #equipment-modal #inventory-panel .ws-bag-filters>*{flex-shrink:0!important}
 #game-root.ui-workspace #equipment-modal #inventory-panel .ws-bag-filters .bag-search{display:flex;flex-wrap:wrap}
 #game-root.ui-workspace #equipment-modal #inventory-panel .ws-bag-filters #bag-filters{flex-wrap:wrap!important}
 #game-root.ui-workspace #equipment-modal #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 #equipment-modal #inventory-panel #bag-items{grid-template-columns:1fr!important}
 #game-root.ui-workspace #equipment-modal #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 #equipment-modal #inventory-panel>header,
#game-root.ui-workspace #equipment-modal #inventory-panel>footer,
#game-root.ui-workspace #equipment-modal #bag-mode-note{display:none!important}
#game-root.ui-workspace #equipment-modal #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 #equipment-modal #inventory-panel #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 #equipment-modal #inventory-panel #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 #equipment-modal #inventory-panel #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 #equipment-modal #inventory-panel #bag-items .bag-item small{display:none!important}
#game-root.ui-workspace #equipment-modal #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 #equipment-modal #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 #equipment-modal #bag-items .bag-item[aria-pressed=true]{outline:1px solid #f0d79a!important;outline-offset:-3px;background-color:#465542!important}
#game-root.ui-workspace #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,#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,#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 #equipment-modal #inventory-panel .rpg-bag-browser{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)!important}
 #game-root.ui-workspace #equipment-modal #inventory-panel #bag-items{grid-template-columns:repeat(auto-fill,minmax(44px,1fr))!important;gap:4px!important}
 #game-root.ui-workspace #equipment-modal #inventory-panel #bag-items .bag-item{height:65px!important;padding:3px!important;gap:2px!important}
 #game-root.ui-workspace #equipment-modal #inventory-panel #bag-items .bag-item :is(img,.gear-pixel-icon,.resource-icon){width:31px!important;height:31px!important}
 #game-root.ui-workspace #equipment-modal #inventory-panel #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 #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 #equipment-modal [data-ws-route=gear] .gear-panel{min-width:0!important;width:auto!important;flex:none!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel .gear-panel-scroll{display:flex!important;flex-direction:column!important;gap:5px!important;padding:6px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #inventory-panel .rpg-bag-detail{border-top:1px solid #7c7754;padding-top:4px}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel .ws-bag-filters{display:contents!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-paperdoll{grid-template-columns:80px minmax(60px,1fr) 80px!important;gap:5px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot>button:first-child{min-height:58px!important;padding:3px!important;gap:3px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot b{font-size:10px!important;line-height:1.3!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot img{width:30px!important;height:30px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-model-wrap{height:360px!important;min-height:300px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear]>.ws-shell{flex-direction:column!important;gap:5px!important}
 #game-root.ui-workspace #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 #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 #equipment-modal [data-ws-route=gear] .ws-roster img{height:22px;width:22px}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-roster small{display:none}
 #game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-panel-scroll{padding:3px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-paperdoll{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:4px!important;position:relative}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-model-wrap{display:none!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-slot b{display:none!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot small{font-size:9px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot img{height:28px!important;width:28px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] .gear-unequip{min-height:22px!important;padding:1px!important;font-size:9px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel .gear-panel-scroll{padding:3px!important;gap:4px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel .rpg-bag-browser{grid-template-rows:minmax(75px,1fr) minmax(70px,.85fr)!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel #bag-items{grid-template-columns:repeat(auto-fill,minmax(43px,1fr))!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel .bag-search{gap:3px!important;flex-wrap:wrap!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel .bag-search input{width:100%!important;min-width:0!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel :is(.bag-secondary-filters,.bag-wallet){font-size:9px!important;gap:2px!important;flex-wrap:wrap!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel .bag-secondary-filters select{max-width:84px!important;font-size:10px!important;padding:2px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] .gear-panel,
#game-root.ui-workspace #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 #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 #equipment-modal [data-ws-route=gear] #inventory-panel .bag-search{display:grid!important;grid-template-columns:minmax(0,1fr) 30px!important;gap:3px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel .bag-search :is(input,button){margin:0!important;min-height:32px!important;height:32px!important;padding:3px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel .bag-search button{font-size:9px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel .bag-mode-bar{display:none!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-name{padding:5px!important;min-height:54px!important;gap:3px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-name h3{font-size:18px!important;margin:2px 0!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-name .avant-identity>small{display:none!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-name .avant-level b{font-size:22px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-progression{padding:5px!important;gap:3px!important}
 #game-root.ui-workspace #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 #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 #equipment-modal [data-ws-route=gear]>.ws-nav{padding-bottom:4px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-title-row{min-height:26px!important;margin-bottom:3px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-title-row>strong{font-size:16px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-title-row button{height:26px!important;min-height:26px!important}
 #game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear] .ws-drag-hint{display:none!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear]>.ws-shell{flex-direction:row!important;padding-top:5px!important}
 #game-root.ui-workspace #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 #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 #equipment-modal [data-ws-route=gear] .ws-roster img{width:22px!important;height:24px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-roster b{font-size:10px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-roster small{display:none!important}
 #game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear][data-ws-filters=false] #inventory-panel :is(.bag-search,.bag-secondary-filters,.bag-mode-bar){display:none!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel .gear-panel-scroll{overflow:auto!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #bag-filters{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #inventory-panel #bag-items{grid-template-columns:repeat(auto-fill,minmax(50px,1fr))!important;gap:4px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel #bag-items .bag-item{height:65px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #inventory-panel #bag-items .bag-item img{width:30px!important;height:30px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-name{padding:4px!important;min-height:48px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-name .avant-identity>small{display:none!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-name h3{font-size:18px!important;margin:1px 0!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-name .avant-level b{font-size:22px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-progression{padding:3px!important;gap:2px!important}
 #game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear] #gear-progression button{min-height:25px!important;padding:2px!important}
}
@media(max-height:540px){
 #game-root.ui-workspace #equipment-modal #inventory-panel .ws-bag-filters #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 #equipment-modal [data-ws-route=gear]{width:min(960px,var(--dialog-width))!important;height:min(650px,var(--dialog-height))!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear]>.ws-shell{flex-direction:row!important;gap:8px!important}
#game-root.ui-workspace #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 #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 #equipment-modal [data-ws-route=gear] .ws-roster img{width:32px!important;height:34px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-content{overflow:hidden!important}
#game-root.ui-workspace #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 #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 #equipment-modal [data-ws-route=gear] [data-bag-filter]:not([data-bag-filter=all]):not([data-bag-filter=weapon]):not([data-bag-filter=armor]):not([data-bag-filter=jewelry]){display:none!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] .bag-secondary-filters label:has(#bag-usable){display:none!important}
#game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #inventory-panel .bag-storage{flex:1!important;min-height:0!important;max-height:none!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #bag-items .bag-item{height:64px!important;min-height:64px!important;max-height:64px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-bag-filters{display:block!important;flex:none!important}
#game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear][data-ws-filters=false] #inventory-panel .ws-bag-filters{display:none!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-filters{display:flex!important;flex-wrap:wrap!important;gap:3px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-filters button{flex:1!important;font-size:11px!important;min-height:28px!important;padding:3px!important}
#game-root.ui-workspace #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 #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 #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 #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-slots{gap:5px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #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 #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-slot :is(b,.hand-slot-tag){display:none!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot small{font-size:10px!important;line-height:12px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot img{width:28px!important;height:28px!important;object-fit:contain}
#game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #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 #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 #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 #equipment-modal [data-ws-route=gear] #bag-action label{display:flex;align-items:center;gap:4px;font-size:11px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear]>.ws-shell{gap:4px!important}
 #game-root.ui-workspace #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 #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 #equipment-modal [data-ws-route=gear] .ws-roster img{width:24px!important;height:28px!important}
 #game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear] .gear-panel-scroll{padding:2px!important;gap:4px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-items{grid-template-columns:repeat(auto-fill,minmax(39px,1fr))!important;gap:3px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-items .bag-item{height:49px!important;min-height:49px!important;max-height:49px!important;padding:3px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-items .bag-item img{width:30px!important;height:30px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-equipment-tabs{gap:2px}
 #game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-paperdoll{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:4px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #gear-model{width:87px!important;height:120px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slots{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-slot img{width:24px!important;height:24px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot small{font-size:9px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] :is(.ws-filter-toggle,#bag-filters button){font-size:10px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-detail{font-size:10px!important;padding:3px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-detail h3{font-size:13px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-action :is(button,select,label){font-size:10px!important}
 #game-root.ui-workspace #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 #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 #equipment-modal [data-ws-route=gear] #bag-items{grid-template-columns:repeat(auto-fill,minmax(44px,1fr))!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-slots{display:flex!important;flex-direction:column!important;gap:2px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-slot img{width:22px!important;height:22px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot small{font-size:8px!important;line-height:10px!important;white-space:normal!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-model-wrap{order:0!important;height:180px!important;min-height:180px!important;align-self:center!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-model{height:180px!important;width:130px!important;max-width:100%!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] .gear-unequip{min-height:19px!important;line-height:14px!important;font-size:9px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-action{flex-flow:row wrap!important;gap:4px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-action label{flex-basis:100%!important}
 #game-root.ui-workspace #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-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 #equipment-modal [data-ws-route=gear] .gear-desktop{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-bag-filters{display:flex!important;flex-direction:column;gap:5px}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] .bag-search{margin:0!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] .bag-secondary-filters{display:none!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-equipment-filter-row{display:flex;align-items:center;gap:5px;min-width:0}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #bag-filters{flex:1;flex-wrap:nowrap!important;margin:0!important;min-width:0}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-filters button{white-space:nowrap;min-width:0!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-slots{display:flex!important;flex-direction:column!important;gap:8px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-slot img{width:34px!important;height:34px!important}
#game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear] #gear-model{max-height:360px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-detail{line-height:1.35!important;padding:4px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #bag-detail :is(h3,h4){margin:1px 0!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-detail .item-heading img{width:36px!important;height:36px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-detail .gear-affixes{display:flex;flex-wrap:wrap;gap:2px 12px;list-style-position:inside}
#game-root.ui-workspace #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 #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 #equipment-modal [data-ws-route=gear] .ws-gear-comparison th:first-child{text-align:left}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-gear-comparison caption{text-align:left;font-size:10px;color:#b7c4b8}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-action{flex-flow:row wrap!important;gap:4px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-action label{flex-basis:100%!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-action button{flex:1!important}
#game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear] #bag-stats>h4{grid-column:1/-1;margin:0!important;font-size:12px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-stats .stat-group{margin:0!important;padding:4px!important;display:block!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-stats .stat-group h5{margin:0 0 3px!important;font-size:11px!important}
#game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear] #bag-stats [data-stat] b{font-size:11px!important;white-space:nowrap}
#game-root.ui-workspace #equipment-modal [data-ws-route=gear] .gear-insights .hero-passives{display:block!important;font-size:11px!important;padding:3px!important}
#game-root.ui-workspace #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 #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 #equipment-modal [data-ws-route=gear] #bag-quality{flex-basis:66px;width:66px;font-size:10px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot img{width:25px!important;height:25px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot>button:first-child{min-height:40px!important;padding:1px!important;gap:0!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot{grid-template-columns:minmax(0,1fr) 18px;gap:2px!important}
 #game-root.ui-workspace #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 #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-slots{gap:6px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-model-wrap{order:0!important;height:210px!important;min-height:180px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #gear-model{width:153px!important;height:210px!important;max-width:100%!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] .ws-gear-comparison{font-size:10px}
 #game-root.ui-workspace #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 #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 #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 #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 #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-paperdoll{overflow:auto!important;align-items:stretch!important;container-type:size}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-slot{min-height:0!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-slot img{width:clamp(16px,8cqh,24px)!important;height:clamp(16px,8cqh,24px)!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-slot small{line-height:9px!important;font-size:8px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #character-panel .gear-model-wrap{height:100%!important;min-height:0!important;max-height:100%!important;align-self:stretch!important}
 #game-root.ui-workspace #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 #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 #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 #equipment-modal [data-ws-route=gear] #character-panel .gear-paperdoll{grid-template-rows:minmax(0,1fr)!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #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 #equipment-modal [data-ws-route=gear] #bag-stats{gap:2px 8px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=gear] #bag-stats .stat-group{display:contents!important}
 #game-root.ui-workspace #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 #equipment-modal [data-ws-route=bag] #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 #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 #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 #equipment-modal [data-ws-route=bag] #bag-action:empty{display:none!important}
#game-root.ui-workspace #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 #equipment-modal [data-ws-route=bag] #bag-money b{font-size:14px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=bag] .bag-mode-bar{display:none!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=bag] .ws-bag-filters{display:flex;flex-direction:column;gap:4px}
#game-root.ui-workspace #equipment-modal [data-ws-route=bag] .bag-search{margin:0!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=bag] .bag-search input{min-height:30px!important;padding:4px 7px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=bag] #bag-detail :is(p,ul,.gear-set,.gear-compare,.weapon-grip){margin:4px 0!important;padding:3px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=bag] #bag-detail .item-heading img{width:40px!important;height:40px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=bag] #bag-detail :is(h3,h4){font-size:16px!important;margin:2px 0!important}
#game-root.ui-workspace #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 #equipment-modal [data-ws-route=bag] #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 #equipment-modal [data-ws-route=bag] .rpg-bag-detail{border-top:1px solid #65735c;padding-top:3px}
 #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #bag-filters{flex-wrap:nowrap!important;overflow-x:auto;min-width:0}
 #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #bag-filters button{flex:none;min-height:24px!important;padding:2px 5px!important;font-size:10px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=bag] #bag-items{grid-template-columns:repeat(auto-fill,minmax(50px,1fr))!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=bag] .bag-item{min-height:53px!important;padding:3px!important}
 #game-root.ui-workspace #equipment-modal [data-ws-route=bag] .bag-item img{height:28px!important;width:28px!important}
}
#game-root.ui-workspace #equipment-modal [data-ws-route=bag] #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 #equipment-modal [data-ws-route=bag] #bag-detail .item-heading img{flex:none!important;width:32px!important;height:32px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=bag] #bag-detail .item-heading h3{font-size:14px!important}
#game-root.ui-workspace #equipment-modal [data-ws-route=bag] #bag-action{padding:2px!important}
#game-root.ui-workspace #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 #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 #equipment-modal [data-ws-route=bag] #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}}
