/* The battlefield HUD has ONE canonical layout. Modal/editor styling is kept in styles.css. */
:root{--battle-blue:#49bfff;--battle-red:#f36977;--battle-gold:#ffe29b;--battle-line:#8abbd1;--battle-panel:linear-gradient(155deg,rgba(24,52,77,.97),rgba(6,25,44,.97));--hud-right:clamp(218px,15.9vw,264px)}
#app{height:100vh;height:100dvh;grid-template-rows:76px minmax(0,1fr) 26px;background:#081829;color:#f4f8ff}
.command-topbar{z-index:20;display:grid!important;grid-template-columns:minmax(228px,1fr) clamp(170px,17vw,282px) clamp(75px,7vw,122px) clamp(170px,17vw,282px) minmax(490px,1.35fr)!important;align-items:center;gap:7px!important;min-width:0;padding:2px 7px!important;height:76px;background:linear-gradient(180deg,#0b2544c8,#102c42cf),url("assets/maps/map_three_castles.webp") center top/cover!important;border-bottom:1px solid #82cbe4;box-shadow:0 3px 13px #0008}
.command-topbar>.command-brand{display:flex!important;flex-direction:row;align-items:baseline;gap:9px;overflow:hidden;height:100%;white-space:nowrap;padding:9px 3px 0 16px;text-shadow:0 3px 3px #061021}
.command-brand strong{font-family:Georgia,'Noto Serif KR',serif;font-size:clamp(23px,2.25vw,39px)!important;font-weight:1000;letter-spacing:-1.1px;color:#ffe0a0;line-height:1.3;white-space:nowrap;text-shadow:0 2px 2px #4c2f13,0 0 8px #ffe59e66}
.brand-subtitle{font-weight:850;font-size:clamp(9px,1vw,15px);color:#f6ffff;white-space:nowrap}
.command-base.profile-hud{display:grid!important;grid-template-columns:57px minmax(0,1fr);grid-template-rows:24px 13px 17px;align-items:center;gap:2px 8px;width:100%!important;min-width:0!important;max-width:none!important;height:73px;margin:0!important;padding:4px 9px 4px 6px!important;border:1.5px solid #8ce2ff!important;border-radius:14px!important;background:linear-gradient(150deg,#154779ed,#092843fa)!important;box-shadow:inset 0 1px 2px #dbfbff80,0 4px 9px #0007}
.command-base.profile-hud.red{border-color:#ffb1b3!important;background:linear-gradient(145deg,#783744ed,#341c33fa)!important;box-shadow:inset 0 1px 2px #ffe0dc80,0 4px 9px #0007}
.command-base.profile-hud .hud-portrait{grid-row:1 / 4;grid-column:1;width:56px;height:56px;border-radius:50%;border:2px solid #b6efff;background:#0a2539;overflow:hidden}
.command-base.profile-hud.red .hud-portrait{border-color:#ffd2a9}
.command-base.profile-hud .hud-portrait canvas{width:100%;height:100%;display:block}
.command-base.profile-hud .base-label{grid-row:1;grid-column:2;display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;padding:0;font-size:14px;white-space:nowrap}
.command-base.profile-hud .base-label .hud-icon{display:none!important}
.command-base.profile-hud .base-label span:nth-child(2){font-size:clamp(10px,1vw,15px);font-weight:900;overflow:hidden;text-overflow:ellipsis}
.command-base.profile-hud .base-label b{font-size:clamp(12px,1.05vw,17px);color:#fff}
.command-base.profile-hud .bar{grid-row:2;grid-column:2;height:10px!important;border-radius:7px;background:#071f34;box-shadow:inset 0 1px 3px #0009;border:1px solid #b7c7da77;overflow:hidden}
.command-base.profile-hud .bar i{height:100%;background:linear-gradient(#aff2ff,#32b4fb 55%,#1684d5)}
.command-base.profile-hud.red .bar i{background:linear-gradient(#ffc7cb,#ff697c 55%,#d63c56)}
.command-base.profile-hud .portrait-status{grid-row:3;grid-column:2;display:block;margin:0;font-size:11px;line-height:1;color:#e6f5fb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.command-resources{display:flex!important;flex-direction:column;gap:0;justify-content:center;align-items:center;width:100%;min-width:0;height:100%;background:linear-gradient(#122b46,#0a1d30);border-radius:8px}
.command-resources .match-clock{display:block;min-height:0!important;width:100%;height:auto!important;padding:0;color:#fff;background:transparent!important;border:0!important;font-size:clamp(19px,2vw,30px);line-height:1.12;font-weight:1000;text-align:center;letter-spacing:.02em;font-variant-numeric:tabular-nums}
.command-resources .clock-caption{font-size:11px;white-space:nowrap;font-weight:850;color:#f7f3e6}
.command-topbar>.command-actions{margin:0!important;display:flex!important;flex-wrap:nowrap!important;align-items:stretch;justify-content:flex-end;gap:4px;min-width:0;height:65px;overflow:visible}
.command-actions>button,.command-actions>.top-settings>summary{display:flex!important;flex:1 1 0;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:65px;min-width:0;padding:3px 2px;border:1.5px solid #a8d6f1;border-radius:10px;background:linear-gradient(#234a69,#112d49);box-shadow:inset 0 1px 2px #ffffff40,0 3px 6px #0008;color:#fff;font-size:clamp(9px,.75vw,12px);font-weight:900;line-height:1.25;white-space:normal;text-align:center;word-break:keep-all}
.command-actions>.top-settings{display:block!important;position:relative;flex:1 1 0;min-width:0}
.command-actions>.top-settings>summary{width:100%;list-style:none;cursor:pointer}.top-settings>summary::-webkit-details-marker{display:none}
.command-actions>.dev-settings{display:block!important}
.command-actions #mobileMenuBtn{display:grid!important;place-items:center;flex:0 0 33px;min-width:33px;width:33px;padding:0;font-size:21px;line-height:1}
.command-actions #battleSpeedBtn{color:#ffe4ab}.command-actions #pauseBtn{color:#fff}.command-actions .toolbar-icon{font-size:21px;line-height:1.1;font-weight:1000}.command-actions #mobileMenuBtn{font-size:24px}
.top-settings .top-popover{top:68px;right:0;z-index:200;width:245px}
/* The actual canvas remains live, full-size, and interactive. No screenshot overlays the battlefield. */
.battle-shell{position:relative!important;display:block!important;min-width:0;min-height:0;overflow:hidden;background:#101f29;isolation:isolate}
.battle-shell>.battle-view{position:absolute!important;inset:0!important;display:block!important;z-index:0;width:100%;height:100%!important;background:transparent!important}
.battle-view>.stage-wrap,.battle-view.minimap-left>.stage-wrap{position:absolute!important;inset:0!important;display:block;width:100%;height:100%;border:0;background:transparent!important;overflow:hidden}
#game{display:block;width:100%;height:100%;background:transparent!important;touch-action:none}
.battle-announcement{position:absolute;z-index:7;top:8px;left:50%;transform:translateX(-50%);min-width:270px;max-width:min(390px,50%);padding:6px 13px;color:#f5fbff;font-size:12px;font-weight:900;white-space:nowrap;text-align:center;background:linear-gradient(#183956f7,#0a223bf5);border:1px solid #9cc5e4;border-radius:11px;box-shadow:0 3px 11px #0008;pointer-events:none}
.battle-map-tools{top:35px;left:14px;right:calc(var(--hud-right) + 6px);gap:5px;max-width:none;width:max-content;flex-wrap:wrap}
.battle-map-tools button{min-height:36px;padding:4px 10px;font-size:12px;font-weight:950;background:linear-gradient(#27654b,#174b3b);border:1.5px solid #c3d9a0;border-radius:9px;box-shadow:inset 0 1px 2px #ffffff66,0 4px 10px #0009}
.battle-map-tools #battleAttackMode{background:linear-gradient(#244866,#122f4c);border-color:#8bb6da}
.battle-map-tools #battleAttackMode:disabled{display:none}
.battle-map-tools #battleMapHint{max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#0b253ddd;border:1px solid #648bad;border-radius:8px;font-size:11px;padding:8px}
.lane-legend{top:5px!important;left:14px!important;background:#122c44ec!important;border:1px solid #648dac;border-radius:8px;padding:4px 9px!important;color:#fff}
.synergy-strip{left:55%;top:47px;max-width:22%;pointer-events:none}
/* Reference right rail: minimap -> weather -> frontline orders, each with the same width. */
.battle-view>.minimap-rail{position:absolute!important;inset:0 0 0 auto!important;right:0!important;left:auto!important;z-index:10;display:flex!important;flex-direction:column;gap:6px;width:var(--hud-right)!important;height:100%;padding:13px 8px 8px!important;background:transparent!important;border:0!important;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;pointer-events:none;scrollbar-width:none}
.battle-view.minimap-left>.minimap-rail{right:auto!important;left:0!important}.minimap-rail>.weather-card,.minimap-rail>.lane-director-strip{position:relative!important;inset:auto!important;left:auto!important;right:auto!important;top:auto!important;flex:none;width:100%!important;max-width:100%!important;margin:0!important;box-sizing:border-box;border:2px solid #9cc2d6!important;border-radius:14px!important;background:var(--battle-panel)!important;box-shadow:0 6px 13px #000a,inset 0 1px 1px #ffffff45!important;pointer-events:auto}
.minimap-rail .minimap-help{display:none!important}.minimap-rail #minimapCenter{display:grid!important;place-items:center;font-size:20px;line-height:1}
.weather-card{display:flex;flex-direction:column;gap:5px;min-height:89px;padding:7px 9px 9px!important;color:#f6fbff}
.weather-heading{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #7798aa75;padding-bottom:6px}
.weather-heading b{font-size:15px;font-weight:950}.weather-heading span{font-weight:850;color:#ffe0a5;font-size:10px;white-space:nowrap}
.weather-details{display:grid;grid-template-columns:37px 43px 1fr;align-items:center;gap:4px;min-height:34px}
.weather-sun{font-size:26px;color:#ffcf49;text-align:center;text-shadow:0 0 9px #fbd15aaa}.weather-details>b{font-size:12px;font-weight:900}
.weather-details small{font-size:10px;color:#d5e5ee;line-height:1.3}
.frontline-command-bar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:6px!important;margin-top:3px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
.frontline-command-bar>button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px!important;height:46px!important;padding:4px 5px!important;border:1.5px solid #b5dfa8!important;border-radius:9px!important;background:linear-gradient(#36ad66,#10743b)!important;color:#fff!important;font-size:17px!important;font-weight:950;box-shadow:inset 0 1px 2px #ffffff55}
.frontline-command-bar .frontline-lane-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px!important}
.frontline-command-bar .frontline-lane-row button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1px;width:100%;min-width:0;min-height:48px;height:48px!important;padding:2px!important;border:1px solid #71b3db;border-radius:9px;background:linear-gradient(#234f76,#0c3153);color:#fff;font-size:12px!important;font-weight:900}
.frontline-command-bar .frontline-lane-row button span:first-child{font-size:21px;line-height:1;color:#e3f8ff}
.frontline-command-bar>button.frontline-base-btn{min-height:45px!important;height:45px!important;background:linear-gradient(#8d643c,#503725)!important;border-color:#deb977!important;color:#fff6dc!important;font-size:15px!important}.lane-director-content[hidden]{display:none!important}
/* Reference bottom dock: flat resource strip, three production slots, six hand cards, book/hero panel. */
.battle-shell>.lower-ui{--card-w:clamp(57px,5.4vw,90px);--card-height:clamp(84px,7.64vw,126px);--hand-card-gap:clamp(3px,.35vw,6px);--hand-card-w:var(--card-w);--hand-card-h:var(--card-height);position:absolute!important;left:12px!important;right:12px!important;bottom:11px!important;z-index:6;display:grid!important;grid-template-columns:calc(2.5 * var(--card-w) + 14px) calc(6 * var(--card-w) + 5 * var(--hand-card-gap)) minmax(0,1fr)!important;grid-template-rows:42px var(--card-height)!important;gap:7px 4px!important;min-height:0!important;height:auto!important;max-height:none!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;pointer-events:none}
.lower-ui>.battle-resource-strip{grid-row:1;grid-column:1 / -1;display:flex!important;align-items:center;gap:5px;width:100%;min-width:0;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;pointer-events:auto;overflow:visible}
.battle-resource-strip .resource.resource-meter{flex:0 1 163px;min-width:96px;height:39px;min-height:39px;display:flex;flex-direction:column;justify-content:center;gap:4px;padding:4px 9px;border:1.5px solid #84c3df;border-radius:9px;background:linear-gradient(#163754f7,#102b46f7);box-shadow:0 2px 8px #0009}
.battle-resource-strip .resource.resource-meter .resource-head{display:flex;justify-content:space-between;align-items:center;gap:5px;white-space:nowrap;line-height:1}
.battle-resource-strip .resource.resource-meter .resource-head small{color:#f8de86;font-size:12px;font-weight:950}
.battle-resource-strip .resource.resource-meter.mp .resource-head small{color:#9ce0ff}
.battle-resource-strip .resource.resource-meter .resource-head b{font-size:12px;font-weight:950;color:#fff;font-variant-numeric:tabular-nums}
.battle-resource-strip .resource-track{position:relative;display:block;width:100%;height:8px;flex:0 0 8px;background:#081929;border:1px solid #46627b;border-radius:5px;overflow:hidden}
.battle-resource-strip .resource-track i{display:block;height:100%;border-radius:5px;transition:width .16s linear}.resource.en .resource-track i{background:linear-gradient(#ffe788,#ffbe1c)!important}.resource.mp .resource-track i{background:linear-gradient(#a9e8ff,#2398ea)!important}
.battle-resource-strip .combat-quick-stats{flex:0 1 auto;display:flex!important;align-items:center;gap:5px;min-width:0}
.battle-resource-strip .combat-quick-stats>span{display:flex!important;justify-content:center;align-items:center;gap:5px;min-width:0;height:37px;padding:2px 5px;border:1.5px solid #83b6d0;border-radius:8px;background:linear-gradient(#163754f7,#102b46f7);box-shadow:0 2px 7px #0008}
.battle-resource-strip .combat-quick-stats i{font-size:11px;font-style:normal;font-weight:900;color:#ceeafa;background:transparent;width:auto;height:auto}
.battle-resource-strip .combat-quick-stats b{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff}
.battle-resource-strip .hand-actions{display:flex;align-items:center;justify-content:flex-start;flex:0 0 auto;gap:5px;pointer-events:auto}
.hand-actions .hand-icon-btn{display:flex;align-items:center;justify-content:center;gap:4px;flex:none;width:auto!important;min-width:64px!important;height:37px!important;padding:4px 6px!important;border:1.5px solid #87bdd9!important;border-radius:8px!important;background:linear-gradient(#214d74,#0a2e4c)!important;color:#fff!important;box-shadow:0 2px 8px #0009}
.hand-actions .hand-icon-btn svg{flex:none;width:17px;height:17px}.hand-actions .hand-icon-btn .hand-action-label{color:#fff;font-size:11px;font-weight:900;white-space:nowrap}
.hand-actions #deckCounter{padding:9px 8px!important;border:1px solid #86b4d1;border-radius:7px;background:#0e2d4af0;color:#fff;font-size:12px;white-space:nowrap}
.hand-actions .hand-use-btn:not([hidden]){display:flex;align-items:center;justify-content:center;padding:4px 6px;color:#fff;background:#19673d;border:1px solid #b5dda2;border-radius:7px;font-weight:900}
.lower-ui>.production-panel,.lower-ui>.hand-panel,.lower-ui>.strategist-panel{display:block!important;grid-row:2;min-width:0;min-height:0;height:var(--card-height);padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;pointer-events:auto;overflow:visible}
.lower-ui>.production-panel{grid-column:1;width:100%}.lower-ui>.hand-panel{grid-column:2;width:100%}.lower-ui>.strategist-panel{grid-column:3;width:100%}
.lower-ui>.production-panel>.section-title,.lower-ui>.hand-panel>.section-title,.lower-ui>.strategist-panel>.section-title{display:none!important}
#productionSlots{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;width:100%;height:calc(var(--card-height) * .8 + 12px);padding:6px;margin:0;overflow:hidden;box-sizing:border-box;border:1.5px solid #87a8ba;border-radius:12px;background:linear-gradient(155deg,#0a273bdf,#152c36ec);box-shadow:0 3px 10px #0009}
#productionSlots .prod-slot{position:relative;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:2px;box-sizing:border-box;width:100%;min-width:0;height:calc(var(--card-height) * .8);padding:3px;aspect-ratio:5/7;border:1.5px dashed #96d9e7;border-radius:10px;background:linear-gradient(#1b4758da,#102a3df0);box-shadow:inset 0 1px 3px #ffffff44,0 2px 8px #0009;overflow:visible;text-align:center}
#productionSlots .prod-slot.assigned{border-style:solid;border-color:#f4d18d}
.prod-main{position:relative;display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;justify-content:center;padding:0;background:transparent;border:0;color:#f5f9ff;overflow:hidden}
.prod-main img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;opacity:.98}.prod-main strong,.prod-main span{position:relative;z-index:1;width:100%;background:#102838df;color:#fff;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.prod-main span{font-size:8px}
.prod-controls{display:flex;flex-wrap:wrap;gap:2px;width:100%}.prod-controls .prod-lanes{display:flex;width:100%;gap:2px}.prod-lanes button,.prod-controls>button{min-width:0;min-height:18px;flex:1;padding:0 1px;font-size:8px;border-radius:4px;color:#fff;background:#244e64;border:1px solid #79a8c2}
.prod-slot:not(.assigned):not(.pending) .prod-lanes{display:none}.prod-slot .prod-main .prod-slot-plus{position:relative;z-index:1;display:block;background:transparent;font-size:32px;font-weight:400;line-height:1.2;color:#f2ffff;text-shadow:0 2px 4px #09202a}.prod-slot:not(.assigned) .prod-main strong,.prod-slot:not(.assigned) .prod-main span:not(.prod-slot-plus){background:transparent}.prod-slot .prog{position:absolute;left:3px;right:3px;bottom:1px;height:3px;border-radius:4px;background:#0a222e}.prod-slot .prog i{display:block;height:100%;background:#ffe19f}
#hand{display:flex!important;align-items:flex-end;justify-content:flex-start;gap:var(--hand-card-gap);width:100%;min-width:0;height:var(--card-height);padding:0!important;margin:0!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
#hand .command-card{position:relative;box-sizing:border-box;flex:0 0 var(--hand-card-w);width:var(--hand-card-w);min-width:var(--hand-card-w);height:var(--hand-card-h);min-height:0;aspect-ratio:5/7;padding:2px;border:1.5px solid #e5c98b!important;border-radius:10px!important;background:linear-gradient(#32566b,#081725)!important;box-shadow:inset 0 0 0 2px #061c2c,0 3px 9px #0009;overflow:hidden;transition:filter .13s,transform .13s}
#hand .command-card img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;border-radius:7px;pointer-events:none;filter:saturate(1.13) contrast(1.05)}
#hand .command-card .card-copy{position:absolute;left:2px;right:2px;bottom:2px;z-index:1;padding:12px 2px 4px;text-align:center;background:linear-gradient(transparent,#061b29ee 33%,#091e2cf6)!important}
#hand .command-card .name{font-size:clamp(9px,.8vw,12px);font-weight:950;color:#fff!important;text-shadow:0 1px 3px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#hand .command-card .meta{font-size:8px;color:#dfecf4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#hand .command-card .cost{position:absolute;isolation:isolate;z-index:9;left:auto;right:-3px;top:-3px;display:grid;place-items:center;width:28px;height:28px;box-sizing:border-box;background:#101c19!important;border:2px solid #dce8c9!important;border-radius:50%!important;overflow:hidden;color:#fff!important;box-shadow:0 2px 6px #0009;font-size:13px;font-weight:950;pointer-events:none}
#hand .command-card .cost::before{content:"";position:absolute;inset:0;z-index:-1;background:#a5ee67;transform:scaleY(var(--hand-en-fill,0));transform-origin:bottom;transition:transform .4s ease,background-color .3s ease}
#hand .command-card.en-charged .cost{color:#173009!important;box-shadow:0 0 8px #b7ff7088}
@media(prefers-reduced-motion:reduce){#hand .command-card .cost::before{transition:none}}
#hand .command-card[data-grade="S"]:before,#hand .command-card[data-grade="SS"]:before,#hand .command-card[data-grade="SSS"]:before{content:attr(data-grade);position:absolute;top:3px;left:3px;z-index:3;padding:1px 2px;border-radius:3px;background:#813f08b8;color:#ffe4a0;font:900 12px Georgia,serif;text-shadow:1px 1px #342309}#hand .command-card .type-icon{position:absolute;left:4px;right:auto;top:5px;font-size:10px;color:#fff0ae;text-shadow:0 1px 3px #000;z-index:2}
#hand .command-card.image-only .type-icon{display:none}
#hand .command-card.playable{opacity:1!important;filter:brightness(1.08)!important}#hand .command-card.disabled,#hand .command-card:disabled{opacity:.65!important;filter:grayscale(.55) brightness(.7)!important}
#hand .command-card.hand-selected{z-index:4;filter:brightness(1.2)!important;border-color:#fff0a5!important;box-shadow:0 0 0 2px #ffe99b,0 5px 12px #000b;transform:translateY(-3px)!important}
#hand .command-card:focus-visible{outline:2px solid #ffe39b;outline-offset:0}
/* Book and up to three real MP skills; field-hero cells keep existing live command targets. */
.lower-ui>.strategist-panel{display:grid!important;grid-template-columns:minmax(0,calc(2.6 * var(--card-w))) minmax(0,1fr);grid-template-rows:var(--card-height);align-items:stretch;gap:4px}
.strategist-command-row{grid-column:1;grid-row:1;display:grid;grid-template-columns:var(--card-w) minmax(0,1fr);gap:3px;width:100%;height:var(--card-height);min-width:0}
#strategistSlot{position:relative;box-sizing:border-box;display:flex;align-items:flex-end;justify-content:center;width:100%;min-width:0;max-width:var(--card-w);height:var(--card-height);aspect-ratio:5/7;padding:3px;border:1.5px solid #bbd0d3;border-radius:10px;background:linear-gradient(#254455e8,#112537ed);overflow:hidden;color:#fff;font-size:10px;text-align:center}
#strategistSlot img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}#strategistSlot>div{position:relative;width:100%;background:#0c2338df;color:#fff;font-size:9px}#strategistSlot.empty{align-items:center}
#strategistSkills{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(3,minmax(0,1fr));gap:3px;width:100%;height:var(--card-height);padding:0;overflow:hidden}
#strategistSkills button{touch-action:manipulation;cursor:pointer;position:relative;z-index:1;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:5px;width:100%;max-width:none;min-width:0;min-height:0;padding:3px;border:1px solid #8cc2dc;border-radius:6px;background:linear-gradient(#24557b,#102f50);font-size:9px;line-height:1.1;color:#fff;overflow:hidden;white-space:normal}
#strategistSkills .skill-emoji{flex:none;font-size:16px;line-height:1}#strategistSkills .skill-mini-label{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:10px;font-weight:900}#strategistSkills .skill-mini-label span,#strategistSkills .skill-mini-label small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#strategistSkills .skill-mini-label small{font-size:9px;color:#f6e3ac}
#strategistLaneButtons{display:flex;flex-direction:column;gap:3px;height:var(--card-height)}#strategistLaneButtons button{flex:1;min-height:0;padding:0;border:1px solid #7baac6;border-radius:5px;background:#214967;color:#fff;font-size:8px}
.field-command-panel{grid-column:2;grid-row:1;min-width:0;min-height:0;overflow:hidden;background:transparent;border:1px solid #7193a7;border-radius:9px}
.field-command-panel>.section-title{display:none!important}
#heroStatus{display:grid!important;grid-auto-flow:column;grid-template-rows:minmax(0,1fr);grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-columns:minmax(48px,1fr);gap:3px;width:100%;height:var(--card-height);overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
#heroStatus .hero-unit-entry{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 16px;align-items:stretch;gap:2px;min-width:0;width:100%;height:100%;min-height:0}
#heroStatus .hero-unit-entry>.hero-pill{position:relative;display:block;flex:1;min-width:0;width:100%;height:100%;padding:2px;border:1.5px solid #8db5c7;border-radius:9px;background:linear-gradient(#244355,#0a2539);overflow:hidden}
#heroStatus .hero-pill img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
#heroStatus .hero-pill .hero-card-stats{display:block;position:relative;left:auto;right:auto;top:auto;z-index:2;padding:0;background:transparent;color:#ffe3a6;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#heroStatus .hero-pill b{display:block;position:relative;left:auto;right:auto;bottom:auto;color:#fff;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
#heroStatus .hero-pill.empty-field-slot{display:flex;align-items:center;justify-content:center;border-style:dashed;color:#cbd6dc}
#heroStatus .hero-pill.empty-field-slot:before{content:none}
#heroStatus .hero-pill.empty-field-slot b{font-size:10px;color:#d9e9f2}
#heroStatus .hero-equipped-items{box-sizing:border-box;border-left:1px solid #7193a766;background:#071b2c88;width:16px;display:flex;flex-direction:column;gap:3px;overflow:auto;scrollbar-width:none}#heroStatus .hero-equipped-items img{width:16px;height:22px;object-fit:cover;border-radius:3px}
#heroStatus .hero-pill .ult{position:absolute;left:2px;right:2px;bottom:1px;height:3px;background:#10202e}#heroStatus .hero-pill .ult i{display:block;height:100%;background:#fbd871}
.sprite-detect{padding:12px;background:#14251e;border:1px solid #817954;border-radius:8px}.sprite-detect p{font-size:12px;color:#cde6d5}
.statusbar{display:flex!important;align-items:center;justify-content:space-between;height:26px!important;padding:0 12px;background:#0b2745;border-top:1px solid #517998;color:#e2f2ff;font-size:11px;z-index:15}.statusbar .legend{display:none}.status-icons{font-size:12px;color:#eff8ff}
/* Preserve the existing mobile tab navigation; desktop uses the full reference composition. */
@media(max-width:1180px){
 :root{--hud-right:clamp(150px,17.5vw,214px)}
 .command-topbar{grid-template-columns:minmax(105px,1fr) minmax(122px,17vw) 68px minmax(122px,17vw) minmax(275px,1.4fr)!important;gap:3px!important;padding:2px 4px!important}
 .command-brand strong{font-size:20px!important}.brand-subtitle{font-size:9px}
 .command-base.profile-hud{grid-template-columns:38px minmax(0,1fr);padding:4px!important;gap:2px 3px}.command-base.profile-hud .hud-portrait{width:36px;height:36px}.command-base.profile-hud .base-label span:nth-child(2){font-size:9px}.command-base.profile-hud .portrait-status{font-size:8px}
 .command-actions>button,.command-actions>.top-settings>summary{font-size:9px}.command-topbar>.command-actions{gap:2px}.weather-heading b,.lane-director-head b{font-size:12px!important}.weather-details{grid-template-columns:26px 1fr}.weather-details small{grid-column:1/-1}.weather-sun{font-size:22px}
 .battle-shell>.lower-ui{--card-w:clamp(52px,5.4vw,65px);grid-template-columns:calc(2.5 * var(--card-w) + 14px) minmax(0,calc(6 * var(--card-w) + 5 * var(--hand-card-gap))) minmax(0,1fr)!important;gap:4px!important;left:4px!important;right:calc(var(--hud-right) + 4px)!important}
 .battle-resource-strip .resource.resource-meter{flex-basis:90px;min-width:67px;padding:3px 4px}.battle-resource-strip .resource.resource-meter .resource-head small,.battle-resource-strip .resource.resource-meter .resource-head b{font-size:9px}.battle-resource-strip .combat-quick-stats>span{gap:2px;padding:2px}.battle-resource-strip .combat-quick-stats i,.battle-resource-strip .combat-quick-stats b{font-size:9px}
 .hand-actions .hand-icon-btn{width:auto!important;min-width:50px!important;height:32px!important;padding:3px 4px!important}.hand-actions .hand-icon-btn .hand-action-label{font-size:9px}.hand-actions #deckCounter{font-size:9px;padding:6px 4px!important}
 .strategist-command-row{grid-template-columns:var(--card-w) minmax(24px,1fr)}#strategistSlot{width:100%}#strategistSkills button{font-size:8px}
 .battle-announcement{display:none}.battle-map-tools{left:6px;right:calc(var(--hud-right) + 4px)}.battle-map-tools button{padding:3px 5px;font-size:9px;min-height:29px}.battle-map-tools #battleMapHint{display:none}
}
@media(max-width:900px){
 #app{grid-template-rows:48px minmax(0,1fr) 0px}
 .command-topbar{height:48px;grid-template-columns:minmax(68px,1fr) minmax(105px,1.5fr) 58px minmax(105px,1.5fr) 156px!important;gap:2px!important;padding:2px!important}
 .command-topbar>.command-brand{padding:4px 1px 0;justify-content:center}.command-brand strong{font-size:13px!important}.brand-subtitle{display:none}
 .command-base.profile-hud{height:43px;grid-template-columns:26px minmax(0,1fr);grid-template-rows:15px 6px 10px;gap:1px 2px;padding:2px!important;border-radius:6px!important}.command-base.profile-hud .hud-portrait{width:25px;height:25px;border-width:1px}.command-base.profile-hud .base-label span:nth-child(2){font-size:8px}.command-base.profile-hud .base-label b{font-size:9px}.command-base.profile-hud .bar{height:5px!important}.command-base.profile-hud .portrait-status{font-size:7px}
 .command-resources .match-clock{font-size:15px}.clock-caption{display:none}
 .command-topbar>.command-actions{height:42px}.command-actions>button,.command-actions>.top-settings{display:none!important}.command-actions #mobileMenuBtn{display:grid!important;place-items:center;width:42px;height:42px;font-size:20px}
 .battle-view>.minimap-rail{width:var(--hud-right)!important;padding:4px 3px 55px!important;gap:3px}
 .weather-card{padding:3px!important}.weather-heading{padding-bottom:2px}.weather-heading b{font-size:10px!important}.weather-heading span{font-size:8px}.weather-details{display:none}
 .minimap-rail>.lane-director-strip.docked-lane-director{padding:3px!important;border-radius:7px!important}.lane-director-strip.docked-lane-director .lane-director-head{min-height:21px;height:21px!important}.lane-director-head b{font-size:9px!important}.lane-director-chip{min-height:40px;padding:2px!important}.lane-command-title b{font-size:10px!important}.lane-command-numbers,.lane-director-chip small{font-size:8px!important}.frontline-command-bar>button{min-height:29px!important;height:29px!important;font-size:10px!important}.frontline-command-bar .frontline-lane-row button{min-height:33px;height:33px!important;font-size:8px!important}.frontline-command-bar .frontline-lane-row button span:first-child{font-size:14px}.frontline-command-bar>button.frontline-base-btn{height:29px!important;min-height:29px!important;font-size:10px!important}
 .lower-ui>.battle-resource-strip{grid-column:1;gap:2px}.battle-resource-strip .resource.resource-meter{height:27px;min-height:27px;padding:2px;flex-basis:78px;min-width:52px;gap:1px}.battle-resource-strip .resource-track{height:5px;flex-basis:5px}.battle-resource-strip .combat-quick-stats>span{height:27px}.battle-resource-strip .combat-quick-stats>span:nth-child(3){display:none!important}.hand-actions #deckCounter{display:inline-flex;padding:5px 3px!important;font-size:9px!important}
 .lower-ui>.production-panel,.lower-ui>.hand-panel,.lower-ui>.strategist-panel{grid-column:1;grid-row:2}.lower-ui>.production-panel:not(.mobile-active),.lower-ui>.hand-panel:not(.mobile-active),.lower-ui>.strategist-panel:not(.mobile-active){display:none!important}.lower-ui>.hand-panel.mobile-active{display:block!important}.lower-ui>.production-panel.mobile-active{display:block!important}.lower-ui>.strategist-panel.mobile-active{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 #hand{width:100%;gap:5px;overflow-x:auto;overflow-y:hidden}.strategist-command-row{width:100%}#heroStatus .hero-unit-entry{min-width:50px}
 .battle-map-tools{top:4px;left:3px;gap:2px}.battle-map-tools button{font-size:8px;min-height:23px;padding:1px 3px}.battle-map-tools #battleMapHint{display:none}.lane-legend,.battle-announcement{display:none!important}
 .statusbar{display:none!important}
}
@media(max-width:560px){:root{--hud-right:92px}.command-topbar{grid-template-columns:50px minmax(70px,1fr) 43px minmax(70px,1fr) 144px!important}.command-brand strong{font-size:10px!important}.command-base.profile-hud .hud-portrait{display:none}.command-base.profile-hud{grid-template-columns:minmax(0,1fr);padding:2px!important}.command-base.profile-hud .base-label,.command-base.profile-hud .bar,.command-base.profile-hud .portrait-status{grid-column:1}.command-base.profile-hud .base-label span:nth-child(2){font-size:7px}.battle-shell>.lower-ui{--card-w:57px;--card-height:80px}.battle-resource-strip .combat-quick-stats>span:nth-child(2){display:none!important}}

.card-inspect-popup{position:fixed;z-index:10000;display:flex;flex-direction:column;gap:5px;box-sizing:border-box;width:min(270px,calc(100vw - 16px));max-height:min(560px,90vh);overflow-y:auto;padding:8px;background:#10221cf5;border:2px solid #d3b677;border-radius:12px;color:#f3f1df;box-shadow:0 12px 34px #000c;pointer-events:none}
.card-inspect-popup[hidden]{display:none!important}
.card-inspect-popup>img{display:block;width:100%;max-height:350px;object-fit:contain;aspect-ratio:5/7;border-radius:7px;background:#0b1715}
.card-inspect-popup .inspect-body{display:grid;gap:5px;padding:2px 4px}
.card-inspect-popup .inspect-body>b{font-size:16px;color:#ffe6a4}
.card-inspect-popup .inspect-meta{color:#d1e2d1;font-size:12px}
.card-inspect-popup .inspect-stat{display:flex;flex-wrap:wrap;gap:5px;font-size:11px;color:#bdf8d1}
.card-inspect-popup .inspect-stat span{border-radius:3px;padding:2px 3px;background:#294735}
.card-inspect-popup p{font-size:12px;line-height:1.45;margin:0;color:#f5edd7;white-space:normal;word-break:keep-all}
@media(max-width:900px){.lower-ui>.battle-resource-strip .hand-actions{gap:3px}.hand-actions #handShuffleBtn,.hand-actions #handDiscardBtn{width:30px!important;min-width:30px!important;height:30px;padding:4px!important}.hand-actions .hand-action-label{display:none}.hand-actions #handShuffleBtn svg,.hand-actions #handDiscardBtn svg{width:18px;height:18px}#heroStatus .hero-card-stats{font-size:8px}}


/* Card list: compact one-row filters matching the Game DB search vocabulary. */
.card-catalog-modal .catalog-toolbar{display:grid;grid-template-columns:minmax(145px,1fr) 98px 105px 95px 85px 145px 68px 104px;gap:5px;align-items:center;padding:6px 8px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin}
.card-catalog-modal .catalog-toolbar input,.card-catalog-modal .catalog-toolbar select{box-sizing:border-box;min-width:0;width:100%;height:32px;padding:4px 6px;flex:none;font-size:11px;border-radius:6px}
.card-catalog-modal .catalog-toolbar .catalog-count{margin:0;display:flex;align-items:center;justify-content:center;min-height:32px;font-size:10px;white-space:nowrap}
.card-catalog-modal .catalog-toolbar .catalog-add-btn{padding:5px 6px;min-width:0;height:32px;font-size:11px;white-space:nowrap}
.card-catalog-modal .catalog-toolbar>.full-backup-actions{grid-column:1/-1;width:100%;margin-top:3px}
@media(max-width:900px){.card-catalog-modal .catalog-toolbar{grid-template-columns:145px 98px 105px 95px 85px 145px 68px 104px;gap:4px}.card-catalog-modal .catalog-toolbar input{flex-basis:auto}}

/* Image-backed capture controls: the supplied illustrations ARE the buttons. */
#pointMenu.graphic-point-menu{position:absolute!important;right:auto!important;bottom:auto!important;display:block!important;box-sizing:border-box;width:min(380px,calc(100% - 8px))!important;height:auto!important;aspect-ratio:1;min-width:0!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;transform:none!important;z-index:28!important;pointer-events:none}
#pointMenu.graphic-point-menu[hidden]{display:none!important}
#pointMenu .point-menu-artwork{display:block;width:100%;height:100%;object-fit:contain;user-select:none;pointer-events:none;filter:drop-shadow(0 5px 6px #0008)}
#pointMenu .point-menu-hotspots{position:absolute;inset:0;display:block;pointer-events:none}
#pointMenu .point-hotspot{position:absolute;display:block!important;z-index:2;box-sizing:border-box;width:33%!important;height:33%!important;min-width:0!important;min-height:0!important;max-width:none!important;margin:0!important;padding:0!important;transform:translate(-50%,-50%)!important;border:0!important;border-radius:50%!important;background:transparent!important;color:transparent!important;font-size:0!important;line-height:0!important;box-shadow:none!important;cursor:pointer;pointer-events:auto;opacity:1!important;touch-action:manipulation}
#pointMenu .point-hotspot[hidden]{display:none!important}
#pointMenu .point-hotspot:hover:not(:disabled){background:#ffffff25!important;box-shadow:0 0 0 2px #fff5b6af!important}
#pointMenu .point-hotspot:focus-visible{outline:3px solid #fff3a2;outline-offset:2px}
#pointMenu .point-hotspot:disabled{cursor:not-allowed;opacity:1!important;background:#00000055!important;box-shadow:inset 0 0 13px #0009!important}
#pointMenu .point-menu-a11y{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;pointer-events:none}
#pointMenu .point-menu-progress{position:absolute;left:26%;right:26%;top:47%;padding:6px 4px;border:1px solid #f3d485;border-radius:6px;background:#132e45ed;color:#fff0c3;text-align:center;font-size:11px;font-weight:850;pointer-events:none}
#pointMenu .point-menu-progress[hidden]{display:none!important}
@media(max-width:900px){
 #pointMenu.graphic-point-menu{width:min(300px,calc(100% - 8px))!important;height:auto!important}
}
@media(min-width:740px) and (max-width:900px) and (orientation:landscape){
 .battle-shell>.lower-ui.hand-with-strategist{grid-template-columns:minmax(0,1fr) minmax(180px,32%)!important}
 .lower-ui.hand-with-strategist>.hand-panel{grid-column:1!important}
 .lower-ui.hand-with-strategist>.strategist-panel{display:grid!important;grid-column:2!important;grid-row:2!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .lower-ui.hand-with-strategist .strategist-command-row{grid-template-columns:minmax(0,1fr) minmax(0,.66fr)!important}
 .lower-ui.hand-with-strategist #strategistLaneButtons{display:none!important}
}

/* Original artwork gallery: each map has a separate locally persisted image and layout. */
.map-gallery-backdrop:not([hidden]){position:fixed;inset:0;z-index:9000;display:grid;place-items:center;background:#020c16d9;padding:14px}
.map-gallery-backdrop[hidden]{display:none!important}
.map-gallery-dialog{width:min(1150px,96vw);max-height:92vh;overflow:auto;padding:16px;border:1px solid #79abc9;border-radius:15px;background:#0a1c2c;color:#eaf4fb;box-shadow:0 20px 70px #000e}
.map-gallery-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:12px}.map-gallery-head div{display:grid;gap:5px}.map-gallery-head strong{font-size:19px}.map-gallery-head small,.map-gallery-tools small{font-size:11px;color:#c3d8e6}.map-gallery-head button{font-size:24px;min-width:36px;min-height:36px;background:#163950;color:white;border:1px solid #789bb4;border-radius:8px}
.map-gallery-tools{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 12px}.map-gallery-import{display:inline-flex;align-items:center;gap:8px;padding:8px;border:1px solid #c7a36a;border-radius:8px;background:#314c3d;font-size:12px;font-weight:800}.map-gallery-import input{max-width:240px;font-size:11px}
.map-gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.map-gallery-tile{min-width:0;border:1px solid #476981;border-radius:11px;overflow:hidden;background:#142d3d}.map-gallery-tile.selected{border:2px solid #ffe18d}.map-gallery-preview{display:grid;place-items:center;width:100%;aspect-ratio:16/9;padding:0;border:0;background:#15344b;color:#b8d3e3;cursor:pointer;font-weight:800}.map-gallery-preview:disabled{cursor:default}.map-gallery-preview img{display:block;width:100%;height:100%;object-fit:cover}.map-gallery-tile-footer{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:7px;font-size:11px;font-weight:800}.map-gallery-replace{position:relative;overflow:hidden;flex:none;padding:5px 8px;border:1px solid #76a3c2;border-radius:6px;background:#1b4b6c;cursor:pointer;font-size:10px}.map-gallery-replace input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.map-gallery-status{margin:10px 0 0;font-size:12px;color:#e6ce91}

/* Cost circles overlap the upper-right corner by ~20% of their area. */
#hand,#hand .command-card,.hand-panel{overflow:visible!important}
.prod-upgrade-en{width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;top:-4.5px!important;right:-4.5px!important;box-sizing:border-box!important;border:2px solid #f1db91!important;background:linear-gradient(to top,#ffd342 0 var(--en-charge,0%),#080b11 var(--en-charge,0%) 100%)!important;color:#fff!important;box-shadow:0 2px 8px #000b!important;z-index:10!important;transition:background-color .12s ease!important}
.prod-upgrade-en::before{display:none!important}.prod-upgrade-en .prod-upgrade-cost{font-size:12px!important;color:#fff;text-shadow:0 1px 2px #000}.prod-upgrade-en.is-charged .prod-upgrade-cost{color:#302306!important;text-shadow:0 1px 0 #fff7a5!important}.prod-upgrade-en:disabled{opacity:1!important}
/* Capture image and all hit zones shrink together; menu avoids hand HUD via positionRadialMenu. */
#pointMenu.graphic-point-menu{width:min(252px,calc(100% - 8px),calc(100dvh - 88px))!important;height:auto!important;aspect-ratio:1!important;z-index:80!important}
#choicePanel.hand-deploy-choice{position:fixed!important;z-index:90!important;max-height:40vh!important;overflow:auto!important;box-shadow:0 8px 28px #000e!important}
.common-rules-dialog{width:min(540px,95vw)}.common-rules-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.common-rules-grid label{display:grid;gap:5px;font-weight:800;font-size:12px}.common-rules-grid input{width:100%;box-sizing:border-box;padding:9px;background:#112c40;color:white;border:1px solid #7ca3bb;border-radius:6px}.common-rules-dialog p{font-size:11px;color:#bed0de}.common-rules-dialog #commonRulesSave{padding:11px;border:1px solid #9dceaf;background:#1e6650;color:#fff;font-weight:900;border-radius:8px;cursor:pointer}

/* Cost tags are visible beside image-backed capture actions, not hidden in hit zones. */
#pointMenu.graphic-point-menu .point-cost-tag{position:absolute;z-index:6;transform:translate(-50%,-50%);display:block;min-width:27px;padding:2px 4px;border:1px solid #f5d876;border-radius:10px;background:#1a1c20eb;color:#ffe17e;font:900 10px/1.1 system-ui,sans-serif;text-align:center;white-space:nowrap;text-shadow:0 1px 2px #000;box-shadow:0 2px 5px #000b;pointer-events:none;}
#pointMenu.graphic-point-menu .point-cost-tag.unavailable{border-color:#95876d;color:#a6a9ae;background:#15171cde}

/* Point menu actions align with their painted circles; each touch target is at least ~55px on desktop. */
#pointMenu .point-facility-name{position:absolute;z-index:5;left:50%;top:15.5%;width:30%;max-height:36px;display:grid;place-items:center;transform:translate(-50%,-50%);padding:5px 2px;border-radius:14px;background:#253a3df5;color:#f9e7af;font:800 clamp(9px,1.5vw,12px)/1.13 system-ui,sans-serif;text-align:center;pointer-events:none;box-shadow:0 1px 5px #000b}
#pointMenu .point-hotspot:not([hidden]):active:not(:disabled){background:#ffeb9360!important;box-shadow:0 0 0 3px #ffefa4!important}
.capture-admin-title{font-size:13px;margin:13px 0 5px;color:#ffdf90}
.capture-admin-grid{display:grid;grid-template-columns:minmax(52px,.8fr) repeat(4,minmax(62px,1fr));gap:5px;align-items:center}
.capture-admin-grid>.capture-admin-head{color:#e4d59e;font:750 10px/1.3 system-ui,sans-serif;text-align:center}
.capture-admin-grid strong{font-size:12px;text-align:center}
.capture-admin-grid input{min-width:0;width:100%;height:32px;box-sizing:border-box;border-radius:5px;border:1px solid #547c8d;background:#112c40;color:#fff;text-align:center;font-size:12px}
.common-rules-dialog{width:min(680px,95vw)!important;max-height:min(85dvh,800px);overflow-y:auto}
@media(max-width:900px){#pointMenu.graphic-point-menu{width:min(240px,calc(100% - 8px),calc(100dvh - 82px))!important}}
/* Keep all three strategist actions finger-sized on compact battle HUDs. This
   adjusts only the active strategist panel, not every hand or production card. */
@media (max-width:900px), (pointer:coarse){
 .ref-screen-b .battle-shell>.lower-ui:has(>.strategist-panel.mobile-active),
 .ref-screen-b .battle-shell>.lower-ui.hand-with-strategist{
  --card-height:clamp(117px,20vh,138px);
 }
 #strategistSkills button{touch-action:manipulation;min-height:32px!important;}
}

/* Compact shared-skill values, leave the skill name readable. */
.skill-mode .db-system-table input.skill-three-digit{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:none!important;padding:4px 2px!important;text-align:center;font-variant-numeric:tabular-nums}.skill-mode .db-system-table input.skill-name-input{width:100%!important;min-width:0!important}.skill-mode .db-system-table td{padding:3px 2px!important;white-space:nowrap}.skill-mode .db-system-table select{width:100%!important;max-width:none!important}

/* Six production slots: two per lane, compact route-only popover. */
#productionSlots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));grid-auto-flow:column;gap:5px;height:var(--card-height);overflow:visible}
#productionSlots .prod-slot{min-height:0;min-width:0;border-radius:10px;overflow:hidden;position:relative}
#productionSlots .prod-main{height:100%;min-height:0;padding:0;width:100%;border-radius:8px}
#productionSlots .prod-controls,#productionSlots .prod-lanes,#productionSlots .prod-queue{display:none!important}
#productionSlots .prod-slot-plus{font-size:19px}
#productionSlots .prod-card-caption{padding:2px 1px;bottom:1px;line-height:1.05}
#productionSlots .prod-card-caption strong{font-size:9px}
#productionSlots .prod-card-caption small{font-size:8px}
#productionSlots .prod-lane-badge{position:absolute;top:3px;left:3px;z-index:3;pointer-events:none;color:#ccefff;background:#0c2036e8;border:1px solid #88ccec55;border-radius:4px;padding:2px 4px;font-size:9px;line-height:1.1}
#productionSlots .prod-upgrade-en{right:2px;top:3px;width:22px;height:22px;font-size:10px;z-index:4}
#prodCommandMenu.production-lane-menu{position:fixed;inset:auto;transform:none;display:flex;align-items:center;gap:4px;width:max-content;min-width:0;height:auto;min-height:0;padding:6px;border:1px solid #7eacc54d;border-radius:12px;background:linear-gradient(145deg,#172c3bf7,#0a1624fc);box-shadow:0 8px 24px #0008;z-index:10000;backdrop-filter:blur(14px)}
#prodCommandMenu.production-lane-menu[hidden]{display:none!important}
#prodCommandMenu.production-lane-menu>*{display:none!important}
#prodCommandMenu.production-lane-menu>.lane-option{display:block!important;position:static;transform:none;width:50px;height:34px;min-width:0;margin:0;padding:0;border:1px solid transparent;border-radius:7px;background:transparent;color:#c7d8e8;font:600 12px sans-serif;box-shadow:none;cursor:pointer}
#prodCommandMenu.production-lane-menu>.lane-option:hover,#prodCommandMenu.production-lane-menu>.lane-option:focus-visible{background:#28516c;outline:1px solid #91dfff}
#prodCommandMenu.production-lane-menu>.lane-option.active{background:#23465c;border-color:#78cdeb66;color:#e8faff}

#productionSlots .prod-slot{height:100%;aspect-ratio:auto;padding:2px}
#productionSlots .prod-upgrade-en{right:2px!important;top:2px!important;width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important}
#productionSlots .prod-upgrade-en .prod-upgrade-cost{font-size:10px!important}

#choicePanel.hand-deploy-choice{padding:5px!important;border-radius:9px!important}
#choicePanel.hand-deploy-choice .choice-head{font-size:11px;margin:0 0 3px;padding:0}
#choicePanel.hand-deploy-choice .choice-body{display:flex!important;gap:4px}
#choicePanel.hand-deploy-choice .choice-body button{flex:1;min-width:0;min-height:32px;padding:5px 3px;font-size:12px;text-align:center;white-space:nowrap}

#heroStatus .hero-unit-entry:has(.empty-field-slot){grid-template-columns:minmax(0,1fr)!important}
#heroStatus .hero-unit-entry:has(.empty-field-slot) .hero-equipped-items{display:none!important}

.ref-screen-b .ref-bottom-assistant{bottom:calc(clamp(84px,7.64vw,126px) + 24px)}
@media(max-width:900px){
 .ref-screen-b .field-command-panel{position:absolute;right:0;bottom:calc(var(--card-height) + 8px);width:min(360px,50vw);height:72px;z-index:7}
 #heroStatus{height:100%}
 .ref-screen-b .ref-bottom-assistant{display:none}
 #heroStatus .hero-unit-entry .hero-equipped-items{max-width:12px}
}

.command-actions>.enemy-difficulty-label{display:flex;flex:0 0 62px;flex-direction:column;justify-content:center;gap:3px;font-size:10px;border:1px solid #a8d6f1;border-radius:8px;background:#13334e;padding:3px}
.command-actions>.enemy-difficulty-label select{width:54px;min-height:26px;color:#ffe6a3;background:#0b253e;border:1px solid #698caa;border-radius:5px}
.command-actions>#upcomingCardsBtn{flex:0 0 45px;font-size:10px}
@media(max-width:900px){.command-actions>.enemy-difficulty-label{display:flex!important;flex-basis:58px;font-size:8px;height:42px;box-sizing:border-box;padding:2px}.command-actions>.enemy-difficulty-label select{width:50px;min-height:22px;height:22px;padding:1px 3px;font-size:10px}.ref-screen-b .command-actions>#upcomingCardsBtn{display:flex!important;flex:0 0 42px;height:42px;font-size:9px}}
