:root{font-family:Georgia,'Noto Serif SC','SPQR CJK',serif;color:#e8dfc8;background:#151b1b;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:1000px}button{font:inherit;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible{outline:2px solid #d6b56e;outline-offset:2px}.top{height:82px;background:#202523;border-bottom:2px solid #8f352d;display:flex;align-items:center;padding:0 22px;gap:27px;box-shadow:0 3px 10px #0005;position:relative;z-index:4}.brand{display:flex;align-items:center;gap:11px;min-width:143px}.laurel{font-size:27px;color:#bc9b5b}.brand h1{font-family:Cinzel,Georgia,'SPQR CJK',serif;font-weight:700;font-size:26px;letter-spacing:3px;margin:0;line-height:1}.brand small{font-family:Georgia,'SPQR CJK',serif;color:#a89372;font-size:8px;letter-spacing:1.5px}.campaign-name{display:flex;flex-direction:column;gap:5px;min-width:205px;border-left:1px solid #5e5b4d;padding-left:23px}.campaign-name b{font-family:Cinzel,Georgia,'SPQR CJK',serif;font-size:13px;color:#eddfba;white-space:nowrap}.campaign-name small{font-size:11px;color:#afa993}.top-stats{display:flex;flex:1;justify-content:space-around;gap:12px}.stat{display:flex;flex-direction:column;gap:4px;min-width:75px}.stat small{color:#a3977c;letter-spacing:1px;font:9px Arial,'SPQR CJK',sans-serif}.stat strong{font:700 16px Georgia,'SPQR CJK',serif;color:#eee3c7;white-space:nowrap}.language{background:transparent;border:1px solid #807765;color:#e9dbbe;padding:7px 10px;min-width:51px;font:12px Arial,'SPQR CJK',sans-serif}.language:hover{background:#3c3f35}.shell{display:grid;grid-template-columns:166px minmax(0,1fr) 310px;height:calc(100vh - 82px);min-height:650px}.rail{background:#232926;border-right:1px solid #4a4b3e;display:flex;flex-direction:column;padding:22px 9px;gap:5px}.rail-label{font-family:Cinzel,'SPQR CJK',serif;color:#7d7464;font-size:9px;line-height:1.7;letter-spacing:1.4px;padding:0 13px 23px}.rail-item{background:transparent;border:0;color:#c7c4b3;text-align:left;padding:12px 11px;font-size:13px;display:flex;align-items:center;gap:12px;border-left:3px solid transparent}.rail-item span{font-size:18px;width:22px;text-align:center;color:#b69b69}.rail-item.active{background:#3a3830;border-left-color:#b64937;color:#fff2d7}.rail-item:hover{background:#373c36}.rail-foot{margin-top:auto;padding:15px;color:#6e776c;text-align:center;line-height:1.8;font:12px Cinzel,'SPQR CJK',serif;letter-spacing:2px}main{min-width:0;display:flex;flex-direction:column;background:#2a302e}.map-toolbar{height:77px;display:flex;justify-content:space-between;align-items:center;padding:13px 21px;background:#303632;border-bottom:1px solid #515446}.eyebrow{font:10px Arial,'SPQR CJK',sans-serif;letter-spacing:2.1px;color:#bf9d69;text-transform:uppercase}.map-toolbar h2{font:600 21px Cinzel,Georgia,'SPQR CJK',serif;color:#f2e3c3;margin:4px 0 0}.controls{display:flex;align-items:center;gap:5px}.controls button{background:#232927;border:1px solid #687066;color:#ddd4bf;font:12px Arial,'SPQR CJK',sans-serif;padding:9px 10px;white-space:nowrap}.controls button:hover{background:#414b40}.controls .play{background:#7e332d;border-color:#a75142;color:#fff0dc;min-width:62px}.controls .step{background:#465142}.control-sep{width:9px}.map-wrap{position:relative;min-height:0;flex:1;overflow:hidden;background:#a8b3aa}#map-svg{width:100%;height:100%;display:block;object-fit:fill}.coast{fill:#c5bd9e;stroke:#777e70;stroke-width:2.5}.land-grain{fill:#705a35;pointer-events:none}.sea-label{fill:#536b66;opacity:.48;font:italic 18px Georgia,'SPQR CJK',serif;letter-spacing:5px}.route{stroke:#727968;stroke-width:2;stroke-opacity:.56;stroke-dasharray:6 5}.route.sea{stroke:#f3e5c2;stroke-opacity:.73;stroke-dasharray:4 7}.theater{cursor:pointer}.halo{opacity:.21;stroke:#41382b;stroke-width:1}.ring{fill:#e7dec3;stroke-width:4}.core{stroke:#efe6cf;stroke-width:1}.theater.selected .halo{opacity:.36;stroke:#fff0cb;stroke-width:2}.theater.reachable .ring{stroke:#f7f1c9;stroke-width:7;animation:pulse 1.3s infinite alternate}@keyframes pulse{from{opacity:.55}to{opacity:1}}.node-mark{font:bold 12px Arial,'SPQR CJK',sans-serif;text-anchor:middle;fill:white;pointer-events:none}.node-label{font:700 13px Georgia,'Noto Serif SC','SPQR CJK',serif;paint-order:stroke;stroke:#c6c3ad;stroke-width:3px;fill:#26312e;text-anchor:middle;pointer-events:none}.city-label{font:italic 11px Georgia,'SPQR CJK',serif;paint-order:stroke;stroke:#c8c4ae;stroke-width:2px;fill:#3f4d43;text-anchor:middle;pointer-events:none}.army-marker{cursor:pointer;filter:drop-shadow(0 2px 2px #17201b77)}.army-marker rect{stroke:#f0dcb3;stroke-width:1.5}.army-marker.selected rect{stroke:#fff5cf;stroke-width:3}.army-marker text{font:bold 10px Arial,'SPQR CJK',sans-serif;fill:white;text-anchor:middle;pointer-events:none}.map-credit{font:9px Arial,'SPQR CJK',sans-serif;fill:#2b4944;letter-spacing:1.1px}.map-hint{position:absolute;left:18px;top:17px;max-width:340px;background:#28302bdb;border-left:3px solid #bca16c;color:#f2e5c9;padding:10px 13px;font-size:11px;line-height:1.5;box-shadow:0 2px 8px #1e252266;pointer-events:none}.map-footer{height:38px;background:#303630;border-top:1px solid #606b61;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 16px;color:#bdbea9;font:10px Arial,'SPQR CJK',sans-serif;white-space:nowrap;overflow:hidden}.legend{display:flex;align-items:center;gap:7px}.legend span{letter-spacing:1px;color:#e3d6b5;margin-right:7px}.legend i{width:9px;height:9px;margin-left:9px;border:1px solid #d7ccb2}.inspector{background:#e6dcc3;color:#2a3029;border-left:3px solid #8e3c31;overflow-y:auto;padding:22px 18px 30px;box-shadow:inset 3px 0 9px #6a635b33}.inspector .eyebrow{color:#8c5439}.panel-heading{border-bottom:1px solid #b5a98d;padding-bottom:13px;margin-bottom:18px}.panel-heading h2{font:600 19px Cinzel,Georgia,'SPQR CJK',serif;margin:6px 0 0;color:#3f3029}.region-title{display:flex;align-items:center;gap:13px;padding:2px 0 17px}.shield{width:49px;height:54px;background:var(--faction);clip-path:polygon(0 0,100% 0,100% 72%,50% 100%,0 72%);display:grid;place-items:center;color:#f9e6c6;font:8px Cinzel,'SPQR CJK',serif;letter-spacing:.5px}.region-title h3{font:700 17px Georgia,'SPQR CJK',serif;margin:0 0 4px}.region-title small{font:italic 12px Georgia,'SPQR CJK',serif;color:#756d5b}.detail-list{margin:0 0 17px}.detail-list div{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #c7baa0;font-size:12px}.detail-list dt{color:#746d5e}.detail-list dd{margin:0;font-weight:700}.action{width:100%;padding:11px 10px;border:1px solid #9b7e5e;color:#503f31;background:#d9c9a8;font-size:11px;line-height:1.35;text-align:center}.action:hover{background:#ead4ab}.action.primary{background:#873b2f;color:#f5e6cb;border-color:#70281f;margin-top:13px}.action.primary:hover{background:#a24837}.separator{height:1px;background:#a99b7e;margin:25px 0 21px}.section-title{font:600 16px Cinzel,Georgia,'SPQR CJK',serif;margin:8px 0 14px}.selected-army{display:flex;flex-direction:column;gap:7px;border-left:3px solid #9c4032;padding:5px 10px;background:#d8ceb6}.selected-army b{font-size:13px}.selected-army small{font-size:11px;color:#514f41}.order-note,.hint{font-size:12px;color:#6c6455;line-height:1.55}.army-list{display:flex;flex-direction:column;gap:7px}.army-row{display:flex;justify-content:space-between;text-align:left;align-items:center;width:100%;border:1px solid #b9a98d;background:#ddd0b4;padding:11px 9px;gap:7px;color:#2d332e}.army-row.on{border-left:4px solid #a54133;background:#f0dfbb}.army-row span{display:flex;flex-direction:column;gap:5px}.army-row b{font-size:12px}.army-row small{font-size:10px;color:#5d6457}.army-row strong{font-size:12px}.rule-block{border-bottom:1px solid #bdb094;margin:0 0 20px;padding-bottom:14px}.rule-block h3{font:600 16px Cinzel,Georgia,'SPQR CJK',serif;color:#47372c;margin:0 0 9px}.rule-block p,.source-note{font-size:12px;line-height:1.65;color:#5f5a4b;margin:0 0 10px}.segmented{display:flex;margin:11px 0;gap:2px}.segmented button{flex:1;padding:9px 2px;border:1px solid #aa9b81;background:#d8cdb5;color:#443e31;font-size:12px}.segmented button.active{background:#81392e;color:#fff0cf;border-color:#81392e}.dispatches{display:flex;flex-direction:column;gap:10px}.dispatches article{border-left:3px solid #a04535;padding:3px 7px;background:#dcd0b8}.dispatches small{font:10px Arial,'SPQR CJK',sans-serif;color:#826749;letter-spacing:1px}.dispatches p{font-size:12px;line-height:1.5;margin:5px 0}.source-list{display:flex;flex-direction:column;gap:9px}.source-list a{display:flex;flex-direction:column;gap:6px;color:#493d2e;text-decoration:none;border:1px solid #bdad91;background:#ded2b9;padding:10px;font-size:12px;line-height:1.45}.source-list a:hover{background:#f2e2c2}.source-list small{font:10px Arial,'SPQR CJK',sans-serif;color:#8a3d30}.toast,.victory{position:fixed;z-index:10;bottom:24px;left:50%;transform:translateX(-50%);background:#26322b;color:#f5e4bd;border:1px solid #c5a06b;padding:12px 22px;box-shadow:0 4px 20px #0008;font-size:13px}.victory{top:88px;bottom:auto;background:#6a342d}
@media(max-width:1250px){.top{gap:14px;padding:0 11px}.campaign-name{min-width:175px;padding-left:12px}.top-stats{gap:6px}.stat{min-width:65px}.shell{grid-template-columns:125px minmax(0,1fr) 285px}.rail-item{font-size:11px;gap:5px}.map-footer>div:last-child{display:none}}@media(max-width:1050px){.top-stats .stat:nth-last-child(-n+2){display:none}.controls button{padding:8px 6px}.shell{grid-template-columns:100px minmax(0,1fr) 270px}.rail-label{font-size:7px}.rail-item{font-size:10px;gap:2px}.rail-item span{font-size:14px;width:16px}}
@media(max-width:700px){body{min-width:0}.top{height:auto;min-height:76px;flex-wrap:wrap;padding:10px;gap:8px}.brand{min-width:110px}.campaign-name{min-width:0;flex:1}.top-stats{order:3;width:100%;flex-basis:100%;justify-content:space-between}.stat strong{font-size:12px}.stat small{font-size:8px}.shell{height:auto;min-height:0;display:flex;flex-direction:column}.rail{flex-direction:row;padding:4px;overflow-x:auto}.rail-label,.rail-foot{display:none}.rail-item{white-space:nowrap;border-left:0;border-bottom:3px solid transparent;padding:8px}.rail-item.active{border-bottom-color:#b64937}.map-toolbar{height:auto;min-height:100px;align-items:flex-start;gap:8px;flex-direction:column}.controls{flex-wrap:wrap}.map-wrap{height:360px;flex:none}#map-svg{width:100%;height:100%}.map-hint{font-size:10px;max-width:240px}.map-footer{overflow-x:auto}.inspector{border-left:0;border-top:3px solid #8e3c31;max-height:none}.diplomatic-country{margin:14px 0}}
.faction-select{color:#ded3bb;font:11px Arial,'SPQR CJK',sans-serif;white-space:nowrap}.faction-select select{background:#232927;color:#f1e5cb;border:1px solid #687066;padding:8px 5px;max-width:125px}.diplomatic-country{border-bottom:1px solid #b5a98d;padding:12px 0;font-size:12px}.diplomatic-country .action{margin-top:4px}
.overview .city-name,.overview .dense .province-label{display:none}
.map-area.reachable{stroke:#fff4bd;stroke-width:3;stroke-dasharray:5 3;filter:brightness(1.12)}.march-prompt{position:absolute;top:12px;left:12px;z-index:4;background:#e5d7bdeF;color:#453426;border:1px solid #8c785d;padding:8px;font:12px Arial,'SPQR CJK',sans-serif}.march-prompt button{background:#863d32;color:#fff0d4;border:0;padding:5px;margin-left:8px}.march-prompt select,.theater-picker select{max-width:160px;background:#f3e9d3;border:1px solid #a7977a;color:#3c3025;padding:5px}.theater-picker{display:flex;align-items:center;justify-content:space-between;gap:6px;font:11px Arial,'SPQR CJK',sans-serif;color:#655746}.map-group-note{font:11px/1.4 Arial,'SPQR CJK',sans-serif;color:#6d6150}
#save,#load{display:none}.setup-saves{display:flex;gap:8px}.setup-saves button{flex:1;padding:9px;background:#ddd0b3;color:#49392b;border:1px solid #958163}
/* Campaign atlas */
body{min-width:0;background:#292d29}.top{height:54px;padding:0 12px;gap:15px;background:#e3d9bd;color:#302c25;border-bottom:3px solid #79533d;box-shadow:0 2px 9px #0008}.brand{min-width:94px;gap:6px}.brand h1{font-size:20px;color:#7b302b}.brand small{font-size:6px;color:#6d5d48}.laurel{font-size:18px;color:#8e693c}.campaign-name{min-width:150px;padding-left:12px;border-color:#ad9d80}.campaign-name b{font-size:10px;color:#4e3529}.campaign-name small{display:none}.top-stats{gap:8px;justify-content:flex-start}.stat{min-width:67px;gap:1px}.stat small{font:8px Arial,'SPQR CJK',sans-serif;color:#746954}.stat strong{font:700 13px Georgia,'SPQR CJK',serif;color:#342d24}.language{color:#56382b;border:1px solid #a59678;padding:5px 8px}.shell{position:relative;display:grid;grid-template-columns:58px minmax(0,1fr);height:calc(100vh - 54px);min-height:0}.rail{padding:6px 3px;gap:3px;background:#302f29;z-index:3;border-right:2px solid #857052}.rail-label,.rail-foot{display:none}.rail-item{height:49px;display:flex;flex-direction:column;justify-content:center;gap:1px;padding:3px 0;border-left:2px solid transparent;font:9px Arial,'SPQR CJK',sans-serif;text-align:center}.rail-item span{width:auto;font-size:18px;color:#d3b67e}.rail-item.active{background:#514b3c;border-left-color:#ad4534}.shell main{position:relative;display:block;overflow:hidden}.map-wrap{position:absolute;inset:0;height:auto;background:#485f69}.map-hint,.map-footer{display:none}#map-svg{width:100%;height:100%;display:block;touch-action:none;cursor:grab;background:#485f69}#map-svg:active{cursor:grabbing}.map-area polygon{stroke:#5d5749;stroke-width:1.5;stroke-linejoin:round;opacity:.88;cursor:pointer}.map-area:hover polygon{filter:brightness(1.16);stroke:#f4e3bb;stroke-width:2.7}.map-area.selected polygon{stroke:#f4e0a6;stroke-width:3}.province-label{font:600 11px Georgia,'Noto Serif SC','SPQR CJK',serif;letter-spacing:.5px;text-anchor:middle;fill:#282922;paint-order:stroke;stroke:#d3c6a7;stroke-width:2.4px;pointer-events:none}.city-name{font:italic 8px Georgia,'SPQR CJK',serif;fill:#292c25;paint-order:stroke;stroke:#d7ccb0;stroke-width:2px;pointer-events:none}.city-dot{fill:#f5e7c4;stroke:#4e483a;stroke-width:1;pointer-events:none}.sea-name{font:italic 23px Georgia,'SPQR CJK',serif;letter-spacing:6px;fill:#c5c3ad;opacity:.56;pointer-events:none}.unit{cursor:pointer;filter:drop-shadow(0 2px 2px #0009)}.unit rect{stroke:#e2d3b3;stroke-width:1.5}.unit path{fill:none;stroke:#f1e3c2;stroke-width:.8}.unit text{fill:#fff5db;font:bold 10px Arial,'SPQR CJK',sans-serif;text-anchor:middle;pointer-events:none}.unit.selected rect{stroke:#fff4bf;stroke-width:3}.march-arrow{fill:none;stroke:#f7e6ba;stroke-width:3;stroke-dasharray:7 3;pointer-events:none}.inspector{position:absolute;z-index:5;top:12px;left:69px;bottom:60px;width:310px;max-height:none;padding:18px 16px;background:#e5dcc8eF;border:2px solid #8c785d;box-shadow:0 5px 22px #0008;color:#2a3029}.inspector.closed{display:none}.panel-close{position:absolute;right:8px;top:7px;width:26px;height:26px;background:#ded0b3;border:1px solid #9d896a;color:#573c2c;font:20px Georgia,'SPQR CJK',serif;line-height:20px}.panel-heading{padding-right:30px}.map-toolbar{position:absolute;z-index:3;right:14px;bottom:14px;height:auto;padding:7px;gap:9px;background:#ddd1b6ed;border:2px solid #877355;box-shadow:0 3px 10px #0007}.map-toolbar .eyebrow{display:none}.map-toolbar h2{margin:0;color:#3c332a;font:700 13px Georgia,'SPQR CJK',serif;white-space:nowrap}.controls{gap:3px}.controls button{font:10px Arial,'SPQR CJK',sans-serif;padding:7px;background:#ded3b9;border:1px solid #9b8b6d;color:#493a2d}.controls .play{background:#853b30;color:#fff0d3;border-color:#6c3028}.controls .step{background:#9b9b7d;color:#211f19}.map-tools{position:absolute;right:14px;top:12px;display:flex;gap:3px}.map-tools button{padding:7px 9px;background:#ded2b9eF;border:1px solid #806c51;color:#4a392c;font:11px Arial,'SPQR CJK',sans-serif;box-shadow:0 2px 5px #0005}.map-tools button.active{background:#843b30;color:#f9e8c5}.map-attribution{position:absolute;left:12px;bottom:8px;color:#f0e3c7;background:#303a35b8;padding:3px 6px;font:9px Arial,'SPQR CJK',sans-serif;pointer-events:none}.setup-backdrop{position:fixed;z-index:20;inset:0;display:grid;place-items:center;background:#101713aa}.setup-panel{position:relative;width:min(420px,90vw);padding:28px;background:#e6dcc5;color:#332d23;border:3px double #806a4c;box-shadow:0 10px 40px #000a}.setup-panel h2{font:22px Georgia,'SPQR CJK',serif}.setup-panel p{font:13px/1.5 Georgia,'SPQR CJK',serif}.setup-panel select{width:100%;margin:12px 0;padding:9px;background:#f1e5cc;color:#372b21;border:1px solid #958163}.setup-panel .primary{background:#843b30;color:#fff0d3}.source-note,.rule-block p{line-height:1.5}
@media(max-width:1050px){.top-stats .stat:nth-last-child(-n+2){display:none}.campaign-name{min-width:110px}.shell{grid-template-columns:54px minmax(0,1fr)}.rail-item{font-size:8px}.controls button{padding:6px}.map-toolbar{flex-direction:row;align-items:center;min-height:0}.inspector{left:62px}}
@media(max-width:700px){.top{height:54px;flex-wrap:nowrap}.brand{min-width:68px}.brand h1{font-size:16px}.brand small,.campaign-name,.top-stats .stat:nth-child(n+3){display:none}.top-stats{order:0;width:auto;flex:1}.shell{display:grid;grid-template-columns:42px minmax(0,1fr);height:calc(100vh - 54px)}.rail{flex-direction:column;overflow:visible}.rail-item{height:43px;white-space:normal;font-size:8px}.rail-item span{font-size:15px}.map-wrap{position:absolute;inset:0;height:auto}.inspector{left:49px;top:8px;bottom:65px;width:min(290px,calc(100vw - 58px));overflow-y:auto}.map-toolbar{right:5px;bottom:5px;flex-wrap:wrap;max-width:calc(100vw - 52px);gap:3px}.map-toolbar h2{font-size:10px}.controls{gap:2px}.controls button{font-size:9px;padding:5px}.map-tools{right:5px;top:5px}.map-tools button{font-size:9px;padding:5px}.map-attribution{font-size:7px;bottom:52px}.province-label{font-size:10px}.city-name{display:none}}
.map-area{stroke:#5d5749;stroke-width:1.5;stroke-linejoin:round;opacity:.9;cursor:pointer}.map-area:hover{filter:brightness(1.16);stroke:#f4e3bb;stroke-width:2.7}.map-area.selected{stroke:#f4e0a6;stroke-width:3}.map-area.reachable{stroke:#fff4bd;stroke-width:3;stroke-dasharray:5 3}

.evidence-point path{fill:#f4dc9c;stroke:#4a3023;stroke-width:1.2}.evidence-command{cursor:pointer}.evidence-command circle:first-child{fill:#ebd7a2;fill-opacity:.28;stroke:#f5e3aa;stroke-width:1.7;stroke-dasharray:2 2}.evidence-command circle:nth-child(2){fill:#775e43;stroke:#f8e7b5;stroke-width:1.2}.evidence-command.selected circle:first-child{stroke:#fff5c4;stroke-width:3}.evidence-command:focus{outline:none}.evidence-command:focus circle:first-child{stroke:#fff;stroke-width:3}

.identity-inline{display:inline-flex;align-items:center;gap:7px}.identity-inline .faction-mark{width:23px;height:23px;flex:none}.campaign-identity .faction-mark{width:45px;height:48px}.region-title .campaign-identity{flex:none}.diplomatic-country .identity-inline{vertical-align:middle}.selected-army .identity-inline{margin-bottom:5px}
.dynasty-council,.genealogy{border-top:1px solid #8f7655;margin-top:1.5rem;padding-top:1rem}
.dynasty-council h3,.genealogy h3{font-family:Georgia,'SPQR CJK',serif;letter-spacing:.06em}
.dynasty-people,.dynasty-choices{display:grid;gap:.4rem;margin:.7rem 0}
.dynasty-people button{text-align:left;padding:.6rem;background:#efe6d5;border:1px solid #ad9674;color:#2d271e}
.dynasty-people button small{display:block;margin-top:.3rem;color:#665846}
.genealogy>p{font-size:.8rem;line-height:1.45;color:#6c5d49}
.gene-tools{display:flex;align-items:center;gap:.5rem;margin:.7rem 0}
.gene-tools button{width:2rem;height:2rem;border:1px solid #9f8867;background:#eadfca;color:#332819}
.gene-viewport{overflow:auto;height:350px;border:1px solid #ac9878;background:repeating-linear-gradient(0deg,#eee4d2,#eee4d2 27px,#e8dcc6 28px);cursor:grab}
.gene-canvas{position:relative}
.gene-canvas svg{position:absolute;inset:0;pointer-events:none;overflow:visible}
.gene-bio,.gene-adopt,.gene-marriage{fill:none;stroke:#725c3f;stroke-width:2}
.gene-adopt{stroke-dasharray:2 5}.gene-marriage{stroke-dasharray:9 5}
.gene-person{position:absolute;width:104px;height:122px;padding:3px;border:1px solid #9a8261;background:#f7f0e4;color:#29231d;text-align:center;overflow:hidden;box-shadow:0 2px 5px #66553b44}
.gene-person img{display:block;width:42px;height:42px;object-fit:cover;margin:0 auto 2px;border-radius:50%}
.gene-person b,.gene-person small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.7rem}
.gene-person small{font-size:.58rem;color:#6b5b45}
.gene-detail{font-size:.8rem;line-height:1.4;margin:.6rem 0}
.gene-personal-actions{margin:1rem 0;padding:.75rem;border:1px solid #a48f6d;background:#eee3ce;color:#34291f}
.gene-personal-actions h4{margin:0 0 .5rem;color:#68352b;font-size:.9rem}
.gene-personal-actions .hint{color:#514331;line-height:1.5}
.gene-personal-actions label{display:grid;gap:.25rem;margin:.7rem 0 .3rem;color:#443527}
.gene-personal-actions select{width:100%;min-width:0;padding:.45rem;background:#fbf3e4;color:#30271d;border:1px solid #98815f;font:inherit}
.gene-personal-actions button{min-height:2rem;padding:.35rem .65rem;background:#dfcfb1;color:#3a2b20;border:1px solid #927957;font:inherit}
.gene-personal-actions button:hover:not(:disabled){background:#f4e4c6}
.gene-personal-actions [role="status"] button{background:#753c31;color:#fff3dc;border-color:#5d3027}
.chronicle-filters{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:10px 0}.chronicle-filters label{display:grid;gap:3px;color:#b99f75;font:10px Arial,'SPQR CJK',sans-serif}.chronicle-filters input,.chronicle-filters select{min-width:0;width:100%;padding:5px;background:#252e2a;color:#efe3c8;border:1px solid #786f59}.chronicle-setting{display:block;margin:8px 0;color:#d4c4a4;font:11px Arial,'SPQR CJK',sans-serif}.annual-reports{border-top:1px solid #756e56;padding:9px 0}.annual-reports summary{cursor:pointer;color:#cda86f;font:700 11px Arial,'SPQR CJK',sans-serif}.chronicle-results{max-height:48vh;overflow:auto}.chronicle-event{border-top:1px solid #605c4e;padding:9px 0}.chronicle-event small{color:#bca678;font:10px Arial,'SPQR CJK',sans-serif}.chronicle-event p{margin:6px 0}.chronicle-event.priority-critical{border-left:3px solid #a64e40;padding-left:8px}.chronicle-event.priority-major{border-left:2px solid #bb985e;padding-left:8px}.chronicle-event.priority-intelligence{border-left:2px solid #728f91;padding-left:8px}.chronicle-actions{display:flex;flex-wrap:wrap;gap:5px}.chronicle-actions button{padding:5px 7px;background:#35433a;color:#efdfbd;border:1px solid #907c59;font:10px Arial,'SPQR CJK',sans-serif}

/* A document table, not a chess game: ink, paper, seals and dated reports. */
.chessboard-active .inspector,.chessboard-active .map-footer{display:none}
.chessboard-mode>#map-svg,.chessboard-mode>.map-hint,.chessboard-mode>.map-tools,.chessboard-mode>.map-attribution,.chessboard-mode>.march-prompt{display:none}
.chessboard{position:absolute;inset:0;overflow:auto;padding:28px clamp(18px,4vw,58px) 130px;color:#332b23;background:repeating-linear-gradient(0deg,#d7c8a9 0,#d7c8a9 3px,#dbcdaf 4px,#dbcdaf 8px);font-family:Georgia,'Noto Serif SC','SPQR CJK',serif}
.board-mast{max-width:1420px;margin:0 auto;display:flex;justify-content:space-between;align-items:center;border-bottom:3px double #765c3d;padding:3px 0 18px;gap:20px}
.board-overline,.board-section-head span{color:#8a4732;letter-spacing:.19em;font:700 10px/1.4 Arial,'SPQR CJK',sans-serif}.board-mast h1{font:700 clamp(28px,4vw,45px)/1 Georgia,'SPQR CJK',serif;letter-spacing:.04em;color:#493528;margin:8px 0}.board-mast p{font-style:italic;color:#66543f;margin:0}.board-seal{width:66px;height:66px;border-radius:50%;display:grid;place-items:center;flex:none;background:#873d30;border:4px double #d1a86d;color:#f3dcb2;font:700 11px Georgia,'SPQR CJK',serif;box-shadow:1px 3px 5px #5b432855}
.board-note{max-width:1420px;margin:16px auto 18px;padding:10px 14px;border-left:4px solid #98543b;background:#f1e8d5;color:#594a36;font:13px/1.5 Georgia,'Noto Serif SC','SPQR CJK',serif}
.board-grid,.board-lower{max-width:1420px;margin:0 auto 18px;display:grid;grid-template-columns:minmax(0,2fr) minmax(270px,1fr);gap:18px}.board-lower{grid-template-columns:1fr 1fr}.board-sheet{min-width:0;padding:19px;background:#eee4d0;border:1px solid #aa9874;box-shadow:0 2px 7px #6d5a3b30;color:#352c22}.board-section-head{display:flex;justify-content:space-between;align-items:end;gap:12px;border-bottom:1px solid #a6916e;padding-bottom:11px;margin-bottom:13px}.board-section-head h2{font:700 20px Georgia,'SPQR CJK',serif;margin:5px 0 0;color:#503929}.board-section-head small,.board-caption{color:#74634d;font:11px/1.4 Arial,'Microsoft YaHei','SPQR CJK',sans-serif}.board-sheet>p{font:13px/1.55 Georgia,'Noto Serif SC','SPQR CJK',serif}.board-sheet h3{font-size:18px;color:#54392c}.board-sheet h4{font:700 11px Arial,'Microsoft YaHei','SPQR CJK',sans-serif;text-transform:uppercase;letter-spacing:.08em;color:#876b4a;margin-top:22px}
.board-key{display:flex;gap:14px;flex-wrap:wrap;font:11px Arial,'Microsoft YaHei','SPQR CJK',sans-serif;color:#605443}.board-key .known{color:#365d49}.board-key .reported{color:#806b40}.board-key .rumor{color:#994c39}.board-map-scroll{overflow:auto;border:1px solid #c2b292;margin-top:12px;background:radial-gradient(ellipse at center,#f6edda,#e5d6b8)}.board-network{display:block;width:100%;min-width:700px;height:auto}.board-map-frame,.board-guide{fill:none;stroke:#a6926e;stroke-width:1.1}.board-guide{stroke-dasharray:4 8;opacity:.42}.board-link{stroke:#657863;stroke-width:2.4;opacity:.8}.board-link.reported{stroke:#9b8050;stroke-dasharray:9 6}.board-link.rumor{stroke:#a35440;stroke-dasharray:3 7;stroke-width:3}.board-marker{cursor:pointer}.board-marker circle{fill:#617566;stroke:#f4e6c9;stroke-width:3;filter:drop-shadow(1px 2px 2px #533e2944)}.board-marker.person circle{fill:#8a6e52}.board-marker.institution circle{fill:#9a8052}.board-marker.movement circle{fill:#a34e3b}.board-marker.coalition circle{fill:#566d6b}.board-marker.reported circle{stroke-dasharray:7 3}.board-marker.rumor circle{stroke:#9d4235;stroke-dasharray:3 3}.board-marker.selected circle,.board-marker:focus circle{stroke:#542e1e;stroke-width:5}.board-marker text{fill:#fff2d7;font:700 17px Georgia,'SPQR CJK',serif;pointer-events:none}.board-marker .board-marker-label{fill:#3e3428;font:700 12px Georgia,'Noto Serif SC','SPQR CJK',serif;paint-order:stroke;stroke:#f1e6ce;stroke-width:4px;stroke-linejoin:round}
.board-roster{border-top:1px solid #c2b08c;padding-top:10px}.board-roster summary{cursor:pointer;color:#704932;font:700 12px Arial,'Microsoft YaHei','SPQR CJK',sans-serif}.board-roster>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:5px;margin-top:10px}.board-roster-item{text-align:left;border:1px solid #b8a482;background:#f7edda;color:#423529;padding:7px}.board-roster-item span,.board-roster-item small{display:block}.board-roster-item small{font:10px Arial,'Microsoft YaHei','SPQR CJK',sans-serif;color:#806b52;margin-top:3px}.board-roster-item.selected{border-color:#943e30;box-shadow:inset 3px 0 #943e30}
.board-stamp{display:inline-block;border:1px solid #9c5742;padding:4px 7px;color:#8a4434;font:700 10px Arial,'Microsoft YaHei','SPQR CJK',sans-serif;letter-spacing:.08em}.board-connections,.board-objectives{list-style:none;padding:0;margin:0}.board-connections li{border-top:1px solid #d0bea0;padding:9px 0;font-size:13px}.board-connections span,.board-connections p,.board-objectives small{color:#806e57;font:11px/1.4 Arial,'Microsoft YaHei','SPQR CJK',sans-serif}.board-connections p{margin:5px 0}.board-risk{border-left:3px solid #957346;padding:3px 0 3px 10px;margin:12px 0}.board-risk.rumor{border-color:#a4533f}.board-risk strong,.board-risk small,.board-advice small{font:700 10px Arial,'Microsoft YaHei','SPQR CJK',sans-serif;color:#8b5c3d;letter-spacing:.05em}.board-risk p{margin:4px 0;font-size:13px;line-height:1.45}.board-objectives li{border-top:1px solid #d1c1a5;padding:7px 0;font-size:13px}.board-objectives small{display:block;margin:3px 0 0 16px}.board-advice{border-top:1px solid #c6b392;padding:12px 0}.board-advice blockquote{margin:6px 0 0;color:#4b3b2e;font:italic 14px/1.55 Georgia,'Noto Serif SC','SPQR CJK',serif}.board-feather{border:1px solid #a58b5b;background:#e5d5ae;padding:12px;color:#5b492e}.board-feather b{font:700 10px Arial,'Microsoft YaHei','SPQR CJK',sans-serif;letter-spacing:.1em}.board-feather p{font-size:13px;line-height:1.5;margin:7px 0 0}
@media(max-width:850px){.board-grid,.board-lower{grid-template-columns:1fr}.chessboard{padding:18px 14px 125px}.board-mast h1{font-size:28px}.board-sheet{padding:14px}.board-evidence{order:-1}.board-network{min-width:640px}}
.board-network{min-width:850px}.board-marker .board-marker-label{font-size:15px}
@media(max-width:850px){.board-network{min-width:760px}}

/* Keep the complete setup usable on smaller screens. */
.setup-panel{max-height:92vh;overflow:auto}.setup-feedback:not(:empty){padding:8px;color:#842f28;background:#f5e5d0}.setup-panel #setup-language{float:right;padding:6px 9px}.setup-panel label{display:block}.setup-panel label:has(input[type=checkbox]){margin:12px 0;line-height:1.4}

.action:disabled{opacity:.48;cursor:not-allowed;filter:grayscale(.5)}.recruit-reason{color:#c5b38e;margin:7px 0 0}

.victory-progress{display:flex;align-items:center;gap:12px;padding:7px 17px;background:#29332e;color:#e7d5ae;border-bottom:1px solid #756d54;font:11px Arial,'SPQR CJK',sans-serif;flex-wrap:wrap}.victory-progress b{color:#d6b475;letter-spacing:1px}.victory-progress small{color:#c9c5b7;font-size:10px}@media(max-width:700px){.victory-progress{position:absolute;z-index:4;top:115px;left:48px;right:8px;max-height:70px;overflow:auto;gap:4px;padding:7px}.victory-progress small{width:100%}}

.resource-forecast{padding:6px 17px;background:#303832;color:#dccda7;border-bottom:1px solid #615d4c;font:11px Arial,'SPQR CJK',sans-serif}.resource-forecast summary{cursor:pointer}.resource-forecast p{margin:5px 0 2px;color:#bdb9aa}@media(max-width:700px){.resource-forecast{position:absolute;z-index:4;top:190px;left:48px;right:8px;padding:6px}}

.war-decision-note{display:block;margin:3px 0 9px;color:#bba978;font:10px/1.45 Arial,'SPQR CJK',sans-serif;max-width:100%}

.board-view-switch{display:flex;gap:8px;margin:8px 0}.board-view-switch button{padding:7px 11px;border:1px solid #99856b;background:#e2d5ba;color:#382e25}.board-view-switch button[aria-pressed="true"]{background:#843b30;color:#fff0d3}.board-link.kind-war{stroke:#a1372b;stroke-width:3}.board-link.kind-alliance,.board-link.kind-coalition{stroke:#4b7955;stroke-width:2.5}.board-link.kind-agreement{stroke:#a88441;stroke-dasharray:7 4}
.board-link.kind-shared_threat{stroke:#8a6a96;stroke-width:2;stroke-dasharray:3 6}
.board-link.kind-secret_treaty{stroke:#654b77;stroke-width:2.5;stroke-dasharray:12 5 2 5}

.tax-projection{margin-top:.7rem;border-top:1px solid rgba(153,125,75,.35);padding-top:.55rem;font-size:.82rem}.tax-row{display:flex;gap:.65rem;flex-wrap:wrap;padding:.18rem 0;border-bottom:1px solid rgba(153,125,75,.16)}.tax-row strong{min-width:5rem}.tax-projection small{display:block;margin-top:.4rem;opacity:.8}.victory-progress.defeat{border-color:#8c453c;color:#7c3028}.victory-progress.defeat-warning{border-color:#a87537}

/* Feather reads like a campaign dispatch, not a dashboard card. */
.feather-panel{margin:0 18px 10px;padding:9px 15px;border-left:3px solid #b89b63;background:linear-gradient(90deg,rgba(171,139,80,.13),transparent);color:#d8d1c0;font:12px/1.5 Manrope,'Microsoft YaHei','SPQR CJK',sans-serif}
.feather-panel strong{display:block;color:#e0c48d;font-size:10px;letter-spacing:.12em}.feather-panel ol{margin:5px 0 0;padding-left:20px}.feather-panel li{margin:2px 0}

/* Keep the campaign operable inside short 16:9 game frames. */
.setup-advanced{margin-top:10px;border-top:1px solid #b8a88a;padding-top:8px}.setup-advanced summary{cursor:pointer;color:#734c35;font:700 12px Arial,'Microsoft YaHei','SPQR CJK',sans-serif}.setup-advanced[open]{padding-bottom:10px}.setup-panel>.action.primary{margin:8px 0;min-height:42px}.storage-note{font-size:12px;line-height:1.4;color:#8b3d31}
@media(max-height:600px) and (orientation:landscape){html,body,#app{height:100dvh;overflow:hidden}.top{height:54px}.shell{height:calc(100dvh - 54px);max-height:calc(100dvh - 54px);min-height:0;overflow:hidden}.shell main{height:100%;min-height:0;overflow:hidden}.rail{min-height:0;overflow-y:auto;scrollbar-width:thin}.map-toolbar{bottom:4px;max-width:calc(100vw - 54px)}.controls button,.map-tools button{min-height:34px}.setup-backdrop{overflow:hidden}.setup-panel{width:min(440px,calc(100vw - 16px));max-height:calc(100dvh - 12px);padding:12px 16px;overflow:auto}.setup-panel h2{margin:5px 0}.setup-panel>p{margin:6px 0}.setup-panel .setup-saves{margin:4px 0}.inspector{top:4px;bottom:47px;max-height:calc(100dvh - 105px)}.panel-close{min-width:38px;min-height:38px}}

/* Short touch frames keep every command within the visible map edge. */
@media(max-width:700px) and (max-height:600px){.top{min-height:54px}.map-toolbar{left:48px;right:4px;bottom:4px;width:auto;max-width:none;min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:3px}.map-toolbar .controls{width:100%;min-width:0;display:flex;flex-wrap:wrap;justify-content:flex-end}.map-toolbar .controls button{min-width:34px;min-height:34px}.map-toolbar .controls #open-atlas{max-width:100%;overflow:hidden;text-overflow:ellipsis}.map-toolbar .control-sep{display:none}}

.startup-error{max-width:540px;margin:10vh auto;padding:28px;border:2px solid #9a654a;background:#e6dcc5;color:#342d25;font:16px/1.5 Georgia,'SPQR CJK',serif}.startup-error h1{color:#81392e}.startup-error small{font:12px/1.4 Arial,'SPQR CJK',sans-serif}
/* In short landscape frames, keep the two basic choices above Start. */
@media(max-height:600px) and (orientation:landscape){
 .setup-panel h2{font-size:18px;margin:4px 0}
 .setup-panel>p:not(.storage-note){display:none}
 .setup-panel label{font-size:11px;line-height:1.1}
 .setup-panel select{margin:3px 0;padding:4px}
}
