@font-face {
  font-family: 'Noto Serif SC';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(assets/noto-serif-sc.woff2?v=bcf274fc0c09) format('woff2');
}

:root{--paper:#f4ecdb;--paper-deep:#e7dabd;--ink:#332f26;--muted:#756b58;--line:#cfbfa2;--red:#984332;--red-deep:#763023;--map:#eae2ce;--serif:'Noto Serif SC','Songti SC','STSong',serif;--sans:'PingFang SC','Microsoft YaHei',sans-serif}
*{box-sizing:border-box}body{margin:0;color:var(--ink);font:16px/1.6 var(--sans);background:var(--paper);overflow:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button,a{touch-action:manipulation}button:focus-visible,a:focus-visible{outline:2px solid var(--red);outline-offset:4px}button{border:0;background:none}a{color:inherit}button svg{width:18px;height:18px;flex:none}button{display:inline-flex;align-items:center;justify-content:center;gap:8px}button:disabled{opacity:.5;cursor:default}[hidden]{display:none!important}.skip-link{position:fixed;z-index:9999;left:10px;top:-80px;background:var(--ink);color:white;padding:10px}.skip-link:focus{top:10px}
.site-header{height:90px;display:flex;align-items:center;justify-content:space-between;padding:0 32px;border-bottom:1px solid var(--line);background:var(--paper);position:relative;z-index:600;box-shadow:0 2px 12px #64543806}.brand{display:flex;align-items:center;text-decoration:none;gap:15px}.brand-seal{font:28px/1 var(--serif);color:#f8e8cf;background:var(--red);border:3px double var(--paper);outline:1px solid var(--red);width:40px;height:43px;display:grid;place-items:center;transform:rotate(-3deg)}.brand-word{font:600 34px/1.3 var(--serif);letter-spacing:5px}.brand-divider{width:1px;height:34px;background:var(--line);margin:0 5px}.brand-description{font:500 16px/1.45 var(--serif);letter-spacing:2px}.brand-description>span{display:block;font:12px/1.8 var(--sans);color:var(--muted);letter-spacing:2px}.header-actions{display:flex;align-items:center;gap:28px}.edition{font:14px var(--sans);color:var(--muted)}.edition span{color:var(--red);margin:0 4px;font:500 18px var(--serif)}.text-button{font-size:14px;gap:9px}.text-button:hover{color:var(--red)}.atlas-layout{height:calc(100dvh - 90px);min-height:460px;display:flex}.sidebar{width:324px;flex:none;background:var(--paper);display:flex;flex-direction:column;position:relative;z-index:450;border-right:1px solid var(--line);box-shadow:4px 0 18px #56482b06}.eyebrow{font:500 13px var(--serif);color:var(--muted);letter-spacing:4px}.filters{padding:22px 24px 17px;flex:none}.filter-heading,.field-heading{display:flex;align-items:center;justify-content:space-between}.filter-heading{margin-bottom:20px}.filter-heading h2{font:600 24px var(--serif);margin:0;letter-spacing:2px}.reset-button{font-size:13px;color:var(--muted);padding:5px 0}.reset-button:hover{color:var(--red)}.field-heading{margin-bottom:10px}.field-heading h3{font-size:14px;font-weight:500;margin:0}.field-heading>span{font-size:12px;color:var(--muted)}.type-filters{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.type-button{border:1px solid var(--line);padding:9px 3px 8px;display:flex;flex-direction:column;gap:5px;border-radius:2px;font-size:14px;background:#f8f2e42b;transition:background .18s,border-color .18s}.type-button svg{width:22px;height:22px;color:#72614c;stroke-width:1.4}.type-button:hover{border-color:#a78267;background:#ebe0c9}.type-button[aria-pressed=true]{background:#9843320c;border-color:var(--red);color:var(--red);box-shadow:inset 0 0 0 1px #98433212}.type-button[aria-pressed=true] svg{color:var(--red)}.period-heading{margin-top:22px}.period-filters{display:flex;flex-wrap:wrap;gap:7px}.period-button{border:1px solid #d5c8ae;border-radius:2px;font-size:14px;line-height:1.4;padding:6px 11px}.period-button:hover{background:#e6d6b88a}.period-button[aria-pressed=true]{color:#fff3dd;background:var(--red);border-color:var(--red)}.filter-note{font-size:12px;color:#857760;margin:10px 0 0}.sidebar-foot{margin-top:auto;padding:13px 24px;border-top:1px solid var(--line);font:13px var(--serif);letter-spacing:2px;color:var(--muted);display:flex;align-items:center;gap:10px}.tiny-seal{color:var(--red);border:1px solid #98433290;font:14px/1.3 var(--serif);padding:0 2px}
.map-surface{position:relative;flex:1;min-width:0;overflow:hidden;background:var(--map)}#map{height:100%;width:100%;background:var(--map);font:14px var(--sans);z-index:1}#map:after{content:'';position:absolute;inset:0;background-image:url('assets/paper.webp');background-size:800px auto;opacity:.29;pointer-events:none;z-index:300;mix-blend-mode:multiply}.leaflet-container{cursor:grab!important}.leaflet-dragging .leaflet-container{cursor:grabbing!important}.leaflet-control-attribution{background:#eee4cdbc!important;color:#776c56!important;font-size:10px!important;padding:3px 8px!important}.leaflet-control-attribution a{color:#776c56}.map-actions{position:absolute;right:25px;top:28px;z-index:410;display:flex;gap:8px}.map-button{border:1px solid #bba887;background:#f7eedcde;box-shadow:0 2px 8px #5a422011;font-size:14px;padding:9px 13px;border-radius:2px}.map-button:hover{background:#fff5de;color:var(--red)}.map-help{position:absolute;left:35px;bottom:38px;z-index:400;display:flex;align-items:center;gap:8px;font-size:12px;color:#7a6c53;pointer-events:none}.help-dot{width:5px;height:5px;background:var(--red);transform:rotate(45deg)}.compass{position:absolute;right:30px;bottom:150px;z-index:400;width:48px;opacity:.7;text-align:center;color:#6a5437;pointer-events:none}.compass>span{font:13px var(--serif)}.compass svg{display:block;width:48px;height:48px;fill:none;stroke:#816c4c;stroke-width:.6}.compass .needle{fill:var(--red);stroke:var(--red)}.leaflet-bottom.leaflet-right{bottom:29px;right:27px}.leaflet-control-zoom{border:1px solid #bba887!important;box-shadow:0 2px 8px #5a422011!important;border-radius:2px!important}.leaflet-control-zoom a{background:#f8efdded!important;color:#69583f!important;width:37px!important;height:36px!important;line-height:36px!important;border-radius:0!important;font-family:var(--sans)!important;font-size:23px!important;font-weight:400!important}.leaflet-control-zoom a:first-child{border-bottom:1px solid #c8b697!important}.leaflet-control-zoom a:hover{background:#fff4da!important;color:var(--red)!important}.leaflet-control-scale{margin-left:35px!important;margin-bottom:70px!important}.leaflet-control-scale-line{background:none!important;border-color:#8b7c64!important;color:#81725a!important;font-size:10px!important;text-shadow:none!important}.province-label{font:14px var(--serif);white-space:nowrap;color:#877451;letter-spacing:2px;text-align:center;pointer-events:none}.province-label span{text-shadow:0 1px 3px #f0e6ce,1px 0 3px #f0e6ce}.map-grid{pointer-events:none}.heritage-marker{width:33px!important;height:33px!important;display:flex;align-items:center;justify-content:center;background:#f7edd8ef;border:1.4px solid var(--marker-color,#984332);color:var(--marker-color,#984332);box-shadow:0 2px 5px #57401e20;border-radius:50%;transition:background .15s,box-shadow .15s;cursor:pointer!important}.heritage-marker svg{width:20px;height:20px;stroke-width:1.7;fill:none;stroke:currentColor}.heritage-marker:hover,.heritage-marker.is-selected{background:var(--marker-color,#984332);color:#fff2d9;box-shadow:0 0 0 5px #98433218}.heritage-marker:focus-visible{outline:2px solid var(--red);outline-offset:4px}.cluster-marker{width:40px!important;height:40px!important;color:#834d36;background:#f4e7cce8;border:1px solid #a7825a;box-shadow:inset 0 0 0 3px #f5ead6,inset 0 0 0 4px #b59971,0 3px 8px #57401e20;border-radius:50%;display:grid;place-items:center;font:500 17px var(--serif);cursor:pointer!important}.cluster-marker:hover{background:#ddc5a0}.map-status{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);z-index:420;border:1px solid var(--line);background:#fbf2df;padding:10px 16px;font-size:14px;max-width:90%;text-align:center}
.leaflet-popup-content-wrapper{background:var(--paper)!important;color:var(--ink)!important;border:1px solid #bca78a;border-radius:3px!important;box-shadow:0 6px 25px #49372025!important;padding:0!important;overflow:hidden}.leaflet-popup-content{margin:0!important;width:260px!important;font:14px/1.6 var(--sans)!important}.leaflet-popup-tip{background:var(--paper)!important;box-shadow:none!important}.hover-image{display:block;width:260px;height:136px;object-fit:cover}.hover-info{padding:12px 15px 13px}.hover-info h3{font:500 20px var(--serif);margin:0 0 5px}.hover-meta{font-size:12px;color:var(--muted)}.hover-info p{margin:8px 0 0;font-size:13px;line-height:1.7}.hover-note{display:block;margin-top:10px;color:var(--red);font-size:12px}.hover-actions{display:flex;justify-content:space-between;margin-top:10px;align-items:center}.hover-actions button{font-size:12px;color:var(--red);padding:4px 0}.hover-actions a{font-size:12px;color:var(--muted);text-underline-offset:3px}
.detail-panel{position:absolute;z-index:460;right:25px;top:82px;width:360px;max-height:calc(100% - 105px);overflow:auto;scrollbar-width:thin;background:var(--paper);border:1px solid #bba887;box-shadow:0 8px 36px #53402326;border-radius:2px;animation:reveal .22s ease-out}.detail-hero{height:195px;position:relative}.detail-hero img{width:100%;height:100%;object-fit:cover}.detail-close{position:absolute;right:12px;top:12px;background:#f6eddae8;width:31px;height:31px;border-radius:50%;box-shadow:0 2px 10px #0002}.detail-type{position:absolute;left:16px;bottom:14px;background:#f6eddae8;color:#635038;font-size:12px;padding:3px 9px;display:flex;align-items:center;gap:6px;border:1px solid #ecdcc3}.detail-type svg{width:14px;height:14px}.detail-body{padding:21px 24px 23px}.detail-name{font:600 28px/1.45 var(--serif);letter-spacing:1px;margin:8px 0 10px}.detail-era{display:inline-block;font-size:13px;color:var(--red);border-top:1px solid #c9a793;border-bottom:1px solid #c9a793;padding:3px 0;margin-bottom:15px}.detail-location{display:flex;align-items:flex-start;gap:7px;font-size:14px;color:var(--muted);line-height:1.7}.detail-location svg{width:15px;height:15px;flex:none;margin-top:4px}.detail-description{font-size:16px;line-height:1.85;margin:17px 0 21px}.detail-focus{border-left:2px solid #b7976e;padding-left:12px;font-size:14px;line-height:1.8;color:#756247;margin:0 0 23px}.detail-focus strong{font-weight:500;color:#584934}.primary-button{background:var(--red);color:#fff1d9;display:flex;align-items:center;justify-content:center;text-decoration:none;font-size:15px;gap:9px;padding:11px 16px;border:1px solid var(--red-deep);border-radius:2px;box-shadow:inset 0 0 0 2px #ffffff0d;transition:background .15s}.primary-button:hover{background:var(--red-deep)}.primary-button svg{width:17px;height:17px}.detail-sources{border-top:1px solid var(--line);margin-top:20px;padding-top:12px;font-size:12px;color:var(--muted);line-height:1.8}.detail-sources summary{cursor:pointer;list-style:disclosure-closed;font-size:12px}.detail-sources[open] summary{list-style:disclosure-open}.detail-sources p{margin:8px 0 0;overflow-wrap:anywhere}.detail-sources a{text-underline-offset:3px}.about-dialog{border:1px solid #bba887;background:var(--paper);color:var(--ink);max-width:560px;width:calc(100% - 32px);max-height:85dvh;padding:36px 38px;box-shadow:0 16px 80px #31251d35}.about-dialog::backdrop{background:#2b271a60;backdrop-filter:blur(3px)}.about-dialog h2{font:600 28px var(--serif);margin:15px 0 22px}.about-dialog p{font-size:16px;line-height:1.85;margin:15px 0}.about-dialog strong{font:600 17px var(--serif);color:var(--red)}.about-dialog .about-lifetime{font-size:13px;color:var(--muted)}.source-note{border-top:1px solid var(--line);padding-top:10px;margin-top:22px}.source-note summary{font-size:13px;color:var(--muted);cursor:pointer}.source-note p{font-size:13px;color:var(--muted)}.about-dialog .primary-button{width:100%;margin-top:24px}.icon-button{width:32px;height:32px;flex:none}.icon-button:hover{background:#e7dac2}.dialog-close{position:absolute;right:12px;top:12px}.mobile-filter-button,.mobile-close,.mobile-help{display:none}@keyframes reveal{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1600px){.sidebar{width:350px}.filters{padding-left:28px;padding-right:28px}.type-button{padding-top:12px;padding-bottom:10px}.detail-panel{width:390px}.detail-hero{height:215px}}
@media(max-height:780px) and (min-width:761px){.site-header{height:76px}.atlas-layout{height:calc(100dvh - 76px)}.filters{padding-top:14px;padding-bottom:13px}.filter-heading{margin-bottom:14px}.type-button{padding:7px 3px 6px;gap:3px}.period-heading{margin-top:15px}.period-button{padding:5px 10px}.field-heading{margin-bottom:7px}.detail-hero{height:155px}.detail-body{padding-top:15px}.detail-description{margin-top:12px;margin-bottom:16px}}
@media(max-width:1100px) and (min-width:761px){.sidebar{width:295px}.filters{padding-left:19px;padding-right:19px}.detail-panel{width:320px}.edition{display:none}.detail-body{padding-left:21px;padding-right:21px}}
@media(max-width:760px){body{overflow:hidden}.site-header{height:72px;padding:0 17px}.brand{gap:11px}.brand-seal{width:30px;height:34px;font-size:23px;border-width:2px}.brand-word{font-size:27px;letter-spacing:3px}.brand-divider,.brand-description,.edition,.about-button span{display:none}.header-actions{gap:16px}.about-button{width:28px;padding:0}.about-button svg{width:19px;height:19px}.mobile-filter-button{display:inline-flex;font-size:14px;gap:6px}.atlas-layout{height:calc(100dvh - 72px);min-height:0}.sidebar{position:fixed;left:0;top:72px;bottom:auto;max-height:calc(100dvh - 72px);width:min(330px,calc(100vw - 38px));transform:translateX(-105%);transition:transform .22s;z-index:650;box-shadow:6px 0 30px #32261925}.sidebar.open{transform:translateX(0)}.mobile-close{display:inline-flex}.filters{padding-top:16px}.filter-heading{margin-bottom:16px}.sidebar-backdrop{position:fixed;inset:72px 0 0;background:#2b271a45;z-index:640;display:block}.map-actions{right:15px;top:23px}.map-button{padding:8px 10px;font-size:13px;gap:6px}.map-button svg{width:15px;height:15px}.map-help{left:21px;bottom:31px;font-size:12px}.desktop-help{display:none}.mobile-help{display:inline}.compass{right:20px;bottom:120px;width:38px}.compass svg{width:38px;height:38px}.leaflet-bottom.leaflet-right{bottom:25px;right:15px}.leaflet-control-scale{margin-left:21px!important;margin-bottom:58px!important}.leaflet-control-zoom a{width:34px!important;height:34px!important;line-height:34px!important}.province-label{font-size:12px;letter-spacing:0}.heritage-marker{width:30px!important;height:30px!important}.heritage-marker svg{width:18px;height:18px}.detail-panel{left:10px;right:10px;top:auto;bottom:20px;width:auto;max-height:min(74dvh,620px);z-index:470}.detail-hero{height:160px}.detail-body{padding:19px 22px 21px}.detail-name{font-size:26px}.detail-description{margin:13px 0 18px}.detail-focus{margin-bottom:18px}.about-dialog{padding:28px 24px}.about-dialog h2{font-size:25px}.leaflet-control-attribution{font-size:9px!important;max-width:100%;white-space:normal}.map-status{bottom:30px}.sidebar-foot{padding-top:10px;padding-bottom:10px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.leaflet-tile-pane{filter:sepia(.82) saturate(.55) contrast(.85) brightness(1.06)}
.site-header:after{content:"";position:absolute;left:0;right:0;bottom:3px;border-top:1px solid #cfbfa244;pointer-events:none}
.map-surface:after{content:"";position:absolute;inset:12px;border:1px solid #9d84582b;z-index:390;pointer-events:none}
.atlas-layout{min-height:0}.sidebar{overflow-y:auto;scrollbar-width:thin;scrollbar-color:#c5b493 transparent}

.detail-dating{border:1px solid #c9b797;background:#e9dcc333;padding:12px 13px;margin:0 0 17px}.dating-basis{display:block;color:var(--red);font:500 13px var(--serif);letter-spacing:1px;margin-bottom:7px}.detail-dating dl,.hover-dating dl{margin:0}.detail-dating dl>div{margin-top:6px}.detail-dating dt{font-size:12px;color:var(--muted);line-height:1.6}.detail-dating dd{margin:1px 0 0;font-size:15px;line-height:1.65;overflow-wrap:anywhere}.detail-dating .dating-note{border-top:1px solid var(--line);padding-top:9px;margin:10px 0 0;font-size:13px;line-height:1.75;color:var(--muted)}
.hover-dating{border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:9px;padding:8px 0}.hover-dating .dating-basis{font-size:12px;margin-bottom:4px}.hover-dating dl>div{display:grid;grid-template-columns:56px minmax(0,1fr);gap:7px;margin-top:3px}.hover-dating dt{font-size:12px;color:var(--muted)}.hover-dating dd{margin:0;font-size:13px;line-height:1.6;overflow-wrap:anywhere}

/* A reading trail on the map, with the weight and rhythm of a paper scroll. */
[hidden] { display:none !important; }
/* Keep the head of the foreground stone lion visible in wide photo cards. */
img[src="assets/photos/tang-tailing.jpg"] { object-position:50% 12%; }
button:disabled { cursor:default; opacity:.55; }
.exploration-header-button { color:var(--red); gap:8px; white-space:nowrap; }
.exploration-header-button svg { width:20px; height:20px; }
.exploration-count { font-size:12px; border:1px solid #a46654; min-width:22px; height:22px; padding:0 5px; display:inline-flex; align-items:center; justify-content:center; border-radius:2px; }
.trail-dock { position:absolute; z-index:435; left:25px; right:25px; bottom:29px; border:1px solid #bca27b; background:#f5ead5 url('assets/paper.webp') center/750px; box-shadow:0 6px 24px #4832171c; padding:13px 18px 10px; }
.has-detail .trail-dock { right:410px; }
.trail-dock::before,.trail-dock::after { content:''; width:5px; position:absolute; top:-4px; bottom:-4px; background:#87613e; border:1px solid #68472d; border-radius:3px; }
.trail-dock::before { left:-6px; } .trail-dock::after { right:-6px; }
.dock-heading { display:flex; align-items:center; gap:12px; }
.dock-title { border:0; background:none; padding:0; color:var(--ink); display:flex; gap:8px; align-items:center; font:600 17px var(--serif); text-align:left; min-width:0; }
.dock-title svg { width:19px; height:19px; flex:none; color:var(--red); }
.dock-title span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:300px; }
.dock-state { font-size:13px; color:var(--muted); white-space:nowrap; }
.dock-expand { margin-left:auto; font-size:14px; color:var(--red); padding:3px 0 3px 10px; background:none; border:0; white-space:nowrap; }
.dock-stops { display:flex; align-items:center; overflow-x:auto; gap:12px; margin-top:9px; padding:2px 0 5px; scrollbar-width:thin; scrollbar-color:#b59e7b transparent; }
.dock-stop { padding:2px 0; display:flex; flex:none; align-items:center; gap:6px; font:500 14px var(--serif); color:var(--muted); border:0; background:none; }
.dock-stop span { display:inline-flex; align-items:center; justify-content:center; width:21px; height:21px; border:1px solid #b49c78; border-radius:50%; font:12px var(--sans); }
.dock-stop.active { color:var(--red); }.dock-stop.active span { background:var(--red); border-color:var(--red); color:#fff5e1; }
.dock-map-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; border-top:1px solid #b59e7538; padding-top:6px; }
.dock-map-actions .text-button { font-size:12px; color:var(--muted); padding:0; }
.route-legend { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); }
.route-legend i { display:inline-block; width:15px; border-top:2px solid var(--red); }
.route-legend .dashed-line { border-color:#7a705d; border-top-style:dashed; margin-left:9px; }

.has-trail .map-help,.has-trail .compass { display:none; }
.has-trail .leaflet-control-scale { margin-bottom:168px !important; }
.has-trail .leaflet-bottom.leaflet-right { bottom:170px; }
.has-trail .map-status { bottom:164px; }
.trail-number { display:flex !important; align-items:center; justify-content:center; background:#f6ebd7; color:#784d35; border:1px solid #a98356; border-radius:50%; font:600 12px var(--sans); box-shadow:0 1px 5px #46301d30; cursor:pointer; }
.trail-number.active { background:var(--red); color:#fff4dd; border-color:#783729; }
.detail-view-tabs { display:flex; border-bottom:1px solid var(--line); gap:18px; margin:17px 0 10px; }
.detail-view-tabs button { border:0; border-bottom:2px solid transparent; background:none; padding:8px 0 10px; font:500 15px var(--serif); color:var(--muted); white-space:nowrap; }
.detail-view-tabs button[aria-selected=true] { color:var(--red); border-bottom-color:var(--red); }
.detail-view-tabs button span { font:12px var(--sans); margin-left:3px; }
.detail-panel.showing-relations .detail-hero { height:145px; }.detail-panel.showing-relations .detail-name { margin-top:0; }.detail-panel.showing-relations .detail-era { margin-bottom:0; }
.detail-trail-note { display:flex; align-items:center; gap:6px; margin:0 0 16px; color:var(--muted); font-size:12px; }
.detail-trail-note svg { width:14px; height:14px; flex:none; }.detail-trail-note button { border:0; background:none; padding:2px 0; margin-left:auto; color:var(--red); font-size:12px; white-space:nowrap; }
.related-current-date { border-left:2px solid #ab785a; padding-left:11px; margin:15px 0; }.related-current-date>span { font-size:12px; color:var(--muted); }.related-current-date p { font-size:14px; line-height:1.65; margin:2px 0; }
.relation-card { border:1px solid #bca27b80; padding:15px; margin-bottom:14px; background:#f5ebd952; }
.relation-label { font:500 13px var(--serif); letter-spacing:.5px; color:var(--red); }
.relation-destination { display:flex; align-items:center; gap:12px; margin:12px 0; }.relation-destination img { width:80px; height:72px; flex:none; object-fit:cover; filter:sepia(.1); }.relation-destination>div { min-width:0; }.relation-destination h3 { font:600 19px var(--serif); margin:0 0 5px; }.relation-destination span { display:block; color:var(--muted); font-size:13px; line-height:1.6; }
.relation-card h4 { font:500 16px var(--serif); margin:13px 0 7px; }.relation-card>p { font-size:16px; line-height:1.85; margin:7px 0 10px; }
.relation-card .relation-label { font-size:14px; }
.relation-state { display:block; color:var(--muted); font-size:14px; line-height:1.7; margin:9px 0 5px; }
.relation-card.is-visited { border-color:#bca27b55; background:#ede3d438; }
.relation-card.is-visited .next-station { background:transparent; }
.relation-card.is-visited .next-station:hover { background:var(--red); }
.theme-site-context { border-left:2px solid #9e7954; padding:10px 12px; background:#e9dbc33d; margin:12px 0; }
.theme-site-context>span { color:var(--muted); font-size:14px; }
.theme-site-context h4 { font:500 16px/1.7 var(--serif); margin:4px 0; }
.theme-site-context p { font-size:16px; line-height:1.8; margin:4px 0 0; }
.theme-readings { margin:10px 0; padding-left:11px; border-left:1px solid #c1aa87; }
.theme-readings p { font-size:14px; line-height:1.8; margin:5px 0; }
.theme-readings p span { color:var(--muted); }
.connection-reading { display:block; font:500 16px/1.8 var(--serif); margin-top:4px; }
.relation-sources { color:var(--muted); font-size:12px; line-height:1.8; margin:8px 0 12px; }.relation-sources summary { cursor:pointer; }.relation-sources a { display:block; margin:6px 0; overflow-wrap:anywhere; text-underline-offset:3px; }
.next-station { color:var(--red); border:1px solid #ab785a; background:#faf2e3; font:500 14px var(--serif); width:100%; padding:10px 8px; margin-top:3px; }.next-station:hover { color:#fff3dd; background:var(--red); border-color:var(--red); }
.relations-empty { border:1px dashed #bca47d; padding:18px; font-size:16px; line-height:1.85; }.relations-empty strong { font:500 18px var(--serif); }.relations-empty p { color:var(--muted); }.relations-empty .text-button { color:var(--red); font-size:14px; }
.exploration-dialog { border:1px solid #a78a61; background:var(--paper) url('assets/paper.webp') center/900px; color:var(--ink); padding:0; width:min(1000px,calc(100% - 48px)); max-width:1000px; max-height:88dvh; box-shadow:0 15px 90px #2e231b40; scrollbar-width:thin; scrollbar-color:#bba887 transparent; }
.exploration-dialog::backdrop { background:#2b271a66; backdrop-filter:blur(3px); }
.exploration-dialog-heading { display:flex; align-items:center; justify-content:space-between; padding:24px 30px 20px; border-bottom:1px solid var(--line); background:#f2e7d1; }
.exploration-dialog-heading h2 { font:600 30px var(--serif); margin:5px 0 0; letter-spacing:3px; }.exploration-dialog-heading .icon-button { width:40px; height:40px; }

.exploration-body { padding:20px 30px 28px; }

.exploration-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); padding-bottom:16px; }
.exploration-toolbar>div { min-width:0; }.exploration-toolbar strong { font:500 23px/1.4 var(--serif); }.exploration-toolbar p { font-size:14px; color:var(--muted); line-height:1.75; margin:7px 0 0; }.exploration-toolbar>.text-button { color:var(--red); white-space:nowrap; padding:5px 0; font-size:14px; }
.exploration-lifetime { color:var(--muted); font-size:14px; line-height:1.75; margin:14px 0 22px; }
.exploration-themes { margin-top:24px; border-top:1px solid var(--line); padding-top:18px; }.exploration-themes>summary { color:var(--red); font-size:14px; cursor:pointer; line-height:1.75; }.exploration-themes .scroll-story-grid { margin-top:18px; }
.scroll-stops { list-style:none; padding:0; margin:0; }
.scroll-stop-card { display:grid; grid-template-columns:32px 120px minmax(0,1fr) 28px; align-items:start; gap:17px; padding:20px 18px; border:1px solid #bca47d80; background:#faf3e69c; }
.scroll-stop-card.active { border-color:#a36b4d; }.scroll-stop-number { color:var(--red); font:500 19px var(--serif); padding-top:5px; }
.scroll-stop-photo { padding:0; border:0; background:none; }.scroll-stop-photo img { width:120px; height:100px; object-fit:cover; filter:sepia(.12); }.scroll-stop-info { min-width:0; }
.scroll-stop-location { display:block; font-size:12px; color:var(--muted); letter-spacing:.5px; }.scroll-stop-name { display:block; border:0; background:none; padding:0; margin:5px 0 7px; text-align:left; color:var(--ink); font:600 23px var(--serif); }
.scroll-stop-basis { font-size:12px; color:#8b6748; }.scroll-stop-dates { display:flex; flex-wrap:wrap; gap:2px 16px; margin:4px 0 14px; }.scroll-stop-dates span { font-size:14px; line-height:1.75; }

.continue-stop { color:var(--red); padding:9px 0 0; font-size:14px; }.remove-stop { width:28px; height:28px; color:var(--muted); }
.scroll-connection { display:grid; grid-template-columns:168px minmax(0,1fr); gap:17px; padding:15px 20px 16px; }.connection-line { width:1px; min-height:40px; background:var(--red); margin-left:15px; position:relative; }.connection-line::after { content:''; position:absolute; left:-3px; top:50%; width:7px; height:7px; border-radius:50%; background:var(--red); }.scroll-connection p { font-size:14px; line-height:1.8; color:#6b5945; margin:6px 0 0; }.scroll-connection .relation-sources { margin-bottom:0; }.free-jump .connection-line { background:repeating-linear-gradient(to bottom,#9f8b6e 0 4px,transparent 4px 9px); }.free-jump .connection-line::after { background:#9f8b6e; }.free-jump .relation-label { color:var(--muted); }.branch-origin { display:block; color:var(--muted); font-size:12px; margin-top:4px; }
.scroll-editor-foot { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-top:24px; padding-top:18px; border-top:1px solid var(--line); }.scroll-editor-foot>span { font-size:13px; color:var(--muted); }.scroll-editor-foot .primary-button { font-size:14px; }
.scroll-empty { text-align:center; padding:24px 0 4px; }.empty-scroll-seal { display:inline-flex; color:var(--red); border:2px solid var(--red); font:27px var(--serif); width:39px; height:42px; align-items:center; justify-content:center; transform:rotate(-4deg); }.scroll-empty h3 { font:500 25px var(--serif); margin:18px 0 9px; }.scroll-empty>p { font-size:16px; line-height:1.8; color:var(--muted); margin:9px 0 22px; }.scroll-empty>.text-button { font-size:14px; color:var(--red); margin-top:20px; }
.scroll-story-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; text-align:left; }.scroll-story { padding:22px; border:1px solid #bca27b90; background:#faf2e2a0; }.scroll-story h4 { font:500 25px var(--serif); margin:13px 0 12px; }.scroll-story p { font-size:15px; line-height:1.85; margin:10px 0; color:#6b5945; }.scroll-story .story-route { font-size:13px; color:var(--muted); border-top:1px solid var(--line); padding-top:10px; }.scroll-story .primary-button { width:100%; margin-top:12px; font-size:14px; }

.atlas-toast { position:fixed; left:50%; bottom:22px; transform:translateX(-50%); z-index:1100; max-width:calc(100vw - 30px); width:max-content; border:1px solid #876749; background:#483b2df2; color:#fff3dd; padding:12px 17px; box-shadow:0 4px 22px #2e231b35; font-size:14px; line-height:1.65; text-align:center; }.atlas-toast button { color:#fff3dd; background:none; border:0; text-decoration:underline; padding:0 0 0 14px; }
.exploration-dialog .atlas-toast { position:sticky; top:auto; bottom:0; left:auto; transform:none; width:100%; max-width:100%; border:0; margin:0; }
@media (min-width:1600px) { .has-detail .trail-dock { right:438px; } }
@media (max-width:1100px) and (min-width:761px) { .has-detail .trail-dock { right:355px; }.has-detail .dock-heading { flex-wrap:wrap; gap:5px 10px; }.has-detail .dock-title { width:100%; }.has-detail .dock-title span { max-width:235px; }.has-detail .route-legend { display:none; }.has-detail .dock-map-actions { justify-content:flex-end; }.edition { display:none; } }
@media (max-width:760px) {
  .site-header { padding:0 14px; }.header-actions { gap:12px; }.exploration-header-button { gap:5px; font-size:14px; }.exploration-header-button svg { width:17px; height:17px; }.exploration-count { font-size:11px; width:18px; min-width:18px; height:18px; padding:0 2px; }.mobile-filter-button { font-size:14px; }
  .trail-dock,.has-detail .trail-dock { left:17px; right:17px; bottom:23px; padding:10px 12px 7px; }
  .dock-heading { gap:7px; }.dock-title { font-size:15px; gap:5px; }.dock-title svg { display:none; }.dock-title span { max-width:125px; }.dock-state { font-size:12px; }.dock-expand { font-size:13px; padding-left:0; }.dock-stops { gap:10px; margin-top:7px; }.dock-stop { font-size:13px; }.dock-stop span { width:18px; height:18px; font-size:11px; }.dock-map-actions { padding-top:4px; }.route-legend { font-size:11px; gap:4px; }.route-legend i { width:11px; }.route-legend .dashed-line { margin-left:5px; }.dock-map-actions .text-button { font-size:11px; }
  .has-trail .leaflet-bottom.leaflet-right { bottom:147px; }.has-trail .leaflet-control-scale { margin-bottom:155px !important; }.has-trail .map-status { bottom:142px; font-size:11px; }
  .has-trail .detail-panel { bottom:153px; max-height:calc(100dvh - 282px); left:10px; right:10px; }.has-trail .detail-panel.showing-relations { max-height:min(52dvh,440px,calc(100dvh - 282px)); }.detail-panel.showing-relations .detail-hero { height:80px; }.detail-hero { height:135px; }.detail-body { padding:16px 19px 20px; }.detail-name { font-size:25px; }.detail-view-tabs { margin-top:13px; }.relation-card { padding:13px; }.relation-destination h3 { font-size:18px; }.relation-card>p { font-size:16px; }.detail-trail-note { font-size:12px; }
  .exploration-dialog { width:calc(100% - 20px); max-height:calc(100dvh - 24px); }.exploration-dialog-heading { padding:17px 19px 14px; }.exploration-dialog-heading h2 { font-size:25px; }.exploration-body { padding:17px 18px 22px; }

  .scroll-stop-card { grid-template-columns:25px minmax(0,1fr) 24px; gap:10px; padding:15px 12px; }.scroll-stop-photo { grid-column:2; width:100%; height:120px; }.scroll-stop-photo img { width:100%; height:120px; }.scroll-stop-info { grid-column:2; }.scroll-stop-number { grid-row:1; font-size:17px; }.remove-stop { grid-column:3; grid-row:1; }.scroll-stop-name { font-size:22px; }.scroll-stop-dates { flex-direction:column; gap:0; margin-bottom:12px; }.scroll-stop-dates span { font-size:14px; }.continue-stop { font-size:14px; }
  .scroll-connection { grid-template-columns:25px minmax(0,1fr); gap:10px; padding:14px 12px; }.connection-line { margin-left:12px; }.scroll-connection p { font-size:14px; }.scroll-connection .relation-label { font-size:13px; }.scroll-editor-foot { flex-direction:column; align-items:stretch; gap:12px; text-align:center; }.scroll-editor-foot .primary-button { width:100%; }
  .scroll-empty { padding-top:18px; }.scroll-empty h3 { font-size:23px; }.scroll-empty>p { font-size:15px; }.scroll-story-grid { grid-template-columns:1fr; gap:14px; }.scroll-story { padding:18px; }.scroll-story h4 { font-size:24px; }
  .atlas-toast { bottom:auto; top:82px; font-size:13px; padding:10px 13px; }.exploration-dialog~.atlas-toast { pointer-events:auto; }
}
@media (max-width:360px) { .header-actions { gap:9px; }.brand { gap:8px; }.brand-word { font-size:24px; }.exploration-header-button { font-size:13px; gap:4px; }.exploration-count { display:none; }.dock-title span { max-width:90px; } }

@media (max-width:760px) { .exploration-toolbar { gap:12px; }.exploration-toolbar strong { font-size:21px; }.exploration-toolbar p,.exploration-lifetime { font-size:14px; }.exploration-lifetime { margin-bottom:18px; } }

/* Overlapping themes: mapped places, shared junctions and explicitly pending places. */

.exploration-tabs { display:flex; gap:28px; padding:0 30px; border-bottom:1px solid var(--line); }
.exploration-tabs button { padding:13px 0 11px; border-bottom:2px solid transparent; color:var(--muted); font:500 17px var(--serif); }
.exploration-tabs button[aria-selected=true] { color:var(--red); border-color:var(--red); }
.theme-card { border:1px solid #bca27b90; background:#faf2e27a; padding:24px; margin-bottom:22px; }
.theme-card:last-child { margin-bottom:0; }
.theme-card-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.theme-card-heading>div { min-width:0; }
.theme-card h3 { font:600 27px/1.5 var(--serif); margin:7px 0 5px; letter-spacing:1px; }
.theme-card>p { font-size:15px; line-height:1.8; margin:10px 0; }
.theme-roster { display:flex; flex-wrap:wrap; gap:10px; margin:20px 0; }
.theme-place { display:inline-flex; align-items:center; justify-content:flex-start; gap:8px; padding:9px 12px; border:1px solid #bca27b90; font:500 15px var(--serif); background:#f8efdf; }
.theme-place small,.pending-badge { font:12px var(--sans); color:var(--muted); white-space:nowrap; }
.theme-place:hover { border-color:var(--red); color:var(--red); }
.shared-place { border-color:#a1785c; }.shared-place small { color:var(--red); }
.pending-place { border-style:dashed; color:var(--muted); background:none; }
.pending-place:hover { color:var(--muted); border-color:#bca27b90; }
.theme-start { padding:10px 18px; font-size:15px; }
.theme-relations,.theme-pending { border-top:1px solid var(--line); padding-top:12px; margin-top:14px; }
.theme-relations>summary,.theme-pending>summary { cursor:pointer; color:var(--red); font-size:14px; padding:3px 0; }
.theme-relations ol { list-style:none; margin:12px 0 0; padding:0; }
.theme-relations li { padding:17px 0 10px; border-bottom:1px solid #d5c8ae88; }
.theme-relations li:last-child { border-bottom:0; }
.theme-pair { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 9px; }
.theme-pair>span[aria-label] { color:#9b8060; }
.theme-endpoint { font:500 17px/1.7 var(--serif); color:var(--ink); border-bottom:1px solid #bca27b; padding:0; }
.theme-endpoint:hover { color:var(--red); border-color:var(--red); }
.pending-endpoint { color:var(--muted); font:500 17px/1.7 var(--serif); }
.pending-endpoint small { font:12px var(--sans); border:1px dashed #ab9473; padding:2px 4px; white-space:nowrap; }
.theme-relations li>p,.theme-pending article>p { font-size:15px; line-height:1.85; margin:8px 0; color:#6b5945; }
.theme-pending article { margin-top:16px; }
.theme-pending h4 { font:500 18px var(--serif); margin:0 0 8px; }
.pending-badge { border:1px dashed #ab9473; padding:3px 5px; margin-left:8px; }
.site-themes { padding:12px 0 14px; border-bottom:1px solid var(--line); }
.site-themes>span { color:#8b6748; font-size:14px; }
.site-themes>small { display:block; color:var(--muted); font-size:13px; line-height:1.7; margin-top:10px; }
.single-theme { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.single-theme strong { font:500 15px/1.7 var(--serif); }
.theme-chips { display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }
.theme-chip { border:1px solid #bca27b90; background:#f7eedc; color:#6b5945; padding:7px 9px; font:500 14px var(--serif); }
.theme-chip:hover,.theme-chip.selected { color:var(--red); border-color:var(--red); background:#98433208; }
.active-theme-note { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:13px; color:var(--muted); margin:14px 0; }
.active-theme-note .text-button { color:var(--red); font-size:13px; padding:0; }
.pending-symbol { width:64px; height:64px; display:grid !important; place-items:center; flex:none; border:1px dashed #bca27b; font:25px var(--serif); color:#927b5a; }
.relation-card .pending-note { border-top:1px dashed #bca27b; padding-top:10px; font-size:14px; color:var(--muted); }
.pending-relation { border-style:dashed; }
.separate-root { font-size:14px; color:var(--muted); margin:20px 0 12px; }
@media (max-width:1100px) and (min-width:761px) { .header-actions { gap:18px; }.brand-description { letter-spacing:1px; }.brand { gap:12px; } }
@media (max-width:760px) {
  .header-actions { gap:9px; }

  .exploration-tabs { padding:0 18px; gap:24px; }.exploration-tabs button { font-size:16px; }
  .theme-card { padding:18px 15px; margin-bottom:18px; }.theme-card h3 { font-size:23px; letter-spacing:0; }.theme-card-heading { gap:10px; }
  .theme-card>p,.theme-relations li>p,.theme-pending article>p { font-size:15px; }.theme-roster { gap:8px; margin:16px 0; }
  .theme-place { font-size:14px; padding:8px 9px; gap:6px; }.theme-place small { font-size:11px; }
  .theme-start { width:100%; }.theme-pair { gap:7px; }.theme-endpoint,.pending-endpoint { font-size:16px; }
  .has-detail .dock-map-actions { flex-wrap:wrap; gap:6px 10px; }
}
@media (max-width:360px) { .brand { gap:7px; }.header-actions { gap:7px; } }

.filter-heading-actions{display:flex;align-items:center;gap:12px}
.map-status .text-button{margin-left:12px;color:var(--red);text-decoration:underline}
