@import url("./start-polish.css");
/* Clear, tactile command surfaces. The settlement stays the visual focus. */
#frame.command-ui{--cmd-accent:#66d6ec;--cmd-ink:#152937;--cmd-panel:#112b39;--cmd-paper:#fff5dc;--cmd-line:rgba(153,209,220,.24)}
html[data-faction=flat] #frame.command-ui,#frame.command-ui[data-command-faction=flat]{--cmd-accent:#ffcb6b;--cmd-panel:#2a303c}
html[data-faction=reptile] #frame.command-ui,#frame.command-ui[data-command-faction=reptile]{--cmd-accent:#a3e782;--cmd-panel:#193d39}
/* Home ledger and command controls share the warm surfaces of the field panels. */
.command-ui #hudRoot.hud2{
 --hud2-res:clamp(310px,49cqw,540px);--hud2-verb:132px;
 --hud-stock:#2c2922;--hud-text:#635038;--hud-edge:#c1a677;
 --hud-material:linear-gradient(180deg,#fff8e8,#eddbb5);
 --hud-shadow:0 2px 0 #7a674d,0 4px 9px #302c2540;
}
.command-ui #hudRoot.hud2 .hud-shade{
 background:linear-gradient(180deg,#2428203d,transparent 16%,transparent 80%,#24282035);opacity:1;
}
.command-ui #hudRoot.hud2 .hud-profile{width:clamp(152px,25cqw,260px);align-items:flex-start;gap:9px}
.command-ui #hudRoot.hud2 .hud-avatar{
 width:56px;height:56px;min-width:56px;border:2px solid #f6e4b9;
 box-shadow:0 2px 0 #665539,0 5px 10px #20212555;background-color:var(--cmd-panel);
}
.command-ui #hudRoot.hud2 .hud-avatar::before{opacity:.12}
.command-ui #hudRoot.hud2 .hud-name{padding:0;text-align:left;min-height:44px;color:#fff6de;text-shadow:0 2px 2px #26261d}
.command-ui #hudRoot.hud2 .hud-name-tx{max-width:100%;font-size:clamp(13px,1.9cqw,20px);letter-spacing:-.035em;font-weight:900}
.command-ui #hudRoot.hud2 .hud-league{
 min-height:44px;border:1px solid var(--hud-edge);border-radius:8px;background:var(--hud-material);
 box-shadow:var(--hud-shadow);padding:3px 8px;gap:5px;color:var(--hud-stock);
}
.command-ui #hudRoot.hud2 .hud-league .hud-num,
.command-ui #hudRoot.hud2 .hud-league .lg-name{color:var(--hud-stock);text-shadow:none}
.command-ui #hudRoot.hud2 .hud-league .lg-name{border-color:#bca779}
.command-ui #hudRoot.hud2 .hud-res-stack{position:relative;margin-left:auto;width:min(var(--hud2-res),calc(100% - 160px))}
.command-ui #hudRoot.hud2 .hud-res{
 display:flex;align-items:stretch;justify-content:flex-end;gap:0;padding:0;
 border-radius:10px;background:var(--hud-material);box-shadow:var(--hud-shadow);
}
.command-ui #hudRoot.hud2 .hud-res:not(:has([data-res=intel]:not([hidden]))){
 max-width:calc(100% - min(10cqw,72px));margin-left:auto;
}
.command-ui #hudRoot.hud2 .hud-res .res-pill{
 flex:1 1 0;width:auto;max-width:none;height:48px;min-height:48px;
 border:1px solid var(--hud-edge);border-right:0;border-radius:0;background:none;
 box-shadow:none;padding:0 9px 0 34px;
}
.command-ui #hudRoot.hud2 .hud-res .res-pill[data-res=credits]{border-radius:10px 0 0 10px;--stock-fill:#a5702e}
.command-ui #hudRoot.hud2 .hud-res .res-pill[data-res=energy]{--stock-fill:#38765f}
.command-ui #hudRoot.hud2 .hud-res .res-pill[data-res=intel]{--stock-fill:#3d709d}
.command-ui #hudRoot.hud2 .hud-res .res-pill :is(.res-val,.res-tk-name){color:var(--hud-stock);text-shadow:none}
.command-ui #hudRoot.hud2 .res-pill::before{background-image:none}
.command-ui #hudRoot.hud2 .hud-res .res-pill::after{inset:0;background-image:none}
.command-ui #hudRoot.hud2 .hud-res .res-pill .res-ico{width:30px;height:32px;left:3px;filter:none}
.command-ui #hudRoot.hud2 .hud-res .res-val{
 display:flex;height:100%;align-items:center;justify-content:flex-end;
 padding:0 0 5px;font-family:var(--ord-ko);font-size:clamp(13px,1.8cqw,20px);
 font-weight:900;font-variant-numeric:tabular-nums;line-height:1;letter-spacing:-.035em;
}
.command-ui #hudRoot.hud2 .res-track{inset:auto 8px 5px;height:4px;border:0;border-radius:3px;box-shadow:none;background:#9c815545}
.command-ui #hudRoot.hud2 .res-track i{background:var(--stock-fill);border-radius:3px;box-shadow:none}
.command-ui #hudRoot.hud2 .res-track::after{content:none}
.command-ui #hudRoot.hud2 .hud-res .res-pill.is-brim{background:#f3da9f}
.command-ui #hudRoot.hud2 .hud-res .res-brim{
 left:auto;right:5px;bottom:-13px;padding:1px 5px;font-size:10px;
 background:#ffe2a4;border:1px solid #b88443;box-shadow:0 1px 2px #3c2b2260;color:#57371d;
}
.command-ui #hudRoot.hud2 .hud-res .res-tickets{
 position:relative;top:auto;right:auto;flex:0 0 60px;width:60px;min-width:60px;
 padding-left:25px;border-right:1px solid var(--hud-edge);border-radius:0 10px 10px 0;background:#e8cca0;
}
.command-ui #hudRoot.hud2 .hud-res .res-tickets .res-ico{width:23px;height:25px;top:46%;left:3px}
.command-ui #hudRoot.hud2 .hud-res .res-tickets .res-val{padding-bottom:11px}
.command-ui #hudRoot.hud2 .hud-res .res-tickets .res-tk-name{color:var(--hud-text);font-size:9px;bottom:3px}
.command-ui #hudRoot.hud2 .hud-res .res-tickets .coc-tk-lock{left:1px;bottom:3px;width:12px;height:12px;filter:none}
.command-ui #hudRoot.hud2 .hud-res .hud-shield{
 position:absolute;top:calc(100% + 8px);right:0;width:auto;min-width:82px;
 height:44px;min-height:44px;padding:4px 8px 4px 25px;border:1px solid var(--hud-edge);
 background:var(--hud-material);border-radius:9px;box-shadow:var(--hud-shadow);gap:6px;
}
.command-ui #hudRoot.hud2 .hud-shield .chip-ico{left:5px;filter:none}
.command-ui #hudRoot.hud2 :is(.hud-shield,.coc-vault) b{color:var(--hud-stock);font-size:12px;text-shadow:none}
.command-ui #hudRoot.hud2 .hud-vault-host{width:min(190px,100%);margin:8px 0 0 auto}
.command-ui #hudRoot.hud2 .hud-res-stack:has(.hud-shield:not([hidden])) .hud-vault-host{
 width:min(190px,calc(100% - 154px));margin-right:154px;
}
.command-ui #hudRoot.hud2 .hud-vault-host:not(:has(.coc-vault:not(.is-empty))){display:none}
.command-ui #hudRoot.hud2 .coc-vault{
 height:44px;min-height:44px;border:1px solid var(--hud-edge);border-radius:9px;
 background:var(--hud-material);box-shadow:var(--hud-shadow);padding:4px 9px 4px 28px;
}
.command-ui #hudRoot.hud2 .coc-vault .chip-text small{color:var(--hud-text);text-shadow:none}
.command-ui #hudRoot.hud2 .coc-vault .hud-num{color:var(--hud-stock)}
.command-ui #hudRoot.hud2 .hud-rail{top:115px;right:max(6px,var(--sa-r));gap:8px}
.command-ui #hudRoot.hud2 .rail-btn{
 width:48px;height:48px;border:1px solid var(--hud-edge);border-radius:11px;
 background:var(--hud-material);box-shadow:var(--hud-shadow);
 grid-template-rows:24px 12px;place-content:center;gap:1px;
}
.command-ui #hudRoot.hud2 .rail-btn::before,.command-ui #hudRoot.hud2 .rail-btn::after{opacity:0}
.command-ui #hudRoot.hud2 .rail-btn .rail-ico{width:23px;height:23px;margin:0;filter:none}
.command-ui #hudRoot.hud2 .rail-btn .rail-label{
 position:static;transform:none;padding:0;color:var(--hud-stock);font-size:10px;font-weight:900;
 text-shadow:none;background:none;border:0;box-shadow:none;
}
.command-ui #hudRoot.hud2 .ss-entry .ss-tag{
 inset:4px auto auto auto;right:calc(100% + 4px);min-width:0;padding:0 4px;transform:none;
 font-size:9px;color:#634018;background:#fff0c6;border:1px solid #c3a06d;box-shadow:0 1px 2px #52382155;
}
.command-ui #hudRoot.hud2 .hud-bottom.hud-verbs{
 bottom:max(7px,var(--sa-b));left:max(6px,var(--sa-l));right:max(6px,var(--sa-r));
}
.command-ui #hudRoot.hud2 .hud-verb-right{flex-direction:row;align-items:flex-end;gap:7px}
.command-ui #hudRoot.hud2 .hud-attack{
 --action-rim:#ffc7a7;--action-floor:#773525;--action-shadow:#642c21;--action-groove:#61251a59;
 position:relative;width:132px;height:61px;min-height:61px;border:1px solid var(--action-rim);border-radius:13px;
 background:linear-gradient(180deg,#b34f37,#913420);
 box-shadow:inset 0 1px 0 #ffffff59,0 3px 0 var(--action-floor),0 6px 13px #20251c67;
 overflow:visible;clip-path:none;padding:4px 10px;
}
.command-ui #hudRoot.hud2 .hud-attack::before,.command-ui #hudRoot.hud2 .hud-attack::after{display:none}
.command-ui #hudRoot.hud2 .hud-attack .atk-medal{
 position:absolute;left:6px;top:50%;width:42px;height:42px;transform:translateY(-50%);
 border:1px solid #ffffff39;background:var(--action-groove);box-shadow:inset 0 1px 3px #2c210c50;filter:none;
}
.command-ui #hudRoot.hud2 .hud-attack .atk-medal::before{display:none}
.command-ui #hudRoot.hud2 .hud-attack .atk-label{
 padding-left:37px;color:#fff8e7;font-size:23px;font-weight:950;
 text-shadow:0 1px 2px var(--action-shadow);letter-spacing:-.04em;line-height:1.1;
}
.command-ui #hudRoot.hud2 .atk-sub{display:none}
.command-ui #hudRoot.hud2 .hud-attack.is-build{
 --action-rim:#d3e8ed;--action-floor:#203f55;--action-shadow:#152a3d;--action-groove:#142d4d60;
 background:linear-gradient(180deg,#416e8d,#264b6c);
}
.command-ui #hudRoot.hud2 :is(.hud-attack.is-build,.rail-btn,.res-tickets,.hud-builders,.coc-vault)>.dot{
 top:5px;right:5px;width:11px;height:11px;margin:0;border:2px solid #fff0d1;box-shadow:0 1px 2px #142e4488;
}
.command-ui #hudRoot.hud2 .hud-builders>.dot{top:-4px;right:-4px}
.command-ui #hudRoot.hud2 .hud-attack:active,
.command-ui #hudRoot.hud2 .hud-attack.is-pressed{
 transform:translateY(2px);box-shadow:inset 0 1px 0 #ffffff59,0 1px 0 var(--action-floor),0 3px 8px #20251c67;
}
.command-ui #hudRoot.hud2 .hud-builders,
.command-ui #hudRoot.hud2 .hud-revenge{
 border:1px solid var(--hud-edge);border-radius:10px;background:var(--hud-material);
 box-shadow:var(--hud-shadow);color:var(--hud-stock);
}
.command-ui #hudRoot.hud2 .hud-builders{height:44px;min-height:44px;min-width:88px;padding:4px 9px 4px 32px}
.command-ui #hudRoot.hud2 .hud-builders .chip-text{display:flex;flex-direction:column;line-height:1.05;gap:2px}
.command-ui #hudRoot.hud2 .hud-builders .chip-text small{display:block;color:var(--hud-text);font-size:10px;text-shadow:none}
.command-ui #hudRoot.hud2 .hud-builders .chip-text b{color:var(--hud-stock);font-size:15px;text-shadow:none}
.command-ui #hudRoot.hud2 .hud-idle-tip{
 top:auto;bottom:calc(100% + 10px);color:#553416;background:#fff1cb;
 border:1px solid #b68e52;font-size:11px;border-radius:7px;box-shadow:var(--hud-shadow);
}
.command-ui #hudRoot.hud2 .hud-idle-tip::before{
 top:auto;bottom:-5px;background:#fff1cb;border:0;border-bottom:1px solid #b68e52;border-right:1px solid #b68e52;
}
.command-ui #hudRoot.hud2 button:focus-visible{outline:3px solid #304c70;outline-offset:2px}

.command-ui .pn-frame:where(:not(.pn-custom-chrome)){background:#142e3bf5!important;border:1px solid #9ab4ac!important;border-radius:16px!important;box-shadow:0 8px 30px #06182188!important;color:#f4efd9}
.command-ui .pn-frame:where(:not(.pn-custom-chrome))::before,.command-ui .pn-frame:where(:not(.pn-custom-chrome))::after{opacity:.08!important;pointer-events:none}
.command-ui :where(.pn-frame:not(.pn-custom-chrome)) .pn-head{background:linear-gradient(100deg,#23434c,#172f3e)!important;border-bottom:1px solid #84aaa23d!important;border-radius:15px 15px 0 0;padding-top:8px;padding-bottom:8px}
.command-ui :where(.pn-frame:not(.pn-custom-chrome)) .pn-head h2{color:#fff5d7;font-size:clamp(19px,2.6cqw,28px);letter-spacing:-.04em;text-shadow:none}
.command-ui .pn-head .ord-file,.command-ui .pn-head .pn-doc{display:none}
.command-ui :where(.pn-frame:not(.pn-custom-chrome)) .pn-head-ic{background:#173442!important;border:1px solid #9db9aa!important;box-shadow:none!important}
.command-ui :where(.pn-frame:not(.pn-custom-chrome)) .pn-body{background:#142e3b!important;scrollbar-color:#779b9c #142e3b}
.command-ui :where(.pn-frame:not(.pn-custom-chrome)) .pn-foot{background:#1a3744!important;border-top:1px solid #84aaa23d!important;border-radius:0 0 15px 15px}
.command-ui :where(.pn-frame:not(.pn-custom-chrome)) .pn-x{background:#183744!important;border:1px solid #9db9aa!important;box-shadow:0 2px 0 #0b222d!important;border-radius:10px!important}
.command-ui .pn-btn:where(:not(.pn-custom-chrome .pn-btn)),.command-ui .hubs-tabs button,.command-ui .hs-button{border-radius:9px!important;box-shadow:0 2px 0 #071b2777!important;background-image:none}
.command-ui .hubs-tabs{gap:6px;padding:6px 0;border:0}
.command-ui .hubs-tabs button{background:#203e4c;color:#dce9df;border:1px solid #7b9a9855;min-height:44px}
.command-ui .hubs-tabs button.on,.command-ui .hs-button[aria-pressed=true]{background:#ecd4a0!important;color:#1d3540!important;border-color:#fff4ca!important}
.command-ui .pn-p-heroes .pn-body{display:flex;flex-direction:column;min-height:0}
.command-ui .pn-p-heroes .pn-heroes{flex:1;min-height:0;height:auto;grid-template-columns:minmax(145px,28%) 1fr;gap:14px}
.command-ui .pn-p-heroes .pn-hero-list{grid-template-columns:repeat(2,minmax(0,1fr))}
.command-ui .pn-p-heroes .pn-hero-tile{border-radius:10px;background:#24424c;border:1px solid #789895}
.command-ui .pn-p-heroes .pn-hero-tile.on{border:2px solid #f9d99e;background:#36545a}
.command-ui .pn-p-heroes .pn-hd{background:none;border:0;box-shadow:none}
.command-ui .pn-p-heroes .pn-hd-name h3{font-size:clamp(18px,2.6cqw,27px);color:#fff2cb;text-shadow:none}
.command-ui .pn-p-heroes .pn-foot{align-items:stretch;gap:12px;padding:8px 12px}
.command-ui .pn-p-heroes .pn-foot .pn-upgrade{display:flex;align-items:center;gap:8px;flex:1}
.command-ui .pn-p-heroes .pn-upgrade-cost{background:none;border:0;box-shadow:none;padding:0;flex:1;font-size:12px}
.command-ui .pn-p-heroes .hs-controls{flex:1.3;display:flex;gap:5px 8px;align-items:center;flex-wrap:wrap}
.command-ui .pn-p-heroes .hs-work{flex-basis:100%}
.command-ui .pn-p-heroes .hs-cosmetic{display:none}
.command-ui .pn-p-heroes .hs-variants small{display:none}
.command-ui .pn-p-heroes .hs-variants{flex-wrap:nowrap}
.command-ui .pn-p-heroes .hs-button{min-height:44px;color:#f5ecd4;background:#244855;border:1px solid #8cb0ab;font-size:12px;padding:5px 9px}
@container frame (max-width:700px){
 .command-ui #hudRoot.hud2{--hud2-res:clamp(280px,57cqw,400px)}
 .command-ui #hudRoot.hud2 .hud-profile{width:160px}
 .command-ui #hudRoot.hud2 .hud-avatar{width:44px;height:44px;min-width:44px}
 .command-ui #hudRoot.hud2 .hud-res .res-pill{height:44px;min-height:44px;padding-left:27px;padding-right:5px}
 .command-ui #hudRoot.hud2 .hud-res .res-pill .res-ico{width:24px;height:26px}
 .command-ui #hudRoot.hud2 .hud-res .res-tickets{flex-basis:50px;min-width:50px}
 .command-ui #hudRoot.hud2 .hud-attack{width:112px;height:56px;min-height:56px}
 .command-ui #hudRoot.hud2 .hud-attack .atk-label{font-size:21px}
 .command-ui .pn-p-heroes .pn-heroes{grid-template-columns:132px 1fr;gap:9px}
 .command-ui .pn-p-heroes .pn-foot{gap:7px}
 .command-ui .pn-p-heroes .pn-foot .pn-upgrade{flex:.8;flex-wrap:wrap}
 .command-ui .pn-p-heroes .pn-foot .hs-controls{flex:1.5}
}
@media(prefers-reduced-motion:reduce){.command-ui #hudRoot *{transition:none!important}}

.command-ui .pn-p-heroes .pn-hd{grid-template-columns:96px minmax(0,1fr);gap:10px}
.command-ui .pn-p-heroes .pn-hd-art .ag-pt{max-height:132px;aspect-ratio:3/4}
.command-ui .pn-p-heroes .pn-hd-info{min-width:0}
.command-ui .pn-p-heroes .pn-hd-info>.ord-file,.command-ui .pn-p-heroes .pn-hd-info>.ord-memo{display:none}
.command-ui .pn-p-heroes .pn-hd-lv{margin-top:7px;gap:6px;min-height:30px}
.command-ui .pn-p-heroes .pn-hd-lvmed{width:32px;height:32px;min-width:32px}
.command-ui .pn-p-heroes .pn-hd-lvmed b{font-size:19px}
.command-ui .pn-p-heroes .pn-hd-name{margin-bottom:6px;gap:6px}
.command-ui .pn-p-heroes .pn-hd-fx{grid-column:1/-1}
.command-ui .pn-p-heroes .hs-head{margin-bottom:8px;flex-shrink:0}
.command-ui .pn-p-heroes .hs-variants small{display:block;flex-basis:auto;max-width:110px;font-size:11px}
.command-ui .pn-p-heroes .pn-head .pn-btn{color:#fff2cf!important;border-color:#b4cfbe88}
@container frame (max-width:700px){.command-ui .pn-p-heroes .pn-hd{grid-template-columns:76px minmax(0,1fr);gap:8px}.command-ui .pn-p-heroes .pn-hd-name h3{font-size:17px}}
/* The guide gives the next action a bright, readable surface above the village. */
.command-ui .coc-guide{background:linear-gradient(150deg,#fffcf3,#f3e5c6);border:1px solid #d9bc7b;border-radius:14px;box-shadow:0 3px #a98d55,0 9px 24px #0a223855;color:#242d3d}
.command-ui .guide.coc-guide.fj-goal{
 color:#2c2922;border:1px solid #c1a677;border-radius:10px;
 background:linear-gradient(180deg,#fff8e8,#eddbb5);box-shadow:0 2px 0 #7a674d,0 4px 9px #302c2540;
}
.command-ui .fj-goal button{min-height:44px;color:#5a4630}
.command-ui .fj-goal button + button{border-color:#c5ac82;color:#27455c}
.command-ui .fj-goal button span{color:#3b5c77}
.command-ui .fj-goal button:focus-visible{outline-color:#304c70}
.command-ui .coc-guide::before,.command-ui .coc-guide::after{opacity:.05;pointer-events:none}
.command-ui .coc-guide .guide-ribbon{background:#deebfc;color:#284d86;border:0;border-radius:6px;box-shadow:none;transform:none}
.command-ui .coc-guide .guide-x{background:#fffaf0;border:1px solid #d1bb93;border-radius:9px;box-shadow:none;color:#313c52}
.command-ui .coc-guide .guide-text b{color:#242d3d;text-shadow:none;letter-spacing:-.03em}
.command-ui .coc-guide .guide-text>span{color:#495364;text-shadow:none}
.command-ui .coc-guide .guide2-note{color:#61522f}
.command-ui .coc-guide .guide-count,.command-ui .coc-guide .guide-resume{color:#304f82;text-shadow:none}
.command-ui .coc-guide .guide-dots i{background:#d4c7ab;box-shadow:none}
.command-ui .coc-guide .guide-dots i.done{background:#47765b}
.command-ui .coc-guide .guide-dots i.now{background:#355f9e;box-shadow:0 0 0 2px #cbdcf3}
.command-ui .coc-guide .guide-go{background:linear-gradient(180deg,#3c6fad,#2a4d87);border:1px solid #dfbf7c;border-radius:9px;box-shadow:0 3px #172f63;color:#fffdf0;text-shadow:0 1px #203963}
.command-ui .coc-guide .guide-go::before,.command-ui .coc-guide .guide-go::after{opacity:0}
.command-ui .coc-guide .guide2-face{border-color:#c4ab79;border-radius:9px;box-shadow:none}
.command-ui .coc-guide :is(.guide-go,.guide-x,.guide-resume):focus-visible{outline:3px solid #244e8e;outline-offset:2px}

/* Match interior cards to the command HUD; geometry and interaction stay intact. */
.command-ui .pn-root{--ord-text:#f1efdb;--ord-text-2:#c3d5d0;--ord-text-3:#a6bcb8;--ord-bronze:#587873;--ord-lacq:linear-gradient(155deg,#23434d,#15313e);--ord-recess:linear-gradient(155deg,#183743,#102a36)}
.command-ui :is(.pn-op,.pn-revenge,.pn-box,.pn-mrow,.pn-rep,.pn-stage,.pn-set-row,.pn-league-now,.pn-pf-card,.pn-hd-stat,.pn-queue-empty){background:linear-gradient(155deg,#23434d,#17313f);border-color:#698d8877;box-shadow:0 3px 7px #071b263d;color:#f2efd9}
.command-ui .pn-op.pvp{background:linear-gradient(155deg,#2d4b53,#1a3542);border-color:#b6b286;box-shadow:0 3px 9px #081c2b55}
.command-ui .pn-op::before,.command-ui .pn-op::after{opacity:.035;pointer-events:none}
.command-ui .pn-op-head{border-bottom-color:#8db2a644;background:none}
.command-ui :is(.pn-op-head h3,.pn-revenge h3,.pn-box h3){color:#fff0cc;text-shadow:none}
.command-ui :is(.pn-op-head p,.pn-op-head small,.pn-mrow-main small){color:#c3d5d0;text-shadow:none}
.command-ui :is(.pn-op-ic,.pn-mrow-ic,.pn-bonus-ic,.pn-set-ic,.pn-region-no,.pn-stat-ic){background:#16313e;border-color:#a2bfa188;box-shadow:none;color:#eed39c}
.command-ui .pn-mrow.ready{background:linear-gradient(110deg,#31564e,#1a3943);border-color:#a4c28a}
.command-ui .pn-op-army{background:#0e283599;border-color:#71958c44;box-shadow:none}
.command-ui .pn-op-league{background:#0f2a36;border-color:#829f8744;box-shadow:none}
.command-ui .pn-btn:where(:not(.pn-custom-chrome .pn-btn)):not(.attack):not(.green):not(.red):not(.is-on):not(.gold){background:#244653;color:#f4edcf;border-color:#91aca388;text-shadow:none}
.command-ui .pn-btn.attack{background:linear-gradient(180deg,#e58c61,#c66849);border-color:#f1c49a;color:#fff5de;text-shadow:0 1px #915235}
.command-ui .pn-btn.green{background:linear-gradient(180deg,#76b79a,#4d8f7d);border-color:#c2dfb5;color:#fff8df;text-shadow:0 1px #366356}
/* tri-10: 금박(.gold) = '얻는' 단추(빈 칸 채우기·추천 편성 넣기·받기·모집·거두기). 위 조용한 단추 규칙이 어둡게 덮어 주황 '출동'보다 약해 보이던 것 —
   지휘 테마 결로 다시 칠한다. 막힘·처리 중은 바로 아래 막힘 규칙이 그대로 이긴다(같은 무게, 뒤에 있음) */
.command-ui .pn-btn.gold{background:linear-gradient(180deg,#ffe49e,#f1bf58 58%,#dc9e35);border-color:#fff0c2;color:#2a1a06;text-shadow:0 1px 0 #fff3cf80;box-shadow:0 3px 0 #8a5a14,0 6px 12px #071b2766!important}
.command-ui .pn-btn:disabled,.command-ui .pn-btn[aria-disabled=true],.command-ui .pn-btn.gold:disabled,.command-ui .pn-btn.gold[aria-disabled=true]{background:#29404a;color:#a7b8b3;border-color:#607e78;box-shadow:none!important;text-shadow:none}
.command-ui .pn-root .ord-card{background:linear-gradient(155deg,#284b57,#18313f);box-shadow:0 0 0 1px #142834,0 0 0 3px var(--ord-rim),0 5px 10px #081e2c66}
.command-ui .pn-root .ord-card:is(.off,.locked){background:linear-gradient(155deg,#263a43,#172b36)}
.command-ui .pn-root .ord-card::after{border-color:#c9d9c126}
.command-ui .pn-root .ord-card .pn-card-desc{color:#c3d5d0}
.command-ui .pn-root .ord-card:hover:not([aria-disabled=true]){box-shadow:0 0 0 1px #142834,0 0 0 3px var(--ord-rim),0 8px 15px #081e2c66}
.command-ui .fo-slot{background:#1e3e49;color:#edeed8;border-color:#789c9277;box-shadow:none}
.command-ui .hubs-practice{background:linear-gradient(#fffdf5,#f4e6c7);color:#482c16;border-color:#ba9564;box-shadow:none}
.command-ui .hubs-practice small{color:#694820}
.command-ui .fo-choice{background:#17343f;color:#edf0dd;border-color:#73958b88}
.command-ui .fo-choice.is-selected{background:#36544d;border-color:#d3d39e;box-shadow:inset 0 0 0 1px #d3d39e}
.command-ui .fo-change{background:#31545a;color:#f3edca;border-color:#a1ba9a}
.command-ui .fo-slot small,.command-ui .fo-summary p{color:#c3d5d0}
.command-ui .pn-p-attack .pn-op:not(.pvp){background:linear-gradient(155deg,#23434d,#17313f);border-color:#698d8877;box-shadow:0 3px 7px #071b263d}
.command-ui .pn-p-attack .pn-op:not(.pvp) .pn-btn.ghost{background:#244653;color:#f4edcf;border-color:#91aca388;text-shadow:none}
/* A short viewport must scroll the hero sheet instead of crushing its description. */
@media(max-height:380px){
 .command-ui .pn-frame.pn-p-heroes{overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain}
 .command-ui .pn-p-heroes .pn-head{position:sticky;top:0;z-index:5;padding-right:58px;flex:none}
 .command-ui .pn-p-heroes .pn-head .pn-x{right:5px;top:5px}
 .command-ui .pn-p-heroes .pn-head .ord-doc{display:none}
 .command-ui .pn-p-heroes .pn-body{flex:none;height:auto;min-height:230px;overflow:visible}
 .command-ui .pn-p-heroes .pn-heroes{flex:none;height:auto;min-height:165px;align-items:start}
 .command-ui .pn-p-heroes .pn-hero-side{max-height:200px;position:sticky;top:76px}
 .command-ui .pn-p-heroes .pn-hero-detail{overflow:visible;min-height:165px}
 .command-ui .pn-p-heroes .pn-foot{flex:none;min-height:100px}
}
.command-ui .pn-p-attack .pn-op.pvp{background:linear-gradient(155deg,#2d4b53,#1a3542);border-color:#b6b286;box-shadow:0 3px 9px #081c2b55}
.command-ui .pn-p-attack .pn-op.camp .pn-op-row .pn-btn.ghost{background:#244653;color:#f4edcf;border-color:#91aca388;text-shadow:none}

/* Keep the suggested campaign visible before alternate matchmaking. */
.command-ui .pn-p-attack .pn-op.pvp>.pn-main-go{margin-top:0;flex:none}
.command-ui .pn-p-attack .pn-op.pvp>.pn-main-go .pn-btn.pn-go-btn:not([aria-disabled=true]):not(:disabled){background:linear-gradient(180deg,#e58c61,#c66849);border-color:#f1c49a;color:#fff5de;text-shadow:0 1px #915235}

/* ── tri-10: 부대 창 — 덜 찼으면 '빈 n칸 채우기'(금박·빛)가 주된 단추, 'n/cap으로 출동'은 조용한 작은 단추 ── */
.command-ui .pn-p-heroes .pn-head .pn-btn.gold{color:#2a1a06!important;border-color:#fff0c2}
.command-ui .al-go.cp-go-part .pn-btn.cp-go-small:not(:disabled):not([aria-disabled=true]){background:#244653;border-color:#91aca388;color:#f4edcf;text-shadow:none}
.command-ui .pn-root .pn-btn.gold.cp-fill-go:not(:disabled):not([aria-disabled=true]){box-shadow:0 3px 0 #8a5a14,0 0 0 2px #ffe6a055,0 6px 16px #ffcf6a40!important}
.command-ui .pn-root .pn-btn.gold.cp-fill-go:not(:disabled):not([aria-disabled=true])::after{content:'';position:absolute;inset:-3px;border-radius:12px;pointer-events:none;box-shadow:0 0 12px 2px #ffd56e;opacity:0;animation:cmdFillGlow 2.2s ease-in-out .5s infinite}
@keyframes cmdFillGlow{50%{opacity:.8}}
/* 좁은 화면(667·568): 채우기 글이 단추 밖으로 넘쳐 출동 단추 밑에 깔리던 것 — 낱말 단위로 두 줄, 568 은 출동 단추 그림을 접는다 */
@media (max-width:700px){.command-ui .pn-root .pn-btn.gold.cp-fill-go b{white-space:normal;word-break:keep-all;line-height:1.12}}
@media (max-width:620px){
 .command-ui .pn-root .pn-btn.gold.cp-fill-go{padding:3px 8px;gap:5px}
 .command-ui .pn-root .pn-btn.gold.cp-fill-go b{font-size:13.5px}
 .command-ui .pn-root .al-go.cp-go-part .pn-btn.cp-go-small{padding:0 8px}
 .command-ui .pn-root .al-go.cp-go-part .pn-btn.cp-go-small svg{display:none}
}
@media(prefers-reduced-motion:reduce){.command-ui .pn-root .pn-btn.gold.cp-fill-go::after{animation:none;opacity:.4}}

/* ── tri-12: 출동 창 — 현장지령은 처음엔 접힌 한 줄(.is-fold = .is-summary 고른 것 · .is-pending 아직 안 고름) ── */
.command-ui .fo-slot.is-pending{display:flex;align-items:center;gap:9px;min-height:56px;padding:6px 10px;box-sizing:border-box;border-color:#cdb36f;background:linear-gradient(100deg,#2c4b4c,#1e3e49)}
.command-ui .fo-slot.is-pending .fo-art{width:36px;height:36px;flex-basis:36px}
.command-ui .fo-slot.is-pending .fo-summary-copy>small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.command-ui .fo-arts{display:flex;flex:none;align-items:center}
.command-ui .fo-arts>.fo-art+.fo-art{margin-left:-12px;box-shadow:-2px 0 0 #1e3e49}
.command-ui .fo-change.fo-pick{background:#ecd4a0;color:#1d3540;border-color:#fff4ca;font-weight:800}
.command-ui .fo-slot header>.fo-fold{margin-left:auto;min-width:56px}
/* 휴대폰 가로(낮은 화면): 왼쪽 칸 맨 위가 출동 판(다음 작전·상대 찾기), 접힌 현장지령 줄은 오른쪽 칸 맨 위.
   펼친 고르기 칸(.is-open)은 지금처럼 위 한 줄 전체를 쓴다 */
@media (max-height:520px) and (max-width:1099px){
 .command-ui .pn-p-attack .pn-attack:has(> .fo-slot.is-fold){grid-template-areas:"main orders" "main secondary" "practice practice" "revenge revenge";grid-template-rows:max-content 1fr}
 .command-ui .pn-p-attack .pn-attack:has(> .fo-slot.is-fold)>.pn-op-col{align-self:start}
}
@media (max-height:520px) and (max-width:700px){
 .command-ui .pn-p-attack .fo-slot.is-fold{gap:7px;padding:6px 8px}
 .command-ui .pn-p-attack .fo-slot.is-fold .fo-change{min-width:52px;padding:6px 8px}
}
@media (max-height:520px) and (max-width:620px){
 .command-ui .pn-p-attack .fo-slot.is-fold :is(.fo-arts,.fo-art){display:none}
}

/* ══ pk-g-hud: 화면 정돈(겹침·잘림 없애기 · 결과 창 · 기지 첫 화면 · 개발 메모처럼 보이던 것) ══ */
/* 낱말 중간 줄바꿈 금지('처음 보/는', '지/금'): 한국어는 낱말(띄어쓰기) 단위로만 넘기고, 한 낱말이 칸보다 길 때만 쪼갠다 */
#frame.command-ui{word-break:keep-all;overflow-wrap:break-word}

/* Keep the hat in the worker button, clear of the count and adjacent action. */
.command-ui #hudRoot.hud2 .hud-builders{justify-content:center}
.command-ui #hudRoot.hud2 .hud-builders .chip-ico{left:4px;width:27px;height:27px}
.command-ui #hudRoot.hud2 .hud-builders .chip-text{align-items:center}

/* Independent status labels above the action stay readable when both are present. */
.command-ui #hudRoot.hud2 .hud-attack .fo-hud-badge,
.command-ui #hudRoot.hud2 .hud-attack :is(.hud-practice-tag,.hud-defense-tag){
 top:auto;bottom:calc(100% + 4px);z-index:2;white-space:nowrap;pointer-events:none;
 padding:2px 5px;border:1px solid #a88146;border-radius:5px;color:#4f3620;background:#fff0c6;
 font-size:10px;line-height:1.2;box-shadow:0 1px 2px #52382155;
}
.command-ui #hudRoot.hud2 .hud-attack .fo-hud-badge{right:auto;left:0}
.command-ui #hudRoot.hud2 .hud-attack :is(.hud-practice-tag,.hud-defense-tag){right:0}
.command-ui #hudRoot.hud2 .hud-attack:has(.fo-hud-badge) :is(.hud-practice-tag,.hud-defense-tag){right:auto;left:calc(100% + 4px)}
.command-ui #hudRoot.hud2 .hud-verb-left:has(.fo-hud-badge,.hud-practice-tag:not([hidden]),.hud-defense-tag:not([hidden])){gap:18px}

/* ③ 기지 첫 화면: 별이 하나도 없는 포상 별 칸(빈 별 네 개)은 숨기고, 든 것이 없는 결사 금고(0 · 0 막대)도 접는다 */
.command-ui #hudRoot.hud2 .coc-stars:not(.is-ready):not(.is-claimed):not(:has(.coc-st.on)){display:none!important}
.command-ui #hudRoot.hud2 .coc-vault.is-empty{display:none!important}

/* ③ 다음 목표 카드: 접지 않고(처음 온 손님이 할 일을 읽는다) 높이를 절반쯤으로 — 꼬리표·닫기 한 줄, 제목, 글 + 오른쪽 아래 단추.
   글·흐름은 tutorial.js(다음 단계 pk-guide) 그대로, 여기서는 크기·자리만 */
@container frame (max-height:520px){
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;column-gap:8px;row-gap:2px;padding:6px 6px 7px 10px;width:clamp(252px,35cqw,298px)}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) :is(.guide-head,.guide-body,.guide-text,.guide-foot){display:contents}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) .guide-ribbon{grid-column:1;grid-row:1;justify-self:start;align-self:center;max-width:100%;white-space:normal;word-break:keep-all;line-height:15px;padding-top:1px;padding-bottom:1px}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) .guide-count{grid-column:1;grid-row:1;justify-self:end;align-self:center}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) .guide-x{grid-column:2;grid-row:1/3;justify-self:end;margin:0}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) .guide-icon{display:none}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) .guide-text>b{grid-column:1;grid-row:2;align-self:end;font-size:14px;line-height:1.25}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) .guide-text>span{grid-column:1;grid-row:3;font-size:11.5px;line-height:1.32}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) .guide-text>:not(b):not(span){grid-column:1/-1}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) .guide-dots{grid-column:1;grid-row:4;align-self:center}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) .guide-foot>span:empty{display:none}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) .guide-go{grid-column:2;grid-row:3/5;align-self:end;justify-self:end;padding:0 10px}
 .command-ui .guide.coc-guide:not(.is-collapsed):not(.guide-ch2):not(.fj-goal) .cg-pal{right:-58px;top:46px;width:58px;height:58px}
}

/* ④ 개발 메모처럼 보이던 것: 창 머리 문서 번호는 작고 흐리게, 끝의 검은 가림 막대는 붉은 '기밀' 도장으로 */
.command-ui .ord-doc{padding:0 34px 0 7px;background:linear-gradient(180deg,#f4ecd6,#dccdaa);font-size:10px;line-height:15px;color:rgba(42,29,15,.62);letter-spacing:.03em}
.command-ui .ord-doc b{color:rgba(42,29,15,.78)}
.command-ui .ord-doc::after{content:var(--locale-label-3ace91446569, '기밀');position:absolute;right:4px;top:50%;transform:translateY(-50%) rotate(-7deg);padding:0 3px;border:1.5px solid #b3261c;border-radius:2px;font:900 9px/11px var(--ord-ko,inherit);letter-spacing:.06em;color:#b3261c;background:rgba(255,248,232,.6)}
.rc-root:not([hidden]) .rc-head::before{background:linear-gradient(180deg,#f4ecd6,#dccdaa)!important;padding-right:9px!important;color:rgba(42,29,15,.62)!important;font-size:10px!important}
/* 전투 정찰 이름표 끝 검은 막대 → 작은 '기밀' 도장 */
.command-ui .bt-opp-head::after{content:var(--locale-label-3ace91446569, '기밀');width:auto;height:auto;top:7px;right:7px;padding:0 3px;border:1.5px solid #b3261c;border-radius:2px;background:rgba(255,248,232,.85);font:900 9px/11px var(--ord-ko,inherit);letter-spacing:.06em;color:#b3261c;transform:rotate(-7deg)}
/* 결과 보고서 머리: 'N-0014 · RELATIO'는 작고 흐리게, 검은 막대 자리에 '기밀' 도장 */
.command-ui .bt-res-doc .bt-res-docno{font-size:10.5px;color:rgba(29,20,11,.5)}
.command-ui .bt-res-doc .bt-res-docno b{color:rgba(29,20,11,.62)}
.command-ui .bt-res-doc .bt-res-redact.ord-classified{width:auto;height:auto;padding:0 4px;border:1.5px solid #b3261c;border-radius:2px;background:transparent;font:900 10px/13px var(--ord-ko,inherit);font-style:normal;letter-spacing:.08em;color:#b3261c;transform:rotate(-6deg)}
/* 캠페인 지도 오른쪽 위 범례('ㄱ=1 … ㅎ=19')는 지도에 꽂힌 낡은 쪽지 그림 안 글로(글자는 숨은 단서라 그대로) */
.command-ui .pn-p-campaign .pn-map-legend{padding:1px 6px;border-radius:2px;background:linear-gradient(176deg,#f1e5c6,#dccb9f);color:#3b2a14;opacity:.92;box-shadow:0 0 0 1px rgba(40,26,10,.55),0 3px 6px rgba(0,0,0,.45);transform:rotate(1.2deg);font-weight:700}
.command-ui .pn-p-campaign .pn-map-legend::before{content:'';position:absolute;left:50%;top:-5px;width:30px;height:9px;margin-left:-15px;background:rgba(236,224,190,.78);box-shadow:0 0 0 1px rgba(60,40,15,.22);transform:rotate(-4deg)}

/* ① 캠페인 옆판: 단계 이름이 '외…'로 잘리지 않게 꼬리표가 다음 줄로 내려간다 · '보상 더 보기'는 출격 막대 위 오른쪽 작은 꼬리표(표적 동전·막대를 덮지 않음) */
.command-ui .pn-p-campaign .pn-stage-top{flex-wrap:wrap;row-gap:4px;justify-content:flex-start}
.command-ui .pn-p-campaign .pn-stage-top b{flex:1 1 auto;white-space:normal;overflow:visible;text-overflow:clip;word-break:keep-all;line-height:1.2}
.command-ui .pn-p-campaign .pn-camp-side.more .pn-camp-more{height:26px;justify-content:flex-end;align-items:flex-end;padding:0 8px 2px 0;background:linear-gradient(180deg,rgba(8,6,5,0),rgba(8,6,5,.92) 45%,#080605 70%)}
.command-ui .pn-p-campaign .pn-camp-side.more .pn-camp-more>span{box-shadow:0 0 0 1px #000,0 2px 6px rgba(0,0,0,.6)}

/* ① 요원 창(낮은 휴대폰 381~430px): 가운데 칸은 자체 스크롤 — 아래끝을 흐리게 해 '더 있음'으로 보이고 마지막 줄까지 올라오게 여백 */
@media (min-height:381px) and (max-height:430px){
 .command-ui .pn-p-heroes .pn-hero-detail{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 30px),rgba(0,0,0,.25) calc(100% - 6px),transparent);mask-image:linear-gradient(180deg,#000 calc(100% - 30px),rgba(0,0,0,.25) calc(100% - 6px),transparent);padding-top:6px;padding-bottom:34px}
 .command-ui .pn-p-heroes .pn-hd-name{margin-bottom:3px}
 .command-ui .pn-p-heroes .pn-hd-ab{padding-top:5px;padding-bottom:5px;min-height:0}
 .command-ui .pn-p-heroes .pn-hd-lv{margin-top:4px}
}

/* ② 결과 창 */
/* '리그 포상' 글: 크림 종이 위 진한 갈색(대비 4.5:1 이상), '이 판에 남은 자원' 줄 끝에 붙으면 한 줄 */
.command-ui .bt-res .pvp-result-notes{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:2px 10px;font-size:11.5px;font-weight:800;color:#4a3216}
.command-ui .bt-res .bt-res-stageleft.has-notes{flex-wrap:nowrap}
.command-ui .bt-res .bt-res-stageleft.has-notes>.bt-res-stageleft-none{margin-left:auto;min-width:0}
.command-ui .bt-res .bt-res-stageleft.has-notes>.pvp-result-notes{flex:none;padding-left:8px;border-left:1px solid rgba(29,20,11,.25)}
/* 전리품 0: 빈 막대 둘 대신 한 줄 */
.command-ui .bt-res .bt-res-sec.is-none{flex-direction:row;align-items:center;justify-content:space-between;gap:10px}
.command-ui .bt-res .bt-res-loot-none{font-size:12.5px;font-weight:800;color:#5a4022}
/* 장부가 넘치면 간격을 줄이고(.is-dense), 그래도 넘치면 '투하한 부대'를 전리품 바로 아래로(.is-dense2) — 늘 보인다 */
.command-ui .bt-res.is-dense .bt-res-side{padding-top:6px;padding-bottom:6px;gap:4px}
.command-ui .bt-res.is-dense :is(.bt-res-plate,.bt-res-sec){gap:4px}
.command-ui .bt-res.is-dense :is(.bt-res-line,.bt-res-used){padding-top:3px}
.command-ui .bt-res.is-dense .bt-res-used{flex-direction:row;align-items:center}
.command-ui .bt-res.is-dense .bt-res-used>.bt-res-label{flex:none}
.command-ui .bt-res.is-dense .bt-res-used-list{flex-wrap:nowrap;overflow-x:auto;min-width:0;padding-bottom:1px;scrollbar-width:none}
.command-ui .bt-res.is-dense2 .bt-res-plate>.bt-res-sec{order:-2}
.command-ui .bt-res.is-dense2 .bt-res-plate>.bt-res-used{order:-1}
/* 색종이는 종이 아래끝(--cf-cut)부터 흐려져 '결사 판정'·'전술 소견' 글 위에 남지 않는다 */
.command-ui .bt-res .bt-res-confetti{-webkit-mask-image:linear-gradient(180deg,#000 0,#000 var(--cf-cut,62%),transparent calc(var(--cf-cut,62%) + 6px));mask-image:linear-gradient(180deg,#000 0,#000 var(--cf-cut,62%),transparent calc(var(--cf-cut,62%) + 6px))}
/* '완벽 수행' 도장: 낮은 화면에서 화면 위끝에 잘리지 않게 조금 내리고 덜 기울인다 */
.command-ui .bt-short .bt-res-stamp,.command-ui .bt-tiny .bt-res-stamp{top:-1px;--rot:-5deg}
/* 결과 창이 넘칠 때 왼쪽 칸(별·제목)도 줄인다 — 아주 낮은 화면(568×320)에서 '파괴율'이 종이 아래로 잘렸다 */
.command-ui .bt-res.is-dense .bt-rstar{width:56px;height:56px}
.command-ui .bt-res.is-dense .bt-rstar:nth-child(2){width:68px;height:68px;margin-bottom:8px}
.command-ui .bt-res.is-dense .bt-res-main{gap:1px}
.command-ui .bt-res.is-dense2 .bt-rstar{width:42px;height:42px}
.command-ui .bt-res.is-dense2 .bt-rstar:nth-child(2){width:52px;height:52px;margin-bottom:6px}
.command-ui .bt-res.is-dense2 .bt-res-main{padding-top:4px;padding-bottom:4px}
.command-ui .bt-root .bt-res.is-dense2 .bt-res-title{font-size:27px}
.command-ui .bt-res.is-dense2 .bt-res-destr b{font-size:24px}
/* 아주 낮은 화면(340px 이하)에서 그래도 넘치면 종이 아래 풍자 한 줄('결사 판정')을 접어 종이에 자리를 준다 */
@media (max-height:340px){.command-ui .bt-res.is-dense2 .bt-res-quote{display:none}}
@container frame (max-height:340px){
 .command-ui #hudRoot.hud2 .hud-rail{top:109px;gap:5px}
 .command-ui #hudRoot.hud2 .rail-btn{width:44px;height:44px}
}

/* Keep direct settlement details and the army arrival notice legible in the command theme. */
#frame.command-ui .pn-p-building .pn-head-art {
 position:static; flex:0 0 34px; width:34px; height:34px; margin:0;
 display:grid; place-items:center; border:0; border-radius:7px;
 background:#1b3844; box-shadow:none; animation:none;
}
#frame.command-ui .pn-p-building .pn-head-art .pn-art { --s:30px !important; }
#frame.command-ui .pn-p-building .pn-head-art .pn-art-lv { display:none; }
#frame.command-ui .pn-p-building .pn-head:has(.pn-head-art) { padding-left:12px; gap:9px; }
#frame.command-ui .pn-p-building button.cp-hq-unbuilt,
#frame.command-ui .pn-p-building button.cp-hq-unbuilt b { color:#395238; }
#frame.command-ui .pn-p-building button.cp-hq-unbuilt > span { text-decoration-color:#6c805f; }
#frame.command-ui .pn-p-army .cp-suggest-card { background:#203c44; }
#frame.command-ui .pn-p-army .cp-sg-tx small { color:#ffe098 !important; }
#frame.command-ui .pn-p-army .cp-sg-tx b { color:#fff9e9 !important; }
#frame.command-ui .pn-p-army .cp-sg-tx :is(em,.cp-sg-plan) { color:#dfeee7; }

/* ══ ag42 Track H: 전투 HUD 명찰 겹침·잘림 완치 · 정찰 좌상단 콤팩트 · 공격 창 스크롤 필/보호막 정돈 ══ */
/* 1) 전투 좌상단 상대 명찰: '기밀' 도장 우측 여백 확보 + '복사 기지 (실제 사람 아님)' 잘림 0px */
#frame.command-ui #battleRoot .bt-root:is([data-phase="live"], [data-phase="replay"]) .bt-opp {
 width:fit-content;
 max-width:min(240px, 32vw);
}
#frame.command-ui #battleRoot .bt-root:is([data-phase="live"], [data-phase="replay"]) .bt-opp-head {
 padding:3.5px 8px 3.5px 5.5px;
 gap:6px;
}
#frame.command-ui #battleRoot .bt-root .bt-opp-head::after {
 top:4px;
 right:5px;
 padding:0 3px;
 font-size:8.5px;
 line-height:11px;
 pointer-events:none;
}
#frame.command-ui #battleRoot .bt-root .bt-opp-text {
 min-width:0;
 flex:1 1 auto;
}
#frame.command-ui #battleRoot .bt-root:is([data-phase="live"], [data-phase="replay"]) .bt-opp-name {
 padding-right:34px;
 font-size:12.5px;
 line-height:1.2;
 white-space:nowrap;
 overflow:hidden;
 text-overflow:ellipsis;
}
#frame.command-ui #battleRoot .bt-root:is([data-phase="live"], [data-phase="replay"]) .bt-opp-sub {
 margin-top:2px;
 font-size:10.5px;
 line-height:1.24;
 white-space:normal;
 flex-wrap:wrap;
 gap:2px 4px;
}
#frame.command-ui #battleRoot .bt-root:is([data-phase="live"], [data-phase="replay"]) .bt-opp-sub .bt-tag {
 max-width:100%;
 box-sizing:border-box;
 padding:0 4.5px;
 font-size:10px;
 line-height:14px;
 white-space:nowrap;
 overflow:hidden;
 text-overflow:ellipsis;
}

/* 2) 정찰 좌상단 카드: 과밀 3단 적층을 슬림하게 정돈해 전장·입구 1·2·병사 카드 숨통 확보 */
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-opp {
 max-width:min(288px, 35.5vw);
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-opp-head {
 margin:3px 4px 0;
 padding:4px 7px;
 gap:6px;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-opp-badge {
 width:24px;
 height:24px;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-opp-badge svg {
 width:16px;
 height:16px;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-opp-name {
 padding-right:2px;
 font-size:13.5px;
 line-height:1.15;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-opp-sub {
 margin-top:2px;
 gap:2.5px 4px;
 font-size:10.5px;
 line-height:1.2;
 white-space:normal;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-intel {
 position:relative;
 min-height:24px;
 padding:2px 7px;
 border:1.5px solid #8a6434;
 border-radius:5px;
 background:linear-gradient(180deg, #fff6dd, #ead4a3);
 color:#3a2210;
 font-size:10.5px;
 font-weight:850;
 line-height:1.2;
 box-shadow:0 1px 0 rgba(74, 44, 32, .34);
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-intel::after {
 content:'';
 position:absolute;
 inset:-6px -2px;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-case-brief {
 margin:2px 0 0;
 padding:2px 0 0;
 gap:0;
 font-size:10px;
 line-height:1.18;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-case-brief > b {
 font-size:10.5px;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-case-brief > span {
 max-width:100%;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] :is(.bt-brief, .bt-scout-compare, .bt-newdef.is-rail) {
 min-height:30px;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-brief {
 padding:3px 7px;
 gap:5px;
 font-size:11px;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-brief b {
 padding:1px 5px;
 font-size:10px;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-scout-compare {
 padding:3px 7px;
 font-size:11px;
}
#frame.command-ui #battleRoot .bt-root[data-phase="scout"] .bt-scout-note:not([hidden]) {
 padding:3px 8px 4px;
 font-size:10.5px;
 line-height:1.24;
}

/* 3) 공격 창: 보호막 카드 다크 잔재 → 크림 서류철 톤 통일 + '아래로 내려 더 보기' 필 본문 비가림 */
#frame.command-ui #panelRoot .pn-frame.atk-chooser .pn-body {
 padding-bottom:32px;
}
#frame.command-ui #panelRoot .pn-frame.atk-chooser .pvp-status {
 padding:9px 11px;
 border:1px solid #a8c7b0;
 border-left:3.5px solid #357c58;
 border-radius:9px;
 background:linear-gradient(180deg, #f3faf2, #e5f1e7);
 color:#244134;
 font-size:11.5px;
 line-height:1.42;
 box-shadow:inset 0 1px 0 rgba(255, 255, 255, .75);
}
#frame.command-ui #panelRoot .pn-frame.atk-chooser .pvp-status b {
 color:#183528;
 font-size:13px;
}
#frame.command-ui #panelRoot .pn-frame.atk-chooser.atk-has-more .atk-scroll-hint {
 justify-content:flex-end;
 padding-right:10px;
 bottom:-11px;
}
#frame.command-ui #panelRoot .pn-frame.atk-chooser .atk-scroll-hint > span {
 margin-bottom:0;
 padding:1.5px 9px 2px;
 font-size:10.5px;
 border-color:#bfa47e;
 background:rgba(255, 250, 236, .97);
 color:#4b331d;
 box-shadow:0 2px 6px rgba(42, 26, 12, .22);
}

/* On compact landscape bases, put the field guide and its own action inside the same card. */
#frame.command-ui .guide .cg-field-goal { display: none; }
@container frame (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  #frame.command-ui .coc-guide.is-field-brief:not(.is-collapsed) {
    box-sizing: border-box;
    width: clamp(246px, 33cqw, 276px);
    top: clamp(54px, 20cqh, 78px);
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 28px 44px;
    grid-template-rows: auto auto auto;
    gap: 0 3px;
    padding: 2px 5px 4px 7px;
  }
  #frame.command-ui .is-field-brief:not(.is-collapsed) .cg-pal {
    --crew-x: -6px;
    --crew-y: -1px;
    --crew-paper: #d6e5ed;
    position: static;
    width: 48px;
    height: 52px;
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    border-radius: 12px;
    background: var(--crew-paper) url('../assets/ui/start_6chibi_3x2.webp') var(--crew-x) var(--crew-y) / 186px 124px no-repeat;
    filter: none;
  }
  #frame.command-ui .is-field-brief .cg-pal.is-flat { --crew-x: -69px; --crew-paper: #f0dfb6; }
  #frame.command-ui .is-field-brief .cg-pal.is-reptile { --crew-x: -131px; --crew-paper: #d7e7c3; }
  #frame.command-ui .is-field-brief.is-brief-crew .cg-pal { --crew-y: -63px; }
  #frame.command-ui .is-field-brief :is(.cg-pal-svg,.guide-dots,.cg-full-goal),
  #frame.command-ui .cg-arrow.cg-brief-self { display: none; }
  #frame.command-ui .is-field-brief .guide-text b {
    grid-column: 2; grid-row: 1;
    align-self: center;
    font-size: 15px;
    line-height: 1.16;
    word-break: keep-all;
  }
  #frame.command-ui .is-field-brief .guide-text > span {
    grid-column: 2 / -1; grid-row: 2;
    margin: -2px 0 4px;
    font-size: 12px;
    line-height: 1.3;
    word-break: keep-all;
  }
  #frame.command-ui .is-field-brief .guide-text .cg-field-goal { display: block; }
  #frame.command-ui .is-field-brief .guide-text .cg-full-goal { display: none; }
  #frame.command-ui .is-field-brief .guide-count { grid-column: 3; grid-row: 1; justify-self: center; }
  #frame.command-ui .is-field-brief .guide-x {
    grid-column: 4; grid-row: 1;
    width: 44px; height: 44px;
    border: 0; box-shadow: none; background: transparent;
  }
  #frame.command-ui .coc-guide.is-field-brief .guide-ribbon.guide2-resume {
    grid-column: 1 / 3; grid-row: 4;
    justify-self: start;
    min-height: 44px; height: auto; min-width: 44px;
    padding: 0 5px;
    border: 0; box-shadow: none; background: transparent;
  }
  #frame.command-ui .coc-guide.is-field-brief .guide-ribbon.guide2-resume::after { content: none; }
  #frame.command-ui .is-field-brief .guide-head > span.guide-ribbon { display: none; }
  #frame.command-ui .is-field-brief .guide-foot .guide-go {
    grid-column: 2 / -1; grid-row: 4;
    min-width: 44px; min-height: 44px;
    max-width: calc(100% - 24px);
    justify-self: end; align-self: center;
    padding: 0 9px;
  }
  #frame.command-ui .is-field-brief .guide-text > .cg-memo { grid-column: 1/-1; grid-row: 3; }
  #frame.command-ui .is-field-brief button:focus-visible { outline: 2px solid #274562; outline-offset: -3px; }
}
