/* v2: the atmosphere belongs only to the poem, never the information pages. */
.home .hero,.score-preview{isolation:isolate;background:white}
.home .hero:before,.score-preview:before{content:'';position:absolute;z-index:-1;inset:-12% -10%;background:linear-gradient(100deg,var(--aur1,rgba(126,120,158,.48)),var(--aur2,rgba(168,140,150,.4)) 24%,var(--aur3,rgba(196,180,150,.3)) 49%,var(--aur4,rgba(108,110,150,.48)) 72%,var(--aur5,rgba(158,136,168,.4)));filter:blur(65px);opacity:.85;transform:translateX(var(--air-shift,0%))}
.home .soul,.score-souls img{filter:blur(4px) drop-shadow(0 10px 36px rgba(178,148,118,.17));opacity:.5}
.home .hero-caption{display:none}
.home .soul-stage{inset:8% max(3vw,calc((100vw - 980px)/2)) 14%}
.home .soul-1{left:75%;top:12%;width:26%}.home .soul-2{left:58%;top:28%;width:19%}.home .soul-3{left:48%;top:56%;width:17%}.home .soul-4{left:19%;top:31%;width:21%}.home .soul-5{left:9%;top:63%;width:17%}
@media(max-width:700px){.home .soul-stage{inset:10% 7% 18%}.home .soul{filter:blur(5px)}.home .hero:before{filter:blur(45px)}}
.home .hero-reading{display:block;height:auto;left:52%;top:35px;transform:none;width:auto}
.home .hero-poem{font-size:18px;font-weight:500;letter-spacing:.12em;color:#3e4847;line-height:1.7}
.reading-letter{display:inline;white-space:pre;transition:none}
.home .poet-sign{position:absolute;bottom:0;right:50px;white-space:nowrap;font-size:13px;margin:0;opacity:.7}
.home .hero-bottom{bottom:24px}.home .hero-progress{opacity:.5}
.score-preview{z-index:0}.score-preview #score-verse{align-self:flex-start;font-size:18px}
.reading-editor>p{margin-bottom:18px}.character-strip{display:flex;flex-wrap:wrap;gap:5px;margin:20px 0 25px}
.score-character{min-width:38px;min-height:52px;border:1px solid var(--line);position:relative;font-family:var(--serif);font-size:17px;padding:6px 9px 14px}
.score-character:after{content:'';position:absolute;bottom:5px;left:6px;height:2px;background:#7b9290;width:calc(var(--weight)*8px)}
.score-character[aria-pressed=true]{border-color:var(--ink);background:#eef3f0}.score-character.is-sounding{background:#e0e8e4}
.cue-row>label:first-of-type{grid-column:1/3;display:flex;align-items:center;justify-content:space-between;gap:15px}
.cue-row>label:nth-of-type(4){display:flex;align-items:center;justify-content:space-between;grid-column:1/3}
.cue-row .cue-time{grid-column:1/3;margin:0;font-size:12px;color:var(--muted)}
.spatial-stage{background:#fff}.spatial-poem{cursor:pointer}.spatial-poem span{line-height:1.65}.spatial-sign{opacity:.6}
.beach-scene{background:#e8e6dc;height:min(760px,80svh);min-height:570px;overflow:hidden}
.beach-scroll{position:absolute;inset:0;overflow:hidden;touch-action:pan-y pinch-zoom;cursor:zoom-in;scrollbar-width:none}
.beach-scroll.is-close{cursor:grab}.beach-scroll:active{cursor:grabbing}
.beach-world{position:absolute;left:0;top:0;background:#e8e6dc url('/assets/beach.webp') center/100% 100%;transform-origin:0 0;will-change:transform}
.shore-ground,.shore-water{position:absolute;left:0;width:1672px;max-width:none;pointer-events:none}
.shore-ground{top:0;height:941px}.shore-water{top:245px;height:245px}
.shore-water.shore-water-v7{top:250px;height:270px}
.shore-water.shore-water-v9{top:164px;height:356px}
.shore-daylight{position:absolute;inset:0;width:1672px;height:941px;max-width:none;pointer-events:none}
.stone-layer{position:absolute;inset:0;z-index:2;pointer-events:none}
.shore-stone{min-width:0;min-height:0;transform:translate(-50%,-50%);padding:0;border:0;background:none}
.shore-stone:disabled{opacity:1;pointer-events:none}.shore-stone img{width:var(--stone-size);height:var(--stone-size);max-width:none;object-fit:contain;filter:drop-shadow(0 1px 1.5px #625d501e);opacity:var(--stone-opacity,1);transition:opacity 1.8s}
.shore-stone:hover img,.shore-stone:focus-visible img{filter:drop-shadow(0 1px 1.5px #625d5030)}
.shore-stone.is-picked img{opacity:.7}.shore-stone.is-picked:after{display:none}
.shore-stone:focus-visible{outline:1px solid #405957;outline-offset:2px;border-radius:50%}
.shore-stone-focus{position:absolute;pointer-events:none}.shore-stone-focus:focus-visible{outline:1px solid #2c504d;box-shadow:0 0 0 2px #ffffffb3}
.beach-controls{position:absolute;right:20px;bottom:18px;display:flex;gap:1px;z-index:3}
.beach-zoom{display:flex;background:#fffffff2;border-radius:3px;box-shadow:0 2px 9px #34443b14;margin-right:7px}
.beach-zoom button:not(:disabled){opacity:.9}
.beach-controls button{width:44px;height:44px;padding:11px;border:0;background:transparent;color:#40534f;opacity:.66;transition:opacity .25s}
.beach-controls button:hover,.beach-controls button:focus-visible{opacity:1}.beach-controls button:disabled{opacity:.22}
.beach-controls svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round}.beach-controls svg[hidden]{display:none}
.beach-error{position:absolute;left:24px;bottom:70px;max-width:70%;font-size:14px;color:#293f38}
.beach-move{position:absolute;width:48px;height:48px;border:0;padding:2px;background:radial-gradient(circle,#ffffffa6,#fff0 72%);color:#3e5c55;z-index:3;opacity:.66;transition:opacity .25s}
.beach-move svg{width:44px;height:44px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
.beach-move:hover,.beach-move:focus-visible{opacity:1}.beach-move:disabled{opacity:0;pointer-events:none}
.beach-move-left{left:8px;top:calc(50% - 24px)}.beach-move-right{right:8px;top:calc(50% - 24px)}.beach-move-up{top:8px;left:calc(50% - 24px)}.beach-move-down{bottom:8px;left:calc(50% - 24px)}
.stone-object{position:relative;display:grid;width:100%;aspect-ratio:1;isolation:isolate}.stone-object>img{grid-area:1/1;width:100%;height:100%;object-fit:contain}
.stone-sheen{grid-area:1/1;pointer-events:none;mask-size:contain;mask-position:center;mask-repeat:no-repeat;background:radial-gradient(ellipse at 29% 20%,#ffffffb0 0%,#ffffff63 13%,#fff0 40%);opacity:0;mix-blend-mode:screen}
.beach #stone-dialog .inspect-object{width:min(330px,65vw);margin:25px auto 35px;filter:drop-shadow(2px 7px 10px #4c554713)}
.beach #stone-dialog{width:min(860px,calc(100% - 24px));max-height:calc(100dvh - 24px);background:radial-gradient(ellipse closest-side at 50% 46%,#fff 0%,#fff 54%,#ffffffed 66%,#ffffff80 82%,#ffffff00 100%);box-shadow:none;border:0;color:#293c35;padding:65px 60px 40px;overflow:auto}
.beach #stone-dialog::backdrop{background:#e6ebe533;backdrop-filter:blur(6px)}
.beach #stone-dialog[open]{animation:stone-appear .85s ease-out}
.beach #stone-dialog #inspect-image{width:100%;height:100%;margin:0}
.beach #stone-dialog .button{background:none;border:0;border-radius:0;box-shadow:none;color:inherit;font-family:var(--serif);font-size:16px;letter-spacing:.2em;min-height:44px;padding:12px 23px}
.beach #stone-dialog .button:hover,.beach #stone-dialog .button:focus-visible{text-decoration:underline;text-underline-offset:9px}
.beach #stone-dialog .dialog-close{right:20px;top:14px;width:44px;padding:10px;color:#3c5048}
.beach #stone-dialog .reading-text{min-height:620px;padding-top:35px}.beach #stone-dialog .reading-verse{font-size:18px}
.beach #stone-dialog .reading-image{opacity:1;left:9%;top:150px}
.beach #stone-dialog .reading-source{opacity:.65}.beach #stone-status:empty{display:none}
@keyframes stone-appear{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.beach #stone-dialog[open]{animation:none}}
@media(max-width:700px){.beach-controls{right:12px;bottom:12px}.beach #stone-dialog{padding:55px 16px 30px}.beach #stone-dialog .reading-text{padding-right:24%;min-height:650px}.beach #stone-dialog .reading-image{left:1%;top:175px}.beach #stone-dialog .reading-verse{font-size:17px}}
.beach-toolbar{top:auto;bottom:24px;left:50%;transform:translateX(-50%);gap:9px;padding:6px 15px;max-width:calc(100% - 36px);white-space:nowrap;background:#fffffff0;border:1px solid #ffffff80}
.beach-toolbar>span{display:none}.beach-toolbar button{font-size:22px}.beach-toolbar .shore-reset,.beach-toolbar .shore-wave-control{font-size:14px;padding:0 10px}
.shore-zoom-control{display:flex;gap:8px;align-items:center;font-size:12px;color:#425958}.shore-zoom-control input{width:180px}
.shore-note{top:22px;left:24px;right:auto;color:#374c48;background:#fffffff0;font-size:13px;padding:7px 14px}
.stone-dialog #inspect-image{width:240px;height:240px}.shore-art{background:#e8e6dc;overflow:hidden}
.pebble-door-world{position:absolute;width:max(100%,800px);aspect-ratio:1672/941;left:50%;top:50%;transform:translate(-50%,-50%);background:url('/assets/beach.webp') center/100% 100%}
.door-stone{position:absolute;max-width:none;object-fit:contain;filter:drop-shadow(0 1px 1px #625d501e)}
@media(max-width:700px){.beach-scene{height:620px;min-height:0}.beach-toolbar{bottom:20px;gap:2px;padding:5px 6px;flex-wrap:wrap;justify-content:center;width:320px}.shore-zoom-control input{width:100px}.beach-toolbar .shore-reset,.beach-toolbar .shore-wave-control{font-size:14px;padding:0 8px}.shore-note{left:18px;top:18px;font-size:12px}.stone-dialog #inspect-image{width:210px;height:210px}}
@media(max-width:700px){.spatial-poem{padding:10px 7px}.spatial-poem span{font-size:18px}.score-character{min-width:40px;min-height:52px}}
@media(max-width:700px){.home .hero-poem{font-size:16px;letter-spacing:.1em}.home .poet-sign{right:34px;font-size:12px}.home .hero-bottom{left:24px}.home .hero{min-height:690px}}

/* Reading first: a continuous typeset surface, not overlapping animated text. */
.reading-controls{display:flex;align-items:center;justify-content:center;gap:20px;flex-wrap:wrap;padding:12px 24px 22px;color:var(--ink);background:#fff}
.reading-controls button{min-height:44px;font-size:14px}.reading-controls button:disabled{opacity:.35}
.reading-controls output{font-family:var(--sans);font-size:13px;min-width:58px;text-align:center}
.reading-controls a{font-size:14px}.reading-controls input{width:150px;direction:rtl}
.reading-window{width:100%;overflow-x:auto;direction:rtl;scrollbar-width:thin;scrollbar-color:#bdc8c4 #fff;overscroll-behavior-x:contain;background:#fff;scroll-margin-top:24px}
.reading-window:focus-visible{outline:1px solid #687773;outline-offset:-2px}
.ribbon-track{display:flex;direction:rtl;width:max-content;min-width:100%;align-items:stretch;padding:28px 32px 52px;padding-left:var(--ribbon-tail,max(32px,calc(100vw - 7.5rem - 32px)));gap:0}
.ribbon-poem{direction:ltr;flex:0 0 auto;width:clamp(7.5rem,13vw,11rem);display:flex;flex-direction:column;align-items:center;padding:0;margin:0;background:#fff}
.verse-number{font-family:var(--sans);font-size:12px;line-height:1.5;color:#6b7471;letter-spacing:.06em;margin-bottom:30px}
.ribbon-verse{writing-mode:vertical-rl;direction:ltr;white-space:nowrap;font-family:var(--serif);font-weight:500;font-size:1.25rem;line-height:1.75;letter-spacing:.075em;color:#283632;margin:0;user-select:text}
.reading-sign{text-align:right;margin:16px 40px 0;font-family:var(--serif);font-size:14px;color:#56625e}
.ribbon-hint{text-align:center;margin:26px 24px 54px;font-size:14px;color:#56625e}
@media(max-width:700px){.reading-controls{gap:10px;padding:4px 20px 16px}.reading-controls .space-range-label{flex-basis:100%;text-align:center}.reading-controls input{width:180px}.ribbon-verse{font-size:1.125rem}.ribbon-track{padding-top:22px;padding-bottom:38px}.verse-number{margin-bottom:24px}.reading-sign{margin-right:28px}}
