
:root{color-scheme:dark;--ink:#0c1724;--panel:#101f30;--cream:#f9edda;--muted:#d4c3ab;--gold:#f0be72;--gold-dim:#b78e59;--red:#a92f3b;--line:#eac18466;background:var(--ink);color:var(--cream);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{min-width:320px;margin:0}button,input{font:inherit}button{touch-action:manipulation}button:focus-visible,input:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.backdrop{position:fixed;inset:0;z-index:-2;pointer-events:none;background-image:url('scenes/01_home_day.jpg');background-position:center;background-size:cover;opacity:.13}.wash{position:fixed;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(90deg,#0c1724f5,#0c1724c9 45%,#0c1724f0)}
.wrap{width:min(100%,1450px);margin:auto;padding:24px clamp(12px,3vw,38px) 56px}.eyebrow{font-weight:800;letter-spacing:.18em;color:var(--gold);font-size:clamp(.63rem,.9vw,.76rem);text-transform:uppercase}
.header{display:flex;gap:20px;justify-content:space-between;align-items:flex-end;flex-wrap:wrap}.header h1{font-family:Georgia,'Times New Roman',serif;letter-spacing:-.038em;font-size:clamp(2.8rem,4.5vw,4.8rem);font-weight:400;line-height:1.02;margin:14px 0 9px}.byline{font-size:.95rem;margin:0 0 14px;color:#e8d8c5}.edition{text-align:right;font-size:.8rem;color:#e7d6bd;margin-bottom:13px;line-height:1.5}.edition b{color:var(--gold);letter-spacing:.12em;font-size:.74rem;display:block}
.topbar{background:#101d2bdc;border:1px solid #d7c0a164;border-radius:13px;display:flex;align-items:center;gap:22px;padding:10px 16px;margin:10px 0 9px}.track-info{width:min(27%,260px);min-width:150px}.track-info strong{font-size:.9rem;display:block}.track-info small{display:block;color:var(--muted);margin-top:2px;font-size:.77rem}.audio-area{min-width:220px;flex:1}.audio-area audio{display:block;width:100%;height:42px} .music-help{margin:0 4px 12px;font-size:.72rem;color:#d0b694}
.book-area{position:relative;isolation:isolate;overflow:hidden;background:#0c1b29;border:1.5px solid #e8b570;box-shadow:0 13px 70px #0008;border-radius:18px}.stage-bg{position:absolute;inset:0;z-index:-2;background-image:url('scenes/01_home_day.jpg');background-size:cover;background-position:center}.stage-shade{position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#061422d8 0%,#09182887 20%,#0a19294d 50%,#09182887 80%,#061422d8 100%)}
.reader-toolbar{background:#0c1826f7;border-bottom:1px solid #bba1746b;padding:9px clamp(10px,2vw,24px);display:grid;grid-template-columns:minmax(155px,235px) 1fr auto;align-items:center;gap:clamp(10px,1.8vw,25px);min-height:77px}
.image-btn{border:0;background:transparent;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:filter .14s ease,transform .14s ease;max-width:100%;line-height:0}.image-btn img{display:block;width:100%;height:auto}.image-btn:hover{filter:brightness(1.18);transform:translateY(-1px)}.image-btn:active{transform:translateY(1px)}.image-btn:disabled{opacity:.35;filter:grayscale(1);cursor:not-allowed;transform:none}
.mood-trigger{width:235px}.page-heading{min-width:0}.page-heading strong{font-family:Georgia,serif;font-size:clamp(1rem,1.7vw,1.48rem);line-height:1.18;display:block}.page-heading small{font-size:clamp(.65rem,.85vw,.76rem);color:#e6d3b8;font-style:italic;display:block;margin-top:4px}
.toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:clamp(3px,.6vw,9px)}.toolbar-actions .previous,.toolbar-actions .next{width:clamp(92px,9.5vw,144px)}.toolbar-actions .enlarge{width:clamp(148px,15vw,218px)}
.reader-viewport{display:flex;width:100%;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-inline:contain;touch-action:pan-x pan-y;scroll-behavior:smooth}.reader-viewport::-webkit-scrollbar{display:none}.page-slide{flex:0 0 100%;scroll-snap-align:center;display:flex;align-items:center;justify-content:center;padding:0 8px}.page-photo{border:0;cursor:zoom-in;display:block;max-width:100%;background:none;padding:0;line-height:0;box-shadow:0 7px 30px #000a}.page-photo img{display:block;width:auto;height:min(63vh,740px);max-width:100%;object-fit:contain;background:#f7ebcf;aspect-ratio:17/22}
.reader-footer{min-height:60px;background:#0c1926f8;border-top:1px solid #d3aa7669;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px clamp(10px,2vw,24px)}.page-controls{display:flex;align-items:center;gap:13px}.nav-mini{border:1px solid #ddbb8f94;background:#203145;min-width:42px;min-height:37px;border-radius:8px;color:var(--cream);cursor:pointer}.nav-mini:disabled{opacity:.4;cursor:not-allowed}.nav-mini:hover:not(:disabled){background:#40516c}.status{font-size:.78rem;color:var(--gold);min-width:46px;text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums}.page-strip{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}.page-jump{border:1px solid #bfaf9680;background:#18283a;color:var(--cream);cursor:pointer;display:flex;align-items:center;gap:7px;border-radius:8px;min-height:35px;padding:6px 10px}.page-jump[aria-current=page]{background:var(--red);border-color:#f0baa2}.page-num{font-weight:750;font-size:.75rem}.page-dotname{font-size:.72rem}.hint{text-align:center;font-size:.75rem;color:var(--gold);margin:11px 2px 18px;font-style:italic}.hint::before{content:'✧';padding-right:10px}.hint::after{content:'✧';padding-left:10px}
.footer-note{font-size:.75rem;line-height:1.5;color:#c5b39c;margin-top:17px;border-top:1px solid #ffffff29;padding-top:14px}
.mood-dialog{border:1.5px solid #f1c17c;border-radius:16px;background:#101d2b;color:var(--cream);width:min(96vw,1000px);max-height:min(88dvh,900px);padding:0;box-shadow:0 24px 100px #000e}.mood-dialog::backdrop{background:#010915d7}.mood-head{padding:18px 23px;background:#0d1928;border-bottom:1px solid #e4b97973;display:flex;justify-content:space-between;align-items:center;gap:15px}.mood-head h2{font:400 2rem/1 Georgia,serif;margin:0}.mood-head p{font-size:.77rem;color:var(--muted);margin:7px 0 0}.scene-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;padding:18px;overflow-y:auto;max-height:calc(88dvh - 93px)}.scene{display:flex;flex-direction:column;border:2px solid #ebc48a42;border-radius:12px;overflow:hidden;background:#1b2b3b;color:inherit;cursor:pointer;text-align:left;padding:0}.scene[aria-pressed=true]{border-color:var(--gold);box-shadow:0 0 0 1px var(--gold)}.scene:hover{border-color:#f2d39d}.scene img{width:100%;aspect-ratio:1.7;object-fit:cover;display:block}.scene-copy{display:block;padding:9px 12px 11px}.scene-copy strong{display:block;font-size:.86rem}.scene-copy small{display:block;color:var(--muted);font-size:.72rem;margin-top:4px}
.plain-btn{background:#203247;border:1px solid #ddbe8f99;border-radius:8px;color:var(--cream);padding:8px 13px;cursor:pointer;white-space:nowrap}.plain-btn:hover{background:#344a60}.plain-btn:disabled{opacity:.35;cursor:not-allowed}
.zoom-dialog{--zoom-scene:url('scenes/01_home_day.jpg');width:min(99vw,1560px);height:min(99dvh,1240px);max-height:none;max-width:none;margin:auto;padding:0;border-radius:16px;border:1.5px solid #e6b675;background:rgba(7,18,31,.82);color:var(--cream);box-shadow:0 20px 110px #000d;overflow:hidden;position:relative;backdrop-filter:blur(3px)}.zoom-dialog::backdrop{background:rgba(0,0,0,.48)}.zoom-dialog::before{content:"";position:absolute;inset:0;background-image:linear-gradient(90deg,#061422d8 0%,#09182887 20%,#0a19294d 50%,#09182887 80%,#061422d8 100%),var(--zoom-scene);background-size:cover,cover;background-position:center,center;opacity:.92;pointer-events:none}.zoom-dialog > *{position:relative;z-index:1}.zoom-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 15px;background:#172739e8;border-bottom:1px solid #ffffff3e;flex-wrap:wrap}.zoom-bar strong{font-size:.88rem}.zoom-buttons{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.zoom-buttons input{width:clamp(70px,10vw,135px);accent-color:var(--gold)}.zoom-perc{min-width:47px;font-size:.82rem;text-align:center;color:var(--gold)}.zoom-space{height:calc(100% - 69px);overflow:auto;overscroll-behavior:contain;padding:18px;position:relative;background:transparent}.zoom-space::before{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(5,12,20,.03),rgba(5,12,20,.1));pointer-events:none}.zoom-space img{display:block;max-width:none;height:auto;background:#f7ebcf;box-shadow:0 8px 50px #000a;user-select:none;-webkit-user-drag:none;margin:0 auto;touch-action:none}.zoom-space.is-dragging{cursor:grabbing}.zoom-instructions{font-size:.69rem;opacity:.78;margin-right:auto}.zoom-mood{font-size:.82rem}
@media(max-width:1100px){.reader-toolbar{grid-template-columns:minmax(140px,175px) 1fr auto;gap:8px}.mood-trigger{width:175px}.toolbar-actions .previous,.toolbar-actions .next{width:100px}.toolbar-actions .enlarge{width:155px}.page-dotname{display:none}}
@media(max-width:780px){.header h1{margin-top:7px}.edition{text-align:left}.reader-toolbar{grid-template-columns:1fr 1fr;row-gap:7px}.mood-trigger{width:min(100%,205px)}.page-heading{text-align:right}.toolbar-actions{grid-column:1 / -1;justify-content:space-between}.toolbar-actions .previous,.toolbar-actions .next{width:clamp(90px,24vw,140px)}.toolbar-actions .enlarge{width:clamp(132px,36vw,195px)}.page-photo img{height:min(67dvh,750px)}.reader-footer{flex-wrap:wrap;justify-content:center}.page-strip{justify-content:center}.zoom-space{height:calc(100% - 116px)}}
@media(max-width:500px){.wrap{padding:13px 9px 38px}.header h1{font-size:2.7rem}.eyebrow{font-size:.58rem;letter-spacing:.1em}.byline{font-size:.78rem}.edition{font-size:.7rem}.topbar{gap:5px;padding:9px;flex-direction:column;align-items:stretch}.track-info{width:100%}.audio-area{width:100%;min-width:0}.audio-area audio{height:37px}.reader-toolbar{padding:8px;grid-template-columns:44% 1fr}.page-heading strong{font-size:.95rem}.page-heading small{font-size:.65rem}.toolbar-actions .previous,.toolbar-actions .next{width:27%}.toolbar-actions .enlarge{width:41%}.page-photo img{height:min(66dvh,590px)}.page-slide{padding:5px}.page-strip{gap:4px}.page-jump{padding:6px;min-width:33px}.page-jump .page-dotname{display:none}.mood-dialog{max-height:92dvh}.scene-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px;max-height:calc(92dvh - 100px)}.scene-copy{padding:7px}.scene-copy strong{font-size:.75rem}.scene-copy small{font-size:.65rem}.mood-head h2{font-size:1.5rem}.mood-head{padding:12px}.zoom-bar{padding:9px}.zoom-bar strong{font-size:.76rem}.zoom-buttons{width:100%;justify-content:space-between}.zoom-space{height:calc(100% - 154px);padding:10px}.zoom-instructions{display:none}.zoom-buttons{row-gap:6px}.zoom-buttons input{width:66px}.zoom-buttons .plain-btn{padding:7px}.zoom-mood{order:-1}}
@media(prefers-reduced-motion:reduce){html,.reader-viewport{scroll-behavior:auto!important}.image-btn{transition:none}}

/* v0.3: Reader starts immediately below the Chronicle title; audio now lives below the page navigation. */
.header h1{margin-bottom:5px}
.byline{margin-bottom:5px}
.edition{margin-bottom:5px}
.book-area{margin-top:7px}
.bottom-soundtrack{margin:0;gap:16px;padding:10px clamp(10px,2vw,24px) 6px;border:0;border-top:1px solid #e4b97955;border-radius:0;background:#0b1929f6;position:relative;z-index:1}
.bottom-soundtrack .track-info{width:min(30%,300px);min-width:145px}
.bottom-soundtrack .audio-area{min-width:0}
.bottom-soundtrack .audio-area audio{height:38px}
.soundtrack-label{display:block;color:var(--gold);letter-spacing:.13em;font-size:.58rem;font-weight:800;margin-bottom:2px}
.book-area .music-help{background:#0b1929f6;font-size:.69rem;margin:0;padding:0 clamp(10px,2vw,24px) 9px;color:#bda98c}
@media(max-width:500px){
 .header h1{margin-bottom:3px}
 .byline{margin-bottom:2px}
 .edition{margin-bottom:5px}
 .bottom-soundtrack{padding:10px 10px 4px;gap:8px;flex-direction:column;align-items:stretch}
 .bottom-soundtrack .track-info{width:100%;min-width:0}
 .bottom-soundtrack .audio-area{width:100%}
 .bottom-soundtrack .audio-area audio{height:34px}
 .book-area .music-help{padding:0 10px 9px}
}

.mobile-zoom-tool,.mobile-page-count{display:none}
@media (max-width: 600px), (orientation: landscape) and (max-height: 540px) and (max-width: 1100px) {
 .zoom-dialog[open]{position:fixed;inset:0;margin:auto;width:100%;height:100dvh;display:flex;flex-direction:column}
 .zoom-bar{flex:none;padding:2px 5px;gap:0}
 .zoom-bar strong,.zoom-instructions{display:none}
 .zoom-buttons{width:100%;display:flex;justify-content:space-between;align-items:center;gap:2px}
 .zoom-buttons .plain-btn{padding:2px 5px;min-width:40px;min-height:44px;font-size:.83rem}
 .mobile-zoom-tool,.mobile-page-count{display:inline-block}
 .mobile-page-count{order:1;font-size:.76rem;color:var(--gold)}
 #zoomPrev{order:0} #zoomNext{order:2} #zoomMood{order:3} #mobileZoom{order:4} #zoomClose{order:5}
 .zoom-buttons :is(#zoomOut,#zoomIn,#zoomFit,#zoomSlider,#zoomPercent){display:none}
 .zoom-buttons.expanded::after{content:"";width:100%;height:0;order:6}
 .zoom-buttons.expanded :is(#zoomOut,#zoomSlider,#zoomPercent,#zoomIn,#zoomFit){display:inline-block;order:7}
 .zoom-space{flex:1;min-height:0;height:auto;padding:6px;touch-action:none;scroll-behavior:auto}
 .zoom-space img{touch-action:none}
 .page-slide{scroll-snap-stop:always}
}

.zoom-dialog[open]{display:flex;flex-direction:column}
.zoom-dialog .zoom-space{flex:1;min-height:0;height:auto}
.lightbox-audio{flex:none;background:#172739f2;border-top:1px solid #ddbe8f66;display:flex;gap:8px;align-items:center;padding:3px 10px;font-size:.8rem}
.lightbox-audio button{min-height:44px;min-width:68px}
.lightbox-audio input{flex:1;width:40px;min-width:40px;height:36px;accent-color:var(--gold)}
.lightbox-audio small{font-variant-numeric:tabular-nums;color:var(--gold)}
.lightbox-audio strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:32%}
