.chapter-gallery { display:block!important; width:100%; min-width:0; border:0!important; background:none!important; padding:24px 0!important; }
.chapter-gallery-window { overflow:hidden; width:100%; touch-action:pan-y; }
.chapter-gallery-track { display:flex; align-items:start; gap:32px; transition:transform 560ms cubic-bezier(.22,.7,.2,1); will-change:transform; }
.chapter-gallery .chapter-slide { --media-ratio:1.6; flex:0 0 min(72%,1080px); display:block; min-width:0; padding:0!important; text-align:left; background:none!important; border:0!important; opacity:.48; transform:scale(.93); transition:opacity 420ms,transform 560ms; color:#eeeae0; cursor:pointer; }
.chapter-gallery .chapter-slide.is-portrait { flex-basis:min(38%,460px); }
.chapter-gallery .chapter-slide.is-square { flex-basis:min(52%,680px); }
.chapter-gallery .chapter-slide.is-panorama { flex-basis:min(78%,1200px); }
.chapter-gallery .chapter-slide.is-current { opacity:1; transform:scale(1); }
.chapter-slide::before,.chapter-slide::after,.gallery-arrow::before,.gallery-arrow::after { content:none!important; }
.chapter-gallery .chapter-slide figure { position:relative; margin:0; width:100%; aspect-ratio:var(--media-ratio); overflow:hidden; background:#141815; border:1px solid #ffffff28; }
.chapter-gallery .chapter-slide-lead { display:block; width:100%; height:100%; object-fit:contain; transform:translateX(var(--parallax)) scale(.96); transition:transform 560ms cubic-bezier(.22,.7,.2,1); }
.chapter-gallery .chapter-slide.is-current:hover .chapter-slide-lead { transform:scale(1); }
.chapter-slide-filmstrip { position:absolute; right:18px; bottom:18px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; width:min(34%,300px); padding:8px; background:#0b100dd9; border:1px solid #b48a467d; box-shadow:0 14px 42px #0009; backdrop-filter:blur(10px); }
.chapter-slide-filmstrip img { display:block; width:100%; aspect-ratio:4/3; object-fit:contain; background:#0a0e0c; border:1px solid #d6b66b52; }
.chapter-slide-caption { padding:22px 3px 0; }
.chapter-gallery .chapter-slide small { display:block; color:#c3b28c; font-size:12px; }
.chapter-slide-count { display:block; margin-top:8px; color:#9fa99f; font-size:13px; letter-spacing:.04em; }
.chapter-gallery .chapter-slide h3 { font-size:27px; line-height:1.45; margin:10px 0; letter-spacing:0; }
.chapter-gallery .chapter-slide p { font-size:15px; line-height:1.9; margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:#c7cdc6; }
.chapter-gallery-controls { display:flex; justify-content:space-between; align-items:center; padding:24px 14%; gap:18px; }
.chapter-gallery-controls output { color:#c4c9c2; font-size:13px; }
.chapter-gallery-controls>div { display:flex; gap:12px; flex-shrink:0; }
.gallery-arrow { display:grid!important; place-items:center; width:54px; height:54px; min-height:0!important; padding:0!important; border:1px solid #e9e5d2!important; border-radius:50%!important; background:transparent!important; color:#f2eee0!important; font-size:29px; overflow:hidden; transition:background 200ms,transform 180ms; cursor:pointer; }
.gallery-arrow:not(:disabled):hover { background:#e9e5d2!important; color:#18201c!important; }
.gallery-arrow:not(:disabled):active { transform:scale(.9); }
.gallery-arrow:disabled { opacity:.3; cursor:default; }
.gallery-arrow span { font:inherit!important; line-height:1!important; color:inherit!important; }
.chapter-gallery .chapter-slide h3,.chapter-dialog h2,.chapter-dialog h3 { font-family:"Noto Serif SC","Songti SC",STSong,serif; font-weight:500; }
.gallery-arrow:not(:disabled):hover span { animation:gallery-arrow-pass 360ms cubic-bezier(.2,.8,.2,1); }
.gallery-arrow[data-direction="-1"] { --arrow-travel:-30px; }
.gallery-arrow[data-direction="1"] { --arrow-travel:30px; }
@keyframes gallery-arrow-pass { 0% {transform:translateX(0);opacity:1} 45%{transform:translateX(var(--arrow-travel));opacity:0} 46%{transform:translateX(calc(var(--arrow-travel) * -1));opacity:0} 100%{transform:translateX(0);opacity:1} }
.chapter-slide:focus-visible,.gallery-arrow:focus-visible { outline:2px solid #e7ca88; outline-offset:-3px; }
.chapter-dialog { position:fixed; inset:0; box-sizing:border-box; width:100%; max-width:none; height:100%; max-height:none; margin:0; border:0; padding:0; background:#141a17; color:#f0ecdf; overscroll-behavior:contain; overflow-y:auto; }
.chapter-dialog::backdrop { background:#000b; }
.chapter-dialog-bar { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; align-items:center; gap:20px; padding:12px 5%; background:#141a17f5; border-bottom:1px solid #ffffff25; }
.chapter-dialog-body { max-width:1400px; margin:auto; padding:50px 5% 90px; }
.chapter-title { max-width:960px; margin-bottom:48px; }
.chapter-title h2 { font-size:40px; line-height:1.45; margin:16px 0 24px; }
.chapter-dialog p { font-size:17px; line-height:1.95; color:#d0d5cc; }
.chapter-record-row,.chapter-reading-row { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); align-items:start; gap:48px; padding:48px 0; border-top:1px solid #ffffff25; }
.chapter-record-row>figure,.chapter-reading-row>div:first-child { position:sticky; top:100px; }
.chapter-dialog figure { margin:0; }
.chapter-dialog figure img { display:block; width:100%; max-height:68vh; object-fit:contain; background:#0c100e; cursor:zoom-in; transition:filter 200ms; }
.chapter-dialog figcaption { font-size:13px; color:#b6beb3; line-height:1.7; padding-top:12px; }
.chapter-dialog h3 { font-size:27px; line-height:1.5; letter-spacing:0; margin:0 0 18px; }
.chapter-reading-row h3 { margin-top:24px; }
.chapter-reading-row.is-text-only { display:block; }
.chapter-reading-row.is-text-only>div:first-child { position:static; }
.chapter-reading-row.is-text-only>div:last-child { max-width:920px; margin:0 auto; columns:2; column-gap:56px; }
.chapter-reading-row.is-text-only>div:last-child>* { break-inside:avoid; }
.chapter-reading-row {scroll-margin-top:90px;}
.chapter-contents {display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:0;margin-bottom:32px;border-top:1px solid #ffffff25;}
.chapter-contents button {text-align:left;padding:18px 12px;background:none;border:0;border-bottom:1px solid #ffffff25;color:#dddccd;font:inherit;cursor:pointer;line-height:1.6;}
.chapter-contents small {display:block;color:#bbaa83;margin-bottom:6px;}
.chapter-contents button:hover,.chapter-contents button:focus-visible {background:#ffffff0a;color:white;}
.chapter-dialog h4 { font-size:20px; }
.chapter-timeline { list-style:none; padding:0 0 0 20px; border-left:1px solid #9b9c7e; }
.chapter-timeline li { margin:30px 0; }
.chapter-timeline time { color:#e0c28c; }
.chapter-facts { display:grid; grid-template-columns:1fr 1fr; gap:36px; border-top:1px solid #ffffff25; padding:40px 0; }
.chapter-dialog footer { border-top:1px solid #ffffff25; padding-top:36px; }
.chapter-dialog a { color:#d9cba4; }
.has-chapter-gallery #officialPlaceChapterIntro,.has-chapter-gallery #officialPlaceDossier,.has-chapter-gallery #officialPlaceRecords,.has-chapter-gallery #officialPlaceFacts { display:none!important; }
.journey-gallery-active #journeyTopicPanel,.journey-gallery-active #journeyEvidenceWall { display:none!important; }
.wuyi-gallery-active #wuyiTopicPanel,.wuyi-gallery-active #wuyiEvidenceWall { display:none!important; }
@media(max-width:700px) {
 .chapter-gallery-track {gap:16px;} .chapter-gallery .chapter-slide,.chapter-gallery .chapter-slide.is-portrait,.chapter-gallery .chapter-slide.is-square,.chapter-gallery .chapter-slide.is-panorama {flex-basis:86%;}
 .chapter-gallery .chapter-slide h3 {font-size:22px;} .chapter-gallery-controls {padding:20px 7%;} .gallery-arrow {width:46px;height:46px;}
 .chapter-slide-filmstrip {right:10px;bottom:10px;width:42%;padding:5px;gap:5px;}
 .chapter-title h2 {font-size:29px;} .chapter-record-row,.chapter-reading-row,.chapter-facts {grid-template-columns:1fr;gap:24px;}
 .chapter-record-row>figure,.chapter-reading-row>div:first-child {position:static;} .chapter-dialog p {font-size:16px;}
 .chapter-dialog-body {padding-top:30px;} .chapter-dialog h3 {font-size:24px;} .chapter-reading-row.is-text-only>div:last-child {columns:1;margin:0;}
}
@media(prefers-reduced-motion:reduce) { .chapter-gallery-track,.chapter-slide,.chapter-slide img,.gallery-arrow {transition:none!important;} .gallery-arrow span {animation:none!important;} }
