:root{color-scheme:dark;--gold:#f4ddb5;--muted:#aaa8b9}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 35%,#242139,#0c101e 65%);color:var(--gold);font-family:Georgia,serif}main{max-width:1280px;margin:auto;padding:28px 24px 20px}header{display:flex;justify-content:space-between;align-items:center;font:10px/1.6 Arial,sans-serif;letter-spacing:2px;border-bottom:1px solid #ffffff16;padding-bottom:20px}header a{color:var(--gold);text-decoration:none;font-weight:bold}header a span{font-weight:normal;color:var(--muted)}header>span{font-size:9px;color:var(--muted)}.intro{text-align:center;padding:36px 0 10px}.intro p{font:10px Arial;letter-spacing:2px}.intro h1{font-size:clamp(32px,5vw,58px);font-weight:normal;margin:15px 0}.intro div{color:var(--muted);font:14px/1.6 Arial}#stage{position:relative;width:100%;aspect-ratio:1.333333;touch-action:pinch-zoom;user-select:none;-webkit-user-select:none;cursor:grab;outline-offset:4px}#stage.dragging{cursor:grabbing}canvas{width:100%;height:100%;display:block}.hint{position:absolute;right:5%;bottom:3%;font:9px Arial;letter-spacing:2px;color:var(--muted)}.chapter{display:flex;justify-content:center;align-items:center;gap:18px;min-height:70px}.chapter span{font:10px Arial;color:var(--muted);letter-spacing:2px}.chapter h2{font-size:22px;font-weight:normal;margin:0}.chapter a{font-size:13px;color:var(--gold);text-underline-offset:5px}.controls{display:flex;justify-content:center;gap:12px}button{font:14px Arial;color:var(--gold);background:transparent;border:1px solid #ffffff32;min-width:48px;min-height:48px;border-radius:30px;cursor:pointer}button:hover{background:#ffffff10}#play{background:var(--gold);color:#282136;padding:0 28px;min-width:170px}.scrub{display:flex;gap:16px;align-items:center;justify-content:center;margin:20px auto 0;font:9px Arial;letter-spacing:2px;color:var(--muted)}input{width:min(320px,60vw);accent-color:var(--gold);min-height:44px;cursor:pointer}.help{text-align:center;color:var(--muted);font:12px Arial}#simpleToggle{display:block;border:0;border-radius:0;border-bottom:1px solid #ffffff2a;margin:18px auto;font-size:12px;color:var(--muted)}#simple{text-align:center}#simple a{display:block;color:var(--gold);padding:16px}footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #ffffff16;margin-top:34px;padding-top:20px;color:var(--muted);font:10px/1.5 Arial;letter-spacing:1px}footer p{letter-spacing:0}a:focus-visible,button:focus-visible,input:focus-visible,#stage:focus-visible{outline:2px solid #75e6db;outline-offset:4px}@media(max-width:600px){main{padding:20px 8px}header{margin:0 8px;letter-spacing:1px}header>span{max-width:105px;text-align:right}.intro{padding:28px 0 8px}.intro div{font-size:12px}.chapter{flex-wrap:wrap;gap:10px;max-width:340px;margin:12px auto 18px}.chapter h2{font-size:20px}.chapter a{flex-basis:100%;text-align:center}.hint{font-size:8px;bottom:0}footer{margin:25px 8px 0;font-size:8px;gap:30px}.help{font-size:11px}}

#simple img{width:100%;height:auto;display:block}.note{max-width:620px;margin:14px auto;text-align:center;font:12px/1.6 Arial;color:var(--muted)}

.chapters{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:24px auto;max-width:850px}.chapters button{font-size:11px;padding:0 15px}.intro div{padding:0 14px}#simple article{max-width:900px;margin:25px auto}#simple h3{font-weight:normal}
.chapters button[aria-current="page"]{border-color:var(--gold);background:#ffffff12}

#stage:has(canvas[data-loading="true"])::after{content:"Loading spread…";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:12px 20px;background:#101527e8;color:var(--gold);border-radius:20px;font:14px Arial;pointer-events:none}

#contents,#simple{max-width:900px;margin:18px auto}summary{cursor:pointer;text-align:center;color:var(--muted);font:12px Arial;padding:14px;list-style-position:inside}summary:focus-visible{outline:2px solid #75e6db}.chapters a{font:12px/1.5 Arial;color:var(--gold);text-decoration:none;padding:12px 14px;border-radius:8px;min-height:44px}.chapters a:hover,.chapters a[aria-current="page"]{background:#ffffff12}.page-picker{display:flex;align-items:center;justify-content:center;gap:10px;margin:0 auto 20px;color:var(--muted);font:12px Arial}.page-picker select{max-width:260px;min-height:44px;background:#171a2b;color:var(--gold);border:1px solid #ffffff28;border-radius:8px;padding:8px}#simple .artwork-text{max-width:660px;margin:16px auto;text-align:left;font:16px/1.65 Georgia;color:#e7dfd2}#simple .artwork-text p{margin:8px 0}.reading-intro{font:13px/1.6 Arial;color:var(--muted);text-align:center}#simple article{scroll-margin-top:20px}#simple img{max-width:680px;margin:auto}

.cover-caption{font:italic clamp(16px,2.2vw,24px)/1.5 Georgia,serif;text-align:center;color:var(--gold);margin:8px 16px 4px}.chapter [hidden],.cover-caption[hidden]{display:none}

.chapter-copy{max-width:560px;text-align:center}.chapter #description{font:15px/1.55 Arial,sans-serif;color:#d0c9bc;margin:9px 0 0;letter-spacing:0}.chapter #description[hidden]{display:none}
@media(max-width:600px){.chapter-copy{flex:1 1 250px}.chapter #description{font-size:14px;line-height:1.5}}

/* Keep the complete title on one line and give descriptions readable measure. */
.chapter{flex-direction:column;gap:10px;padding:0 4px}.chapter-copy{width:100%;min-width:0}.chapter h2{white-space:nowrap;font-size:clamp(14px,4.7vw,22px);line-height:1.3}.chapter #description{max-width:38ch;margin:9px auto 0}.chapter a{flex-basis:auto}
@media(max-width:600px){.chapter-copy{flex:none}.chapter{max-width:340px;width:calc(100% - 32px)}}
/* Guide actions and accessible chapter dialog. */
.chapter #guide{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:46px;padding:0 25px;margin-top:5px;border:1px solid #e6c88777;border-radius:9px;background:linear-gradient(135deg,#e8c99122,#e8c99109);color:#ffe3ae;font:16px/1.3 Georgia,serif;text-decoration:none;box-shadow:0 3px 12px #0002}.chapter #guide:hover{background:#e8c9912a;border-color:#e6c887}.chapter #guide[hidden]{display:none}.native-picker-fallback[hidden]{display:none}.browse-guides{display:flex;align-items:center;justify-content:space-between;gap:45px;margin:14px auto 20px;padding:0 18px;min-height:44px;border:1px solid #d4c6ac42;border-radius:8px;background:#ffffff04;color:#dcd3c1;font:13px Arial,sans-serif}.browse-guides span{font-size:17px;color:#d9bd88}button:focus-visible,a:focus-visible{outline:2px solid #e9cb91;outline-offset:4px}
#guide-picker{box-sizing:border-box;width:min(480px,calc(100vw - 28px));max-height:82vh;max-height:82dvh;margin:auto;padding:0;border:1px solid #e6c88755;border-radius:20px;background:linear-gradient(145deg,#202137,#10121f);color:#f5ead4;box-shadow:0 24px 90px #0009;overflow:hidden}#guide-picker::backdrop{background:#040610bb;backdrop-filter:blur(5px)}.picker-heading{display:flex;justify-content:space-between;gap:12px;padding:24px 22px 20px;border-bottom:1px solid #e6c88726}.picker-eyebrow{margin:0 0 9px;font:10px/1.4 Arial,sans-serif;letter-spacing:2px;color:#c9b48b}.picker-heading h2{margin:0;font:23px/1.2 Georgia,serif;font-weight:normal}.picker-subtitle{margin:10px 0 0;font:13px/1.5 Arial,sans-serif;color:#bcb8c7}.picker-close{flex:none;width:44px;height:44px;min-height:44px;padding:0;border:1px solid #ffffff20;border-radius:50%;background:#ffffff05;color:#e8dcc6;font:27px Arial,sans-serif}.picker-list{padding:10px;overflow-y:auto;max-height:calc(82vh - 152px);max-height:calc(82dvh - 152px);overscroll-behavior:contain}.picker-row{display:flex;align-items:center;width:100%;gap:13px;min-height:57px;height:auto;padding:13px 12px;border:1px solid transparent;border-radius:10px;background:transparent;color:#e2dccc;text-align:left}.picker-row:hover{background:#ffffff06}.picker-number{font:11px Arial,sans-serif;color:#a99878;letter-spacing:1px;min-width:20px}.picker-name{flex:1;font:16px/1.35 Georgia,serif}.picker-check{width:16px;color:#bfa372;font:18px Arial,sans-serif}.picker-row[aria-current=page]{border-color:#ddbf7955;background:#e8c99114}.picker-row[aria-current=page] .picker-name{color:#ffe3ae}@media(max-width:380px){.picker-heading{padding:21px 16px 17px}.picker-heading h2{font-size:21px}.picker-name{font-size:15px}}

.chapter #guide span{font:19px Arial,sans-serif}

#guide-picker[open]{display:flex;flex-direction:column}.picker-heading{flex:none}.picker-list{min-height:0;flex:1;max-height:none}
/* Definite block size prevents Safari from collapsing the flexible guide list. */
#guide-picker{height:min(680px,82vh);height:min(680px,82dvh)}.picker-list{flex:1 1 0%;overflow-y:auto;-webkit-overflow-scrolling:touch}
/* Embedded edition: preserve the book, remove standalone-site framing. */
main{padding-top:8px;padding-bottom:12px}body{background:#10121f}#stage{min-height:180px}.help{min-height:20px}
/* In an iframe, size and center the dialog in the actually visible part of its host page. */
#guide-picker{height:min(680px,calc(var(--host-visible-height,100dvh)*.82));max-height:min(680px,calc(var(--host-visible-height,100dvh)*.9));top:calc(var(--host-visible-top,0px) + var(--host-visible-height,100dvh)/2);bottom:auto;transform:translateY(-50%);margin:0 auto}

/* Seamless full-width embed: retain a small gutter without a colored panel. */
html,body{background:transparent}
main{width:100%;max-width:none;padding:8px 0 12px}
.accessible-guide-text[hidden]{display:none}
@media(max-width:600px){main{padding:4px 0 10px}.chapter{max-width:calc(100% - 20px)}}

html.in-page-book{overflow-y:hidden}

/* Guide-footer pilot: allow vertical reading gestures over the book. */
.guide-pilot #stage{touch-action:pan-y pinch-zoom}
