.atlas-app{max-width:none;padding:0 2.5vw 2rem;background:#f3f2ed}
.atlas-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.3rem 0}
.atlas-heading h1{font-size:clamp(1.9rem,3vw,3rem);margin:0}.atlas-heading .kicker{margin:0 0 .35rem}
.atlas-app button,.atlas-app select{font:inherit;cursor:pointer}
#open-method{background:transparent;border:1px solid #c6c2b7;padding:.55rem .9rem;font-size:.9rem}
.map-shell{position:relative;border:1px solid #c7ccc5;border-radius:12px;overflow:hidden;isolation:isolate;background:#d5e4e3;min-height:640px;height:calc(100svh - 230px);max-height:960px}
#history-map{width:100%;height:100%;display:block;cursor:grab;touch-action:none}
#history-map:active{cursor:grabbing}
#territories path{stroke:#fcf8ec;stroke-width:.5;fill-rule:evenodd;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .35s}
#territories path:hover,#territories path.selected{stroke:#2b2635;stroke-width:2}
.imperial{fill:#71394f;background:#71394f}.dependent{fill:#aa819d;background:#aa819d}.allied{fill:#beab6b;background:#beab6b}.contested{fill:url(#contested);background:repeating-linear-gradient(135deg,#d0a3a6 0 4px,#713647 4px 5px)}.neutral{fill:#d5d5c8;background:#d5d5c8}
#place-markers circle{fill:#263e5a;stroke:#fff;stroke-width:1.6;vector-effect:non-scaling-stroke}
#place-markers text{fill:#26303a;font:12px system-ui,sans-serif;paint-order:stroke;stroke:#fffdf5;stroke-width:3;stroke-linejoin:round}
#place-markers g{cursor:pointer}#place-markers g.active circle{fill:#c69437;stroke-width:2.5}
.map-top{position:absolute;top:1rem;left:1rem;right:4.2rem;pointer-events:none}
.map-legend{display:flex;gap:.5rem 1rem;flex-wrap:wrap;width:fit-content;background:#fffdf5ed;border:1px solid #d7d4c8;border-radius:8px;padding:.6rem .8rem;box-shadow:0 3px 15px #23342910;font-size:.8rem}
.map-legend span{display:flex;align-items:center;gap:.4rem}.map-legend i{width:.75rem;height:.75rem;border-radius:2px}
.map-controls{position:absolute;top:1rem;right:1rem;display:grid;border:1px solid #c7c9bf;border-radius:7px;overflow:hidden;box-shadow:0 3px 15px #23342915}
.map-controls button{width:2.6rem;height:2.6rem;background:#fffdf5;color:#263e5a;border:0;border-bottom:1px solid #deddd4;font-size:1.3rem}
.map-info{position:absolute;right:1rem;top:13rem;width:min(290px,30%);background:#fffdf7f5;border:1px solid #d7d4c8;border-top:3px solid #a88949;border-radius:8px;padding:1.15rem;box-shadow:0 5px 25px #23342918}
.map-info h2{font-size:1.65rem}.map-info p{font-size:.9rem;line-height:1.5;margin:.7rem 0}.map-info .info-eyebrow{color:#765a2c;font-size:.8rem;margin-top:0}
.map-info a{font-size:.83rem}.map-info #info-quality{font-size:.78rem;color:#675b4d}
#clear-selection{display:block;background:transparent;border:0;padding:.5rem 0 0;text-decoration:underline;font-size:.8rem}
.map-layers{position:absolute;bottom:10rem;left:1rem;display:flex;gap:1rem;background:#fffdf5eb;padding:.5rem .8rem;border-radius:6px;font-size:.85rem}
.map-layers input{accent-color:#71394f}
.map-help{position:absolute;left:1rem;bottom:8rem;font-size:.75rem;background:#fffdf5bf;padding:.2rem .5rem;pointer-events:none}
.timeline{position:absolute;bottom:0;left:0;right:0;background:#fcfbf6f5;backdrop-filter:blur(12px);padding:.8rem 1.5rem .5rem;border-top:1px solid #c5c8bd}
.timeline-head{display:flex;align-items:center;gap:1rem}.timeline button{background:#263e5a;border:0;border-radius:5px;color:white;padding:.45rem .85rem;font-size:.85rem}
#year-output{font:2rem Georgia,serif;color:#71394f;min-width:4.5rem}
#period-label{font-size:.92rem}.timeline select{margin-left:auto;background:transparent;border:1px solid #cec9bc;padding:.25rem;font-size:.8rem}
.timeline input[type=range]{width:100%;accent-color:#71394f;cursor:ew-resize;margin:.65rem 0 .2rem}
.timeline-ticks{display:flex;justify-content:space-between;font-size:.75rem;color:#67665e}
#boundary-status{font-size:.72rem;color:#6e675b;margin:.25rem 0 0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
#atlas-method{max-width:700px;width:94vw;max-height:85svh;overflow:auto;border:1px solid #c4b998;border-radius:12px;background:#fcfbf6;padding:2rem;color:#292623}
#atlas-method::backdrop{background:#172535a6;backdrop-filter:blur(5px)}
#atlas-method h2{font-size:2.3rem}#atlas-method h3{font-size:1.45rem;margin-top:1.4rem}
.method-close{float:right;border:0;background:transparent;font-size:1.8rem!important}
.map-shell:fullscreen{height:100svh;max-height:none;border-radius:0}
@media(max-width:760px){
.atlas-app{padding-inline:.65rem}.atlas-heading{align-items:start}.atlas-heading h1{font-size:1.9rem}#open-method{max-width:8rem;font-size:.78rem;padding:.4rem}
.map-shell{height:820px;min-height:0}#history-map{height:65%;width:100%}.map-info{top:auto;bottom:8.5rem;left:.75rem;right:.75rem;width:auto;padding:.7rem .9rem;max-height:12rem;overflow:auto}.map-info h2{font-size:1.35rem}.map-info p{margin:.4rem 0}
.map-top{top:.65rem;left:.65rem}.map-legend{font-size:.72rem;gap:.3rem .6rem;max-width:90%}
.map-layers{bottom:22rem;left:.65rem}.map-help{display:none}.timeline{padding:.7rem .8rem}.timeline-head{gap:.5rem}#period-label{display:none}
}
@media(prefers-reduced-motion:reduce){#territories path{transition:none}}
.atlas-quality{font-size:.78rem;color:#765a2c;margin:.4rem 0 0}

.review{fill:url(#review-border);background:repeating-linear-gradient(135deg,#d8d1bc 0 5px,#8a8065 5px 6px)}
#territories path.review{stroke:#8b7c5c;stroke-dasharray:2 2}
