:root{color-scheme:dark;--gold:#efc982;--cream:#fff1d5;--serif:"Hiragino Mincho ProN","Yu Mincho",YuMincho,"Noto Serif JP",serif;--sans:"Hiragino Maru Gothic ProN","Hiragino Sans","Yu Gothic",sans-serif}
*{box-sizing:border-box}html{min-height:100%;background:#142222}body{margin:0;min-height:100svh;color:var(--cream);font-family:var(--sans);position:relative;isolation:isolate;display:flex;flex-direction:column}
.room,.lamplight{position:absolute;inset:0;z-index:-1;pointer-events:none}
.room{background:#152526}
.room::before,.room::after{content:"";position:absolute;inset:0}.room::before{background:linear-gradient(90deg,rgba(5,17,20,.76) 0,rgba(5,19,23,.67) 24%,rgba(5,18,20,.08) 49%,transparent 75%),linear-gradient(180deg,#0817194a,transparent 30%,transparent 68%,#08191bde)}.room::after{box-shadow:inset 0 0 7vw #06101062}
.lamplight{background:radial-gradient(ellipse at 97% 29%,#fbae3e12,transparent 29%);animation:lamp 7s ease-in-out infinite alternate}@keyframes lamp{to{opacity:.45}}
button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:3px solid #ffe197;outline-offset:4px}button:disabled{cursor:default}
.mast{height:clamp(66px,9svh,88px);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,4vw,74px);background:linear-gradient(180deg,#07171bdd,#0b1b1c96);border-bottom:1px solid #ddbd804d;flex:none}
.brand{display:flex;align-items:center;gap:.7rem;font:600 clamp(1.1rem,1.65vw,1.7rem) var(--serif);letter-spacing:.14em;color:#fff0cb}.brand img{width:45px}.tools{display:flex;align-items:center;gap:10px}.tools button,.turn,.hotspot{border:1px solid #b89a64;border-radius:5px;display:inline-flex;align-items:center;justify-content:center;gap:.58em;min-height:45px;padding:0 1.05em;font-size:.93rem;font-weight:650;letter-spacing:.07em;background:linear-gradient(160deg,#253a3aec,#101f21f5);box-shadow:inset 0 0 0 2px #203031,0 4px 12px #05121545;color:#f6e4b8}
button svg{width:1.22em;height:1.22em;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.tools button:hover,.turn:not(:disabled):hover,.hotspot:hover{filter:brightness(1.22)}.tools button .loud,[aria-pressed=true] .mute{display:none}.tools button[aria-pressed=true] .loud{display:block}
main{width:min(100%,1900px);margin:auto;flex:1;display:flex;flex-direction:column;justify-content:center}.spread{position:relative;display:grid;grid-template-columns:26% 74%;align-items:center;min-height:clamp(450px,71svh,880px);padding:0 0 0 clamp(24px,4.8vw,91px)}
.intro{position:relative;z-index:1;pointer-events:none;align-self:center;padding-bottom:2.6rem;text-shadow:0 2px 12px #071514,0 0 24px #071514}.chapter{font-weight:600;font-size:clamp(.85rem,1.1vw,1.05rem);color:#ffdc99;letter-spacing:.13em;white-space:nowrap;display:flex;gap:.65em;align-items:center}.short-rule{width:22px;height:1px;background:#d4ad68}.chapter i{font-style:normal;font-size:.8em}h1{font:650 clamp(2.5rem,4.02vw,4.8rem)/1.42 var(--serif);margin:.25em 0 .26em;letter-spacing:.07em;white-space:nowrap;color:#fff2cd}.flourish{max-width:165px;display:flex;align-items:center;gap:7px;color:#e4b66c;font-size:.75rem;margin:10px 0 1.3rem}.flourish i{height:1px;background:linear-gradient(90deg,#e8bf76c4,#e8bf7617);flex:1}.flourish i:first-child{flex:.32;transform:rotate(180deg)}#words{font:600 clamp(1.02rem,1.29vw,1.38rem)/1.95 var(--serif);letter-spacing:.048em;margin:0;color:#fff2d8;overflow-wrap:anywhere}
.stage{position:relative;height:clamp(425px,72svh,910px);touch-action:pan-y;user-select:none;cursor:grab;min-width:0}.stage:active{cursor:grabbing}.stage canvas,.flat,#magic{position:absolute;inset:0;width:100%;height:100%}.stage canvas{opacity:0}.stage.ready canvas{opacity:1}.stage.ready .flat{visibility:hidden}.flat{display:grid;place-items:center}.flat img{width:100%;height:100%;object-fit:contain}
.hotspot{position:absolute;left:clamp(19%,var(--hot-x,54%),80%);top:clamp(20%,calc(var(--hot-y,62%) + 3%),89%);transform:translate(-50%,0);background:linear-gradient(145deg,#42311aee,#211e17ed);font-size:.87rem;min-height:40px;color:#ffdf9b;letter-spacing:.06em;white-space:nowrap;z-index:1;border-radius:24px;padding:0 1em;box-shadow:0 3px 14px #090e12aa,inset 0 0 0 2px #44392080}.hotspot:before{content:"";position:absolute;top:-8px;left:50%;border:1px solid #ffe7ad;background:#ffde8e;width:6px;height:6px;transform:rotate(45deg);box-shadow:0 0 10px #ffe58a}.hotspot svg{fill:#ffe3a255;width:1em}.stage.is-turning .hotspot{visibility:hidden}
#reply{position:absolute;z-index:2;left:clamp(24px,4.8vw,91px);bottom:4%;padding:.65em 1em;margin:0;max-width:38%;border-left:2px solid #cda15a;background:#102323e6;box-shadow:0 4px 18px #07141666;font:600 1.02rem/1.65 var(--serif);color:#ffe1a1}#reply:empty{display:none}
.journey{margin:4px clamp(20px,4vw,76px) clamp(15px,2.5svh,34px);padding:clamp(12px,2.5vh,26px) 3px 0;display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #e1ba775a;position:relative}.journey::before,.journey::after{content:"";position:absolute;top:-3px;width:5px;height:5px;background:#c6a569;transform:rotate(45deg)}.journey::before{left:0}.journey::after{right:0}.turn{font-size:1.05rem;padding:0 1.3em;min-height:48px}.turn:disabled{color:#c6c2a9;opacity:.53}.forward{background:linear-gradient(145deg,#efd29a,#d8ae6d);color:#322415;border-color:#f1d9a4;box-shadow:inset 0 0 0 2px #9d774880,0 4px 15px #0610107a}
.stops{display:flex;max-width:760px;width:65%;align-items:stretch;justify-content:center}.stops button{min-width:0;flex:1;background:none;border:0;position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;color:#cdcbb8;font-size:clamp(.78rem,1vw,.93rem);letter-spacing:.075em;white-space:nowrap;min-height:48px;text-shadow:0 2px 6px #071412}.stops button:before{content:"";position:absolute;top:10px;left:-50%;right:50%;height:1px;background:linear-gradient(90deg,transparent,#c9ac7299 18%,#c9ac7299 82%,transparent);pointer-events:none}.stops button:first-child:before{display:none}.stops i{position:relative;display:grid;place-items:center;background:#172827;border:1px solid #b3a17b;width:17px;height:17px;transform:rotate(45deg);margin:2px 0;font:normal 11px Georgia,serif;z-index:1}.stops i:after{content:"";width:4px;height:4px;background:#c1bfa6}.stops button[aria-current]{color:#ffe3a3}.stops button[aria-current] i{border-color:#fad78e;box-shadow:0 0 12px #e0ba5c5c}.stops button[aria-current] i:after{background:#ffda85;width:7px;height:7px}
#magic{pointer-events:none}.spark{position:absolute;left:var(--x);top:var(--y);color:#fff2aa;text-shadow:0 0 12px #ffd055;font-size:var(--size);animation:spark 1.8s ease-out both}.firefly{width:6px;height:6px;border-radius:50%;background:#fff8a7;box-shadow:0 0 7px 4px #ffeb898c}.hoot{font-family:Georgia,serif}@keyframes spark{0%{opacity:0;transform:translateY(10px) scale(.2)}28%{opacity:1}100%{opacity:0;transform:translateY(-35px) scale(1.05)}}
.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
dialog{width:min(720px,94vw);padding:clamp(19px,3vw,31px);color:#3e3327;background:#eee0bb url(paper.svg);border:5px double #aa8a56;border-radius:6px;box-shadow:0 24px 90px #030b11a8;max-height:90svh;overflow:auto}dialog::backdrop{background:#071517cc;backdrop-filter:blur(4px)}.dialog-head{display:flex;align-items:center;justify-content:space-between}.dialog-head h2{margin:.15em 0 .3em;font:650 1.8rem var(--serif);letter-spacing:.15em}.dialog-head p{margin:0;font-size:.85rem;color:#685530;letter-spacing:.08em}.dialog-head button{background:transparent;border:1px solid #9d825b;color:#443c2a;border-radius:50%;width:44px;height:44px;font:1.7rem var(--serif)}#entries button{color:#3f3320;min-height:44px;border:1px solid #8a744f;background:#f5e7c6;box-shadow:0 2px 5px #5a4b2c40;font-family:var(--serif);font-weight:650}
#entries button[aria-current]{background:#344c40;color:#ffebbd}#entries small{font:italic .94em Georgia,serif;margin-right:.3em}
@media(max-width:850px) and (min-width:651px){.spread{padding-left:24px;grid-template-columns:27% 73%}.intro{align-self:start;margin-top:12vh}h1{font-size:2.4rem}#words{font-size:.98rem}.stage{height:65svh}.stops{width:62%}.turn{padding:0 .85em}}
@media(max-width:650px){.mast{height:58px;padding:0 14px}.brand{gap:6px;letter-spacing:.06em;font-size:1.02rem}.brand img{width:31px}.tools{gap:6px}.tools button{font-size:.79rem;padding:0 .64em;gap:.3em;min-height:40px}.tools button svg{width:1.15em}.room{background-position:55% center}.room:before{background:linear-gradient(180deg,#081c2066,#0b1d20c4 18%,#12232536 38%,#0c1d2026 58%,#0c2222eb 85%),linear-gradient(90deg,#0a191c63,transparent 85%)}main{justify-content:flex-start}.spread{display:flex;flex-direction:column;align-items:stretch;min-height:0;padding:0}.intro{padding:0 20px;margin:clamp(13px,3.2svh,38px) 0 0;width:100%;display:contents}.chapter{padding:0 21px;margin-top:22px;font-size:.8rem;gap:.5em;order:0}.short-rule{width:16px}h1{font-size:clamp(1.65rem,7vw,2.45rem);margin:5px 20px 0;line-height:1.45;letter-spacing:.04em;order:1;text-shadow:0 2px 8px #071a1a}h1 br{display:none}.flourish{display:none}.stage{order:2;width:100%;height:clamp(255px,78vw,440px);margin:0}.story{order:3;padding:6px 22px 0;text-shadow:0 2px 10px #061717}#words{font-size:clamp(1.05rem,4.25vw,1.25rem);line-height:1.75;letter-spacing:.055em}.hotspot{min-height:36px;font-size:.76rem}.hotspot:after{content:"";position:absolute;inset:-5px 0}.spread #reply{position:static;order:4;max-width:none;margin:7px 22px 0;font-size:.94rem;line-height:1.65;padding:.3em .6em}.journey{display:grid;grid-template-columns:auto 1fr auto;gap:8px;margin:22px 16px 17px;padding:14px 0 0}.stops{width:100%;min-width:0;align-items:center;justify-content:center}.stops button{min-height:44px;justify-content:center}.stops button:before{top:50%}.stops button span{display:none}.stops i{width:13px;height:13px}.turn{min-height:45px;font-size:.92rem;padding:0 .8em}.turn svg{width:1.02em}.atlas{aspect-ratio:1/1.05}#entries button{font-size:.82rem;padding:5px 7px}#entries button:nth-child(2){left:33%;top:43%}#entries button:nth-child(3){left:69%;top:59%}#entries button:nth-child(4){left:76%;top:19%}}
@media(max-width:350px){.brand{font-size:.93rem}.tools button{padding:0 .45em}.stage{height:238px}.journey{gap:4px}.turn{padding:0 .65em}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important}}



/* The slider is a shaped strip of card emerging from a stitched pocket. */
.pull-control{--pull:0;position:absolute;right:6%;bottom:0;display:flex;align-items:center;gap:10px;z-index:2;color:#ffe6ae;user-select:none;font:600 .88rem var(--serif);letter-spacing:.08em;text-shadow:0 2px 7px #06100c}
.pull-rail{width:136px;height:46px;position:relative;display:block;background:linear-gradient(90deg,#132b2ad9,#172a26cc);border:1px solid #b9986499;border-radius:22px 4px 4px 22px;box-shadow:inset 0 0 0 3px #25332d,0 2px 5px #15201a77;overflow:hidden}
.pull-rail::before{content:"";position:absolute;left:9px;right:10px;top:50%;height:1px;background:repeating-linear-gradient(90deg,#ddc18b80 0 3px,transparent 3px 7px)}
.pull-paper{position:absolute;left:calc(6px + var(--pull)*75px);width:48px;height:32px;top:6px;color:#6e4223;background:linear-gradient(170deg,#ffebbf,#d3ad73);border:1px solid #947543;border-radius:15px 3px 3px 15px;box-shadow:0 2px 3px #050e0a8c,inset 0 0 0 2px #e8c999;display:flex;align-items:center;justify-content:center;gap:5px;pointer-events:none}
.pull-paper i{width:8px;height:8px;border:1px solid #795936;background:#34453a;border-radius:50%;box-shadow:0 0 0 2px #c2985d}.pull-paper b{font:17px Georgia,serif}.pull-rail:has(:focus-visible){outline:3px solid #ffdb86;outline-offset:2px}.pull-rail input{position:absolute;inset:0;margin:0;width:100%;height:100%;opacity:0;cursor:ew-resize;touch-action:none;appearance:none}.pull-rail input::-webkit-slider-thumb{appearance:none;width:53px;height:44px}.pull-rail input::-moz-range-thumb{width:53px;height:44px}.pull-rail input:disabled{cursor:default}
.breeze{position:relative;pointer-events:auto;margin:14px 0 0;display:inline-flex;align-items:center;justify-content:center;gap:.55em;padding:.35em .8em;min-height:42px;border:1px solid #c3b58780;border-radius:24px;background:#183837ba;color:#f7e7bb;font:600 .9rem var(--serif);letter-spacing:.08em}.breeze svg{width:22px;height:20px}.breeze:hover,.breeze[data-blowing]{background:#405951;color:#fff1c3}.play,#motion[aria-pressed=false] .pause{display:none}#motion[aria-pressed=false] .play{display:block}
#magic .wind-leaf{position:absolute;width:17px;height:8px;background:linear-gradient(165deg,#d4ae6b 0 48%,#88643c 49%);border-radius:3% 95%;left:var(--left);top:var(--top);animation:paper-gust 2.6s ease-out both;animation-delay:var(--delay)}@keyframes paper-gust{0%{opacity:0;transform:translate(-15px,9px) rotate(-20deg)}19%{opacity:.9}62%{transform:translate(48px,-19px) rotate(100deg)}100%{opacity:0;transform:translate(92px,0) rotate(200deg)}}
@media(max-width:850px) and (min-width:651px){.pull-control{bottom:0;right:4%}.intro{margin-top:8vh}.breeze{margin-top:8px}}
@media(max-width:650px){.pull-control{right:16px;bottom:-8px;gap:7px;font-size:.8rem}.pull-rail{height:42px;width:116px}.pull-paper{top:4px;left:calc(6px + var(--pull)*55px)}.story{padding-top:18px}.breeze{order:5;align-self:flex-start;margin:9px 0 0 20px;min-height:40px}.spread{padding-bottom:14px}.journey{margin-top:auto}.tools #sound span,.tools #motion span{display:none}.tools #sound,.tools #motion{width:40px;padding:0}.tools{gap:4px}#motion svg,#sound svg{width:17px;height:17px}.chapter{margin-top:15px}}
@media(max-width:355px){.mast{padding:0 9px}.brand{gap:3px}.brand img{width:26px}.tools #sound,.tools #motion{width:35px}}
.stage.is-pulling,.stage.is-pulling .hotspot{cursor:ew-resize}.stage.is-pulling .hotspot{opacity:.24}.motion-off .lamplight,.motion-off .spark,.motion-off .wind-leaf{animation:none!important}
.story-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;order:5;margin-top:12px}
.story-controls .breeze{margin:0}
#readBook{border-color:#dcbd80;color:#ffedc7}
.story-controls [aria-pressed=true]{background:#405951;border-color:#e4c387}
#voiceError{order:6;color:#fff0c5;font-size:.9rem}
.voice-credit{margin:1rem 0 0;text-align:center;font-size:.85rem}
@media(max-width:650px){.story-controls,#voiceError{margin:9px 20px 0}}

.shelf-button{padding:.2rem .4rem .2rem 0;border:0;background:none}
.shelf-label{font:600 1rem var(--serif);border:1px solid #b89a64;border-radius:5px;padding:.48em .7em;color:var(--cream);background:#192d2d}
.atlas{aspect-ratio:auto;min-height:0;background:none;border:none;overflow:visible}

#entries{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
#entries button{position:static;transform:none;display:flex;align-items:center;gap:.45rem;white-space:normal;padding:.35rem .6rem;border-radius:4px;font-size:1rem}
#entries button img{position:static;transform:none;width:30%;border-radius:2px}
#sourceCredit{font:400 .95rem/1.6 var(--sans);margin:1rem 0 0}
#sourceCredit a{color:#604524;margin-inline:.25em}
@media(max-width:850px){.shelf-button .brand-name{display:none}}
@media(max-width:650px){#entries button small{display:none}}
@media(min-width:651px){.grimm[data-page="1"] #title.long-title{font-size:clamp(1.65rem,2.8vw,3.4rem)}}
.play-parts{order:6;display:flex;flex-wrap:wrap;gap:.3rem .6rem;pointer-events:auto;margin-top:.45rem}
.play-parts[hidden]{display:none}
.play-parts button{border:0;color:#ffe7b5;background:#122421dd;text-decoration:underline;text-decoration-color:#ad955f;text-underline-offset:.28em;border-radius:3px;padding:.35rem .46rem;font:550 .91rem var(--serif);min-height:36px}
@media(max-width:650px){.play-parts{margin:.35rem 20px 0}.play-parts button{min-height:42px}}
@media(min-width:651px){main{justify-content:flex-start}.spread{padding-bottom:3.9rem}.stage{align-self:start}.journey{margin-top:auto}.spread #reply{bottom:1.1rem}}

.flat #stillDetail{opacity:1;object-fit:contain;pointer-events:none}
.flat.show-detail #poster{visibility:hidden}

.part-menu{pointer-events:auto;order:6;position:relative;width:fit-content;max-width:100%;margin-top:.45rem;font-family:var(--serif)}
.part-menu summary{cursor:pointer;min-height:36px;padding:.4rem .65rem;font-size:.95rem;color:#ffdda0;background:#142925e8;border-radius:4px;width:fit-content}
.part-menu summary:focus-visible{outline:2px solid #ffdc9b}
.part-menu[open] .play-parts{position:absolute;bottom:100%;left:0;z-index:3;width:min(330px,80vw);padding:.6rem;gap:.35rem;background:#162b29;border:1px solid #a68a61;border-radius:6px;box-shadow:0 5px 15px #08141299}
@media(max-width:650px){.part-menu{margin:.4rem 20px 0}.part-menu[open] .play-parts{position:static;margin:.25rem 0 0}.part-menu summary{min-height:40px}}
.flat{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);overflow:hidden}
@media(max-width:650px){.grimm #title{white-space:normal;text-wrap:balance}}
@media(max-width:380px){.grimm[data-page="1"] #title:not(.long-title) br{display:initial}}

.page-count{color:var(--cream);font:italic 1.05rem Georgia,serif;letter-spacing:.1em;background:none;border:0;min-height:44px;padding:0 .7em}
.stops button span{display:none}
.stops button{min-height:44px;justify-content:center}
.stops button:before{top:50%}
#entries button small{display:inline}
@media(min-width:651px){.page-count{display:none}.stops{width:min(54%,560px)}}
@media(max-width:650px){.stops{display:none}.page-count{justify-self:center}.atlas #entries{gap:.4rem}.atlas #entries button{font-size:.85rem;gap:.24rem;padding:.25rem}.atlas #entries img{width:27%}#title{white-space:normal;text-wrap:balance}}
.hotspot{top:clamp(18%,calc(var(--hot-y,62%) + 3%),calc(100% - 92px))}
@media(max-width:650px){
  .stage{margin-bottom:24px}
  .pull-control{bottom:-26px}
  .hotspot{top:clamp(18%,calc(var(--hot-y,62%) + 3%),calc(100% - 64px))}
}

.route-map{position:relative;margin:.25rem 0 .85rem;border:1px solid #b39c74;background:#e8d9b3}
.route-map img{display:block;width:100%;max-height:230px;object-fit:fill}
.route-map button{position:absolute;transform:translate(-50%,-50%);min-height:36px;padding:.2em .5em;border:1px solid #94764a;border-radius:3px;background:#f8eccc;color:#43371e;font:600 clamp(.72rem,1.5vw,.93rem) var(--serif)}
.route-map button:nth-of-type(1){left:19%;top:77%}
.route-map button:nth-of-type(2){left:41%;top:47%}
.route-map button:nth-of-type(3){left:64%;top:65%}
.route-map button:nth-of-type(4){left:82%;top:24%}
.route-map button{white-space:nowrap}
@media(max-width:480px){
  #indexDialog .dialog-head{position:sticky;top:-20px;z-index:2;padding:.3rem 0;background:#eee0bb url(paper.svg)}
  .atlas #entries{grid-template-columns:1fr}
  .atlas #entries button{display:grid;grid-template-columns:4.2rem 1.5rem 1fr;gap:.45rem;text-align:left;padding:.24rem .6rem;font-size:1rem}
  .atlas #entries button img{width:100%;height:2.6rem;object-fit:contain}
}

#peekView[hidden]{display:none}

.scene-share{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
.scene-share button{min-height:44px;padding:.4rem .9rem;border:1px solid #8b724c;border-radius:.4rem;background:#fff3d7;color:#433625}
.scene-share output{font-size:.85rem;overflow-wrap:anywhere}
#indexDialog #bookBlurb{font-size:.94rem;line-height:1.7}
