@charset "UTF-8";
:root{color-scheme:light;--paper:#f5f1e5;--paper-light:#fbf8ef;--ink:#253d46;--moss:#496e68;--sage:#b8ccc0;--pale:#e7e7d7;--rain:#7d9296;--muted:#626e68;--line:#dcded0;--saffron:#c29c4c;--serif:"Hiragino Mincho ProN","Yu Mincho","YuMincho","Noto Serif CJK JP","Noto Serif JP",serif;--sans:"Hiragino Kaku Gothic ProN","Yu Gothic","Noto Sans CJK JP","Noto Sans JP",sans-serif}
*{box-sizing:border-box}html{min-width:300px;background:var(--paper);scroll-behavior:smooth}body{margin:0;color:var(--ink);font-family:var(--sans);-webkit-font-smoothing:antialiased;line-height:1.6;background:radial-gradient(ellipse at 11% 10%,rgba(199,206,179,.13),transparent 46%),var(--paper)}button,input{font:inherit}button{color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}button{border:0;background:transparent}button:disabled{cursor:default}button,a,input{-webkit-touch-callout:none}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--moss);outline-offset:5px}button:disabled{opacity:.3}button svg{display:block;flex-shrink:0}img{display:block;max-width:100%}[hidden]{display:none!important}::selection{background:#d3dcc7;color:#304638}.book-shell{max-width:1200px;margin:0 auto;padding:0 48px}.book-header{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:95px;border-bottom:1px solid var(--line)}.brand{display:inline-flex;align-items:center;gap:12px;padding:10px 0;text-align:left;font-family:var(--serif);font-size:14px;font-weight:600;letter-spacing:.12em}.brand-mark{width:27px;height:27px;color:var(--moss)}.text-button{display:inline-flex;align-items:center;gap:12px;min-height:44px;padding:8px 0 8px 14px;font-size:12px;letter-spacing:.1em}.text-button svg{width:20px;height:20px}.text-button:hover,.quiet-button:hover{color:#23402f}.skip-link{position:fixed;left:20px;top:-80px;z-index:100;background:var(--ink);color:white;padding:12px 18px;border-radius:4px}.skip-link:focus{top:15px}main:focus{outline:none}.eyebrow{display:block;font-size:10px;line-height:1.5;letter-spacing:.26em;color:var(--moss)}.cover{max-width:890px;margin:0 auto;padding-top:42px}.cover-heading{text-align:center;position:relative;padding-bottom:33px}.cover-heading>.eyebrow{font-family:var(--serif);font-size:11px;letter-spacing:.38em;margin-bottom:18px}.cover h1{margin:0;font-family:var(--serif);font-weight:500;letter-spacing:.12em;line-height:1.48;font-size:49px}.title-first{font-size:.79em;display:inline-block;margin-right:.22em}.title-last{position:relative;display:inline-block}.title-dot{position:absolute;height:6px;width:6px;border-radius:50%;background:var(--moss);right:-13px;top:12px;opacity:.65}.title-last::after{content:"";position:absolute;width:92%;height:1px;background:var(--sage);left:0;bottom:-5px;transform:rotate(-2deg)}.cover-tagline{font-family:var(--serif);margin:22px 0 0;font-size:12px;letter-spacing:.22em;color:var(--moss)}.cover-art{position:relative;width:100%;max-width:770px;margin:auto;overflow:hidden;border-radius:48% 48% 2px 2px / 3% 3% 2px 2px;isolation:isolate;background:var(--pale);box-shadow:0 14px 30px -26px #5d665b}.cover-art img{width:100%;aspect-ratio:1.43;object-fit:cover;object-position:50% 53%}.cover-art-rule{position:absolute;inset:9px;border:1px solid rgba(245,243,233,.4);border-radius:inherit;pointer-events:none}.cover-bottom{max-width:770px;margin:0 auto;padding:28px 0 4px;display:flex;align-items:center;justify-content:space-between;gap:32px}.cover-description{font-family:var(--serif);font-size:15px;letter-spacing:.12em;line-height:2;margin:0}.cover-actions{text-align:center;min-width:230px}.primary-button{display:inline-flex;align-items:center;justify-content:space-between;gap:32px;min-width:230px;min-height:55px;padding:14px 25px;border-radius:3px;background:var(--ink);color:var(--paper-light);font-family:var(--serif);font-size:14px;letter-spacing:.12em;transition:background .2s,transform .2s}.primary-button:hover{background:#47614e}.primary-button:active{transform:translateY(1px)}.primary-button>span:last-child{font-family:var(--sans);font-size:22px;line-height:1}.quiet-button{min-height:44px;padding:10px 7px;font-size:11px;letter-spacing:.08em;text-decoration:underline;text-decoration-color:#bfc7b8;text-underline-offset:5px}.resume-note{margin:9px 0 0;font-size:10px;color:var(--muted);letter-spacing:.06em}.cover-actions .quiet-button{min-height:33px;padding-bottom:0}.colophon{margin:29px 0 0;text-align:center;font-size:10px;color:var(--muted);letter-spacing:.12em}.book-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;max-width:1104px;margin:48px auto 0;border-top:1px solid var(--line);padding:25px 0 30px;font-family:var(--serif);font-size:10px;color:var(--muted);letter-spacing:.13em}.footer-flower{font-size:19px;color:#9aa68c}.reader{max-width:680px;margin:0 auto;padding-top:30px}.chapter-heading{display:flex;align-items:center;gap:13px;min-height:34px;margin-bottom:17px}.chapter-number{font-size:10px;letter-spacing:.15em;color:var(--moss);border-right:1px solid #cbd2c0;padding-right:13px;white-space:nowrap}.chapter-heading h2{margin:0;font-size:12px;letter-spacing:.13em;font-family:var(--serif);font-weight:500}.chapter-change{margin-left:auto;font-family:var(--serif);font-size:10px;color:var(--moss);opacity:0}.chapter-change.is-visible{animation:chapter-note 1.4s ease both}.scene{transition:opacity .18s ease;position:relative}.scene.is-loading{opacity:.53}.scene.is-entering{animation:page-in .38s ease both}.picture-button{display:block;width:100%;margin:0;padding:0;border-radius:3px;text-align:inherit;touch-action:pan-y;cursor:pointer}.art-frame{display:block;position:relative;overflow:hidden;isolation:isolate;border-radius:3px;background:#e9e9db;aspect-ratio:1.13;box-shadow:0 12px 35px -31px rgba(50,70,50,.45)}.art-frame>img{width:100%;height:100%;object-fit:cover;object-position:50% 50%;user-select:none;-webkit-user-drag:none}.art-frame.is-triptych{aspect-ratio:1.05;background:var(--paper)}.art-frame.is-triptych>img{object-fit:contain;animation:triptych-reveal 1.6s ease both}.image-turn-hint{position:absolute;bottom:14px;right:14px;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:rgba(249,248,238,.8);color:var(--ink);opacity:0;transform:translateX(-3px);transition:opacity .2s,transform .2s}.image-turn-hint svg{width:17px;height:17px}.picture-button:hover .image-turn-hint,.picture-button:focus-visible .image-turn-hint{opacity:1;transform:translateX(0)}.rain{position:absolute;inset:-25%;z-index:1;pointer-events:none;opacity:.16;background:repeating-linear-gradient(104deg,transparent 0 40px,rgba(233,242,240,.85) 41px,transparent 42px 83px);background-size:100% 180px;mask-image:linear-gradient(transparent,#000 25%,#000 70%,transparent);animation:rain-fall 2.3s linear infinite}.story-text{max-width:570px;margin:26px auto 0;padding:0 11px;font-family:var(--serif);font-size:17px;line-height:2.04;letter-spacing:.055em;line-break:strict;overflow-wrap:anywhere;cursor:default}.story-text p{margin:0}.story-text p+p{margin-top:.45em}.story-text ruby{ruby-align:center}.ending-note{display:flex;justify-content:center;align-items:center;gap:15px;margin:24px auto 10px;font-family:var(--serif);font-size:12px;letter-spacing:.3em;color:var(--moss)}.ending-note span{font-size:23px;color:#a8b298}.reader-navigation{position:relative;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:31px;padding-top:18px}.progress-track{position:absolute;top:0;left:0;right:0;height:2px;background:#e1e4d5;overflow:hidden}.progress-track>div{height:100%;width:0;background:#93a185;transition:width .4s ease}.page-button{display:inline-flex;align-items:center;justify-content:center;gap:16px;padding:8px 9px;min-width:100px;min-height:48px;font-family:var(--serif);font-size:12px;letter-spacing:.1em;border-radius:3px;transition:background .2s}.page-button:hover:not(:disabled){background:#e9ecdf}.page-button svg{width:22px;height:22px}.next-button{padding-right:0}.previous-button{padding-left:0}.page-counter{padding:10px;min-width:95px;min-height:48px;font-size:12px;font-variant-numeric:tabular-nums;letter-spacing:.13em;color:var(--moss)}.page-counter .total-pages{color:#91998a;font-size:10px}.reading-hint{text-align:center;margin:10px 0 0;font-size:10px;color:#7f8878;letter-spacing:.08em}.reader+.load-error{padding:100px 20px}.reader~.book-footer{margin-top:35px}.image-error{text-align:center;font-family:var(--serif);padding:20px;color:var(--moss);border-bottom:1px solid var(--line)}.load-error{padding:100px 20px;text-align:center}.load-error h1{font-family:var(--serif);font-weight:500;font-size:24px}.load-error p{font-size:14px}.load-error button{margin-top:18px}.contents-dialog{color:var(--ink);border:1px solid #d9dece;border-radius:9px;background:var(--paper-light);padding:31px 34px 22px;width:620px;max-width:calc(100vw - 36px);max-height:calc(100dvh - 48px);overflow-y:auto;overscroll-behavior:contain;box-shadow:0 35px 120px rgba(39,58,43,.18)}.contents-dialog::backdrop{background:rgba(42,58,47,.24);backdrop-filter:blur(5px)}.dialog-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.dialog-header h2{font-family:var(--serif);font-size:22px;font-weight:500;letter-spacing:.1em;margin:7px 0 0}.dialog-header .eyebrow{font-size:8px}.icon-button{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;margin-top:0;margin-right:-9px;background:#edf0e5}.icon-button svg{width:20px;height:20px}.contents-description{color:var(--muted);font-size:11px;letter-spacing:.05em;margin:14px 0 20px}.chapter-list{display:grid;gap:19px}.contents-chapter{padding-top:15px;border-top:1px solid var(--line)}.chapter-link{min-height:36px;display:flex;align-items:center;gap:14px;padding:0 4px 7px 0;text-align:left;font-family:var(--serif);font-size:14px;letter-spacing:.07em}.chapter-link>span:first-child{font-family:var(--sans);font-size:9px;letter-spacing:.05em;color:var(--moss)}.chapter-link>span:last-child{font-family:var(--sans);margin-left:8px;color:var(--moss)}.page-grid{display:grid;grid-template-columns:repeat(10,1fr);gap:5px}.page-jump{border:1px solid #e2e6d8;min-height:40px;border-radius:3px;font-size:10px;font-variant-numeric:tabular-nums;color:var(--moss);background:#f3f5eb}.page-jump:hover{background:#e3e9d9}.page-jump[aria-current=page]{background:var(--ink);color:var(--paper-light);border-color:var(--ink)}.contents-settings{border-top:1px solid var(--line);margin-top:24px;padding-top:18px;display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.contents-settings>p{font-size:9px;line-height:1.9;color:var(--muted);margin:0}.rain-setting{display:flex;align-items:center;gap:9px;font-size:10px;white-space:nowrap;min-height:44px;margin-top:-8px;position:relative;cursor:pointer}.rain-setting input{position:absolute;opacity:0;width:34px;height:24px;margin:0}.switch{display:block;width:30px;height:17px;background:#d7ddce;border-radius:20px;transition:background .2s;position:relative}.switch::after{content:"";position:absolute;width:11px;height:11px;top:3px;left:3px;background:var(--paper-light);border-radius:50%;transition:transform .2s}.rain-setting input:checked+.switch{background:var(--moss)}.rain-setting input:checked+.switch::after{transform:translateX(13px)}.rain-setting input:focus-visible+.switch{outline:2px solid var(--moss);outline-offset:4px}.dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:16px}.dialog-footer .quiet-button{font-size:10px}.toast{position:fixed;z-index:50;left:50%;bottom:24px;transform:translateX(-50%);display:flex;align-items:center;gap:18px;max-width:calc(100vw - 30px);padding:13px 13px 13px 20px;background:#344b3e;color:var(--paper-light);border-radius:5px;box-shadow:0 8px 35px #344b3e35;font-size:11px}.toast>span{white-space:nowrap}.toast button{color:inherit;font-size:11px;white-space:nowrap;min-height:36px;text-decoration:underline;text-underline-offset:4px}.toast .toast-close{font-size:22px;text-decoration:none;min-width:30px;padding:0}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}body.dialog-open{overflow:hidden}
@keyframes page-in{from{opacity:.45;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
@keyframes triptych-reveal{0%,26%{clip-path:inset(0 0 66.666% 0)}45%,66%{clip-path:inset(0 0 33.333% 0)}90%,100%{clip-path:inset(0 0 0 0)}}
@keyframes chapter-note{0%{opacity:0;transform:translateY(4px)}25%,70%{opacity:.8;transform:translateY(0)}100%{opacity:0}}
@keyframes rain-fall{from{background-position:0 -180px}to{background-position:-30px 180px}}
@media(min-width:1100px){.reader{max-width:740px}.art-frame{aspect-ratio:1.19}.story-text{max-width:610px}.cover{padding-top:47px}.cover-art{max-width:780px}.cover-art img{aspect-ratio:1.5}.cover-bottom{max-width:780px}}
@media(max-width:700px){.book-shell{padding:0 25px}.book-header{min-height:77px}.brand{font-size:12px;gap:9px;letter-spacing:.07em}.brand-mark{width:24px;height:24px}.text-button{font-size:11px;gap:8px}.cover{padding-top:32px}.cover-heading{padding-bottom:26px}.cover-heading>.eyebrow{font-size:10px;margin-bottom:15px}.cover h1{font-size:38px}.cover-tagline{font-size:10px;margin-top:18px;letter-spacing:.16em}.cover-art img{aspect-ratio:1.08;object-position:50% 50%}.cover-art{border-radius:47% 47% 2px 2px / 2% 2% 2px 2px}.cover-bottom{padding-top:25px;gap:20px;align-items:flex-start}.cover-description{font-size:12px;line-height:2;letter-spacing:.04em}.cover-actions{min-width:175px}.primary-button{min-width:175px;gap:15px;padding:12px 18px;min-height:50px;font-size:12px}.primary-button>span:last-child{font-size:20px}.colophon{font-size:9px;letter-spacing:.03em;margin-top:27px}.book-footer{margin-top:34px;padding:21px 0 25px;font-size:9px;letter-spacing:.04em}.reader{padding-top:23px}.chapter-heading{gap:11px;margin-bottom:13px;min-height:27px}.chapter-number{font-size:9px;padding-right:11px}.chapter-heading h2{font-size:11px;letter-spacing:.08em}.art-frame{aspect-ratio:1.05}.art-frame.is-triptych{aspect-ratio:1.03}.story-text{font-size:16px;line-height:2;letter-spacing:.045em;margin-top:23px;padding:0 7px}.reader-navigation{margin-top:25px;padding-top:12px}.page-button{gap:12px;font-size:11px;min-width:86px}.reading-hint{font-size:9px;margin-top:7px}.page-counter{font-size:11px}.contents-dialog{padding:26px 23px 17px}.dialog-header h2{font-size:20px}.chapter-list{gap:14px}.contents-chapter{padding-top:13px}.page-grid{gap:4px;grid-template-columns:repeat(5,1fr)}.page-jump{min-height:38px;font-size:10px}.chapter-link{font-size:13px;gap:10px}.contents-settings{display:block;margin-top:20px}.contents-settings>p{margin-top:4px}.toast{gap:11px;padding:10px 9px 10px 14px;bottom:15px;font-size:10px;flex-wrap:wrap;justify-content:center}.toast button{font-size:10px}.toast>span{flex:1}.toast .toast-close{min-width:24px}.chapter-change{display:none}.image-turn-hint{display:none}}
@media(max-width:420px){.book-shell{padding:0 20px}.book-header{min-height:68px}.cover{padding-top:29px}.cover-heading{padding-bottom:24px}.cover h1{font-size:33px;letter-spacing:.09em}.title-first{margin-right:.13em}.title-dot{width:4px;height:4px;right:-8px;top:10px}.cover-tagline{font-size:10px;margin-top:18px}.cover-art img{aspect-ratio:1.02}.cover-bottom{gap:15px;padding-top:23px}.cover-description{font-size:11px;letter-spacing:.02em;line-height:2}.cover-actions{min-width:164px}.primary-button{min-width:164px;min-height:48px;padding:11px 16px;font-size:12px}.cover-actions .quiet-button{font-size:10px}.resume-note{font-size:9px;max-width:170px}.colophon{font-size:8px;margin-top:24px}.book-footer{margin-top:28px;font-size:8px}.reader{padding-top:19px}.chapter-heading{margin-bottom:12px}.story-text{font-size:15.5px;margin-top:22px;padding:0 5px;letter-spacing:.025em;line-height:2}.reader-navigation{margin-top:24px}.contents-dialog{max-width:calc(100vw - 24px);padding:23px 20px 15px}.dialog-header h2{font-size:19px}.contents-description{font-size:10px}.toast{max-width:calc(100vw - 24px)}}
@media(max-width:340px){.book-shell{padding:0 15px}.brand{font-size:11px;gap:6px}.brand-mark{width:20px;height:20px}.cover h1{font-size:29px}.cover-bottom{display:block;text-align:center}.cover-actions{margin-top:20px}.cover-description br{display:none}.resume-note{max-width:none}.story-text{font-size:15px}.page-button{min-width:75px;gap:7px}}
/* Illustration formats are intentional: all narrative compositions stay intact. */
.brand{padding:0}
.brand-title{width:225px;height:auto;object-fit:contain}
.cover-invitation{font-family:var(--serif);font-size:43px;letter-spacing:.12em;font-weight:500;line-height:1.65;margin:0}
.art-frame{aspect-ratio:3/2;background:var(--paper)}
.art-frame>img{object-fit:contain}
.art-frame.is-triptych{aspect-ratio:1}
.cover-art{border-radius:2px;max-width:570px;background:var(--paper)}
.cover-art img{aspect-ratio:1;object-fit:contain;object-position:center}
.cover-art-rule{border-color:rgba(245,241,229,.2)}
.title-dot{background:var(--saffron)}
.title-last::after{height:2px;background:var(--saffron);opacity:.65}
.triptych-marker{display:none;position:absolute;left:0;top:0;width:3px;height:33.333%;background:var(--saffron);opacity:.72;pointer-events:none;transition:top .35s ease}
.is-triptych .triptych-marker{display:block}
.is-triptych[data-panel="1"] .triptych-marker{top:33.333%}
.is-triptych[data-panel="2"] .triptych-marker{top:66.666%}
.scene{touch-action:pan-y pinch-zoom}
.picture-button{touch-action:pan-y pinch-zoom}
.page-jump,.chapter-link,.toast button,.cover-actions .quiet-button{min-height:44px}
.reading-hint,.page-counter .total-pages{color:var(--muted)}
.dialog-header{position:sticky;top:0;z-index:3;background:var(--paper-light);padding-bottom:9px}
@media(min-width:900px){
  .cover{max-width:1040px;padding-top:68px;display:grid;grid-template-columns:minmax(280px,.83fr) minmax(0,1.17fr);column-gap:62px;grid-template-rows:1fr auto auto 1fr;align-items:center}
  .cover-heading{grid-column:1;grid-row:2;text-align:left;padding:0}
  .cover-heading>.eyebrow{margin-bottom:21px}
  .cover h1{font-size:56px;line-height:1.6}
  .title-first{display:block;line-height:1.4;font-size:.7em;margin:0}
  .cover-tagline{font-size:11px;letter-spacing:.12em;margin-top:24px}
  .cover-art{grid-column:2;grid-row:1 / span 4;max-width:none;width:100%}
  .cover-bottom{grid-column:1;grid-row:3;display:block;width:100%;padding:27px 0 0;margin:0}
  .cover-description{font-size:13px;letter-spacing:.075em}
  .cover-actions{margin-top:27px;text-align:left}
  .cover-actions .quiet-button{display:block;margin-top:2px}
  .colophon{grid-column:1 / -1;grid-row:5;margin-top:40px;text-align:center;font-size:9px;letter-spacing:.13em}
  .cover+.reader{padding-top:30px}
  .book-footer{margin-top:37px}
}
@media(min-width:701px) and (max-width:899px){.cover-art{max-width:480px}.cover-bottom{max-width:480px}.cover h1{font-size:43px}}
@media(max-width:700px){.art-frame{aspect-ratio:3/2}.art-frame.is-triptych{aspect-ratio:1}.cover-art img{aspect-ratio:1}.cover-art{border-radius:2px}.cover-bottom{max-width:570px}}
@media(max-width:899px){.cover-invitation{display:none}.cover-tagline{margin-top:14px}.cover-heading{padding-bottom:23px}}
@media(max-width:700px){.brand-title{width:190px}.cover-heading>.eyebrow{margin-bottom:12px}.cover{padding-top:24px}.cover-tagline{margin-top:0}.cover-heading{padding-bottom:22px}}
@media(max-width:420px){.brand-title{width:180px}.cover{padding-top:23px}.cover-heading{padding-bottom:21px}.cover-heading>.eyebrow{font-size:9px;margin-bottom:10px}.story-text{font-size:17px;line-height:1.95;letter-spacing:.025em}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.001ms!important;animation-delay:0ms!important;transition-duration:.001ms!important}.art-frame.is-triptych>img{clip-path:none!important}.rain{display:none!important}}
/* Ending prompt and credits */
.ending-panel{display:flex;flex-direction:column;align-items:center;gap:4px;margin:4px auto 14px;text-align:center}
.ending-prompt{margin:0;font-family:var(--serif);font-size:15px;letter-spacing:.12em;color:var(--ink,#23402f)}
.ending-panel[hidden]{display:none}
.credits{max-width:1104px;margin:0 auto 28px;padding:0 4px;text-align:center;font-family:var(--serif);font-size:10px;line-height:1.9;letter-spacing:.06em;color:var(--muted)}
.credits a{color:inherit;text-decoration:underline;text-decoration-color:#bfc7b8;text-underline-offset:3px}
@media(max-width:420px){.credits{font-size:9px}}

/* ---- Round 2: ruby, zoom, tools, guide, full-bleed art on phones ---- */
.scene{position:relative}
.ruby-on .story-text{line-height:2.35}
.ruby-on .story-text ruby rt{font-size:.5em;letter-spacing:0;font-family:var(--sans,sans-serif);color:var(--muted)}
.story-tools{display:flex;justify-content:center;margin:2px 0 0}
.speak-button[aria-pressed="true"]{color:#23402f;text-decoration-color:#23402f}
.zoom-button{position:absolute;top:10px;right:10px;z-index:3;width:44px;height:44px;border-radius:50%;border:0;background:rgba(245,241,229,.86);color:#23402f;display:grid;place-items:center;cursor:pointer;box-shadow:0 1px 6px rgba(0,0,0,.18)}
.zoom-button svg{width:20px;height:20px}
.zoom-button:focus-visible{outline:2px solid #23402f;outline-offset:2px}
.zoom-dialog{border:0;padding:0;margin:0;max-width:none;max-height:none;width:100vw;height:100dvh;background:#1d2a22;color:#f5f1e5}
.zoom-dialog::backdrop{background:#1d2a22}
.zoom-scroll{position:absolute;inset:0;overflow:auto;display:grid;place-items:center;touch-action:pan-x pan-y pinch-zoom}
.zoom-scroll img{width:100%;height:100%;object-fit:contain;display:block;cursor:zoom-in}
.zoom-scroll img.is-zoomed{width:260vw;height:auto;max-width:none;cursor:zoom-out}
.zoom-close{position:absolute;top:max(10px,env(safe-area-inset-top));right:10px;z-index:5;background:rgba(245,241,229,.9);color:#23402f}
.zoom-hint{position:absolute;left:0;right:0;bottom:max(12px,env(safe-area-inset-bottom));margin:0;text-align:center;font-size:11px;letter-spacing:.1em;color:rgba(245,241,229,.75);pointer-events:none}
.ending-guide{margin:6px 0 4px}
.guide-dialog{width:min(720px,94vw)}
.guide-list{display:grid;gap:22px;margin:14px 0 6px}
.guide-entry h3{margin:0 0 2px;font-family:var(--serif);font-size:18px;letter-spacing:.1em}
.guide-note{margin:0 0 10px;font-size:13px;line-height:1.8;color:var(--muted)}
.guide-clues{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.guide-clue{display:flex;flex-direction:column;gap:4px;text-align:left;padding:0 0 8px;border:1px solid var(--line);border-radius:3px;background:var(--paper-light,#faf7ee);cursor:pointer;overflow:hidden;font:inherit;color:inherit}
.guide-clue img{width:100%;aspect-ratio:3/2;object-fit:cover;display:block}
.guide-clue span{padding:0 9px;font-size:12px;line-height:1.6}
.guide-clue small{padding:0 9px;font-size:10px;color:var(--muted);letter-spacing:.08em}
.guide-clue:focus-visible{outline:2px solid #23402f;outline-offset:2px}
@media(max-width:700px){
  .scene .picture-button{margin-left:-25px;margin-right:-25px;width:calc(100% + 50px)}
  .scene .art-frame{border-radius:0}
}
@media(max-width:420px){.scene .picture-button{margin-left:-20px;margin-right:-20px;width:calc(100% + 40px)}}
@media(max-width:340px){.scene .picture-button{margin-left:-15px;margin-right:-15px;width:calc(100% + 30px)}}

/* ===== The book ===== The same book as its two shelf-mates: picture left, text right; or held tall, picture above, text below. */
html{background:#d9c6a4}
body{background:#d9c6a4 url('assets/ui/desk.webp') center/cover no-repeat fixed;font-family:var(--serif);color:#4c4333}
.book-shell{max-width:none;padding:0}
.book-footer{display:none}
body:not(.reading) .book-header{display:none}
.cover{max-width:none;min-height:100svh;margin:0;padding:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}
#cover-open{display:block;padding:0;border-radius:2px;line-height:0}
#cover-image{width:min(88vw,calc(100svh - 230px),760px);height:auto;aspect-ratio:1;object-fit:contain;box-shadow:0 8px 30px #665b4530}
.cover-tagline{margin:0;font-size:13px;letter-spacing:.18em;color:#5d4a2d}
.cover-description{margin:0;font-size:13px;line-height:1.8;letter-spacing:.08em;color:#5d4a2d}
.cover-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;min-width:0;margin:6px 0 0}
.resume-note,.colophon{margin:0;font-size:12px;letter-spacing:.06em;color:#5d4a2d}
.credits{display:block;padding:0 16px;color:#5d4a2d;font-size:11px}
body.reading .credits{display:none}
.cover-actions button,.controls button,.ending-actions button{position:relative;min-height:48px;min-width:92px;padding:10px 24px;border:1px solid transparent;border-radius:12px;background:transparent url('assets/ui/paper-button.webp') center/100% 100% no-repeat;color:#554d40;font-family:var(--serif);font-size:13px;line-height:1.5;letter-spacing:.09em;transition:filter 160ms ease,transform 160ms ease,box-shadow 160ms ease}
.cover-actions button{min-height:52px;min-width:158px;padding:12px 28px}
@media(hover:hover){.cover-actions button:hover,.controls button:not(:disabled):hover,.ending-actions button:hover{filter:brightness(1.025);box-shadow:0 3px 8px #67583d14}}
.cover-actions button:active,.controls button:not(:disabled):active,.ending-actions button:active{transform:translateY(1px);filter:brightness(.97)}
.controls button:disabled{opacity:.38;filter:grayscale(.65)}
#page-number{min-width:76px;padding:8px 10px;color:#7b715e;font-size:11px;letter-spacing:.03em;font-variant-numeric:tabular-nums;text-decoration:underline;text-underline-offset:4px}

body.reading{height:100svh;min-height:0;overflow:hidden;overscroll-behavior:none;touch-action:pan-y;--header:48px;--footer:62px}
body.reading .book-shell{height:100%;display:flex;flex-direction:column}
body.reading main{flex:1;min-height:0}
.book-header{min-height:0;height:var(--header);padding:6px 18px;border:0;gap:12px}
.brand{line-height:0}
.brand-title{width:auto;height:calc(var(--header) - 2px);max-width:52vw;object-fit:contain;object-position:left center}
.header-tools{display:flex;align-items:center;gap:6px}
.text-button{min-height:36px;padding:6px 12px;border-radius:12px;gap:0;color:#554d40;font-size:12px;letter-spacing:.09em;white-space:nowrap}
.speak-button[aria-pressed="true"]{text-decoration:underline;text-underline-offset:4px}
.reader{max-width:none;height:100%;margin:0;padding:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr auto;justify-items:center;align-items:center;--side:300px}
#scene{position:relative;display:grid;perspective:2200px;background-repeat:no-repeat;box-shadow:0 1px 0 #f4ead6,1px 2px 0 #dccfb6,0 3px 0 #f1e6d0,1px 4px 0 #d6c8ad,0 5px 0 #efe3cc,0 8px 14px #4a33172e,0 20px 44px #4a33173d;border-radius:2px;transition:opacity .18s ease}
#scene.is-loading{opacity:.7}
#picture-page{position:relative;display:grid;place-items:center;min-width:0;min-height:0;overflow:hidden}
#picture-button{width:100%;height:100%;display:grid;place-items:center;padding:0;margin:0;border-radius:0;touch-action:manipulation}
#picture-button:focus-visible{outline-offset:-6px}
#art-frame,.turn-sheet .art-frame,.leaf-picture .art-frame{display:block;position:relative;width:92%;height:auto;aspect-ratio:3/2;overflow:hidden;background:transparent;box-shadow:none;border-radius:0}
#art-frame.is-triptych,.turn-sheet .is-triptych,.leaf-picture .is-triptych{aspect-ratio:1}
.art-frame>img{width:100%;height:100%;object-fit:contain}
.zoom-button{top:8px;right:8px;width:38px;height:38px;background:#f6ead5d9;color:#4c4333;box-shadow:0 1px 4px #4a33172e}
.zoom-button svg{width:17px;height:17px}
.image-error{position:absolute;inset:auto 8% 8%;padding:10px;background:#f6ead5e6;border:0;border-radius:6px}
#text-page{position:relative;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;overflow:auto}
.text-flow{width:100%;max-width:26em}
.story-text,.ruby-on .story-text{max-width:none;margin:0;padding:0;color:#4c4333;font-size:clamp(15px,calc(var(--side)*.034),21px);line-height:1.95;letter-spacing:.05em;line-break:strict;text-wrap:pretty}
.ruby-on .story-text{line-height:2.15}
.ruby-on .story-text ruby rt{color:#7b6f5a}
.caption-line{display:block;opacity:0;transition:opacity 650ms ease-in-out}
#chapter-page{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4em;padding:8%;text-align:center;color:#4c4333;font-size:clamp(20px,calc(var(--side)*.058),36px);letter-spacing:.14em;line-height:1.7;opacity:0;transition:opacity 900ms ease-in-out;pointer-events:none}
#chapter-page[hidden]{display:none}
#chapter-page.visible{opacity:1}
.reader-foot{width:100%;height:var(--footer);padding:6px 12px 0;display:flex;flex-direction:column;align-items:center;position:relative}
.reader-foot .controls{display:flex;align-items:center;justify-content:center;gap:16px;flex:none}
.reading-hint{margin:4px 0 0;min-height:18px;font-size:12px;letter-spacing:.04em;color:#5d4a2d}
.ending-panel{position:fixed;inset:0;z-index:30;display:grid;place-items:center;margin:0;padding:16px;background:#3b2a1240}
.ending-card{width:min(88vw,340px);padding:22px 18px 20px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;border-radius:14px;background:#f8f3e8;box-shadow:0 12px 48px #44392740}
.ending-note{display:block;margin:0;font-size:17px;letter-spacing:.3em;text-indent:.3em;color:#4c4333}
.ending-prompt{margin:0;font-size:14px;line-height:1.8;letter-spacing:.06em;color:#5d4a2d}
.ending-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.ending-actions button{min-height:42px;padding:6px 16px;font-size:12px}
.ending-actions button[hidden]{display:none}
.menu-button{display:grid;place-items:center;width:44px;height:44px;padding:0;margin-right:-6px;border-radius:10px;color:#5d4a2d}
.menu-button:focus-visible{outline:2px solid currentColor;outline-offset:-2px}
.controls #previous-button:not(:focus-visible),.controls #next-button:not(:focus-visible){position:absolute;width:1px;height:1px;min-width:0;min-height:0;padding:0;border:0;overflow:hidden;clip-path:inset(50%)}
#page-number{min-width:0;min-height:32px;padding:2px 10px;background:none;color:#5d4a2d;font-size:12px;letter-spacing:.06em;text-decoration:none}
.dialog-footer{flex-wrap:wrap;gap:6px 16px;justify-content:flex-start}
.dialog-footer a.quiet-button{color:inherit;display:inline-flex;align-items:center;font-size:10px}
.leaf-face{position:absolute;z-index:8;display:grid;place-items:center;pointer-events:none;overflow:hidden;backface-visibility:hidden;background:#f6ead5;will-change:transform;--shade:0}
.leaf-face::after{content:'';position:absolute;inset:0;background:#3b2a12;opacity:calc(var(--shade)*.2);pointer-events:none}
.turn-sheet{position:absolute;inset:0;z-index:2;display:grid;place-items:center;pointer-events:none}

@media (orientation:landscape){
 .reader{--side:min(47vw,calc(100svh - var(--header) - var(--footer) - 18px))}
 #scene{grid-template-columns:var(--side) var(--side);grid-template-rows:var(--side);background-image:url('assets/ui/book-paper.webp');background-size:100% 100%}
 #text-page{padding:9% 10%}
 .leaf-text{transform-origin:left center;background:#f6ead5 url('assets/ui/book-paper.webp') right center/200% 100% no-repeat}
 .leaf-picture{transform-origin:right center;background:#f6ead5 url('assets/ui/book-paper.webp') left center/200% 100% no-repeat}
}
@media (orientation:landscape) and (max-height:500px){
 body.reading{--header:36px;--footer:36px}
 .reading-hint{display:none}
 .reader-foot{padding-top:4px}
 #text-page{padding:5% 7%}
 .story-text,.ruby-on .story-text{font-size:14px;line-height:1.7;letter-spacing:.03em}
 .ruby-on .story-text{line-height:1.86}
}
@media (orientation:portrait){
 body.reading{--header:46px}
 .reader{--side:min(95vw,760px,calc((100svh - var(--header) - var(--footer) - 14px)/2));--text:var(--side)}
 #scene{grid-template-columns:var(--side);grid-template-rows:var(--side) var(--text);background-color:#f6ead5}
 #picture-page,.leaf-picture{background:#f6ead5 url('assets/ui/book-paper-v.webp') center top/100% 200% no-repeat}
 #text-page,.leaf-text{background:#f6ead5 url('assets/ui/book-paper-v.webp') center bottom/100% 200% no-repeat}
 #text-page{padding:12px 7%}
 .ruby-on .story-text{line-height:2}
 .brand-title{max-width:38vw}
 .leaf-text{transform-origin:center top}
 .leaf-picture{transform-origin:center bottom}
}
@media (orientation:portrait) and (max-height:680px){
 body.reading{--header:40px;--footer:40px}
 .reading-hint{display:none}
 .story-text{font-size:14px;line-height:1.72;letter-spacing:.03em}
 .ruby-on .story-text{font-size:14px;line-height:1.88;letter-spacing:.02em}
 #text-page{padding:8px 5%}
}

/* The way back to the shelf. */
.shelf-link{color:#5d4a2d;font-size:12px;letter-spacing:.06em;text-decoration:none;white-space:nowrap;padding:8px 4px;border-radius:4px}
.shelf-link:hover{text-decoration:underline;text-underline-offset:4px}
.shelf-link:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.cover-shelf-link{position:absolute;left:12px;top:8px;font-size:13px}
.cover{position:relative}
@media(prefers-reduced-motion:reduce){.caption-line,#chapter-page,.cover-actions button,.controls button{transition:none}}

/* ===== Sideways phone ===== The book takes the whole height. The title bar folds away (the cover
   is still in the menu), the page number is printed in the corner of the text page, and the menu
   sits at the top right. */
@media (orientation:landscape) and (max-height:500px){
 body.reading{--header:0px;--footer:0px}
 .reader{--side:min(47vw,calc((100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 12px)/2),calc(100svh - 14px))}
 body.reading .book-header{height:0;padding:0;overflow:visible}
 body.reading .book-header .brand{display:none}
 body.reading .menu-button{position:fixed;z-index:20;top:max(2px,env(safe-area-inset-top));right:max(2px,env(safe-area-inset-right));margin:0}
 .reader-foot{position:fixed;z-index:4;right:calc((100vw - 2*var(--side))/2 + 8px);bottom:calc((100svh - var(--side))/2 + 4px);width:auto;height:auto;padding:0}
 .reader-foot .controls{gap:8px}
 #page-number{min-height:24px;padding:0 6px;font-size:11px;opacity:.7}
 #text-page{padding:6% 8% 10%}
 .story-text{font-size:clamp(15px,calc(var(--side)*.045),18px);line-height:1.8;letter-spacing:.035em}
 .ruby-on .story-text{font-size:clamp(15px,calc(var(--side)*.045),18px);line-height:1.9;letter-spacing:.03em}
}

/* ===== Upright phone ===== A step smaller and a little tighter, so the text with furigana reads lighter. */
@media (orientation:portrait) and (max-width:500px){
 body.reading .story-text,body.reading.ruby-on .story-text{font-size:14px;letter-spacing:.03em}
 body.reading .story-text{line-height:1.85}
 body.reading.ruby-on .story-text{line-height:1.95}
}

/* ===== Three-panel pictures ===== The strips arrive with the story: the first page shows the top strip,
   the next page opens the second below it, and the last page shows all three. */
.is-triptych>img{transition:clip-path .8s ease}
.is-triptych[data-panel="0"]>img{clip-path:inset(0 0 66.8% 0)!important;animation:none}
.is-triptych[data-panel="1"]>img{clip-path:inset(0 0 33.4% 0)!important;animation:none}
.is-triptych[data-panel="2"]>img{clip-path:inset(0)!important;animation:none}

/* Closing page: only the title artwork, in the middle of the text page. */
#text-page.end-page{align-items:center;justify-content:center}
#text-page.end-page .story-text{width:100%;text-align:center}
.story-text .end-logo{display:block;width:min(78%,360px);height:auto;margin:0 auto}
