/* Shared neutral materials, restrained national accents, readable depth. */
html body[data-strategic-bloc]{--bloc-base:#14212c;--bloc-panel:#1d2d39;--bloc-head:#293d4b;--bloc-wash:#344d5b;--bloc-border:#a5bbcb30;--command-text:#e1e8eb;--command-muted:#9eafb9;--command-paper:#c2c9c6;--command-metal:#263641;--city-success:#9ebdaf;--city-gold:#c4b184}
html body[data-strategic-bloc=communist]{--bloc-accent:#d5a6a7;--bloc-head:#48333b;--bloc-wash:#62444b;--atelier-gold:#c7b38a;--command-accent-ink:#8b5a61}
html body[data-strategic-bloc=authoritarian]{--bloc-accent:#a2c0d5;--bloc-head:#2c4054;--bloc-wash:#405d72;--atelier-gold:#c5b58e;--command-accent-ink:#527b9b}
html body[data-strategic-bloc=democratic]{--bloc-accent:#a7c8bf;--bloc-head:#2d4544;--bloc-wash:#3f615c;--atelier-gold:#ccbd96;--command-accent-ink:#537e75}
html body.map-cockpit[data-strategic-bloc] #leftPanel#leftPanel{background:linear-gradient(155deg,#243340,var(--bloc-base) 65%)!important;border-right:1px solid #a1b3c52b!important}
html body.map-cockpit[data-strategic-bloc] :is(.command-country-identity,.command-leader){background:linear-gradient(115deg,var(--bloc-head),#22323e)!important;border:1px solid var(--bloc-border)!important}
html body.map-cockpit[data-strategic-bloc] #leftPanel#leftPanel .command-shortcuts button{background:#1a2a35!important;border:1px solid #9fb7c71c!important;color:#c6d2da!important;transition:background-color .16s,border-color .16s,transform .16s}
html body.map-cockpit[data-strategic-bloc] #leftPanel#leftPanel .command-shortcuts button[aria-pressed=true]{background:var(--bloc-head)!important;box-shadow:inset 3px 0 var(--bloc-accent);color:#f0eeee!important}
html body.map-cockpit[data-strategic-bloc] #leftPanel#leftPanel .command-shortcuts button:hover{background:#304451!important;border-color:#b7c9d157!important;transform:translateX(2px)}
html body.map-cockpit[data-strategic-bloc] :is(#managementBody,.management-body,.mr-main,.mr-board-scroll,.mr-inspector){background:#182630!important;color:var(--command-text)!important}
html body.map-cockpit[data-strategic-bloc] :is(.mr-header,.mr-tabs,.mr-inspector-label,.workspace-heading){background:linear-gradient(110deg,#2a3a46,#1d2c37)!important;border-color:#9fb1bf2c!important}
html body.map-cockpit[data-strategic-bloc] :is(.mr-side,.mr-queue,.recruit-form,.recruit-preview,.full-production-line,.unit-matchup){background:#20313d!important;border-color:#a6b9c931!important}
html body.map-cockpit[data-strategic-bloc] :is(.mr-tech,.mr-slot,.full-decision){background:#263846!important;border-color:#a9bbca2c!important;box-shadow:0 1px 0 #e9eef008 inset,0 3px 9px #00000012!important}
html body.map-cockpit[data-strategic-bloc] .mr-tech.selected{background:linear-gradient(145deg,var(--bloc-head),#253b48)!important;border-color:var(--bloc-accent)!important;box-shadow:inset 0 2px var(--bloc-accent)!important}
html body.map-cockpit[data-strategic-bloc] :is(.mr-tabs button.active,.mr-start:not(:disabled),.recruit-submit:not(:disabled)){background:var(--bloc-head)!important;color:#edf1ef!important;border-color:var(--bloc-accent)!important}
html body.map-cockpit[data-strategic-bloc] :is(.mr-tech-state,.mr-queue-label,.recruit-step i){color:var(--city-gold)!important}
html body.map-cockpit[data-strategic-bloc] :is(.mr-branch,.mr-axis){background:#253743!important;color:#c7d3d9!important}
html body.map-cockpit[data-strategic-bloc] :is(.mr-facts,.recruit-cost,.matchup-meta){background:#182832!important;border:1px solid #94adbc24!important}
html body.map-cockpit[data-strategic-bloc] :is(.mr-benefits p,.mr-prerequisites button,.city-rule-note){color:#b8c8ce!important;line-height:1.65}
html body.map-cockpit[data-strategic-bloc] :is(table tbody tr:nth-child(even),.mr-row:nth-child(even)){background:#789bb607!important}
html body.map-cockpit[data-strategic-bloc] :is(.mr-tabs button,.mr-tech,.city-directory button,.city-building button){transition:background-color .16s,border-color .16s,box-shadow .16s}
html body :is(button,a,input,select):focus-visible{outline:2px solid #c7d5dd;outline-offset:3px}
.city-workspace{max-width:1500px;margin:auto;color:#e1e8eb}.city-workspace .workspace-heading{padding:20px 24px;margin-bottom:18px;border:1px solid #a2b7c52e;border-radius:5px}.city-workspace h2{font-size:25px;margin:6px 0}.city-workspace p{margin:7px 0;color:#9eafb9;font-size:12px;line-height:1.7}
.city-management-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:22px;align-items:start}.city-directory{display:flex;flex-direction:column;gap:8px;max-height:calc(100vh - 270px);overflow:auto;position:sticky;top:0;scrollbar-width:thin;padding:1px 6px 8px 1px}.city-directory button{display:flex;align-items:center;justify-content:space-between;text-align:left;padding:15px;background:#22323f!important;border:1px solid #aec0cf24!important;border-radius:4px;color:#dae2e5}.city-directory button[aria-pressed=true]{background:var(--bloc-head)!important;border-color:var(--bloc-accent)!important;box-shadow:inset 3px 0 var(--bloc-accent)}.city-directory small{display:block;font-size:10px;color:#a4b7c0;margin-top:5px}.city-directory strong{font:500 22px/1.2 ui-monospace,monospace;color:var(--city-success);text-align:right}.city-directory b{font-size:14px}
.city-command{min-width:0;color:#e1e8eb}.city-command-heading{display:flex;justify-content:space-between;align-items:start;border-bottom:1px solid #b3c2cc24;padding:2px 0 18px;margin-bottom:20px}.city-command-heading small{font-size:10px;letter-spacing:.17em;color:var(--city-gold)}.city-command-heading h2{font-size:27px;margin:7px 0}.city-command-heading p{font-size:12px;color:#a4b6c0;margin:0}.city-command-heading>button{font-size:24px;min-width:34px;height:34px;line-height:1;padding:0;border:1px solid #9bb3c633;background:#263c4b;color:#ccd8de;border-radius:4px}
.city-morale{display:grid;grid-template-columns:110px 1fr;gap:22px;align-items:center;padding:17px 20px;background:linear-gradient(110deg,#2c423f,#21333e 72%);border:1px solid #abc6b831;border-radius:5px}.city-morale small{display:block;color:#b1c6bd;font-size:11px}.city-morale strong{font:500 32px/1.4 ui-monospace,monospace;color:#c1d4c5}.city-morale em{font:11px system-ui;color:#93a99e;font-style:normal}.city-morale-track{height:5px;background:#0f2026;border-radius:6px;overflow:hidden;margin:0 0 12px}.city-morale-track i{display:block;height:100%;background:linear-gradient(90deg,#6c9387,#b0c4af)}
.city-income{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.city-income>span{padding:12px 15px;min-width:100px;background:#283946;border:1px solid #aabccd20;border-radius:4px;font-size:11px;color:#adbcc6}.city-income b{display:block;font-size:20px;font-weight:500;color:#d2c29e;margin-top:7px}.city-income small{font-size:10px;color:#93a7b6}.city-rule-note{font-size:11px!important;margin:14px 0 23px!important}.city-command h3{font-size:14px;letter-spacing:.04em;margin:22px 0 12px}.city-command h3>span{font-size:11px;color:#9db1bd}
.city-buildings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.city-building{display:grid;grid-template-columns:32px 1fr 70px;gap:10px;align-items:start;min-height:108px;padding:15px 12px;background:#223440;border:1px solid #b2c1cc21;border-radius:4px}.city-building.is-built{border-color:#a6bfa73b;background:linear-gradient(125deg,#293d43,#243542)}.city-building-mark{display:grid;place-items:center;width:31px;height:31px;font-size:22px;color:#c0b38f;background:#a29e7914;border:1px solid #cbbf9a25;border-radius:3px}.city-building b{font-size:13px;font-weight:600}.city-building small{display:block;color:#90b5a5;font-size:10px;margin-top:6px}.city-building p{font-size:10px;color:#a2b4c0;line-height:1.65;margin-top:10px}.city-building>button{padding:7px 4px;background:#304851!important;border:1px solid #a8c2bc49!important;color:#d4e0dc!important;font-size:11px;border-radius:3px}.city-building>button span{display:block;font-size:9px;white-space:normal;color:#a0b4bc;margin-top:6px}.city-building>button:disabled{opacity:.42}.city-resource-development{padding:14px 0;color:#a5b7c1;font-size:12px}.city-resource-development summary{cursor:pointer;margin-bottom:10px}
.city-queues>article{display:flex;gap:12px;align-items:center;border:1px solid #a9bbc92a;background:#243641;padding:12px;margin-bottom:8px;border-radius:4px}.city-queues article>div{flex:1;min-width:0}.city-queues b{font-size:12px}.city-queues small{display:block;font-size:10px;color:#9eafbd;margin:5px 0}.city-queues progress{width:100%;height:4px;accent-color:#a9bca9}.city-queues button{background:#354651;border:1px solid #a5bac334;color:#c4d0d6;border-radius:3px;padding:5px 8px;font-size:10px}.city-empty{padding:12px;border:1px dashed #a6b6c125;color:#94a8b3;font-size:12px}
html body.map-cockpit #mapBottomDetail:has(.city-command){right:18px;left:auto;bottom:16px;width:min(470px,calc(100vw - 40px));max-height:72vh;overflow:auto;background:#172630f5!important;border:1px solid #a6bac54a;border-radius:6px;box-shadow:0 12px 45px #0006;padding:21px;contain:layout paint}
.city-command.compact .city-command-heading{margin-bottom:14px;padding-bottom:13px}.city-command.compact h2{font-size:23px}.city-command.compact .city-morale{grid-template-columns:86px 1fr;gap:12px;padding:12px}.city-command.compact .city-morale strong{font-size:27px}.city-command.compact .city-morale small{line-height:1.7;font-size:10px}.city-command.compact .city-rule-note{margin:10px 0!important}.city-building-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.city-building-summary>span{padding:9px;background:#2a3d48;font-size:10px;color:#b9c9cf;border-radius:3px}.city-building-summary b{float:right;color:#d7c79f}.city-open-buildings{width:100%;padding:11px;margin-top:15px;background:var(--bloc-head)!important;color:#e1e9ec!important;border:1px solid var(--bloc-accent)!important}.recruit-deployment[open]{border-color:#9ab7ab45;background:#25403822}.legacy-campaign-management{margin:18px 0;color:#bac8ce;text-align:left}.legacy-campaign-management summary{cursor:pointer}.legacy-campaign-management .online-resume-entry{padding:12px}
@media(max-width:950px){.city-management-layout{grid-template-columns:195px minmax(0,1fr);gap:12px}.city-buildings{grid-template-columns:1fr}}
@media(max-width:650px){.city-management-layout{grid-template-columns:1fr}.city-directory{flex-direction:row;position:static;max-height:110px}.city-directory button{min-width:170px}.city-morale{gap:12px}.city-income>span{min-width:85px}.city-workspace .workspace-heading{padding:14px}}
@media(prefers-reduced-motion:reduce){html body.map-cockpit[data-strategic-bloc] *{animation-duration:.001ms!important;transition:none!important}}

/* Isolate the new workspace from legacy global header/nav/button sizing. */
html body.map-cockpit #managementBody .city-workspace :is(header,nav){position:static!important;inset:auto!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none;transform:none!important;z-index:auto!important;box-shadow:none!important}
html body.map-cockpit #managementBody .city-workspace .workspace-heading{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:20px;padding:17px 20px!important;margin:0 0 19px!important;border-radius:5px}
html body.map-cockpit #managementBody .city-workspace .workspace-heading :is(h2,small){display:block!important;position:static!important;clip:auto!important;max-height:none!important;overflow:visible!important}
html body.map-cockpit #managementBody .city-workspace .workspace-heading h2{font-size:21px!important;line-height:1.4!important;color:#e3e8e8;margin:5px 0!important}
html body.map-cockpit #managementBody .city-workspace .workspace-heading small{font-size:9px!important;letter-spacing:.16em;color:#a7b8c3}
html body.map-cockpit #managementBody .city-workspace .city-directory{display:flex!important;flex-direction:column!important;gap:8px!important;max-height:calc(100vh - 360px)!important;overflow:auto!important;background:transparent!important;border:0!important;padding:0 6px 6px 0!important}
html body.map-cockpit #managementBody .city-directory button{position:relative!important;display:flex!important;flex:0 0 auto!important;height:auto!important;min-height:70px!important;width:100%!important;margin:0!important;padding:13px!important;line-height:1.5!important;white-space:normal!important;overflow:visible!important;gap:12px!important;text-align:left!important}
html body.map-cockpit #managementBody .city-directory button>span{min-width:0;flex:1}.city-directory button>strong{flex:0 0 33px}
html body.map-cockpit #managementBody .city-directory :is(b,small){height:auto!important;line-height:1.45!important;white-space:normal!important;overflow:visible!important;position:static!important}
html body.map-cockpit #managementBody .city-command-heading{background:transparent!important;display:flex!important;border:0!important;border-bottom:1px solid #a6bac82c!important;padding:0 0 15px!important;margin-bottom:17px!important}
html body.map-cockpit #managementBody .city-command-heading h2{display:block!important;line-height:1.4!important;height:auto!important;color:#e5e8e6!important}
html body.map-cockpit #managementBody .city-building{min-height:120px!important}.city-building>div{min-width:0}
html body.map-cockpit #managementBody .city-building>button{height:auto!important;min-height:44px!important;white-space:normal!important;line-height:1.5!important}
html body.map-cockpit #managementBody .city-workspace p{white-space:normal!important;height:auto!important}
@media(max-width:650px){html body.map-cockpit #managementBody .city-workspace .city-directory{flex-direction:row!important;max-height:120px!important}.city-directory button{max-width:200px!important}}

/* Keep the city list and the selected city's buildings within the viewport. */
html body.map-cockpit #managementBody:has(.city-workspace){padding-top:12px!important}
html body.map-cockpit #managementBody:has(.city-workspace)>section:not(.city-workspace){padding:8px!important;margin-bottom:10px!important}
html body.map-cockpit #managementBody .city-workspace .workspace-heading{padding:9px 14px!important;margin-bottom:14px!important}
html body.map-cockpit #managementBody .city-workspace .workspace-heading p{margin:4px 0 0!important}
html body.map-cockpit #managementBody .city-management-layout{height:calc(100vh - 365px);min-height:340px;gap:20px;align-items:stretch}
html body.map-cockpit #managementBody .city-workspace .city-directory{max-height:none!important;height:100%}
html body.map-cockpit #managementBody .city-management-main{overflow:auto;scrollbar-width:thin;padding-right:8px;min-height:0}
html body.map-cockpit #managementBody .city-command-heading{padding-bottom:10px!important;margin-bottom:12px!important}
html body.map-cockpit #managementBody .city-command-heading h2{font-size:23px;margin:4px 0!important}
html body.map-cockpit #managementBody .city-morale{padding:12px 15px;grid-template-columns:88px 1fr;gap:15px}
html body.map-cockpit #managementBody .city-morale strong{font-size:28px}
html body.map-cockpit #managementBody .city-income{margin:10px 0;gap:8px}
html body.map-cockpit #managementBody .city-income>span{padding:8px 12px;min-width:92px}
html body.map-cockpit #managementBody .city-income b{font-size:17px;margin-top:4px}
html body.map-cockpit #managementBody .city-rule-note{margin:9px 0 13px!important}
html body.map-cockpit #managementBody .city-command h3{margin:14px 0 10px}
@media(max-width:650px){html body.map-cockpit #managementBody .city-management-layout{height:auto;display:block}.city-management-main{max-height:none}.city-directory{margin-bottom:16px}}

.city-building-mark .command-icon{display:block;width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.6}

/* Keep the city title independent of the fixed global game header. */
html body.map-cockpit #mapBottomDetail .city-command-heading {
 position:static!important;inset:auto!important;transform:none!important;
 width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
 display:flex!important;align-items:flex-start!important;gap:12px;
 background:transparent!important;overflow:visible!important;box-shadow:none!important;
 padding:2px 0 13px!important;box-sizing:border-box;
}
html body.map-cockpit #mapBottomDetail .city-command-heading>div {min-width:0;flex:1;padding-inline-start:12px;}
html body.map-cockpit #mapBottomDetail .city-command-heading h2 {overflow:visible;white-space:normal;overflow-wrap:anywhere;line-height:1.3;}
html body.map-cockpit #mapBottomDetail .city-command-heading>button {flex:0 0 auto;position:static!important;transform:none!important;}
/* The identity card shares the navigation width, including its inner gutter. */
html body.map-cockpit.left-command-layout[data-strategic-bloc] #leftPanel .command-country-identity {
  display:grid; grid-template-columns:42px minmax(0,1fr); align-items:center;
  gap:10px; padding:11px 10px; margin:0 0 12px; box-sizing:border-box;
  min-width:0; border-radius:4px;
}
html body.map-cockpit.left-command-layout #leftPanel .command-country-identity > .flag {
  position:relative; inset:auto; justify-self:start; align-self:center;
  width:42px; height:28px!important; min-width:0; min-height:0; max-width:100%;
  margin:0; overflow:hidden; box-sizing:border-box;
}
html body.map-cockpit.left-command-layout #leftPanel .command-country-identity > h2 {
  min-width:0; padding:0; margin:0; line-height:1.35; font-size:15px; overflow-wrap:anywhere;
}
html body.map-cockpit.left-command-layout[data-strategic-bloc] #leftPanel .command-country-identity > .command-leader {
  grid-column:1/-1; display:grid; grid-template-columns:42px minmax(0,1fr); align-items:center;
  width:auto; min-width:0; gap:10px; margin:0; padding:9px 0 0;
  background:transparent!important; border:0!important; border-top:1px solid var(--bloc-border)!important; border-radius:0;
}
html body.map-cockpit.left-command-layout #leftPanel .command-leader-photo {
  position:relative; inset:auto; justify-self:center; width:32px; height:39px; margin:0;
}
html body.map-cockpit.left-command-layout #leftPanel .command-leader .leaders {
  min-width:0; gap:3px; line-height:1.4; overflow-wrap:anywhere;
}
html body.map-cockpit.left-command-layout #leftPanel .command-leader .leaders b {font-size:12px;line-height:1.4}
html body.map-cockpit.left-command-layout #leftPanel .command-leader .leaders span {font-size:11px;line-height:1.35}
#leftPanel .command-country-identity > .flag.su::after {font-size:13px;line-height:1;left:12%;top:9%}
#leftPanel .command-country-identity > .flag.us::after {box-sizing:border-box;padding:1px 0;font-size:3.5px;line-height:4px;text-align:center;overflow:hidden}
