:root{--bg:#111e25;--ink:#27332f;--gold:#d7b47b;--cream:#ede9df;--muted:#97a5a8;--line:#ffffff18;--red:#a84936}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#e7e6df;font:14px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--gold);outline-offset:4px}button:disabled{opacity:.3;cursor:default}button{border:0}a{color:inherit}button,select{color:inherit}.header{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 30px;border-bottom:1px solid var(--line);background:#101b21}.brand{display:flex;align-items:center;gap:13px;text-decoration:none;font-family:"Songti SC","SimSun",serif;font-weight:700;font-size:25px;letter-spacing:3px}.brand small{display:block;font:8px/1.5 Arial;letter-spacing:2.4px;color:#9ba6a5}.seal{display:grid;place-items:center;width:36px;height:40px;background:var(--red);font-size:25px;letter-spacing:0;border:1px solid #c77861;outline:1px solid #824534;outline-offset:3px}.header-center{color:#8c9b9c;font-family:"Songti SC",serif;letter-spacing:3px;font-size:13px}.quiet{background:transparent;color:#b5bfbd;font-size:12px}.quiet span{margin-left:9px;color:var(--gold)}main{height:calc(100dvh - 204px);min-height:510px;display:grid;grid-template-columns:minmax(0,1fr) 368px}.atlas{display:flex;flex-direction:column;min-width:0}.toolbar{height:62px;display:flex;align-items:center;padding:0 25px;gap:17px;border-bottom:1px solid var(--line);position:relative;z-index:4}.search{display:flex;align-items:center;gap:9px;flex:1;max-width:270px;color:var(--gold)}.search span{font-size:24px}.search input{border:0;border-bottom:1px solid #ffffff15;background:transparent;color:#e0e3dc;padding:6px 0;width:100%;font-size:12px;outline-offset:0}input::placeholder{color:#849398}.toolbar select{background:#19272e;border:1px solid #ffffff18;padding:7px 28px 7px 10px;font-size:12px;max-width:220px;border-radius:3px}.toolbar #catalog-button{margin-left:auto;white-space:nowrap}.map-stage{flex:1;position:relative;overflow:hidden;min-height:360px}#map{width:100%;height:100%;position:absolute;inset:0;touch-action:none;cursor:grab}#map:active{cursor:grabbing}.map-heading{position:absolute;top:24px;left:28px;z-index:2;pointer-events:none}.eyebrow{font-size:10px;letter-spacing:2.6px;color:var(--gold)}.map-year{font:62px/1.2 Georgia,serif;color:#eee7d8;letter-spacing:-3px;margin:8px 0 6px}.map-year span{font:14px "Songti SC",serif;margin-left:8px;color:#a2aaa6;letter-spacing:0}#map-subtitle{color:#aab7b6;font-size:12px;letter-spacing:1px}.map-tools{position:absolute;right:22px;top:24px;display:flex;flex-direction:column;border:1px solid #ffffff22;border-radius:5px;overflow:hidden}.map-tools button{background:#14242ce8;font-size:23px;width:38px;height:38px;line-height:1;border-bottom:1px solid #ffffff15}.map-tools button:last-child{border-bottom:0}.map-tools button:hover{background:#30434a}.focus-event{position:absolute;right:22px;bottom:57px;background:#14242cf2;color:#dac6a4;border:1px solid #d7b47b50;border-radius:4px;padding:6px 12px;font-size:12px}.map-legend{position:absolute;left:25px;bottom:18px;display:flex;gap:20px;font-size:10px;color:#b1bdbc;align-items:center}.map-legend span,.map-legend label{display:flex;gap:6px;align-items:center}.point{width:7px;height:7px;border-radius:50%;background:var(--gold)}.dash{width:18px;border-top:1px dashed var(--gold)}.map-legend input{accent-color:var(--gold);width:12px;height:12px;margin:0}.map-credit{position:absolute;bottom:15px;right:22px;text-align:right;font:9px/1.5 Arial,sans-serif;color:#86989d}.map-credit a{text-decoration:none}.map-footer{height:31px;border-top:1px solid var(--line);display:flex;justify-content:space-between;padding:5px 25px;font-size:10px;color:#829496}.detail{background:var(--cream);color:var(--ink);border-left:1px solid #d9d4c8;display:flex;flex-direction:column;min-height:0}.detail-scroll{overflow:auto;flex:1;padding:28px 28px 12px;scrollbar-width:thin;scrollbar-color:#c9c5b8 transparent}.event-kicker{display:flex;align-items:center;gap:8px;color:#8e5943;font-size:10px;letter-spacing:1px}.event-kicker:before{content:"";width:22px;height:1px;background:#a3533e}.detail h1{font:30px/1.4 "Songti SC","SimSun",serif;letter-spacing:1px;margin:17px 0 13px;color:#26352f}.event-date{font:12px Georgia,"PingFang SC",serif;letter-spacing:.5px;color:#8c7460;padding-bottom:21px;border-bottom:1px solid #3333331b}.event-summary{font-size:14px;line-height:1.95;margin:20px 0 15px}.event-meaning{color:#6a746b;font-size:12px;line-height:1.9}.section-label{display:flex;justify-content:space-between;font-size:10px;color:#7d8278;letter-spacing:1.2px;margin:24px 0 10px}.section-label span{letter-spacing:0}.nodes{border-top:1px solid #3333331b}.node-button{display:flex;align-items:flex-start;text-align:left;gap:10px;width:100%;padding:11px 0;background:transparent;color:var(--ink);border-bottom:1px solid #33333315}.node-button:hover,.node-button.active{color:#a54934}.node-number{font:11px/1.9 Georgia,serif;color:#a98358;min-width:17px}.node-button strong{display:block;font-size:12px;font-weight:500}.node-button small{display:block;font-size:10px;color:#85897e;margin-top:3px}.node-button .arrow{margin-left:auto;font-size:12px;color:#a2a494}.display-note{font-size:10px;line-height:1.85;color:#7a8077;margin:18px 0}.source-details{border-top:1px solid #3333331b;padding:12px 0;font-size:11px;color:#747c72}.source-details summary{cursor:pointer;display:flex;justify-content:space-between}.source-details summary:after{content:"＋"}.source-details[open] summary:after{content:"−"}.source-details a{display:block;margin:10px 0;text-decoration:none;color:#835b3d;line-height:1.6}.source-details a:hover{text-decoration:underline}.event-nav{height:55px;border-top:1px solid #3333331b;display:flex;align-items:center;justify-content:space-between;padding:0 22px;flex-shrink:0}.event-nav button{background:transparent;color:#4b5b52;font-size:11px}.event-nav span{font:11px Georgia;color:#888d80}.timeline{height:128px;border-top:1px solid #ffffff1b;display:flex;align-items:center;gap:45px;padding:19px 30px;background:#0e181e}.playback{display:flex;align-items:center;gap:14px;flex-shrink:0}.play{width:46px;height:46px;border-radius:50%;border:1px solid #c7ad7c;background:transparent;color:var(--gold);font-size:15px;padding-left:8px}.playback strong{display:block;font:17px "Songti SC",serif;letter-spacing:2px}.playback small{display:block;font-size:9px;color:#809294;margin-top:5px}.playback select{background:#19272e;border:0;padding:4px;font-size:11px;margin-left:7px}.time-track{position:relative;flex:1;min-width:0}.time-top{display:flex;justify-content:space-between;font-size:10px;color:#859696;margin-bottom:18px}.time-top span:first-child{font:11px Georgia;color:#c9b791;letter-spacing:1px}#year-slider{appearance:none;width:100%;height:2px;background:#4b5554;cursor:pointer;display:block;margin:0;position:relative;z-index:2}#year-slider::-webkit-slider-thumb{appearance:none;width:12px;height:12px;background:#d7b47b;border:3px solid #1d2b30;border-radius:50%;box-shadow:0 0 0 1px #d7b47b}#year-slider::-moz-range-thumb{width:9px;height:9px;background:#d7b47b;border:2px solid #1d2b30;border-radius:50%}.timeline-dots{position:relative;height:13px;margin-top:-12px;margin-bottom:4px}.timeline-dot{position:absolute;bottom:0;transform:translateX(-50%);width:8px;height:10px;border:0;background:transparent;padding:0;z-index:3}.timeline-dot:before{content:"";display:block;width:3px;height:6px;background:#8d9c98;margin:auto}.timeline-dot.active:before{background:var(--gold);height:13px;width:3px}.timeline-dot:hover:after{content:attr(data-title);position:absolute;bottom:22px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#283840;color:#ede9df;border:1px solid #c5ac7555;padding:5px 9px;border-radius:3px;font-size:10px;pointer-events:none}.ticks{display:flex;justify-content:space-between;font:10px Georgia;color:#71868a;margin-top:11px}.catalog{position:absolute;top:12px;right:16px;width:300px;max-height:calc(100% - 30px);z-index:7;background:#16262ef7;border:1px solid #52615e;box-shadow:0 15px 40px #0006;overflow:auto;border-radius:5px}.catalog-head{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:#16262e;padding:12px 18px;border-bottom:1px solid #ffffff18}.catalog-head strong{font-size:12px;font-weight:500;color:var(--gold)}.catalog-head button{background:transparent;color:#a5b0ac;font-size:22px}.catalog-item{display:flex;width:100%;gap:15px;background:transparent;text-align:left;color:#c2ceca;padding:12px 18px;border-bottom:1px solid #ffffff0c;font-size:12px}.catalog-item small{font:12px Georgia;color:#9b967e;margin-top:3px}.catalog-item:hover,.catalog-item.active{background:#d2af7320;color:#ead9b5}.node-popover{position:absolute;left:26px;bottom:58px;width:min(330px,calc(100% - 52px));padding:18px 20px;background:#15252ef7;border:1px solid #bfa27080;border-radius:4px;z-index:6;box-shadow:0 10px 25px #0005}.node-popover h3{font-size:15px;font-weight:500;margin:0 20px 5px 0;color:#e1c898}.node-popover p{font-size:11px;color:#aebcb9;margin:8px 0;line-height:1.8}.node-popover a{font-size:10px;color:#c7b38e;margin-right:16px;text-decoration:none}.node-popover button{position:absolute;right:10px;top:7px;background:transparent;font-size:22px;color:#a3b0ae}.empty{position:absolute;inset:0;z-index:8;background:#14242ef0;display:flex;align-items:center;justify-content:center;flex-direction:column}.empty[hidden]{display:none}.empty strong{font:23px "Songti SC",serif}.empty p{color:#9baead;font-size:12px}.empty button{background:var(--gold);color:#24302b;border-radius:3px;padding:8px 20px}.marker{cursor:pointer}.marker text{font:11px -apple-system,"PingFang SC",sans-serif;fill:#e8d8b6;paint-order:stroke;stroke:#14252c;stroke-width:4px;stroke-linejoin:round}.marker .hit{fill:transparent;pointer-events:all}.marker .dot{fill:#e2bd79;stroke:#1b2e36;stroke-width:2}.marker .halo{fill:#d3af6922;stroke:#d3af6966;stroke-width:1}.marker:hover .halo,.marker.selected .halo{fill:#d3af6955;stroke:#ead6aa}.map-relation{stroke:#cba66b;stroke-width:1.4;stroke-dasharray:5 5;fill:none;opacity:.75}.graticule{stroke:#78919a12;stroke-width:.65;fill:none}.land-shape{fill:#293d43;stroke:#69817d70;stroke-width:.8;stroke-linejoin:round}.river-shape{fill:none;stroke:#52707c80;stroke-width:1.1}.context-dot{fill:#78939155}.context-label{fill:#799195;font:10px -apple-system,"PingFang SC",sans-serif;letter-spacing:1px}.sea-label{fill:#506d7b;font:11px "Songti SC",serif;letter-spacing:7px}dialog{max-width:600px;width:calc(100% - 40px);border:1px solid #8d9988;background:#eeeade;color:#2a3931;padding:40px;box-shadow:0 30px 80px #0007;border-radius:5px}dialog::backdrop{background:#07141bd9;backdrop-filter:blur(6px)}dialog .eyebrow{color:#9c7250}dialog h2{font:27px "Songti SC",serif;margin:18px 0}dialog p{line-height:1.9;font-size:13px;color:#687066}.dialog-close{position:absolute;right:17px;top:13px;background:transparent;color:#7a8277;font-size:26px}.about-rule{border-top:1px solid #9a9a8a40;padding-top:20px;margin-top:20px}.about-rule b{font-size:12px;color:#8e6144}.about-rule p{margin:5px 0 16px;font-size:12px}.about-note{font-size:10px!important}.about-note a{color:#8e6144}body.loading main{opacity:.7}
@media(min-width:1550px){main{grid-template-columns:minmax(0,1fr) 410px}.detail-scroll{padding:35px}.detail h1{font-size:34px}.map-heading{top:35px;left:38px}.map-year{font-size:78px}}
@media(max-width:1000px){.header-center{display:none}main{grid-template-columns:minmax(0,1fr) 320px}.toolbar{gap:10px;padding:0 16px}.toolbar select{max-width:135px}.toolbar #catalog-button{font-size:11px}.toolbar #count{font-size:12px}.timeline{gap:25px;padding:18px 22px}.playback strong{font-size:14px}.playback small{display:none}.time-top span:last-child{display:none}.detail-scroll{padding:23px}.map-heading{left:20px}.map-year{font-size:52px}.map-credit{font-size:8px}.map-footer span:last-child{display:none}}
@media(max-width:720px){.header{height:65px;padding:0 21px}.brand{font-size:22px}.brand small{font-size:7px}.seal{width:30px;height:34px;font-size:22px}.header .quiet{font-size:10px}main{height:auto;display:flex;flex-direction:column;min-height:0}.atlas{height:54dvh;min-height:390px}.toolbar{height:52px;flex-shrink:0}.map-stage{min-height:280px}.map-heading{top:16px}.map-year{font-size:43px;margin-top:5px}.eyebrow{font-size:8px}.map-tools{top:16px;right:14px}.map-tools button{width:32px;height:32px;font-size:20px}.map-credit{right:12px;bottom:10px}.map-legend{left:16px;bottom:12px;font-size:9px;gap:10px}.map-footer{padding:5px 16px}.detail{border:0;min-height:300px}.detail-scroll{padding:25px 25px 12px;overflow:visible}.detail h1{font-size:28px}.detail .event-summary{margin:15px 0}.event-date{padding-bottom:15px}.event-nav{margin-bottom:110px}.timeline{position:fixed;bottom:0;left:0;right:0;height:98px;z-index:10;padding:14px 16px;gap:16px;box-shadow:0 -5px 25px #0002}.playback{gap:0}.playback>div,.playback select{display:none}.play{height:37px;width:37px;font-size:12px}.time-top{margin-bottom:18px}.time-top span{font-size:10px}.ticks{font-size:9px}.catalog{right:10px;width:calc(100% - 20px);max-height:calc(100% - 20px)}.focus-event{right:12px;bottom:51px;font-size:10px;padding:5px 9px}.node-popover{bottom:48px;left:14px;width:calc(100% - 68px);padding:13px 16px}.node-popover h3{font-size:13px}.node-popover p{font-size:10px}.node-popover a{font-size:9px}dialog{padding:30px 25px}.header .quiet span{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
/* Public terrain edition */
.header-actions{display:flex;align-items:center;gap:20px}.header-actions #motion-toggle{color:#d5bd8d;border:1px solid #b9a77740;border-radius:4px;padding:5px 9px;font-size:11px}.header-actions #motion-toggle[aria-pressed=false]{color:#8da2a8}
#map{background:#0c263b}.land-shape{fill:none;stroke:#e3d7b630;stroke-width:.6}.river-shape{stroke:#83c1d5aa;stroke-width:.75}.graticule{stroke:#d9e5df0e}.terrain-image{opacity:1}.map-vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#06192385,transparent 30%,transparent 75%,#061923a0),linear-gradient(90deg,#071c251c,transparent 30%);z-index:1}.map-heading{z-index:2;text-shadow:0 2px 8px #0009}.map-year{color:#fff7df}.map-heading .eyebrow{color:#f5d5a4}#map-subtitle{color:#ece8d8}.map-tools,.focus-event,.map-legend,.map-credit{z-index:2}.map-credit{color:#c4d0d1;text-shadow:0 1px 4px #000}.map-legend{background:#12252dd9;border:1px solid #dee0c626;border-radius:4px;padding:6px 9px;color:#dce3da;bottom:16px}.map-credit{bottom:15px}.focus-event{bottom:64px;background:#14242ee8}.context-label{fill:#fff6e5;font-size:calc(11px * var(--map-label-scale,1));font-weight:500;letter-spacing:0;paint-order:stroke;stroke:#122524c0;stroke-width:calc(2.5px * var(--map-label-scale,1));stroke-linejoin:round}.context-dot{fill:#f4e7d2;r:calc(1.7px * var(--map-label-scale,1));stroke:#172523;stroke-width:calc(.7px * var(--map-label-scale,1))}.terrain-label{fill:#e0d9b8;font:10px 'Songti SC',serif;font-size:calc(10px * var(--map-label-scale,1));text-anchor:middle;opacity:.65;paint-order:stroke;stroke:#17252388;stroke-width:calc(2px * var(--map-label-scale,1))}.sea-label{fill:#a0c4d5;font-size:calc(12px * var(--map-label-scale,1));letter-spacing:3px}.marker text{font-size:12px;stroke:#132722;stroke-width:4px;font-weight:500}.marker .dot{fill:#ffd18c;stroke:#4e3824;stroke-width:1.6}.marker .halo{fill:#dca6472b;stroke:#ffe0a890;stroke-width:1.2}.map-relation{stroke:#ffd38f;stroke-width:1.8;opacity:1;vector-effect:non-scaling-stroke}.journey-line{fill:none;stroke:#b0e6eb;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}.journey-head{fill:#e1fbfb;stroke:#467482;stroke-width:2;pointer-events:none}.transition-note{position:absolute;left:50%;bottom:112px;transform:translateX(-50%);z-index:3;max-width:calc(100% - 32px);white-space:nowrap;padding:7px 13px;background:#102b35ec;border:1px solid #9bcbd677;border-radius:30px;font-size:11px;color:#cce8e9;box-shadow:0 4px 18px #0003;pointer-events:none}.transition-note[hidden]{display:none}.event-photo{margin:17px 0 16px}.photo-open{display:block;width:100%;position:relative;overflow:hidden;border-radius:3px;background:#c3c3b7;padding:0;aspect-ratio:16/9;text-align:left}.photo-open img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .35s}.photo-open:hover img{transform:scale(1.035)}.photo-kind,.photo-zoom{position:absolute;font-size:10px;line-height:1.6;background:#14231deb;color:#f4eadd;padding:4px 7px;bottom:8px;border-radius:2px}.photo-kind{left:8px}.photo-zoom{right:8px}.event-photo figcaption{color:#858475;font-size:10px;line-height:1.6;margin-top:6px}.event-summary{margin-top:15px}.catalog-item{align-items:center;gap:12px}.catalog-item img{width:54px;height:40px;object-fit:cover;border-radius:2px;flex-shrink:0}.catalog-item small{color:#bda57e}.catalog-item span{line-height:1.5}.catalog{width:335px}.catalog-item.active{border-left:2px solid #d7b47b;padding-left:16px}
#photo-dialog{width:min(1000px,calc(100% - 36px));max-width:1000px;max-height:92dvh;padding:24px;background:#142129;color:#eee8db;border:1px solid #7d8872;overflow:auto}#photo-dialog .dialog-close{position:sticky;float:right;top:0;margin-right:-8px;background:#24342d;border-radius:50%;width:33px;height:33px;font-size:25px;line-height:1;color:#e6e3d5;z-index:2}.photo-dialog-head h2{color:#eee8db;font-size:23px;margin:9px 0 18px}.photo-dialog-head .eyebrow{color:#c5ab7d}.photo-image-stage{display:flex;justify-content:center;background:#0b141a;min-height:100px;border:1px solid #d6c8aa22}.photo-image-stage img{display:block;max-width:100%;max-height:60dvh;object-fit:contain;width:auto;height:auto}#photo-dialog #photo-caption{font-size:13px;color:#e6d7b7;margin:14px 0 8px}#photo-credit{font-size:11px;color:#a7b7b7;line-height:1.8}#photo-credit small{font-size:10px;color:#7f969a}#photo-credit a{color:#d6bb83;text-decoration:underline}
@media(max-width:1000px){.header-actions{gap:13px}.map-credit{font-size:8px}.map-legend{left:12px;gap:10px}.map-credit{right:12px}.map-tools{right:14px}.map-footer{padding-left:15px;padding-right:15px}}
@media(max-width:720px){.header-actions{gap:8px}.header-actions #motion-toggle{font-size:10px;padding:3px 5px}.brand{font-size:20px}.header{padding:0 17px}.map-credit{font-size:7px;bottom:9px}.map-legend{left:10px;bottom:9px;padding:4px 5px;gap:7px}.map-legend .dash{width:12px}.focus-event{bottom:49px}.transition-note{bottom:91px;font-size:9px;padding:5px 9px}.catalog{width:calc(100% - 20px)}#photo-dialog{padding:18px;width:calc(100% - 22px)}.photo-dialog-head h2{font-size:20px}.photo-image-stage img{max-height:58dvh}.event-photo{max-width:600px}.header .brand small{font-size:6px;letter-spacing:1.6px}}
@media(prefers-reduced-motion:reduce){.photo-open img{transition:none}}

.brand-mark{width:48px;height:48px;display:block;flex-shrink:0}.brand{gap:10px}.brand small{letter-spacing:2.2px}@media(max-width:720px){.brand-mark{width:37px;height:37px}.brand{gap:7px}.header .brand small{letter-spacing:1.1px}}
/* Full-table atlas and calligraphic identity */
.brand-calligraphy{display:block;width:214px;height:68px;object-fit:contain;flex-shrink:0}.brand{line-height:1}.scope-note{position:absolute;left:25px;right:75px;top:160px;max-width:490px;background:#12252de8;color:#d1dcd7;border-left:2px solid #b59d71;padding:9px 12px;font-size:11px;z-index:2;pointer-events:none}.scope-note[hidden]{display:none}.timeline{height:156px}main{height:calc(100dvh - 232px)}.timeline-dots{margin:0 0 5px;height:44px}.time-top{margin-bottom:8px}.timeline-dot{height:8px}.timeline-dot:before{height:4px;width:4px;border-radius:50%}.timeline-dot.active:before{height:6px;width:6px}.time-top span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:72%}.ticks{margin-top:9px}.playback select{min-width:49px}.toolbar select{max-width:220px}
@media(max-width:1000px){.toolbar select{max-width:145px}.time-top span:first-child{max-width:100%}}
@media(max-width:720px){.brand-calligraphy{width:175px;height:56px}.header-actions{gap:6px}.scope-note{top:115px;left:16px;right:55px;font-size:10px;max-width:none;padding:7px 10px}.timeline{height:auto;min-height:142px;padding:13px 16px;gap:12px}.playback{flex-direction:column;gap:10px}.playback select{display:block;margin:0;font-size:11px;max-width:52px}.event-nav{margin-bottom:160px}.ticks{font-size:8px}.time-track{min-width:0}.toolbar{gap:8px}.toolbar select{max-width:135px}.search{min-width:65px}main{height:auto}}
@media(max-width:360px){.brand-calligraphy{width:150px}.header{padding:0 12px}.header-actions{gap:4px}}

@media(min-width:721px){main{min-height:400px}}

@media(max-width:720px){.event-nav{margin-bottom:190px}.timeline-dot{height:6px}}
/* 山河中国 — two connected volumes */
.era-nav{height:67px;flex-shrink:0;display:flex;align-items:center;padding:0 25px;gap:20px;border-bottom:1px solid #ffffff15;background:#132129}.era-nav button{display:flex;align-items:baseline;gap:10px;background:transparent;padding:11px 0;color:#7d9296;border-bottom:2px solid transparent}.era-nav button[aria-pressed=true]{color:#f2dfbd;border-color:#c99e67}.era-nav button small{font-size:9px;letter-spacing:2px}.era-nav button strong{font:19px 'Songti SC',serif;letter-spacing:2px}.era-nav button span{font-size:10px;color:#8fa4a5}.era-link{color:#7c867b}.era-caption{margin-left:auto;font-size:9px;color:#74898d;letter-spacing:1px;line-height:1.7}.ancient-view #terrain{opacity:.56}.ancient-view #context{visibility:hidden}.territory-shape{fill-opacity:.38;stroke-width:1.2;stroke-dasharray:4 2;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill-opacity .15s}.territory-shape:hover,.territory-shape:focus-visible{fill-opacity:.65;stroke:#fff0cc;outline:0}.territory-label{font-family:'Songti SC','SimSun',serif;font-weight:700;letter-spacing:2px;paint-order:stroke;stroke:#13222edb;stroke-linejoin:round;pointer-events:none}.area-swatch{display:block;width:11px;height:10px;background:#d7b47b70;border:1px dashed #d7b47b}.polity-list{margin:15px 0 22px}.polity-list button{padding:5px 9px;margin:0 5px 6px 0;background:#ffffff65;color:#34423b;border:1px solid #c5c3b4;border-radius:3px;font-size:11px}.polity-list button:before{content:'';display:inline-block;width:9px;height:9px;background:var(--polity);margin-right:6px;border-radius:2px}.polity-list button:hover{background:#fff}.map-legend label[hidden]{display:none}.ancient-view .map-legend{gap:12px}.ancient-view .map-legend>span,.ancient-view .map-legend>label:last-child{display:none}.ancient-view .map-heading .eyebrow{color:#dcc69b}.ancient-view .map-year{font-size:56px}.ancient-view .map-heading{top:22px}.map-stage{min-height:350px}.toolbar{flex-shrink:0}.ancient-view .map-credit{font-size:8px}.ancient-view .map-tools{top:22px}.map-footer{flex-shrink:0}
@media(max-width:1100px){.era-nav{gap:12px;padding:0 16px}.era-nav button{gap:6px}.era-nav button span,.era-caption{display:none}.era-nav button strong{font-size:17px}.era-nav{height:59px}}
@media(max-width:720px){.era-nav{height:55px;gap:18px;padding:0 16px}.era-nav button{padding:9px 0}.era-nav button strong{font-size:17px}.era-nav button small{font-size:8px}.atlas{height:65dvh;min-height:490px}.map-stage{min-height:330px}.ancient-view .map-year{font-size:40px}.ancient-view .map-heading{top:16px}.ancient-view .map-tools{top:16px}.ancient-view .map-credit{font-size:7px}.ancient-view .map-legend{font-size:9px}.ancient-view .focus-event{bottom:67px}.ancient-view .transition-note{bottom:105px}.ancient-view .node-popover{bottom:68px}.era-caption{display:none}}

.ticks{position:relative;height:16px;display:block}.ticks span{position:absolute;white-space:nowrap}.atlas{min-height:0}@media(min-width:721px){.map-stage{min-height:250px}}
/* V5 — parallel dynasties and dated transitions */
.territory-reference{position:absolute;top:145px;left:25px;z-index:3;background:#10242eec;border:1px solid #c0a27166;border-radius:4px;padding:8px 10px;max-width:calc(100% - 100px);color:#e8d5ae}.territory-reference[hidden]{display:none}.territory-reference>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.territory-reference label{font-size:10px;color:#98afaf}.territory-reference select{background:#20363d;color:#f1dfbb;border:1px solid #b7a67a55;border-radius:3px;padding:5px;max-width:210px;font-size:11px}.territory-reference button{background:transparent;color:#d8c091;font-size:10px;padding:4px}.territory-reference small{font-size:9px;display:block;margin-top:5px;color:#afc2be}.territory-explainer{padding:12px 13px;margin-top:15px;background:#ddd8c7;border-left:3px solid #a87b50;color:#63705f;font-size:11px;line-height:1.8}.territory-explainer b{font-size:12px;color:#7c5b38}.territory-explainer p{margin:5px 0}.territory-explainer small{font-size:10px}.territory-primary{fill-opacity:.46;stroke-width:1.6}.territory-neighbor{fill-opacity:.25;stroke-width:.8}.territory-core{fill-opacity:1;stroke-dasharray:6 5;stroke-width:1.5}.chronology-view #terrain{opacity:.62!important}.territory-old{pointer-events:none}.territory-reference select:disabled{opacity:.7}
@media(max-width:720px){.territory-reference{top:105px;left:16px;padding:6px 8px;max-width:calc(100% - 75px)}.territory-reference label{display:none}.territory-reference select{max-width:170px;font-size:10px}.territory-reference small{font-size:8px}.territory-reference>div{gap:4px}.territory-reference button{font-size:9px}.ancient-view .node-popover{max-height:calc(100% - 95px);overflow:auto}.map-footer #map-status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
.era-nav .dynasty-button{margin-left:auto;border:1px solid #b79b6266;border-radius:4px;padding:6px 10px;font-size:12px;color:#e0c596;white-space:nowrap;gap:6px}
.era-nav .dynasty-button:hover{background:#d7b47b18}.map-year small{font:18px 'Songti SC',serif;letter-spacing:0;margin-right:7px}
.chronology-view #terrain{opacity:.85}.chronology-view .map-legend>span{display:flex}.chronology-view .map-legend>label[hidden]{display:none}
.dynasty-context{background:#e3ddcf;border-left:2px solid #a87150;padding:12px 14px;margin:18px 0;color:#586458}.dynasty-context>span{display:block;font-size:10px;color:#8c7960}.dynasty-context strong{font:19px/1.7 Georgia,'Songti SC',serif;color:#455346}.dynasty-context small{display:block;font-size:11px}.dynasty-context button{font-size:10px;color:#8d583f;background:transparent;padding:8px 8px 0 0}.dynasty-context button:hover{text-decoration:underline}
#dynasty-dialog{width:min(1100px,calc(100% - 40px));max-width:1100px;max-height:90dvh;padding:0 30px 25px;background:#eee9de;color:#2d3c36;border:1px solid #9c896a;overflow:auto;scrollbar-width:thin}
.dynasty-modal-head{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:2;background:#eee9defa;border-bottom:1px solid #beb8a5;padding:24px 0 16px}.dynasty-modal-head .eyebrow{color:#946d43}.dynasty-modal-head h2{font:29px/1.4 'Songti SC',serif;margin:8px 0 0}.dynasty-modal-head button{align-self:flex-start;font-size:28px;color:#566457;background:transparent;min-width:40px}.dynasty-intro{font-size:13px;color:#596658;line-height:1.9}.dynasty-filters{display:flex;gap:12px;align-items:center;margin:18px 0 10px}.dynasty-filters input,.dynasty-filters select{border:1px solid #c5b99e;background:#f7f3e9;color:#3c4c42;padding:9px 12px;border-radius:3px;font-size:12px}.dynasty-filters input{flex:1;min-width:0}.dynasty-filters input::placeholder{color:#818772}.dynasty-filters select{max-width:190px}.dynasty-filters>span{font-size:11px;color:#86735a;white-space:nowrap}.dynasty-scope{font-size:11px;color:#7b806f;line-height:1.9;border-bottom:1px solid #c8bfac;padding-bottom:15px}.dynasty-group-title{display:flex;justify-content:space-between;align-items:baseline;gap:16px;border-bottom:1px solid #bcb6a6;margin:26px 0 13px}.dynasty-group-title h3{font:21px 'Songti SC',serif;margin:0 0 8px}.dynasty-group-title span{font-size:10px;color:#85775f}.dynasty-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.dynasty-card{border:1px solid #d2c9b6;background:#f7f3e9;padding:17px 18px;display:flex;flex-direction:column;border-radius:3px}.dynasty-card-top{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.dynasty-card h4{font:23px/1.4 'Songti SC',serif;margin:0;color:#35493c}.dynasty-card-top strong{font:13px Georgia,'Songti SC',serif;color:#a07147;white-space:nowrap}.reign-track{position:relative;height:5px;margin:14px 0 5px;background:#e3ddcd;border-radius:3px}.reign-track i{position:absolute;height:100%;background:#ac7953;border-radius:3px}.dynasty-card p{font-size:12px;line-height:1.85;margin:8px 0;color:#586150}.dynasty-card p b{font-weight:400;color:#a86a4b;margin-right:4px}.dynasty-card .dynasty-founder{font-size:12px;color:#435b4b;padding-bottom:9px;border-bottom:1px solid #d9d1bd}.dynasty-founder span{display:block;color:#8b866f;font-size:10px;margin-top:3px}.dynasty-card details{margin:8px 0 12px;font-size:11px;color:#80775f}.dynasty-card details summary{cursor:pointer}.dynasty-card details p{font-size:11px}.dynasty-card details a{display:block;margin:5px 0;text-decoration:none;color:#93613e}.dynasty-card details a:hover{text-decoration:underline}.dynasty-card-actions{display:flex;gap:9px;margin-top:auto;border-top:1px solid #d9d1bd;padding-top:12px}.dynasty-card-actions button{padding:7px 12px;border:1px solid #c5b99f;background:#eee6d7;color:#756044;font-size:11px;border-radius:3px}.dynasty-card-actions button:hover{background:#e1d2b8}.dynasty-endnote{font-size:11px;color:#7c7e6e;border-top:1px solid #c8bfac;margin-top:30px;padding-top:18px}.dynasty-empty{padding:30px;text-align:center}
@media(max-width:1000px){.era-nav{gap:10px}.era-nav .dynasty-button{font-size:11px;padding:6px 8px}.era-nav .dynasty-button small{display:none}}
@media(max-width:720px){.era-nav{gap:9px;padding:0 12px}.era-nav button{gap:4px}.era-nav button strong{font-size:16px;letter-spacing:1px}.era-nav .dynasty-button{font-size:10px;padding:6px}.era-nav .era-link{font-size:10px}#dynasty-dialog{width:calc(100% - 20px);max-height:94dvh;padding:0 16px 22px}.dynasty-modal-head{padding-top:18px}.dynasty-modal-head h2{font-size:23px}.dynasty-grid{grid-template-columns:1fr}.dynasty-filters{flex-wrap:wrap;gap:8px}.dynasty-filters input{flex-basis:100%}.dynasty-filters select{flex:1;max-width:none}.dynasty-group-title{display:block}.dynasty-group-title span{display:block;margin-bottom:9px}.dynasty-card h4{font-size:22px}.dynasty-card-top strong{font-size:12px}.dynasty-intro{font-size:12px}.map-year small{font-size:14px}}

/* Compact music settings; reachable on mobile without crowding playback controls. */
.music-settings{position:relative;color:#d5bd8d;font-size:11px}.music-settings summary{cursor:pointer;list-style:none;border:1px solid #b9a77740;border-radius:4px;padding:5px 9px;white-space:nowrap}.music-settings summary::-webkit-details-marker{display:none}.music-settings summary[data-playing=true]{background:#d7b47b22;border-color:#d7b47b}.music-panel{position:absolute;z-index:40;right:0;top:35px;width:230px;padding:18px;background:#17272f;border:1px solid #d7b47b55;border-radius:8px;box-shadow:0 12px 35px #0006;color:#e7e6df}.music-panel strong{display:block;font-size:17px;font-family:"Songti SC",serif}.music-panel small{display:block;color:#acb7b5;font-size:11px;margin:4px 0 14px}.music-switch{display:flex;align-items:center;gap:7px;margin-bottom:14px}.music-panel input{accent-color:#d7b47b}.music-panel input[type=range]{width:100%;margin:10px 0;display:block}.music-panel p{margin:3px 0 0;color:#c5b58f;font-size:11px}.music-panel button{margin-top:10px;background:#d7b47b;color:#17272f;padding:5px 10px;border-radius:3px}.music-settings summary:focus-visible{outline:2px solid #d7b47b;outline-offset:4px}
@media(max-width:720px){.header{padding:0 12px}.brand-calligraphy{width:148px}.header-actions{gap:5px}.music-settings summary{font-size:10px;padding:3px 5px}.music-panel{position:fixed;top:61px;right:12px;max-width:calc(100vw - 24px)}.header #about{max-width:65px;font-size:9px;padding:3px}.header #motion-toggle{white-space:nowrap}}
@media(max-width:360px){.brand-calligraphy{width:125px}.header{padding:0 8px}.header-actions{gap:3px}}

.share-box{border:1px solid #9a825344;border-radius:7px;padding:16px;margin:18px 0 24px;background:#d7b47b0c}.share-preview{display:flex;align-items:center;gap:14px}.share-preview img{width:80px;height:80px;border-radius:4px;flex-shrink:0}.share-preview strong{font-size:14px}.share-preview p{font-size:12px!important;line-height:1.6;margin:6px 0!important}.share-box #share-status{font-size:12px;color:#7c6344}.share-box button{background:#263a38;color:#fff;padding:8px 12px;border-radius:4px}.share-box a{font-size:12px}
