/* Shared finishing layer; original art, scene composition and reading order stay intact. */
:root { --exhibit-gold: #ddc18c; }
html { scroll-padding-top: 82px; }
body { overflow-x: clip; }
a, button, summary, input, label { -webkit-tap-highlight-color: #ddc18c33; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--exhibit-gold); outline-offset: 5px; }
a, button, summary { touch-action: manipulation; }
button, summary { font: inherit; }
button, summary, .repair-footer a, .cap-link, .journey-link { min-height: 44px; }
.skip-link { position: fixed; z-index: 200; left: 16px; top: -100px; padding: 14px 22px; background: #112c30; color: #fff1ce; }
.skip-link:focus { top: 80px; }
.site-header { height: 72px; padding: 14px 24px; color: #eddfc4; }
.site-brand { font-size: 17px; letter-spacing: .12em; }
.chapter-menu { pointer-events: auto; }
.chapter-menu > summary { display: grid; place-items: center; min-width: 48px; cursor: pointer; padding: 8px; font-size: 14px; list-style: none; border-bottom: 1px solid #c5ac7959; }
.chapter-menu > summary::-webkit-details-marker { display: none; }
.chapter-menu[open] > summary { color: #f2ce8b; border-color: currentColor; }
.chapter-dropdown { position: absolute; right: 24px; top: 72px; width: min(320px,calc(100vw - 32px)); max-height: calc(100svh - 100px); overflow-y: auto; background: #0d2529f5; border: 1px solid #c4a66e66; box-shadow: 0 18px 42px #0006; backdrop-filter: blur(16px); padding: 12px 20px; }
.chapter-dropdown ol { list-style: none; padding: 0; margin: 0; }
.chapter-dropdown a { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid #e3cba31a; font-size: 15px; }
.chapter-dropdown li:last-child a { border: 0; }
.chapter-dropdown span { color: #b6a57c; font: 12px Arial,sans-serif; }
.chapter-dropdown strong { font-weight: 400; }
.chapter-dropdown small { font-size: 12px; color: #aeb5a6; }
.chapter-dropdown a:hover { color: #f2ce8b; }
.sound-control { position: fixed; z-index: 110; top: max(14px,env(safe-area-inset-top)); right: 24px; color: #e7d5ac; }
.sound-control-home { right: 88px; }
.sound-control > summary { display: grid; place-items: center; min-width: 50px; min-height: 44px; cursor: pointer; list-style: none; border: 1px solid #d5b47c66; background: #122b2de6; font-size: 13px; letter-spacing: .15em; }
.sound-control > summary::-webkit-details-marker { display: none; }
.sound-control[open] > summary { color: #ffe2a3; border-color: #ddbf7e; }
.sound-player { position: absolute; right: 0; top: 52px; padding: 16px; width: min(320px,calc(100vw - 36px)); border: 1px solid #b29b6955; background: #132b2ef5; box-shadow: 0 16px 40px #0007; }
.sound-player p { font-size: 14px; margin: 0 0 12px; }
.sound-player audio { display: block; width: 100%; height: 40px; color-scheme: dark; }
.detail-brand { position: fixed; z-index: 80; top: 25px; left: 50%; transform: translateX(-50%); color: #edddbd; font-family: Painting,'Songti SC',serif; font-size: 17px; letter-spacing: .12em; text-decoration: none; text-shadow: 0 2px 8px #102b2d; }
.realm-exit-fixed, .decode-exit-fixed { min-height: 44px; top: 14px; left: 20px; background: #112a2de8; border: 1px solid #c6a97566; color: #eddbba; }
.realm-route { position: sticky; top: 70px; z-index: 65; box-shadow: 0 10px 20px #0002; }
.realm-route a { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; }
.realm-route a:focus-visible, .realm-route a:hover { color: #ffe1a7; }
.chapter-rail { right: 20px; gap: 4px; }
.chapter-rail a { min-height: 36px; padding: 6px; }
.chapter-rail a:focus-visible span { opacity: 1; }
body:has(#three-realms:target, .realm-panel:target) .chapter-rail a[href="#three-realms"] span { opacity: 1; color: #e6bb80; }
body:has(#three-realms:target, .realm-panel:target) .chapter-rail a[href="#three-realms"] i { width: 30px; background: #e6bb80; }
.hero-note { font-size: 14px; }
.hero-copy .eyebrow { font-size: 12px; }
.scroll-cue span { font-size: 13px; }
.epilogue-copy p { font-size: 16px; }
.cap { top: max(90px, 10svh); }
.cap-q { font-size: 16px; }
.cap-link { font-size: 14px; }
.cap-link:focus-visible { background: #ddbb7c; color: #13292b; }
.puzzle-heading > p, .repair-heading > p { font-size: 16px; line-height: 1.8; }
.explore-copy p, .read-stop > p { line-height: 1.95; }
.explore-subject { transition: filter .45s ease; }
@media (hover: hover) {
 .explore-art:hover .explore-subject { filter: drop-shadow(0 20px 24px #0007) brightness(1.05); }
 .repair-switch:hover { border-color: #edce92; }
}
label:has(input:focus-visible) { outline: 2px solid #edce92; outline-offset: 4px; }
.shaft-sticky:has(.silk-linework:focus-visible) .silk-linework { opacity: 0 !important; }
@media (max-width: 760px) {
 .site-header { padding-inline: 16px; }
 .site-brand { font-size: 15px; gap: 8px; }
 .site-brand .seal { width: 26px; height: 30px; font-size: 18px; }
 .sound-control { right: 16px; }
 .sound-control-home { right: 76px; }
 .sound-control-home .sound-player { right: -52px; }
 .chapter-dropdown { right: 16px; }
 .hero-copy { padding-inline: 24px; }
 .hero-copy h1 { font-size: clamp(3rem,14vw,5.5rem); }
 .hero-note { font-size: 13px; }
 .detail-brand { font-size: 15px; left: 56%; }
 .realm-exit-fixed, .decode-exit-fixed { left: 12px; padding-inline: 10px; font-size: 12px; }
 .realm-route { top: 68px; }
 .epilogue-copy h2 { font-size: 2rem; line-height: 1.5; }
 .epilogue-copy { width: 100%; }
}
@media (max-height: 600px) and (orientation: landscape) {
 .realm-panel-sticky { min-height: 680px; }
 .wheel-sticky { min-height: 600px; }
}

@supports not (animation-timeline: view()) {

 /* All five original compositions remain paired with their own caption. */
 .wheel-track { height: auto; }
 .wheel-sticky { position: relative; height: auto; padding: 0; display: grid; grid-template-columns: 1fr; min-height: 0; }
 .wheel-backgrounds, .wheel-carousel, .wheel-captions { display: contents; }
 .wb, .wc, .cap { animation: none !important; opacity: 1; visibility: visible; transform: none; position: relative; inset: auto; grid-column: 1; }
 .wb { min-height: 90svh; margin: 0; }
 .wc { z-index: 5; align-self: center; justify-self: center; margin-top: 120px; }
 .fg-inner { width: min(80vw,480px); height: auto; aspect-ratio: 300/228; transform: none; }
 .cap { z-index: 7; width: min(86%,480px); align-self: start; justify-self: center; margin: 90px 0 0; pointer-events: auto; }
 .wb-1, .fg-1, .cap-1 { grid-row: 1; }
 .wb-2, .fg-2, .cap-2 { grid-row: 2; }
 .wb-3, .fg-3, .cap-3 { grid-row: 3; }
 .wb-4, .fg-4, .cap-4 { grid-row: 4; }
 .wb-5, .fg-5, .cap-5 { grid-row: 5; }
 .wheel-rim, .wheel-hint, .wheel-spotlight { display: none; }
 .prologue-shaft { height: auto; }
 .shaft-sticky { position: relative; height: auto; min-height: 100svh; padding: 100px 24px 60px; }
 .shaft-beats { display: grid; gap: 42px; width: min(680px,100%); }
 .shaft-beat { position: relative; inset: auto; opacity: 1 !important; transform: none; animation: none !important; }
 .shaft-sticky .shaft-image { opacity: .5; }
 .shaft-sticky .silk-linework { opacity: 0 !important; }

}

@media (prefers-reduced-motion: reduce) {

 /* All five original compositions remain paired with their own caption. */
 .wheel-track { height: auto; }
 .wheel-sticky { position: relative; height: auto; padding: 0; display: grid; grid-template-columns: 1fr; min-height: 0; }
 .wheel-backgrounds, .wheel-carousel, .wheel-captions { display: contents; }
 .wb, .wc, .cap { animation: none !important; opacity: 1; visibility: visible; transform: none; position: relative; inset: auto; grid-column: 1; }
 .wb { min-height: 90svh; margin: 0; }
 .wc { z-index: 5; align-self: center; justify-self: center; margin-top: 120px; }
 .fg-inner { width: min(80vw,480px); height: auto; aspect-ratio: 300/228; transform: none; }
 .cap { z-index: 7; width: min(86%,480px); align-self: start; justify-self: center; margin: 90px 0 0; pointer-events: auto; }
 .wb-1, .fg-1, .cap-1 { grid-row: 1; }
 .wb-2, .fg-2, .cap-2 { grid-row: 2; }
 .wb-3, .fg-3, .cap-3 { grid-row: 3; }
 .wb-4, .fg-4, .cap-4 { grid-row: 4; }
 .wb-5, .fg-5, .cap-5 { grid-row: 5; }
 .wheel-rim, .wheel-hint, .wheel-spotlight { display: none; }
 .prologue-shaft { height: auto; }
 .shaft-sticky { position: relative; height: auto; min-height: 100svh; padding: 100px 24px 60px; }
 .shaft-beats { display: grid; gap: 42px; width: min(680px,100%); }
 .shaft-beat { position: relative; inset: auto; opacity: 1 !important; transform: none; animation: none !important; }
 .shaft-sticky .shaft-image { opacity: .5; }
 .shaft-sticky .silk-linework { opacity: 0 !important; }

 .realm-panel-art, .realm-panel-backdrop, .realm-panel-copy, #decode .decode-list > li { animation: none !important; opacity: 1; transform: none; }
 *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
.sound-control { border: 0; }
.sound-control > summary { padding: 8px 12px; height: 44px; line-height: 1; }
body.standalone .realm-repair, body.standalone .explore-copy h2, body.standalone .chapter { scroll-margin-top: 140px; }
.three-heading h2, .three-heading-repeat { font-family: 'Songti SC', 'STSong', serif; }
/* Chapter rail follows scroll position in supporting browsers. */
@supports (animation-timeline: view()) {
 body { timeline-scope: --nav-prologue, --nav-three, --nav-realms, --nav-puzzle, --nav-decode, --nav-epilogue; }
 #prologue { view-timeline: --nav-prologue block; }
 #three-realms { view-timeline: --nav-three block; }
 #realms { view-timeline: --nav-realms block; }
 #silk-puzzle { view-timeline: --nav-puzzle block; }
 #decode { view-timeline: --nav-decode block; }
 #epilogue { view-timeline: --nav-epilogue block; }
 .chapter-rail a span { animation: rail-active linear; animation-range: entry 100% exit 0%; }
 .chapter-rail a:nth-child(1) span { animation-timeline: --nav-prologue; }
 .chapter-rail a:nth-child(2) span { animation-timeline: --nav-three; }
 .chapter-rail a:nth-child(3) span { animation-timeline: --nav-realms; }
 .chapter-rail a:nth-child(4) span { animation-timeline: --nav-puzzle; }
 .chapter-rail a:nth-child(5) span { animation-timeline: --nav-decode; }
 .chapter-rail a:nth-child(6) span { animation-timeline: --nav-epilogue; }
}
@keyframes rail-active { from, to { opacity: 1; color: #e6c28c; } }
/* Hash navigation must settle immediately, including very long reading pages. */
html { scroll-behavior: auto; }
#decode, #three-realms, .realm-panel { scroll-margin-top: -72px; }
.puzzle-tile > img, .puzzle-tile > span, .puzzle-tile > small { pointer-events: none; }

.detail-header-shade { position: fixed; inset: 0 0 auto; height: 72px; z-index: 70; pointer-events: none; background: #0d2428f5; border-bottom: 1px solid #d4bb871a; backdrop-filter: blur(12px); }
body.standalone .realm-repair, body.standalone .explore-copy h2, body.standalone .chapter { scroll-margin-top: 58px; }
