/* Atlas room: restrained command furniture around a legible printed map. */
:root{--atlas-bg:#141f25;--atlas-panel:#1d2a30;--atlas-line:#3c4a4d;--atlas-type:#e5e0d3;--atlas-muted:#99aaa8;--atlas-brass:#bdab83;--atlas-paper:#e9e2cf}
body{background:var(--atlas-bg);color:var(--atlas-type);font-size:13px;letter-spacing:.15px}
body>header{background:#17232a;border-bottom:1px solid #4c5856;box-shadow:0 5px 18px #07111640;padding:0 18px;column-gap:22px}
body .brand{font:22px/1.3 "Songti SC","Noto Serif SC",serif;letter-spacing:4px;color:#e9e2d2}
body .brand b{font-weight:400;color:#c4b18c}.brand small{margin-top:4px!important;color:#8eaaa9!important;letter-spacing:2px!important}
body button,body select,body input,body textarea{border-radius:3px;border-color:#435255;background:#24333a;color:#d8dfda;box-shadow:inset 0 1px #ffffff06;font-size:12px;line-height:1.4}
body button{padding:8px 12px;cursor:pointer}
body button:hover{background:#30434b;border-color:#8a998d;color:#faf1db}
body button.active,body button[aria-selected=true]{background:#34433f;border-color:#a69979;color:#f0e3c5}
body button:focus-visible,body select:focus-visible{outline:2px solid #cebc92;outline-offset:2px}
body button:disabled{cursor:default;opacity:.45}
body>header .top{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;align-items:center;align-content:center;gap:6px;min-height:50px;scrollbar-width:thin;padding:5px 0}
body>header .top>span{border:0;border-right:1px solid #405052;background:transparent;padding:4px 12px;font-size:11px;color:#92a6a6;line-height:1.4}
body>header .top>span b{font-size:13px;color:#e6e1d1;letter-spacing:.3px;font-weight:600}
body>header .top button{min-height:30px;padding:5px 9px;border-color:#3c4e52;white-space:nowrap}
body>header .top button[data-speed]{min-width:30px;border-color:transparent;color:#98b0b1}
body>header #pause{color:#daccaa;background:#33433f;border-color:#6c7c70;min-width:32px}
body #warnings{padding:4px 0 7px;gap:5px;border-top:1px solid #ffffff0b;scrollbar-width:none}
body #warnings .task-entry{min-width:80px;padding:6px 10px;background:transparent;border:0;border-radius:3px;color:#9daead;gap:7px;font-size:11px}
body #warnings .task-entry.attention{background:#a7925720;color:#dbc79f}
body #warnings .task-entry:hover{background:#ffffff0b}
body #warnings .task-entry i{background:transparent;border-left:1px solid #62706a50;border-radius:0;min-width:15px;padding:0 0 0 7px;color:#e8ddc0;font-size:11px}
body .left,body .right{background:#1a282e;border-color:#3a4a4e;padding:20px 18px}
body .left:before{font-size:9px;letter-spacing:3px;color:#829b9b;margin-bottom:16px}
body .left h2{font-size:24px;font-weight:400;line-height:1.5;color:#e8e0cc}
body .left .flag{margin-bottom:8px;border-color:#677b78!important;filter:saturate(.85)}
body h3{font-size:11px;letter-spacing:1.6px;color:#b8aa8b;border-color:#415255;padding-bottom:9px}
body .card,body .experience-priorities,body .policy-flow{background:#203037;border-color:#3c5054;border-radius:4px;padding:14px}
body .metric{padding:10px 3px;border-color:#ffffff0b;color:#9eafae}
body .metric b{color:#ddd3bb;font-weight:500}
body .spirit-chip,body .spirit-button{background:#24343a;border-color:#435655;border-radius:3px;padding:7px 9px}
body .leaders{line-height:1.7;color:#95aaa8;font-size:11px}
body .left-country-summary{border-color:#3b4c4e;padding:12px 0}
body .management-overlay,body #managementOverlay{background:#19272e;border-color:#53625f;box-shadow:0 20px 60px #0006}
body .management-head{background:#213139;border-bottom-color:#55645f;min-height:74px}
body .management-head h2{font-size:25px;font-weight:400;letter-spacing:2px}
body .management-body{background:#19272e;padding:22px}
body .research-slot,body .full-focus-node,body .tech-node,body .cabinet-slot,body .law-card{background:#26383e;border-color:#4b615f;border-radius:4px;box-shadow:0 2px 5px #0002}
body .full-focus-canvas,body .tech-board{background-color:#17272d!important;background-size:40px 40px}
body .map-wrap,body #map{background:#354e56}.map-wrap .sea{fill:#354e56!important}
body .map-wrap:after{opacity:.027;mix-blend-mode:soft-light}
body .map-wrap .nation{stroke:#d4cdb5;stroke-width:.65;stroke-opacity:.7}
body .map-wrap .operational-province-fill{stroke:#40514b;stroke-width:.35}
body .map-wrap .country-name-label{font-family:"Songti SC","Noto Serif SC",serif;font-weight:500;fill:#f0ead8;stroke:#34433f;stroke-width:.4px;stroke-opacity:.6;letter-spacing:.1em;opacity:.88}
body .map-wrap .minor-country-label{opacity:.72}
body .map-wrap .river{stroke:#98b8bc!important;stroke-opacity:.55!important;stroke-width:.75}
body .map-tools{top:12px;left:12px;display:flex;flex-wrap:nowrap;align-items:center;gap:2px;max-width:calc(100% - 90px);overflow:auto;padding:4px!important;border:1px solid #63746d!important;border-radius:5px!important;background:#1e2e34f5!important;box-shadow:0 4px 16px #10232c30!important;scrollbar-width:none}
body .map-tools>span{padding:0 10px;color:#a4b6b0;font-size:10px;white-space:nowrap}
body .map-tools button{border:0;background:transparent;flex:0 0 auto;white-space:nowrap;padding:8px 11px;color:#c2cdca;font-size:11px;border-radius:3px}
body .map-tools button.active{background:#566153;color:#f2e7c9;box-shadow:inset 0 0 0 1px #a89d7b50}
body .map-zoom-overlay{right:16px;bottom:16px;background:#1e2e34f5!important;border-color:#6b7b72!important;border-radius:5px!important;padding:4px;box-shadow:0 4px 14px #12232b30!important}
body .map-zoom-overlay button{border:0;background:transparent;color:#d0d8cf;min-height:32px;font-size:11px}
body .map-zoom-overlay button:hover{background:#3a4b4b}
body .map-zoom-overlay .zoom-readout,body .map-zoom-overlay [role=status]{font:11px ui-monospace,monospace;color:#c7b98e}
body .scenario-coast-locations{right:16px;bottom:72px}
body .scenario-coast-locations select{background:#20323aee;border-color:#5b706f;color:#d0d8cc;padding:8px 28px 8px 11px;border-radius:4px;font-size:11px;min-height:35px}
body .map-pan-help{left:14px;bottom:18px;padding:7px 10px!important;opacity:.72;color:#b4c3bb;font-size:10px;background:#1c2f34e6!important;border-color:#52655c80!important}
body .map-wrap .legend{padding:7px 10px!important;font-size:9px;opacity:.75;border-color:#52655c80!important;background:#1c2f34e6!important}
body #mapBottomDetail,body .advisor-drawer,body .battle-detail{background:#1d2f36fa;border-color:#6f7d70;border-radius:5px;box-shadow:0 12px 35px #07191d55}
body #mapBottomDetail>header{background:#2a3c41;color:#e6d9bd;padding:14px 16px;border-color:#5d6b60}
body .province-detail-grid>section{border-color:#405650;padding:12px}
body .province-city-row{border-color:#3d5555;background:#22383c;padding:10px 12px;margin-block:5px}
body .province-city-row b{font-weight:500;color:#e2dcc8}
body .province-city-row small{color:#9cafaa;font-size:11px;line-height:1.7}
body .modal{background:#09171fd1;backdrop-filter:blur(5px)}
body .modal article{border:1px solid #728079;border-radius:7px;box-shadow:0 28px 100px #0006;background:#22343b;padding:30px}
body .modal h2{font-weight:400;font-size:26px;line-height:1.5}
body .modal #modalText{color:#bfcdc7;font-size:13px;line-height:1.9}
body #modal.worldview-modal{inset:0!important;padding:24px;z-index:60;background:#0a1922c9;overflow:hidden}
body #modal.worldview-modal article{box-sizing:border-box;width:min(920px,100%);max-width:920px;max-height:calc(100dvh - 48px);display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:0;padding:42px 52px 26px;background:#e9e2cf;color:#303e3e;border:1px solid #b6ad95;border-radius:4px;box-shadow:0 30px 100px #0007,inset 0 0 80px #af9c7120;position:relative}
body #modal.worldview-modal article:before{content:"1936 / 世界形势档案";position:absolute;right:52px;top:22px;font:9px ui-monospace,monospace;letter-spacing:2px;color:#8e8a76}
body #modal.worldview-modal #modalType{color:#798272;font:10px/1.8 sans-serif;letter-spacing:4px;margin-bottom:12px}
body #modal.worldview-modal h2{color:#293d40;font:400 clamp(23px,3vw,34px)/1.55 "Songti SC","Noto Serif SC",serif;letter-spacing:1px;margin:0;padding:0 42px 22px 0;border-bottom:1px solid #b7b39e}
body #modal.worldview-modal #modalText{max-height:none!important;min-height:0;overflow:auto;color:#48524a;font-size:14px;line-height:1.95;white-space:normal!important;margin:0;padding:22px 18px 24px 0;scrollbar-color:#a6aa96 #ded9c6}
.worldview-lead{display:block;color:#667263;font-size:13px;padding-bottom:18px;margin-bottom:4px}
.worldview-section{display:block;padding:20px 0 22px 42px;border-top:1px solid #c8c4b050;position:relative}
.worldview-index{position:absolute;left:0;top:25px;font:11px ui-monospace,monospace;color:#8c967e}
.worldview-section>strong{display:block;color:#344d4c;font-family:"Songti SC","Noto Serif SC",serif;font-size:20px;font-weight:600;line-height:1.6;margin-bottom:10px}
.worldview-section>.worldview-body{display:block;margin-top:8px}
body #modal.worldview-modal #modalTopClose{position:absolute;right:15px;top:12px;width:32px;min-width:32px;height:32px;padding:0;margin:0;color:#6c7567;background:transparent;border:0;font-size:21px;box-shadow:none}
body #modal.worldview-modal #modalChoices:empty{display:none}
body #modal.worldview-modal #modalClose{margin:0;padding:11px 18px;border:1px solid #536358;background:#344d4c;color:#f2ecd9;text-align:center;border-radius:3px;font-size:12px;letter-spacing:2px}
body #modal.worldview-modal #modalClose:hover{background:#45615c}
body #modal.worldview-modal ::-webkit-scrollbar-track{background:#ded9c6}body #modal.worldview-modal ::-webkit-scrollbar-thumb{background:#a6aa96;border-color:#ded9c6}
@media(max-width:700px){
 body>header{grid-template-columns:82px minmax(0,1fr);padding:0 9px;gap:0 10px}
 body .brand{font-size:17px;letter-spacing:2px}.brand small{font-size:6px!important;letter-spacing:1px!important}
 body>header .top{min-height:43px;padding:4px 0;gap:5px}
 body>header .top button{padding:5px 8px;font-size:11px;min-height:29px}
 body>header .top>span{padding:4px 8px}
 body #warnings{padding:4px 0;gap:3px}
 body #warnings .task-entry{padding:6px 9px;font-size:10px;min-width:0}
 body .map-tools{top:9px;left:9px;max-width:calc(100% - 30px);padding:3px!important}
 body .map-tools>.map-tools-title{display:none}
 body .map-tools button{padding:7px 9px;font-size:10px}
 body .map-pan-help,body .map-wrap .legend{display:none!important}
 body .scenario-coast-locations{right:12px;bottom:68px;max-width:210px}
 body .map-zoom-overlay{right:12px;bottom:14px}
 body #modal.worldview-modal{padding:12px}
 body #modal.worldview-modal article{padding:37px 22px 20px;max-height:calc(100dvh - 24px)}
 body #modal.worldview-modal article:before{left:22px;right:auto;top:17px;font-size:8px;letter-spacing:1px}
 body #modal.worldview-modal #modalType{margin-bottom:8px}
 body #modal.worldview-modal h2{font-size:23px;padding:0 12px 18px 0}
 body #modal.worldview-modal #modalText{font-size:13px;line-height:1.9;padding:17px 9px 16px 0}
 .worldview-section{padding:18px 0 18px 27px}.worldview-index{font-size:9px;top:23px}.worldview-section>strong{font-size:18px}
 body .management-body{padding:14px}
}
@media(prefers-reduced-motion:reduce){body button{transition:none}}
/* Keep the pan hint at its natural height: an inherited top inset would stretch it. */
body .map-pan-help{top:auto!important;right:auto!important;height:auto;min-height:0}
body .map-wrap .country-name-label{fill:#304342;stroke:#ede5ce;stroke-width:.35px;stroke-opacity:.45;opacity:.95}
body .map-wrap .minor-country-label{opacity:.82}

body .map-tools .map-mode-toolbar{display:flex;flex-wrap:nowrap;gap:2px;padding:0}
body .map-wrap .map-river{stroke:#96b1b3!important;stroke-opacity:.4!important}
@media(max-width:700px){body .zoom-level{top:56px;right:14px;background:#1c3036dd;border-color:#5d716a;color:#bfb698;font-size:9px;padding:5px 8px}}
body .map-pan-help{display:none!important}
body .command-hint{left:14px;right:auto;bottom:16px;transform:none;background:#1b2d34e8;border:1px solid #52665f80;border-radius:4px;color:#aebeb5;font-size:10px;padding:7px 11px;box-shadow:none}
@media(max-width:700px){body .map-tools{left:45px;max-width:calc(100% - 61px)}body .command-hint{display:none!important}}
body .research-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 16px}
body .research-slots .research-slot{min-width:0;min-height:64px;height:auto;padding:12px;line-height:1.6}
body .research-slots .research-slot.empty{background:transparent;border-style:dashed;border-color:#4c6464;color:#a8bcb5;box-shadow:none}
@media(max-width:900px){body .research-slots{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){body .research-slots{grid-template-columns:minmax(0,1fr)}body .research-slots .research-slot{min-height:54px}}

/* Readability pass: screen-sized labels, strong ink and a clean paper halo. */
body .map-wrap .country-name-label{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-weight:650;fill:#172e32;stroke:#f6efd9;stroke-width:1.8px;stroke-opacity:.95;paint-order:stroke fill;vector-effect:non-scaling-stroke;letter-spacing:.035em;opacity:1;text-rendering:geometricPrecision}
body .map-wrap .minor-country-label{opacity:1}





/* Unified focus reading order: background, conditions, effects, execution, sources. */
body .full-focus-node{height:96px!important;min-height:96px!important;padding:9px 10px 8px!important;display:flex;flex-direction:column;justify-content:center;gap:4px;overflow:hidden}
body .full-focus-node>b{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.4;max-height:2.8em;overflow:hidden;font-size:12px}
body .full-focus-node .focus-node-impact{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:1.4;font-style:normal;color:#d6c49a}
body .full-focus-node small{font-size:10px;line-height:1.3;color:#b2c0c3}
body .full-focus-node.locked .focus-node-impact{color:#b6b8ad}
body .focus-dossier p{font-size:13px;line-height:1.85;margin:8px 0 12px;color:#d4ddd7}
body .focus-execution-facts{display:grid;grid-template-columns:42px 1fr;gap:6px 10px;margin:10px 0;font-size:12px;line-height:1.7}
body .focus-execution-facts dt{color:#a9babd}body .focus-execution-facts dd{margin:0;color:#d7ddd4}
body .focus-background a{display:block;margin:7px 0;overflow-wrap:anywhere}
body .focus-background p{white-space:pre-line;line-height:1.8}
body .focus-detail .policy-flow article>b{font-size:12px;font-weight:500;color:#c8c4ad}






/* Focus receipts and politics: outcome first, supporting detail on demand. */
.politics-overview{display:flex;flex-wrap:wrap;align-items:center;gap:20px;border-bottom:1px solid #716e52;padding:14px 4px 18px;margin-bottom:18px}.politics-overview h2{margin:4px 0;font-size:21px}.politics-overview>div>small{color:#b5b29f;letter-spacing:.12em}.politics-overview dl{display:flex;flex:1;justify-content:space-around;gap:18px;margin:0}.politics-overview dt{font-size:12px;color:#b3b6ac}.politics-overview dd{font-size:22px;margin:4px 0 0;color:#ede5c7}.politics-overview dd small{display:block;font-size:12px;color:#b7c4ae}.politics-overview nav{display:flex;flex-wrap:wrap;gap:6px}.politics-primary{align-items:start}.politics-disclosure{margin:12px 0;border:1px solid #555e53;padding:0;background:#202b2c}.politics-disclosure>summary{padding:13px 15px;cursor:pointer;font-size:13px;color:#dfd8bb}.politics-disclosure[open]>summary{border-bottom:1px solid #525b50;margin-bottom:10px}.politics-disclosure>p,.politics-disclosure>div,.politics-disclosure>section{margin:12px}.politics-specials>section,.politics-specials>div{margin:14px}.law-category>summary>small{display:block;margin-top:5px;color:#aeb8a7}.law-category .law-option-list{padding:10px}.advisor-drawer{width:min(420px,95vw)!important;padding:20px!important}.advisor-drawer .advisor.candidate-card{display:block;padding:16px 0;border-bottom:1px solid #657064}.candidate-card header{display:flex;gap:12px;align-items:center}.candidate-card header>i{width:38px;height:44px;display:grid;place-items:center;background:#354136;font-size:21px;font-style:normal}.candidate-card h3{font-size:18px;margin:0 0 5px}.candidate-card header small{font-size:12px;line-height:1.6;color:#b8c1b2}.candidate-cost{display:flex;justify-content:space-between;gap:10px;margin:14px 0;font-size:13px}.candidate-cost b{color:#eadbb0}.candidate-cost span{color:#b7cab0}.candidate-cost .blocked{color:#d2ad96}.candidate-effects{margin:14px 0}.candidate-effects h4,.candidate-conditions h4{font-size:12px;color:#b2bda9;margin:8px 0}.candidate-effects p,.candidate-conditions p{font-size:13px!important;line-height:1.7;margin:6px 0!important}.candidate-card footer{display:flex;gap:8px;margin:16px 0}.candidate-card footer button{flex:1;min-height:38px}.candidate-card .politics-disclosure{background:transparent}.candidate-card .politics-disclosure>summary{font-size:12px;padding:10px}.candidate-card .politics-disclosure p,.candidate-card .politics-disclosure small{font-size:12px!important;line-height:1.75}.focus-result{margin:14px 0;padding:15px;border:1px solid #74775b;background:#202c27;color:#dedecb}.focus-result>header{display:flex;justify-content:space-between;font-size:12px;letter-spacing:.07em;color:#c6c49b}.focus-result h3{font-size:14px!important;margin:16px 0 9px}.focus-result ul{list-style:none;padding:0;margin:0}.focus-result-changes li{display:flex;flex-wrap:wrap;align-items:center;gap:7px 12px;padding:11px 0;border-bottom:1px solid #495448}.focus-result-changes li>span{flex:1;min-width:90px;font-size:13px}.focus-result-changes strong{font-size:15px;font-weight:500}.focus-result-changes strong i{font-style:normal;margin:0 9px;color:#a5ae97}.focus-result-changes em{font-style:normal;font-size:12px;color:#d5cda8}.focus-result-pending li{padding:9px 0;font-size:13px;border-bottom:1px solid #465146}.focus-result-pending small{display:block;color:#b8bda9;margin-top:5px;line-height:1.6}.focus-result nav{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.focus-result button{font-size:12px;min-height:32px}.focus-result .result-footnote{display:block;font-size:11px;line-height:1.65;color:#aeb8a6;margin-top:12px}.focus-result p{font-size:13px;line-height:1.7}.focus-result>details>summary{padding:10px 0;font-size:12px;cursor:pointer}.focus-result-history{margin-top:12px}.focus-result-history>summary{cursor:pointer;font-size:12px;color:#d2cfac}.focus-completion-intro{font-size:14px;line-height:1.8;color:#bdc7b7}.focus-completion-legacy{padding:12px;border:1px solid #66715c;line-height:1.8}.focus-detail .focus-result{padding:10px}.focus-detail .focus-result-changes strong{font-size:12px}.focus-detail .focus-result-changes li>span{font-size:12px}.politics-primary .leader-sheet .manpower-status{font-size:12px}.politics-primary .leader-sheet .spirit-card{padding:10px;text-align:left}.politics-primary .cabinet-slots{gap:9px}
@media(max-width:900px){.politics-overview dl{flex-basis:100%;flex-wrap:wrap;justify-content:flex-start}.politics-overview dl>div{min-width:105px}.politics-overview dd{font-size:18px}}

.politics-primary{grid-template-columns:minmax(250px,30%) minmax(0,1fr)!important}.politics-primary>div,.politics-primary>section{min-width:0}.politics-primary .cabinet-slots{grid-template-columns:repeat(3,minmax(0,1fr))}.politics-primary .cabinet-slot{min-width:0}@media(max-width:1000px){.politics-primary{grid-template-columns:1fr!important}.politics-primary .cabinet-slots{grid-template-columns:repeat(2,minmax(0,1fr))}}

body .focus-result>header,body .candidate-card>header{height:auto;min-height:0;position:static;background:transparent;border:0;padding:0;box-shadow:none;grid-template-columns:none;white-space:normal}body #modal.focus-result-modal>article{width:min(680px,94vw);max-height:92vh;padding:26px}body #modal.focus-result-modal #modalText{max-height:calc(92vh - 195px)!important;min-height:200px;white-space:normal;margin:16px 0;overflow:auto}body .focus-result{white-space:normal}body #modal.focus-result-modal .focus-result button{width:auto;margin:0;text-align:center}body #modal.focus-result-modal #modalText>details>summary{padding:12px 2px;cursor:pointer;font-size:13px}body .candidate-card>header>i{flex-shrink:0}body .candidate-card>header>div{min-width:0}

body .politics-primary .law-grid{grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr))!important;min-width:0}body .politics-primary .law-grid>details{min-width:0}

body .candidate-card>header{justify-content:flex-start;gap:12px;text-align:left}body .candidate-card>header>div{flex:1;text-align:left}
/* State-based focus suggestions share the existing dossier. */
.focus-state-advice {border-top:1px solid #52605c;margin-top:16px;padding-top:12px;display:grid;gap:8px}
.focus-state-advice>button {text-align:left;padding:10px;background:#243332;border:1px solid #52615a;border-left:3px solid #b7a67a;white-space:normal}
.focus-state-advice strong,.focus-state-advice small {display:block;line-height:1.6}
.focus-state-advice small {color:#c9d0c8;margin-top:4px}
.focus-advice-label {font-size:12px;color:#c9d0c8;line-height:1.5}
.focus-state-advice {margin:0 0 7px;padding:0;border:1px solid #5b685c;background:#23312b;display:block;max-height:160px;overflow:auto;flex-shrink:0}
.focus-state-advice>summary {padding:8px 10px;color:#dccc9e;font-size:12px;cursor:pointer}
.focus-state-advice>button {display:block;width:calc(100% - 16px);margin:0 8px 7px;padding:7px 10px;font-size:12px}
body .full-production-line .factory-control .allocation-consequence{grid-column:1/-1;flex-basis:100%;display:block;white-space:normal;max-width:240px;color:#d1c29d;font-size:11px;line-height:1.7;margin-top:8px;text-align:left}
body .full-production-line .factory-control{flex-wrap:wrap;max-width:250px}

.event-history-entry{display:grid;grid-template-columns:7.5em 1fr;gap:5px 12px;padding:12px 4px;border-bottom:1px solid #ffffff14}.event-history-entry small{color:#a6b0ab}.event-history-entry b{font-size:14px;font-weight:500;color:#e0ddcb}.event-history-entry span{grid-column:2;color:#b6c1bb;font-size:12px;line-height:1.6}.event-history details{margin-top:12px}.event-history summary{cursor:pointer;color:#c9c4a5}
/* Completed research stays readable and opens its existing effect dossier. */
body .tech-node.research-completed{position:relative;height:auto;min-height:96px;padding-bottom:25px;opacity:.86;filter:none;cursor:pointer;border-color:#75836d}
body .tech-node.research-completed:hover,body .tech-node.research-completed:focus-visible{opacity:1;border-color:#c6b98e}
.research-done-label{position:absolute;right:8px;bottom:5px;font-size:10px;line-height:16px;color:#d2dfc8;letter-spacing:.08em}
.research-workspace,.research-workspace>.research-layout{min-width:0}
.research-category-sidebar{max-width:100%;min-width:0;overflow-x:auto}
.research-category-sidebar>b,.research-category-sidebar>button{flex:0 0 auto;white-space:nowrap}
@media(min-width:1100px){
 .research-workspace:has(>.research-bottom-detail){display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,34%);gap:16px;align-items:start}
 .research-workspace>.research-bottom-detail{position:sticky;top:76px;bottom:auto;margin:0;max-height:calc(100vh - 280px);box-shadow:none}
}

/* Pending choices precede the journal's negative-order history section. */
#managementBody > [data-pending-events] { order: -20; }

/* Ineligibility must not hide the cost or the reason that prevents a choice. */
body button.event-choice-card:disabled{opacity:1;color:#d8dfda;background:#1e2b30;border-style:dashed;cursor:not-allowed}
body button.event-choice-card:disabled .event-choice-story{color:#bac6c1}
body button.event-choice-card:disabled .event-choice-effects{color:#d8dfda}
body button.event-choice-card:disabled .event-choice-blocked{color:#e2c48f}

/* Settled choices have no option grid: let their full receipt use the panel. */
body #modal.event-result-modal>article{width:min(680px,94vw);max-height:92dvh;padding:28px;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px}
body #modal.event-result-modal #modalText{max-height:none!important;min-height:0;margin:12px 0;overflow:auto;white-space:pre-line;font-size:14px;line-height:1.75;scrollbar-color:#a89d70 #26343a}
body #modal.event-result-modal #modalChoices{display:none}
body #modal.event-result-modal #modalClose{margin-top:0!important}
@media(max-width:640px){body #modal.event-result-modal>article{width:calc(100vw - 24px);padding:40px 18px 18px;max-height:calc(100dvh - 24px)}body #modal.event-result-modal h2{font-size:23px;line-height:1.4}}

/* The event overlay covers the top clock. Keep a real pause action in its own header. */
body #modalType:has(.modal-clock){display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-right:28px;letter-spacing:2px}
body .modal-clock{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:#b8c8c7;font:12px/1.5 system-ui,sans-serif;letter-spacing:0}
body .modal-clock .running{color:#ecd58b}
body #modal .modal-clock button{width:auto;min-width:72px;display:inline-block;margin:0;padding:5px 9px;text-align:center;font-size:12px}
body #modal .modal-clock button:disabled{opacity:1;color:#bdc8bd;border-color:#62726e;background:#283c3e;cursor:default}
body #modal.focus-result-modal .focus-result-changes small{grid-column:1/-1;color:#bdcec7}

body #modal.research-result-modal>article{width:min(760px,94vw);max-height:92dvh;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;padding:30px}
body #modal.research-result-modal #modalChoices{display:none}
body #modal.research-result-modal #modalText{white-space:normal!important;max-height:none!important;min-height:0;margin:10px 0;overflow:auto}
body .research-completion-record{padding:18px;border:1px solid #66736b;background:#1c3031;margin-bottom:16px}
body .research-completion-record:last-child{margin-bottom:0}
body .research-completion-record>header{position:static;height:auto;min-height:0;display:flex;gap:12px;align-items:baseline;justify-content:space-between;padding:0;background:none;border:0;box-shadow:none}
body .research-completion-record h3{font:500 17px/1.5 "Songti SC",serif;letter-spacing:0;border:0;margin:0;color:#ede5ca;padding:0}
body .research-completion-record time{font-size:12px;color:#aebfba;white-space:nowrap}
body .research-completion-record h4{margin:16px 0 6px;font-size:13px;color:#d9c98d}
body .research-completion-record ul{padding-left:20px;margin:6px 0;line-height:1.8}
body .research-completion-note{color:#becdc8;font-size:13px;line-height:1.8}
body .research-completion-record nav{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0}
body #modal .research-completion-record nav button{width:auto;margin:0;padding:8px 12px;text-align:center}
@media(max-width:640px){body #modal.research-result-modal>article{padding:40px 18px 18px;width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}body #modal.research-result-modal h2{font-size:23px;line-height:1.4}body .research-completion-record{padding:14px}body .research-completion-record>header{flex-wrap:wrap;gap:4px}}
/* Result cards size against the full viewport, including the top bar area. */
body #modal:is(.event-result-modal,.focus-result-modal,.research-result-modal){inset:0;height:100dvh;padding:12px;box-sizing:border-box;overflow:hidden}
body #modal.focus-result-modal>article{grid-template-rows:auto auto minmax(0,1fr) auto;max-height:calc(100dvh - 24px)}
body #modal.focus-result-modal #modalChoices{display:none}
body #modal.focus-result-modal #modalText{min-height:0;max-height:none!important}

/* Keep the existing construction queue reachable before the long city list. */
@media(max-width:760px){
 #managementBody .construction-layout{grid-template-columns:minmax(0,1fr);height:auto}
 #managementBody .construction-layout>aside{order:-1;grid-column:auto;max-height:45vh;overflow:auto}
}

.army-command-card .army-parent-action{grid-column:2/-1;justify-self:start;max-width:100%}

@media(max-width:760px){
 .recruitment-controls{display:flex;flex-wrap:wrap;gap:10px}
 .recruitment-controls>label{min-width:0;max-width:100%}
 .recruitment-controls select{min-width:0;max-width:100%}
}

/* The command dock must not inherit the large portrait font size. */
body .decision-visible.decision-locked{opacity:1}
body .decision-visible.decision-locked small{color:#c9c5ad}
body .decision-visible.decision-locked button:disabled{opacity:.72;border-style:dashed}
body #armyCommandBar .general-slot.command-capacity{font-size:12px;line-height:1.4}
body #armyCommandBar .command-capacity>span{min-width:0;grid-template-columns:minmax(0,1fr) auto}
body #armyCommandBar .command-capacity span small{font-size:10px;white-space:normal;overflow-wrap:anywhere}
body #armyCommandBar .marshal-command-badge{min-width:0;line-height:1.4}
@media(max-width:700px){
 body>header .top>span:has(#date){display:inline-flex;align-items:center;flex-shrink:0;padding:4px 7px;position:static}
 body>header .top>span:has(#date) .command-icon-wrap{display:none}
 body>header .top #date{font-size:11px;white-space:nowrap}
 body.ux-selecting #selectedDivisionRoster{left:48px;max-height:min(38vh,calc(100% - 260px));overflow:auto}
 body.ux-selecting #armyCommandBar{left:48px;width:calc(100% - 60px);max-width:calc(100% - 60px)}
 body #armyCommandBar .command-capacity>i,body #armyCommandBar .marshal-command-badge>i{width:24px;height:28px;flex-shrink:0;font-size:14px}
 body #armyCommandBar>.general-slot.command-capacity{min-width:140px;max-width:100%;min-height:48px;height:auto!important;padding:4px 7px}
 body #armyCommandBar .command-capacity span strong{font-size:13px}
 body #armyCommandBar>.marshal-command-badge{flex:0 1 180px;max-width:100%;font-size:11px}
 body #armyCommandBar .marshal-command-badge>span{min-width:0}
 body #armyCommandBar button{font-size:11px;padding:6px 8px}
}
.mobile-time-controls{display:none}
body .battle-compact.neutral .battle-card{fill:#243138;stroke:#a6b3af}
@media(max-width:700px){
 body>header{height:auto;grid-template-rows:auto auto auto}
 body>header>.brand,body>header>.top{grid-row:1}
 body>header>#warnings{grid-row:3;grid-column:1/-1}
 body>header>.clock-status{display:none}
 body>header>.mobile-time-controls{grid-row:2;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0;padding:5px 0;border-top:1px solid #40505260}
 body .mobile-time-controls>span{display:inline-flex;align-items:center;flex:1;white-space:nowrap;color:#e6e1d1;font-size:11px;font-variant-numeric:tabular-nums}
 body .mobile-time-controls .command-icon-wrap{display:none}
 body .mobile-time-controls button{flex:0 0 auto;min-width:29px;min-height:30px;padding:5px 6px;font-size:11px}
 body .mobile-time-controls #pause{min-width:32px}
}
@media(max-width:360px){
 body>header>.mobile-time-controls{gap:2px}
 body .mobile-time-controls button{min-width:26px;padding:5px 4px}
}

/* Lift interactive controls out of the isolated map artwork. */
.army-interaction-layer{position:absolute;z-index:45;pointer-events:none;overflow:hidden}
.army-interaction-layer>#selectedDivisionRoster,
.army-interaction-layer>#armyCommandBar,
.army-interaction-layer>#clusterPopover{pointer-events:auto}
body.management-open .army-interaction-layer{display:none}

/* Policy choices also appear in the events panel, outside the modal grid. */
.event-card>.policy-choice-card{display:flex;flex-direction:column;gap:8px;width:100%;box-sizing:border-box;text-align:left;white-space:normal;font-size:14px;line-height:1.6;padding:14px;margin-top:10px}
.event-card>.policy-choice-card .event-choice-effects{gap:4px;padding-top:8px}

/* Disabled decision explanations remain readable; only their action is disabled. */
.decision-visible>button:disabled{opacity:1;color:#c8d1cd;background:#202d31;border-color:#526368;cursor:default}

/* Developer-only progression controls use their own layout, not the battalion grid. */
.developer-progression-panel{max-width:1120px;margin:16px auto;padding:22px!important}
.developer-progression-panel>p{line-height:1.8}
.developer-progression-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}
.developer-progression-panel .developer-progression-option{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;padding:16px;border:1px solid #536765;background:#203136;cursor:pointer}
.developer-progression-panel .developer-progression-option>span{display:flex;align-items:center;justify-content:flex-start;gap:10px;width:auto;min-height:0;padding:0;background:none;color:#e7e1c9;white-space:normal;writing-mode:horizontal-tb;font-size:15px;line-height:1.5}
.developer-progression-panel .developer-progression-option input[type=checkbox]{appearance:auto;flex:0 0 18px;width:18px;min-width:18px;height:18px;margin:0;padding:0;box-shadow:none;accent-color:#b7aa70}
.developer-progression-panel .developer-progression-option>small{display:block;line-height:1.8;color:#b8c8c6}
.developer-progression-panel>small:last-child{display:block;margin-top:16px;line-height:1.8}
@media(max-width:800px){.developer-progression-options{grid-template-columns:1fr}}
/* Direct attack preparation stays in the existing order workflow. */
body .attack-preparation-target{display:grid;grid-template-columns:auto minmax(160px,1fr);gap:12px;align-items:center;margin:4px 0 16px;color:#ddd8c8}
body .attack-preparation-target select{width:100%;padding:9px}
body .attack-preparation{display:grid;gap:14px;white-space:normal;color:#dddccf;font-size:13px;line-height:1.65}
body .attack-preparation p{margin:0;white-space:normal}
body .attack-preparation-summary{display:flex;flex-wrap:wrap;gap:8px 24px;padding:12px 14px;background:#273a3e;border-left:3px solid #b9a980;color:#e9e3ce}
body .attack-preparation-summary b{font-size:16px;color:#f4e5bb}
body .attack-preparation-warnings{margin:0;padding:10px 14px 10px 32px;background:#40382b;color:#f2d7a3;border:1px solid #6d5c3e}
body .attack-preparation-table{overflow:auto;max-height:38vh;border:1px solid #475553}
body .attack-preparation table{width:100%;border-collapse:collapse;text-align:left;background:#19272d;font-size:12px;line-height:1.6}
body .attack-preparation th{position:sticky;top:0;background:#2b3a3f;color:#e2d8bd;font-weight:500}
body .attack-preparation td,body .attack-preparation th{padding:9px 12px;border-bottom:1px solid #3c4a4b;white-space:normal;min-width:68px}
body .attack-preparation td:first-child{min-width:170px}body .attack-preparation td:last-child{min-width:140px}
body .attack-preparation small{display:block;color:#b4c4bd;font-size:12px;line-height:1.7}
body .attack-preparation-rearguard{display:grid;gap:5px;padding:12px 14px;background:#223137;border:1px solid #415151}
body .attack-preparation .attack-preparation-limit{font-size:12px;color:#b4c4bd}
body .attack-preparation button{width:auto;justify-self:start;padding:10px 18px;font-size:13px}
/* Paper template tile needs dark text even when dock-wide muted rules apply. */
body #armyCommandBar .army-bar-template-icon,body #armyCommandBar .army-bar-template-icon span,body #armyCommandBar .army-bar-template-icon small{background:#d7cba5;color:#18272a}
body #armyCommandBar .army-bar-template-icon small{font-size:11px}

body #modal.attack-preparation-modal>article{width:min(820px,94vw);max-height:92vh;padding:26px}
body #modal.attack-preparation-modal #modalText{min-height:0;margin:0}
body #modal.attack-preparation-modal #modalButtons{max-height:calc(92vh - 190px);overflow:auto;padding-right:4px}

/* Existing actions, settlements and bottlenecks in one read-only report. */
.task-entry[data-open="progress"] i{display:none}
body #modal.strategic-progress-modal{inset:0;height:100dvh;padding:12px;overflow:hidden}
body #modal.strategic-progress-modal>article{width:min(960px,96vw);height:min(880px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:0;min-width:0;padding:24px}
body #modal.strategic-progress-modal #modalChoices{display:none}
body #modal.strategic-progress-modal #modalText{min-height:0;max-height:none!important;margin:12px 0;overflow-y:auto;overflow-x:hidden;white-space:normal!important;scrollbar-color:#a89d70 #26343a}
.strategic-progress-report{color:#dedbcb;font-size:14px;line-height:1.65}
.progress-report-date{font-size:12px;opacity:.8}
.progress-report-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
.strategic-progress-report h3{margin:14px 0 8px;font-size:15px;color:#d7c17e}
.strategic-progress-report .progress-report-card{min-width:0;border:1px solid #566057;background:#203034;padding:12px;margin:8px 0;overflow-wrap:anywhere}
body #modal .progress-report-card>header{height:auto;min-height:0;position:static;background:transparent;border:0;box-shadow:none;display:flex;justify-content:space-between;gap:12px;white-space:normal}
.strategic-progress-report .progress-report-card p{margin:6px 0}
.strategic-progress-report time,body #modal .strategic-progress-report small{font-size:12px;color:#adb7ab;letter-spacing:normal}
body #modal .strategic-progress-report button{display:inline-flex;width:auto;max-width:100%;margin:6px 6px 0 0;text-align:center;justify-content:center}
.strategic-progress-report footer{position:static;height:auto;background:transparent;border-top:1px solid #566057;margin-top:14px;padding-top:10px;display:flex;flex-wrap:wrap}
@media(max-width:700px){.progress-report-columns{grid-template-columns:minmax(0,1fr)}body #modal .progress-report-card>header{display:block}body #modal.strategic-progress-modal>article{padding:18px}}

.progress-report-latest{border-left:3px solid #d7c17e;background:#2b3b3d;padding:12px;margin:12px 0}.progress-report-latest p{margin:5px 0}

.progress-report-policy-list{border:1px solid #566057;padding:10px;margin:10px 0}.progress-report-policy-list summary{cursor:pointer;color:#d7c17e}.progress-report-policy{padding:8px 0}.progress-report-policy p{margin:4px 0}

/* Vehicle design: keep engineering limits separate from component names. */
.tank-designer-v48 .tank-component-list button small{display:block;margin-top:4px;line-height:1.45;color:#bac3ba;font-size:11px;white-space:normal}
.tank-designer-v48>section:nth-of-type(2)>label{display:grid;gap:6px;margin:12px 0}
.tank-designer-v48>section:nth-of-type(2)>label input,.tank-designer-v48>section:nth-of-type(2)>label select{width:100%;min-width:0;box-sizing:border-box}
.tank-designer-v48>section:nth-of-type(2)>p{line-height:1.7;color:#c5cbbf}
.tank-designer-v48 [data-clone-tank]{margin:2px 0 5px}
@media(max-width:1000px){.tank-designer-v48{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr)}.tank-designer-v48>aside{grid-column:1/-1}.tank-designer-v48 .tank-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}}
@media(max-width:650px){.tank-designer-v48{grid-template-columns:minmax(0,1fr)}.tank-designer-v48>aside{grid-column:auto}}

/* Focus directory: keep complete routes under readable subject headings. */
body .focus-subtree-nav .focus-directory-group{border:0;border-top:1px solid #445253;padding:8px 0 2px;margin:2px 0;background:transparent}
.focus-directory-group>summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;font-size:12px;font-weight:600;line-height:1.5;color:#d2c9af;padding:4px 1px 8px}
.focus-directory-group>summary::before{content:'▸';color:#98a696;font-size:10px}.focus-directory-group[open]>summary::before{content:'▾'}
.focus-directory-group>summary::-webkit-details-marker{display:none}.focus-directory-group>summary small{margin-left:auto;color:#93a19b;font-size:10px;white-space:nowrap}
.focus-directory-group>div{display:grid;gap:5px}.focus-directory-group button{margin:0;width:100%}
.focus-directory-group:has(button.active)>summary{color:#ece0bc}

.focus-followups>p{font-size:11px;color:#9eaaa3;margin:4px 0 8px}.focus-followups>div,.focus-followups details>div{display:grid;gap:5px}.focus-followups button{text-align:left;padding:8px 10px;line-height:1.5;background:#273537;border:1px solid #475956;color:#d8ddcc}.focus-followups button b{display:block;font-size:12px;font-weight:500}.focus-followups button small{display:block;font-size:10px;color:#a9b5ac;margin-top:3px}.focus-followups details{margin-top:7px}.focus-followups summary{font-size:11px;color:#b9c1b0;cursor:pointer;margin:6px 0}
@media(max-width:900px){
 .focus-subtree-nav:has(.focus-directory-group){max-height:126px;padding:5px}
 .focus-subtree-nav [data-focus-branches]{align-items:flex-start}
 body .focus-subtree-nav .focus-directory-group{flex:0 0 auto;min-width:126px;margin:0;padding:0 4px 3px;border-top:0;border-left:1px solid #445253}
 .focus-directory-group>summary{padding:4px 3px 7px;min-height:24px;white-space:nowrap}
 .focus-directory-group>div{display:flex;gap:5px}
 .focus-directory-group button{flex:0 0 140px;width:140px;min-height:45px}
}

/* Foreign files keep the portrait beside the identity, with historical notes
   below at full panel width. A third grid item must not inherit the flag track. */
.foreign-diplomacy-head{grid-template-columns:62px minmax(0,1fr);align-items:start;gap:8px 10px}
.foreign-diplomacy-head>.flag{grid-column:1;grid-row:1;justify-self:center}
.foreign-diplomacy-head>.leader-portrait,.foreign-diplomacy-head>.portrait{grid-column:1;grid-row:2;justify-self:center}
.foreign-diplomacy-head>.foreign-country-identity{grid-column:2;grid-row:1/3;min-width:0;overflow-wrap:anywhere}
.foreign-country-identity h3{margin:0 0 6px;line-height:1.5}
.foreign-country-identity>b,.foreign-country-identity>small{display:block;line-height:1.6}
#panel>.harmony-history-note{width:100%;min-width:0;overflow-wrap:anywhere}

.diplomacy-facts>p{margin:0;padding:6px 0;min-width:0;line-height:1.6;overflow-wrap:anywhere}
.map-bottom-detail .core-status a{color:#dfc381;text-decoration:underline;text-underline-offset:2px}
.map-bottom-detail .core-status a:hover,.map-bottom-detail .core-status a:focus-visible{color:#fff0bb}
