:root{font-family:'DM Sans',sans-serif;color:#e9e7de;background:#101b23;font-synthesis:none}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0}button,input{font:inherit}button{cursor:pointer}.shell{min-height:100vh;background:radial-gradient(ellipse at 50% 0%,#1d303a 0,#101b23 47%,#101b23 100%)}.topbar,main,footer{max-width:1440px;margin:auto}.topbar{height:94px;padding:0 5%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff18}.brand{display:flex;align-items:center;gap:13px}.brand-mark{font-size:35px;line-height:1;color:#d2ac7d}.brand strong,.footer-brand span{font:700 21px 'Libre Baskerville',serif;letter-spacing:-.045em}.brand small{display:block;font-size:9px;letter-spacing:.22em;color:#8f9fa4;margin-top:5px;font-weight:700}.top-actions{display:flex;align-items:center;gap:30px}.demo-badge{font-size:10px;letter-spacing:.16em;color:#aebcbc;font-weight:700}.demo-badge span{display:inline-block;width:6px;height:6px;border-radius:50%;background:#b2cda6;margin:0 9px 1px 0;box-shadow:0 0 10px #b2cda6}.about-button{border:1px solid #52646b;background:transparent;color:#e4e8e5;border-radius:6px;padding:11px 16px;font-size:12px;font-weight:700}.about-button span{margin-left:14px;color:#cda97e}main{padding:0 5% 85px}.intro{display:flex;justify-content:space-between;align-items:end;gap:30px;padding:62px 0 47px}.eyebrow,.section-kicker{color:#c3a782;font-size:10px;font-weight:700;letter-spacing:.23em}.intro h1{font:400 clamp(38px,4.2vw,65px)/1.15 'Libre Baskerville',serif;letter-spacing:-.055em;margin:18px 0}.intro h1 em{color:#d3a982;font-weight:400}.intro-copy{max-width:610px;font-size:15px;line-height:1.8;color:#aebdc1;margin:0}.year-display{text-align:right;white-space:nowrap;padding-bottom:5px}.year-display span,.year-display small{display:block;color:#9aaeb4;font-size:10px;letter-spacing:.18em;font-weight:700}.year-display strong{display:block;font:400 43px 'Libre Baskerville',serif;color:#e9dfcb;margin:12px 0 9px;letter-spacing:-.055em}.year-display small{font-size:11px;letter-spacing:0;font-weight:400;color:#81959b}.explorer{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(300px,.85fr);min-height:555px;border:1px solid #49616a;border-radius:9px;overflow:hidden;background:#192832;box-shadow:0 22px 80px #00000029}.map-panel{min-width:0;display:flex;flex-direction:column;border-right:1px solid #49616a}.panel-top{display:flex;justify-content:space-between;align-items:center;padding:28px 31px 18px}.panel-top h2,.timeline-heading h2,.compare-heading h2{font:400 24px 'Libre Baskerville',serif;letter-spacing:-.04em;margin:10px 0 0}.map-tools{display:flex;gap:7px}.map-tools button{width:32px;height:32px;border:1px solid #516772;color:#d6dfde;background:#253945;border-radius:5px;font-size:20px;line-height:1}.map-tools button:hover,.about-button:hover{border-color:#c8a57b;color:#fff}.map-viewport{position:relative;flex:1;min-height:390px;overflow:hidden;background:radial-gradient(ellipse at center,#284451 0%,#1c3541 58%,#1b303a 100%)}.map-viewport svg{width:100%;height:100%;position:absolute;inset:0;touch-action:none;cursor:grab}.map-viewport svg:active{cursor:grabbing}.latitude path{stroke:#c1d3d2;stroke-width:1;opacity:.08;fill:none}.land path{fill:#45605f;stroke:#81a09a;stroke-width:1.5;stroke-linejoin:round;opacity:.85}.marker{cursor:pointer}.marker-halo{opacity:.16;transition:opacity .2s}.marker-circle{stroke:#f7f2e6;stroke-width:2;filter:drop-shadow(0 3px 5px #07181b)}.marker-symbol{fill:#17252b;font-size:17px;font-weight:700;pointer-events:none}.marker-label{fill:#f4f1e8;font:700 16px 'DM Sans',sans-serif;paint-order:stroke;stroke:#233942;stroke-width:4;pointer-events:none}.marker:hover .marker-halo,.marker.selected .marker-halo{opacity:.4}.marker.selected .marker-circle{stroke-width:3}.map-hint{position:absolute;left:25px;bottom:20px;font-size:11px;color:#d1dcda;background:#1b303bcf;border:1px solid #71878a77;border-radius:4px;padding:10px 13px;pointer-events:none}.hint-icon{font-size:14px;margin-right:6px}.map-footer{height:53px;padding:0 28px;display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#9eb1b6}.legend-dot{display:inline-block;width:7px;height:7px;background:#d9b88a;border-radius:50%;margin-right:7px}.detail-panel{padding:29px 32px 22px;position:relative;display:flex;flex-direction:column;background:linear-gradient(155deg,#263b44,#1b2b35 53%)}.detail-top{display:flex;justify-content:space-between;align-items:center}.detail-index{font-size:10px;color:#8fa4aa;letter-spacing:.1em}.detail-emblem{display:grid;place-items:center;width:76px;height:76px;margin-top:41px;border-radius:50%;background:color-mix(in srgb,var(--accent) 16%,transparent);border:1px solid color-mix(in srgb,var(--accent) 50%,transparent);color:var(--accent);font-size:36px;font-weight:700}.detail-region{color:#bdac98;font-size:10px;letter-spacing:.2em;font-weight:700;margin:21px 0 7px}.detail-panel h2{font:400 38px 'Libre Baskerville',serif;letter-spacing:-.05em;margin:0}.detail-rule{height:1px;background:#ffffff30;margin:24px 0}.detail-label{font-size:10px;color:#b7c5c5;letter-spacing:.15em;font-weight:700;margin:0 0 10px}.detail-panel h3{font:400 21px/1.35 'Libre Baskerville',serif;margin:0 0 10px;color:#f4e9d4}.detail-description{color:#afc0c2;font-size:12px;line-height:1.7;margin:0}.event-box{background:#b88d5d18;border-left:2px solid #d4ad7c;padding:13px 15px;margin-top:24px}.event-box span{color:#d5ad78;font-size:9px;letter-spacing:.12em;font-weight:700}.event-box p{color:#e4ded0;font-size:12px;line-height:1.6;margin:8px 0 0}.event-box.empty{opacity:.65}.detail-bottom{margin-top:auto;padding-top:25px;color:#92a7ab;font-size:10px}.tiny-dot{display:inline-block;width:5px;height:5px;border-radius:50%;margin-right:6px}.timeline-section{margin-top:32px;border:1px solid #435963;border-radius:9px;background:#1b2b34;padding:27px 31px 22px}.timeline-heading,.compare-heading{display:flex;justify-content:space-between;align-items:end}.timeline-current{font:400 25px 'Libre Baskerville',serif;color:#e5c69d}.timeline-control{display:flex;align-items:center;gap:18px;margin:33px 0 18px}.timeline-end{font-size:11px;color:#9bb0b5;white-space:nowrap}.timeline-control input{appearance:none;-webkit-appearance:none;width:100%;height:5px;border-radius:8px;background:linear-gradient(to right,#d6b488 0 var(--progress),#597078 var(--progress) 100%);outline:none;cursor:pointer}.timeline-control input::-webkit-slider-thumb{appearance:none;width:19px;height:19px;background:#e4c295;border:4px solid #273742;border-radius:50%;box-shadow:0 0 0 2px #e4c295}.timeline-control input::-moz-range-thumb{width:13px;height:13px;background:#e4c295;border:3px solid #273742;border-radius:50%;box-shadow:0 0 0 2px #e4c295}.era-labels{display:flex;justify-content:space-between;margin:0 68px 24px;color:#718990;font-size:9px;letter-spacing:.1em}.jump-row{border-top:1px solid #ffffff19;padding-top:18px;display:flex;align-items:center;gap:9px;flex-wrap:wrap}.jump-row span{color:#93a8ad;font-size:10px;letter-spacing:.15em;font-weight:700;margin-right:12px}.jump-row button{background:#263a44;border:1px solid #49616a;color:#c4d2d1;border-radius:4px;padding:8px 13px;font-size:10px}.jump-row button:hover,.jump-row button.active{border-color:#d9b78a;background:#504736;color:#f6e4c8}.compare-section{padding-top:65px}.compare-heading h2{font-size:35px;margin-top:12px}.compare-heading .period{color:#d6a97c}.compare-heading p{font-size:13px;color:#9fb3b8;margin:13px 0 0}.compare-year{font:400 20px 'Libre Baskerville',serif;color:#dcb689;border:1px solid #8b78607a;border-radius:4px;padding:11px 16px;white-space:nowrap}.compare-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:28px}.compare-card{min-width:0;text-align:left;display:flex;flex-direction:column;min-height:290px;border:1px solid #3e5660;background:#1a2b34;border-radius:7px;color:#eeeae0;padding:19px;transition:transform .2s,border-color .2s,background .2s}.compare-card:hover{transform:translateY(-3px);border-color:var(--accent)}.compare-card.active{border-color:var(--accent);background:#21333d}.card-top{display:flex;align-items:start;justify-content:space-between}.card-number{color:#718a91;font-size:10px;letter-spacing:.12em}.card-icon{color:var(--accent);font-size:27px;font-weight:700;line-height:1}.card-region{font-size:9px;letter-spacing:.16em;color:var(--accent);font-weight:700;margin-top:18px}.compare-card strong{font:400 22px 'Libre Baskerville',serif;margin-top:7px}.card-divider{height:1px;background:#ffffff25;width:100%;margin:20px 0 16px}.card-period{font-size:12px;line-height:1.5;font-weight:700;color:#e1e6e1}.card-event{font-size:10px;line-height:1.6;color:#96aeb3;margin-top:9px;flex:1}.card-arrow{display:flex;align-items:center;justify-content:space-between;color:var(--accent);font-size:9px;letter-spacing:.12em;font-weight:700;margin-top:18px}.card-arrow b{font-size:18px;font-weight:400}.data-note{color:#799097;font-size:10px;line-height:1.6;margin:21px 0 0}footer{padding:28px 5%;border-top:1px solid #ffffff16;display:flex;justify-content:space-between;align-items:center;color:#7f969c;font-size:10px;letter-spacing:.04em}.footer-brand{color:#d5ad7b;font-size:21px}.footer-brand span{color:#d9dfd9;font-size:15px;margin-left:7px}footer>span:last-child{letter-spacing:.14em;font-size:9px}dialog{max-width:490px;width:calc(100% - 32px);background:#21343e;border:1px solid #9b8063;border-radius:9px;color:#e9e7de;padding:35px;box-shadow:0 25px 70px #0008}dialog::backdrop{background:#061015ba}.dialog-close{position:absolute;right:18px;top:13px;border:0;background:none;color:#c3d0cf;font-size:27px}dialog h2{font:400 30px/1.3 'Libre Baskerville',serif;letter-spacing:-.04em}dialog p{font-size:13px;line-height:1.8;color:#b0c1c2}.dialog-done{background:#d1ac7d;border:0;border-radius:4px;color:#1a292f;font-weight:700;padding:12px 17px;margin-top:8px}
@media(max-width:1050px){.explorer{grid-template-columns:minmax(0,1.55fr) minmax(285px,.85fr)}.detail-panel{padding:25px}.compare-grid{grid-template-columns:repeat(3,1fr)}.compare-card{min-height:255px}}
@media(max-width:750px){.topbar{height:75px}.brand small{font-size:7px}.brand strong{font-size:18px}.top-actions{gap:0}.demo-badge{display:none}.about-button{font-size:11px;padding:9px}.intro{display:block;padding:44px 0 35px}.intro h1{font-size:42px}.intro-copy{font-size:13px}.year-display{text-align:left;padding:25px 0 0}.year-display strong{font-size:30px;margin:7px 0}.explorer{display:block}.map-panel{border-right:0;border-bottom:1px solid #49616a}.map-viewport{height:330px;min-height:330px}.detail-panel{min-height:430px}.detail-emblem{margin-top:25px}.timeline-section{padding:23px 18px}.timeline-end{font-size:9px}.timeline-control{gap:9px}.era-labels{margin:0 45px 22px;font-size:7px}.compare-section{padding-top:50px}.compare-grid{grid-template-columns:repeat(2,1fr)}.compare-heading{align-items:start}.compare-heading h2{font-size:28px}.compare-year{font-size:14px;padding:8px}.compare-card{min-height:270px}footer>span:last-child{display:none}}
@media(max-width:480px){main{padding-left:4%;padding-right:4%}.topbar{padding:0 4%}.brand-mark{font-size:27px}.brand strong{font-size:15px}.brand small{letter-spacing:.1em}.intro h1{font-size:35px}.panel-top{padding:22px 19px 15px}.panel-top h2{font-size:19px}.map-tools button{width:28px;height:28px}.map-viewport{height:270px;min-height:270px}.map-hint{font-size:9px;left:12px;bottom:12px}.map-footer{padding:0 16px;font-size:8px}.timeline-heading h2{font-size:20px}.timeline-current{font-size:18px}.era-labels span:nth-child(2),.era-labels span:nth-child(3){display:none}.compare-grid{gap:8px}.compare-card{padding:15px;min-height:285px}.compare-card strong{font-size:18px}.card-period{font-size:11px}.compare-heading p{max-width:230px;font-size:11px}.compare-year{font-size:12px}footer{padding:25px 4%}footer>span:nth-child(2){display:none}}
.map-tooltip{position:absolute;z-index:3;display:flex;flex-direction:column;gap:6px;width:min(255px,calc(100% - 20px));padding:13px 15px;background:#172730f5;border:1px solid #c9a77c;border-radius:6px;box-shadow:0 10px 30px #071318a8;color:#ecede5;pointer-events:none}.map-tooltip[hidden]{display:none}.tooltip-kicker{font-size:9px;letter-spacing:.14em;font-weight:700;color:#d8b887}.map-tooltip strong{font:400 16px/1.3 'Libre Baskerville',serif}.tooltip-event{color:#b9c9c9;font-size:11px;line-height:1.5}.tooltip-event b{color:#e3c39b;font-weight:700}

/* Brighter atlas palette: clear ocean, warm land, vivid civilization accents. */
:root{color:#f8f6ed;background:#193241}
.shell{background:radial-gradient(ellipse at 48% 0%,#365866 0%,#254453 44%,#193241 100%)}
.topbar{border-bottom-color:#d9f3ee30}
.brand-mark,.footer-brand{color:#ffca81}
.brand small,.year-display span,.year-display small,.demo-badge{color:#c8dce0}
.about-button{border-color:#9dbbc3;color:#fffdf5}
.about-button span,.eyebrow,.section-kicker,.intro h1 em,.compare-heading .period{color:#ffd095}
.intro-copy,.compare-heading p{color:#d7e5e5}
.year-display strong,.timeline-current,.compare-year{color:#fff0d6}
.explorer{background:#2e4d5b;border-color:#89aab0;box-shadow:0 24px 70px #071d2c40}
.map-panel{border-right-color:#89aab0}
.map-tools button{background:#3d6171;border-color:#9cbdc5;color:#fff}
.map-viewport{background:radial-gradient(ellipse at center,#46849a 0%,#36738d 61%,#2b627e 100%)}
.latitude path{stroke:#efffff;opacity:.18}
.land path{fill:#94ad87;stroke:#d6e0b5;stroke-width:1.3;opacity:1}
.marker-halo{opacity:.27}
.marker:hover .marker-halo,.marker.selected .marker-halo{opacity:.55}
.marker-label{fill:#fffdf4;stroke:#244c5f;stroke-width:5}
.map-hint{background:#244859e8;border-color:#b4d1d2;color:#f3f7f3}
.map-footer,.detail-index,.detail-bottom{color:#c9dfe1}
.detail-panel{background:linear-gradient(155deg,#416273,#2d4e5f 65%)}
.detail-region,.detail-label{color:#ffdaaa}
.detail-panel h3{color:#fff2dc}
.detail-description{color:#d9e7e5}
.event-box{background:#ffc9771c;border-left-color:#ffd18a}
.event-box span{color:#ffdb9e}
.event-box p{color:#f7f2e8}
.timeline-section{background:#2e4d5b;border-color:#89aab0}
.timeline-end,.jump-row span{color:#d5e7e7}
.timeline-control input{background:linear-gradient(to right,#ffd087 0 var(--progress),#7199a4 var(--progress) 100%)}
.timeline-control input::-webkit-slider-thumb{background:#ffe1a8;border-color:#2d4e5f;box-shadow:0 0 0 2px #ffe1a8}
.timeline-control input::-moz-range-thumb{background:#ffe1a8;border-color:#2d4e5f;box-shadow:0 0 0 2px #ffe1a8}
.era-labels,.data-note{color:#bed5d8}
.jump-row button{background:#416576;border-color:#8dabb4;color:#f5fbf9}
.jump-row button:hover,.jump-row button.active{background:#725b3a;border-color:#ffd18e;color:#fff5df}
.compare-year{border-color:#ddbd8d}
.compare-card{background:#2d4e5f;border-color:#7b9da7;color:#fffaf0}
.compare-card.active{background:#3b5d6c}
.card-number,.card-event{color:#d0e0e1}
.card-period{color:#fff9ed}
footer{color:#c3d8db;border-top-color:#cbe6e433}
.footer-brand span{color:#fff9ec}
.map-tooltip{background:#264554f5;border-color:#ffda9e;color:#fffaf1}
.tooltip-kicker,.tooltip-event b{color:#ffdb9f}
.tooltip-event{color:#e1eeee}
dialog{background:#345766;border-color:#ffcf91;color:#fffaf1}
dialog p{color:#dce9e8}
.dialog-done{background:#ffd18f}

/* A short, page-by-page reading view that works on touch screens. */
.read-story{display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;margin-top:22px;padding:13px 15px;border:1px solid #ffd18e;border-radius:5px;background:#ffd18e;color:#233e49;text-align:left;font-size:12px;font-weight:800}
.read-story:hover{background:#ffe3b6;border-color:#ffe3b6}
.read-story:focus-visible,.story-navigation button:focus-visible,.story-close:focus-visible,.story-source:focus-visible{outline:3px solid #67a6c4;outline-offset:3px}
.read-story span{font-size:18px;font-weight:400}
#storyDialog{width:min(620px,calc(100% - 26px));max-width:620px;max-height:calc(100dvh - 32px);padding:34px 40px 27px;background:#fbf4e7;border:1px solid #f5d29b;border-radius:12px;color:#23424b;overflow-y:auto}
#storyDialog .story-close{position:sticky;float:right;right:0;top:0;z-index:2;width:34px;height:34px;margin:-17px -22px 0 0;border-radius:50%;background:#e8ded0;color:#2b4b52;line-height:1}
.story-topline{display:flex;align-items:center;justify-content:space-between;padding-right:36px;color:#657b7e;font-size:10px;font-weight:800;letter-spacing:.12em}
#storyDialog .story-topline .section-kicker{color:#9a6228}
.story-emblem{display:grid;place-items:center;width:58px;height:58px;margin:23px 0 12px;border-radius:50%;background:color-mix(in srgb,var(--accent) 36%,#fff);border:1px solid color-mix(in srgb,var(--accent) 75%,#b5a99a);color:#183d4c;font-size:28px;font-weight:800}
#storyDialog .story-place{margin:0;color:#9a6228;font-size:10px;font-weight:800;letter-spacing:.18em}
#storyDialog h2{max-width:510px;margin:9px 0 5px;color:#1d3c49;font:400 clamp(27px,5vw,39px)/1.2 'Libre Baskerville',serif;letter-spacing:-.045em}
#storyDialog .story-subtitle{margin:0 0 21px;color:#567078;font-size:12px;font-weight:700;text-transform:capitalize}
.story-body{min-height:205px;border-top:1px solid #d8d2c4;padding-top:8px}
#storyDialog .story-body p{margin:12px 0;color:#314c52;font-size:15px;line-height:1.78}
#storyDialog .story-body strong{color:#123b50}
#storyDialog .story-body .story-note{margin-top:20px;padding-left:15px;border-left:2px solid #d2a663;color:#66777a;font-size:12px;line-height:1.65}
#storyDialog .story-body .story-event{padding:12px 16px;background:#eadcc4;border-radius:5px;font-size:13px;line-height:1.6}
.story-event span{display:block;margin-bottom:5px;color:#925d21;font-size:10px;font-weight:800;letter-spacing:.12em}
.story-source{display:inline-block;margin:9px 0 22px;color:#285f79;font-size:11px;font-weight:800;text-decoration:underline;text-underline-offset:3px}
.story-navigation{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:17px;border-top:1px solid #d8d2c4}
.story-navigation button{min-width:118px;padding:10px 13px;border:1px solid #2e697d;border-radius:5px;background:#2e697d;color:#fffdf7;font-size:12px;font-weight:800}
.story-navigation button:first-child{background:transparent;color:#2e697d}
.story-navigation button:disabled{border-color:#d5d5cd;color:#a4a8a3;cursor:default}
.story-navigation span{color:#667a7d;font-size:11px;font-weight:700;white-space:nowrap}
@media(max-width:600px){#storyDialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:24px 23px 20px}#storyDialog .story-close{margin:-10px -10px 0 0}.story-topline{padding-right:32px}.story-emblem{margin-top:21px}.story-body{min-height:0}#storyDialog .story-body p{font-size:14px;line-height:1.7}.story-navigation button{min-width:91px;padding:10px 9px;font-size:11px}.story-navigation span{font-size:10px}}

/* Dated polity overlays sit above the physical map and below the place markers. */
.historical-territory{fill-opacity:.63;stroke:#315363;stroke-opacity:.95;stroke-width:1.15;stroke-linejoin:round;vector-effect:non-scaling-stroke;cursor:help}
.historical-territory:hover{fill-opacity:.88;stroke:#143c50;stroke-width:1.7}
.empire-legend{border-top:1px solid #adcbd43d;padding:15px 22px;background:#294b5c}
.map-panel .timeline-section{margin:0;padding:22px;border:0;border-top:1px solid #adcbd43d;border-radius:0;background:#2e4d5b}
.map-panel .timeline-control{margin-top:24px;gap:12px}
.map-panel .timeline-heading h2{font-size:22px}
.map-panel .timeline-current{font-size:24px}
.map-panel .jump-row{gap:7px;padding-top:14px}
.map-panel .jump-row button{padding:8px 10px}
@media(max-width:480px){.map-panel .timeline-section{padding:19px 15px}.map-panel .timeline-heading h2{font-size:20px}.map-panel .timeline-current{font-size:19px}.map-panel .timeline-control{gap:8px}}
.empire-legend summary{cursor:pointer;color:#fff6e0;font-size:12px;font-weight:800;line-height:1.6}
.legend-help{float:right;color:#bfdae0;font-size:10px;font-weight:400}
.empire-legend-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 12px;margin-top:12px;max-height:152px;overflow-y:auto;scrollbar-color:#86aab6 #294b5c}
.empire-legend-list button{display:flex;gap:8px;align-items:center;text-align:left;color:#edf6f4;background:transparent;border:1px solid transparent;border-radius:4px;padding:5px;font:500 11px/1.35 'DM Sans',sans-serif;cursor:pointer}
.empire-legend-list button:hover,.empire-legend-list button:focus-visible{background:#ffffff12;border-color:#9ec5d2;outline:none}
.empire-legend-list i{display:block;flex:0 0 12px;width:12px;height:12px;border:1px solid #ffffff65;border-radius:2px}
.campaign-note{margin:0;padding:14px 22px;background:#ffc45f19;color:#eee1c5;font-size:11px;line-height:1.7;border-top:1px solid #ffc45f44}
.campaign-note strong,.campaign-note a{color:#ffce78}
.campaign-note[hidden]{display:none}
@media(max-width:480px){.empire-legend{padding:13px 15px}.legend-help{float:none;display:block;margin-left:15px}.empire-legend-list{gap:4px}.empire-legend-list button{font-size:10px}}
.marker .marker-label{font-size:12px;fill:#fffdf4;stroke:#244350;stroke-width:2.5px;paint-order:stroke;pointer-events:auto;stroke-linejoin:round}
.marker:hover .marker-label,.marker:focus .marker-label,.marker.selected .marker-label{fill:#ffe0a8;text-decoration:underline;text-underline-offset:3px}
.place-illustration{margin:19px 0 22px}
.place-illustration img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:8px;background:#d9e6df}
.place-illustration figcaption{margin-top:9px;font-size:12px;line-height:1.55;color:#526b6b}
.place-illustration figcaption span{display:block;margin-top:5px;font-size:9px;text-transform:uppercase;letter-spacing:.12em;opacity:.8}
.place-illustration.compact{margin:20px 0 16px}
.place-illustration.compact img{aspect-ratio:16/9}
.place-illustration.compact figcaption{display:none}
#storyDialog .story-place{margin-top:20px}
@media(max-width:600px){.place-illustration{margin:15px 0}.place-illustration figcaption{font-size:11px}}
/* The reader uses the full viewport; paragraphs keep a comfortable line length. */
#storyDialog{inset:0;width:100vw;max-width:none;height:100dvh;max-height:100dvh;box-sizing:border-box;margin:0;padding:32px max(28px,calc((100vw - 1140px)/2)) 28px;border:0;border-radius:0;overscroll-behavior:contain}
#storyDialog .story-close{position:fixed;top:20px;right:22px;margin:0;width:44px;height:44px;font-size:26px;background:#e8ded0;box-shadow:0 2px 12px #23424b22}
#storyContent{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:48px;align-items:start}
.story-topline,#storyDialog .story-place,#storyDialog h2,#storyDialog .story-subtitle{grid-column:1/-1}
#storyDialog h2{max-width:none;font-size:clamp(32px,4vw,52px)}
#storyDialog .story-subtitle{margin-bottom:25px}
#storyDialog .place-illustration{grid-column:2;grid-row:5 / span 2;margin:0;position:sticky;top:32px}
#storyDialog .story-body{grid-column:1;grid-row:5;min-height:0;border-top:0;padding:0}
#storyDialog .story-body p{font-size:19px;line-height:1.85;margin:0 0 22px}
#storyDialog .story-body .story-note{font-size:14px}
#storyDialog .story-source{grid-column:1;grid-row:6;font-size:12px;line-height:1.6}
#storyDialog .story-navigation{margin-top:30px;padding:20px 0;background:#fbf4e7}
#storyDialog .story-navigation button{font-size:14px;padding:14px 20px}
body:has(#storyDialog[open]){overflow:hidden}
@media(max-width:750px){#storyDialog{padding:28px 24px 20px}#storyContent{display:flex;flex-direction:column}#storyDialog .story-close{top:14px;right:14px}#storyDialog .story-topline{padding-right:54px;width:100%;box-sizing:border-box}#storyDialog .place-illustration{position:static;margin:0 0 24px;width:100%}#storyDialog .place-illustration img{max-height:260px;object-fit:cover}#storyDialog .story-body p{font-size:18px;line-height:1.8}#storyDialog .story-navigation{gap:8px;position:sticky;bottom:-20px;margin:8px 0 0;padding:16px 0 20px}#storyDialog .story-navigation button{min-width:95px;font-size:12px;padding:12px 10px}}
.map-footer{min-height:53px;height:auto;gap:8px;flex-wrap:wrap;padding-top:10px;padding-bottom:10px}
.map-footer a{color:#ffda9f;text-decoration:underline;text-underline-offset:2px}
.panel-actions{display:flex;align-items:center;gap:12px}
.map-play-button{min-width:132px;padding:9px 12px;border:1px solid #ffcf88;border-radius:5px;background:#ffcf88;color:#244350;font-size:11px;font-weight:800;white-space:nowrap}
.map-play-button:hover{background:#ffe0ad}
.map-play-button:focus-visible{outline:3px solid #fff;outline-offset:3px}
.map-year-badge{position:absolute;right:18px;bottom:20px;display:flex;flex-direction:column;gap:3px;min-width:112px;padding:10px 13px;border:1px solid #ffdc9f;background:#244859eb;color:#fff5df;border-radius:5px;pointer-events:none;text-align:right}
.map-year-badge span{color:#ffd99d;font-size:8px;font-weight:800;letter-spacing:.14em}
.map-year-badge strong{font:400 19px 'Libre Baskerville',serif}
.playback-hint{margin:0 0 18px;color:#d4e5e3;font-size:11px;line-height:1.5}
.border-note{margin:15px 0 0;color:#c5d9db;font-size:10px;line-height:1.6}
#aboutDialog a{color:#ffda9f}
@media(max-width:750px){.map-footer{align-items:flex-start;flex-direction:column;justify-content:center}.map-year-badge{top:14px;bottom:auto;right:12px}}
@media(max-width:600px){.panel-top{flex-wrap:wrap;gap:13px}.panel-actions{width:100%;justify-content:space-between}.map-year-badge{min-width:90px;padding:8px 10px}.map-year-badge strong{font-size:15px}}

/* Give the map the full panel width and omit Antarctica without stretching geography. */
.explorer{display:block;min-height:0}
.map-panel{border:0}
.map-viewport{flex:none;aspect-ratio:1000/380;height:auto;min-height:220px}
@media(min-width:900px){.empire-legend-list{grid-template-columns:repeat(3,minmax(0,1fr))}}

.history-search{position:relative;z-index:3;width:100%;max-width:720px;padding:0 31px 18px}
.history-search label{display:block;margin-bottom:9px;color:#fff3da;font-size:12px;font-weight:700}
.search-input-wrap{display:flex;align-items:center;gap:12px;padding:0 14px;background:#f4f8f3;border:2px solid transparent;border-radius:7px;color:#244350}
.search-input-wrap:focus-within{border-color:#ffc45f;box-shadow:0 0 0 3px #ffc45f26}
.search-input-wrap>span{font-size:23px}
#historySearch{flex:1;min-width:0;width:100%;padding:11px 0;background:transparent;border:0;outline:0;color:#203e4a;font:400 15px 'DM Sans',sans-serif}
#historySearch::placeholder{color:#647b80}
#clearSearch{flex:none;width:32px;height:32px;border:0;border-radius:5px;background:#dce7e5;color:#294b5c;font-size:23px}
#searchHelp{margin:8px 0 0;color:#c4dadd;font-size:11px}
.search-dropdown{position:absolute;top:100%;left:31px;right:31px;margin-top:-11px;border:1px solid #98b6bd;border-radius:8px;background:#f7f7ed;color:#244350;box-shadow:0 14px 35px #102d4266;overflow:hidden}
#historyResults{max-height:320px;overflow-y:auto;overscroll-behavior:contain}
.search-result{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 17px;border-bottom:1px solid #dbe3db;cursor:pointer}
.search-result{width:100%;border-left:0;border-right:0;border-top:0;background:transparent;color:#244350;text-align:left;font-family:'DM Sans',sans-serif}
.search-result:hover,.search-result[aria-selected=true]{background:#dcece7}
.search-result strong{display:block;font-size:14px;line-height:1.4}
.search-result small{display:block;margin-top:4px;font-size:10px;color:#627678}
.search-result-year{flex:none;font-size:12px;color:#566d70}
#searchStatus{margin:0;padding:11px 17px;font-size:11px;line-height:1.6;color:#526a70}
.search-selection{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:14px;padding:14px 16px;border-left:3px solid #ffc45f;background:#ffffff09;border-radius:4px;color:#f4f4e5}
.search-selection>div{flex:1;min-width:180px}
.search-selection strong{font-size:14px}.search-selection strong span{color:#ffce86;white-space:nowrap}
.search-selection p{margin:6px 0 0;font-size:12px;line-height:1.6;color:#d0e2e3}
.search-selection button,.search-selection a{color:#ffda9f;font-size:12px;font-weight:700}
.search-selection button{background:transparent;border:1px solid #ffda9f66;padding:10px;border-radius:4px}
.history-search [hidden]{display:none}
@media(max-width:750px){.history-search{padding:0 19px 16px}.search-dropdown{left:19px;right:19px}.search-result{padding:12px;gap:10px}.search-result strong{font-size:13px}.search-result-year{font-size:10px}}

#worldMap:focus-visible{outline:3px solid #ffd18e;outline-offset:-3px}
.panel-top h2,.map-panel .timeline-heading h2{margin-top:0}

.year-entry{display:flex;align-items:center;gap:9px 12px;flex-wrap:wrap;margin:0 0 11px}
.year-entry label{color:#e0e9e8;font-size:10px;font-weight:800;letter-spacing:.13em;white-space:nowrap}
.year-entry-controls{display:flex;align-items:stretch;gap:7px}
.year-entry input{width:156px;min-height:37px;border:1px solid #9fb7be;border-radius:5px;background:#1d3542;color:#fff2d9;padding:8px 10px;font-size:13px;font-weight:700}
.year-entry input::placeholder{color:#b7c9ca;font-weight:400}
.year-entry input:focus-visible{outline:2px solid #ffd18e;outline-offset:2px}
.year-entry input[aria-invalid="true"]{border-color:#ffc1a7;outline-color:#ffc1a7}
.year-entry button{border:1px solid #ffd18e;border-radius:5px;background:#eac48f;color:#1c3340;padding:8px 13px;font-size:12px;font-weight:800;white-space:nowrap}
.year-entry button:hover,.year-entry button:focus-visible{background:#ffe0ad;outline-color:#ffe0ad}
.year-entry-help{color:#cee1e2;font-size:10px;line-height:1.5}
.year-entry-error{flex-basis:100%;margin:0;color:#ffd1bc;font-size:11px;line-height:1.5}
@media(max-width:480px){.year-entry{align-items:flex-start;flex-direction:column}.year-entry-controls{width:100%}.year-entry input{flex:1;min-width:0}.year-entry button{min-width:72px}}
#storyDialog.territory-only #storyContent{display:block;max-width:850px}
#storyDialog.territory-only .story-body{max-width:760px;margin-top:25px}
#storyDialog.territory-only .story-source{margin-top:10px}
.story-sources{grid-column:1;grid-row:6;display:flex;flex-wrap:wrap;gap:4px 20px}
