*{box-sizing:border-box}body{margin:0;background:#b6bba5;color:#f7f0d8;font-family:Georgia,'Songti SC','STSong',serif;overflow:hidden}canvas{display:block;touch-action:none}header{position:fixed;top:30px;left:36px;right:36px;display:flex;align-items:center;gap:20px;z-index:2;font-size:12px;letter-spacing:4px}header span{margin-right:auto}button{font:inherit;color:inherit;cursor:pointer;border:1px solid #f5ecd555;background:#192d2a55;padding:10px 16px;border-radius:2px}button:hover{background:#596657aa}button:focus-visible{outline:2px solid #fff}aside{position:fixed;left:48px;top:125px;pointer-events:none;text-shadow:0 2px 12px #25392e}small{font-size:12px;letter-spacing:5px}h1{font-weight:400;font-size:64px;margin:15px 0 18px;letter-spacing:12px}aside p{max-width:260px;font-size:15px;line-height:1.8}#progress{font-size:12px;letter-spacing:3px;color:#efe3b5}footer{position:fixed;bottom:25px;width:100%;text-align:center;font-size:12px;letter-spacing:1px;color:#fff8d9b0}i{padding:0 12px}#caption{position:fixed;bottom:110px;left:20%;width:60%;text-align:center;font-size:20px;line-height:1.8;text-shadow:0 2px 10px #123;pointer-events:none;transition:opacity .5s}#interact{position:fixed;bottom:65px;left:50%;transform:translateX(-50%);background:#e8dfb9;color:#243b35;min-width:160px}.veil{position:fixed;inset:0;background:linear-gradient(90deg,#142b2be8,#20332b55);display:grid;place-items:center;z-index:5}.veil section{text-align:center}.veil h2{font-size:76px;font-weight:400;letter-spacing:15px;margin:24px 0}.veil p{font-size:23px;line-height:2;letter-spacing:5px}.veil button{display:block;margin:36px auto 20px;min-width:220px;padding:15px}.veil em{font-style:normal;display:block;font-size:12px;line-height:2;color:#d9ddc3}#loading{position:fixed;inset:0;background:#233b35;display:grid;place-items:center;z-index:10}#touch{display:none;position:fixed;bottom:65px;left:20px;z-index:3}#touch button{padding:12px;min-width:42px;touch-action:none}[hidden]{display:none!important}@media(max-width:700px){header{top:20px;left:20px;right:20px;gap:8px}aside{top:90px;left:24px}h1{font-size:42px}aside p{max-width:180px;font-size:13px}footer{display:none}#touch{display:block}#caption{left:12%;width:76%;bottom:220px;font-size:17px}.veil h2{font-size:52px}.veil p{font-size:18px}#interact{bottom:30px}}

#transition{position:fixed;inset:0;background:#e8e4c9;opacity:0;pointer-events:none;z-index:4}button:disabled{opacity:.5}

#map{position:fixed;right:28px;bottom:65px;width:140px;height:140px;pointer-events:none;opacity:.85}@media(max-width:700px){#map{width:100px;height:100px;right:14px;bottom:85px}}

#guest-dialog{width:min(560px,calc(100% - 32px));max-height:85dvh;overflow:auto;border:1px solid #bcb39788;border-radius:4px;background:#23362ff5;color:#f2ebd6;padding:25px 28px;box-shadow:0 18px 70px #101d1866;font-family:Georgia,'Songti SC','STSong',serif}#guest-dialog::backdrop{background:#101d1855}#guest-dialog .guest-heading{display:flex;justify-content:space-between;align-items:center}#guest-dialog .guest-heading small{font-size:11px;color:#c7c9ae}#guest-dialog h2{font-size:28px;font-weight:400;letter-spacing:6px;margin:12px 0}#guest-dialog .guest-close{padding:7px 10px;font-size:12px}#guest-dialog .guest-words{font-size:17px;line-height:2;min-height:105px;margin:18px 0 23px}#guest-dialog .guest-choices{display:grid;gap:8px}#guest-dialog .guest-choices button{text-align:left;font-size:14px;line-height:1.5;padding:10px 13px;background:#35493d;border-color:#d3c9a32e}#guest-dialog .guest-choices button:hover{background:#4c6050}#guest-dialog .guest-note{display:block;color:#aab5a0;font-size:10px;letter-spacing:1px;line-height:1.7;margin-top:20px}@media(max-width:700px){#guest-dialog{padding:18px 20px}#guest-dialog .guest-words{font-size:15px;min-height:80px}#guest-dialog .guest-choices button{font-size:13px}}
@media(min-width:701px){#guest-dialog{width:480px;margin:auto 32px auto auto}.guest-words{min-height:90px}}
body:has(#guest-dialog[open]) #caption,body:has(#guest-dialog[open]) #interact{visibility:hidden}

/* The scene carries the story; interface remains a quiet margin. */
header{letter-spacing:3px}header button{background:#1e362e33;border-color:#efe8cd33;font-size:11px;padding:9px 13px}aside{top:110px;left:38px;max-width:250px}h1{font-size:54px;letter-spacing:10px;margin-bottom:14px}aside p{font-size:13px;max-width:220px;color:#f0ead6}#caption{white-space:pre-line;font-size:18px;letter-spacing:1px;bottom:112px}#map{width:112px;height:112px;opacity:.65;bottom:60px}footer{font-size:10px;color:#efe8d5a0;letter-spacing:.7px}#interact{font-size:13px;border-radius:2px;padding:12px 22px;box-shadow:0 4px 22px #14261c22}#skip-dream{position:fixed;right:32px;bottom:35px;z-index:5;background:#243a3077;font-size:12px}body[data-phase="reading"] aside,body[data-phase="reading"] #map,body[data-phase="reading"] footer,body[data-phase="reading"] #touch,body[data-phase="waking"] aside,body[data-phase="waking"] #map,body[data-phase="waking"] footer{opacity:0;pointer-events:none}body[data-phase="reading"]::before,body[data-phase="waking"]::before{content:"";position:fixed;inset:0;border-top:35px solid #17271b;border-bottom:35px solid #17271b;pointer-events:none;z-index:1}body[data-phase="reading"] header{top:48px}body[data-phase="waking"] #interact{display:none}aside,#map,footer{transition:opacity .7s}.veil{background:linear-gradient(90deg,#142a26e8,#273b2e22)}.veil h2{font-size:70px}.veil section{max-width:90vw}#guest-dialog{box-shadow:0 18px 70px #101d1866}@media(max-width:700px){aside{left:23px;top:90px;max-width:175px}h1{font-size:39px}aside p{font-size:12px;max-width:165px}#map{width:84px;height:84px;right:14px;bottom:98px}#caption{font-size:15px;bottom:205px;left:10%;width:80%}#skip-dream{right:16px;bottom:20px}body[data-phase="reading"]::before,body[data-phase="waking"]::before{border-width:22px}.veil h2{font-size:52px}}

#pause-note{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);padding:24px 34px;background:#1b302ce8;border:1px solid #e8dfbb44;z-index:4;text-align:center;font-size:23px;letter-spacing:5px;pointer-events:none}#pause-note span{display:block;font-size:12px;letter-spacing:1px;color:#d6d8c3;margin-top:15px}body.paused #touch,body.paused #interact{visibility:hidden}body[data-phase="waking"] #touch{opacity:0;pointer-events:none}@media(max-width:700px){#pause-note{width:260px;font-size:20px;padding:22px}}

body[data-moment]:not([data-moment=""]) aside,body[data-moment]:not([data-moment=""]) #map,body[data-moment]:not([data-moment=""]) footer,body[data-moment]:not([data-moment=""]) #touch{opacity:0;pointer-events:none}
body[data-moment="watch-fish"] aside,body[data-moment="watch-fish"] #map,body[data-moment="watch-fish"] footer,body[data-moment="watch-fish"] #touch{visibility:hidden}

body:not([data-phase="walk"]):not([data-phase="dream"]) #touch{display:none}body[data-phase="end"] aside,body[data-phase="end"] #map,body[data-phase="end"] footer,body[data-phase="end"] #caption{visibility:hidden}

/* Keep the ending title together on a narrow screen. */
@media(max-width:700px){#ending h2{font-size:clamp(25px,8.2vw,42px);letter-spacing:.12em;white-space:nowrap}#ending section{width:90vw}#ending p{letter-spacing:3px}}

body:has(#guest-dialog[open]) aside,body:has(#guest-dialog[open]) #map,body:has(#guest-dialog[open]) footer,body:has(#guest-dialog[open]) #touch{visibility:hidden}
#guest-dialog .guest-choices button[aria-pressed="true"]{background:#4c6050;border-color:#d3c9a366}

#loading.load-failed section{text-align:center;max-width:calc(100vw - 40px);padding:28px}#loading.load-failed h2{font-weight:400;font-size:26px;letter-spacing:3px}#loading.load-failed p{font-size:15px;line-height:1.8;color:#d9ddc3}#loading.load-failed button{margin-top:20px;min-width:160px}

/* The title screen owns the composition until the visitor enters. */
body:has(#intro:not([hidden])) aside,
body:has(#intro:not([hidden])) #map,
body:has(#intro:not([hidden])) footer,
body:has(#intro:not([hidden])) #caption,
body:has(#intro:not([hidden])) #touch,
body:has(#intro:not([hidden])) #interact {visibility:hidden}

.music-level{display:flex;align-items:center;gap:7px;font-size:10px;letter-spacing:1px;color:#e9e6ce}.music-level input{width:72px;accent-color:#d8d4ac;cursor:pointer}.music-level input:focus-visible{outline:2px solid #e9e6ce;outline-offset:4px}@media(max-width:700px){.music-level span{display:none}.music-level input{width:48px}header{gap:8px}header>span{letter-spacing:1px}header button{padding:9px 8px}}

#touch{user-select:none;-webkit-user-select:none}#touch button[data-held="true"]{background:#d4d0a3aa;color:#172b24;border-color:#f1e8bd;box-shadow:inset 0 0 0 1px #f1e8bd55}

@media(max-width:700px){#guest-dialog{width:calc(100% - 24px);max-height:52dvh;margin:auto 12px 12px;padding:14px 18px;overscroll-behavior:contain;scroll-padding-top:54px}#guest-dialog .guest-heading{position:sticky;top:-14px;z-index:1;background:#23362f;padding:5px 0}#guest-dialog h2{font-size:25px;margin:8px 0}#guest-dialog .guest-words{font-size:14px;min-height:0;margin:12px 0 16px}#guest-dialog .guest-note{margin-top:14px}}

#guest-dialog{scrollbar-width:thin;scrollbar-color:#87917b #23362f;color-scheme:dark}#guest-dialog::-webkit-scrollbar{width:7px}#guest-dialog::-webkit-scrollbar-track{background:#23362f}#guest-dialog::-webkit-scrollbar-thumb{background:#87917b;border-radius:7px}

/* Keep soundtrack controls usable above the opening/ending veil. */
body[data-phase="intro"] header,body[data-phase="end"] header{z-index:6}

.touch-guide{display:none}@media(max-width:700px){.touch-guide{display:block;margin-top:8px;color:#e4e1c7}}

#loading.loading-progress:not(.load-failed) section{text-align:center;width:min(320px,calc(100vw - 56px));color:#eee7ce}#loading.loading-progress:not(.load-failed) small{font-size:10px;letter-spacing:6px;opacity:.65}#loading.loading-progress:not(.load-failed) h2{font-size:52px;font-weight:400;letter-spacing:13px;margin:28px 0 32px}#loading.loading-progress:not(.load-failed) p{font-size:14px;letter-spacing:2px;line-height:1.8;margin-bottom:22px}#loading.loading-progress:not(.load-failed) progress{display:block;width:100%;height:2px;border:0;border-radius:0;appearance:none;-webkit-appearance:none;background:#ece3bd22;color:#d9c891}#loading.loading-progress:not(.load-failed) progress::-webkit-progress-bar{background:#ece3bd22}#loading.loading-progress:not(.load-failed) progress::-webkit-progress-value{background:#d9c891}#loading.loading-progress:not(.load-failed) progress::-moz-progress-bar{background:#d9c891}#loading.loading-progress:not(.load-failed) section>span{display:block;font-size:11px;line-height:1.8;letter-spacing:1px;opacity:.65;margin-top:18px}

/* Desktop exploration: a compact objective, with details kept inside the journal. */
#journal-toggle,#map-toggle{display:none}
@media(min-width:701px){
 header{top:26px;left:32px;right:32px;gap:12px}header>span{font-size:11px;color:#f4edd3cc}header button{background:#20332966;backdrop-filter:blur(8px);border-radius:3px}
 #journal-toggle{display:block;order:5}aside{top:86px;left:32px;max-width:310px;padding:13px 18px 12px;border-left:2px solid #dbc78f99;background:linear-gradient(90deg,#1c302bc9,#1c302b55 80%,transparent);border-radius:0 3px 3px 0}aside small{font-size:10px;letter-spacing:2px;color:#e5d5ac}aside h1{display:none}aside p{max-width:280px;margin:8px 0 0;font-size:13px;line-height:1.75;color:#fff3d8}#progress:empty{display:none}#progress{margin-top:9px;font-size:10px;letter-spacing:2px}
 footer{display:flex;justify-content:center;align-items:center;gap:22px;bottom:25px;font-size:11px;color:#f5ebd0dd;text-shadow:0 1px 5px #102219}footer span{display:flex;align-items:center;gap:5px}kbd{display:inline-block;font:10px Georgia,serif;min-width:22px;padding:4px 5px;text-align:center;border:1px solid #e1dcc166;border-bottom-width:2px;border-radius:3px;color:#f6edd8;background:#2033298c;letter-spacing:.5px}
 #map{opacity:0;transform:translateY(8px);transition:opacity .25s,transform .25s;right:32px;bottom:94px;width:138px;height:138px}body.map-open #map{opacity:.9;transform:none}#map-toggle{display:block;position:fixed;right:32px;bottom:30px;font-size:11px;background:#20332988;border-color:#e1dcc144;border-radius:3px;padding:9px 13px}#map-toggle[aria-pressed="true"]{border-color:#e4d19caa}
 body:not([data-phase="walk"]):not([data-phase="dream"]) #map-toggle,body[data-moment]:not([data-moment=""]) #map-toggle,body:has(#guest-dialog[open]) #map-toggle{visibility:hidden}
 #caption{bottom:128px;font-size:19px;line-height:1.95;color:#fff2d5;text-shadow:0 2px 7px #11241b,0 1px 20px #11241b}#interact{bottom:70px;border-radius:4px;background:#e8d9b4f0;border-color:#fff0cc99;box-shadow:0 6px 30px #10221755;letter-spacing:2px}
}
#journey-journal{width:min(790px,calc(100vw - 80px));padding:32px 38px;border:1px solid #cabb8d66;border-radius:5px;background:#26392ff7;color:#f2e8ca;box-shadow:0 30px 100px #091b1577;max-height:85vh;overflow:auto}#journey-journal::backdrop{background:#0e211c88;backdrop-filter:blur(5px)}.journal-top{display:flex;justify-content:space-between;align-items:center}.journal-top small{font-size:10px;letter-spacing:3px;color:#cdbd94}.journal-close{font-size:11px;padding:8px 12px;background:transparent}#journal-title{font-size:34px;font-weight:400;letter-spacing:7px;margin:22px 0 15px}.journal-lead{font-size:14px;line-height:1.9;color:#e4d9bd;margin-bottom:25px}.journal-pages{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #e0d2a533;border-bottom:1px solid #e0d2a533}.journal-pages article{padding:23px 18px 25px;border-right:1px solid #e0d2a522}.journal-pages article:first-child{padding-left:0}.journal-pages article:last-child{border-right:0}.journal-pages small{font-size:10px;letter-spacing:2px;color:#d6be83}.journal-pages article p{font-size:17px;line-height:1.9;min-height:65px;margin:17px 0}.journal-pages article span{font-size:11px;line-height:1.8;color:#d2cfb2}.journal-pages .unseen{opacity:.45}.journal-controls{display:flex;flex-wrap:wrap;gap:15px 22px;margin-top:24px}.journal-controls span{font-size:11px;color:#ded8bd;display:flex;align-items:center;gap:7px}.journal-foot{font-size:11px;color:#adae94;margin:25px 0 0;letter-spacing:2px}body:has(#journey-journal[open]) #pause-note{visibility:hidden}body:has(#journey-journal[open]) aside,body:has(#journey-journal[open]) footer,body:has(#journey-journal[open]) #caption,body:has(#journey-journal[open]) #map,body:has(#journey-journal[open]) #map-toggle{visibility:hidden}
@media(min-width:701px){body[data-moment]:not([data-moment=""]) #journal-toggle{visibility:hidden}}
#tree-story,#pond-story,:is(#gourd-story,#turtle-story){width:460px;max-width:calc(100vw - 48px);max-height:80vh;overflow:auto;margin:auto 32px auto auto;padding:28px 30px;background:#22362ff2;color:#f4e9cc;border:1px solid #d3c39966;border-radius:4px;box-shadow:0 20px 80px #11271b66}#tree-story::backdrop,#pond-story::backdrop,:is(#gourd-story,#turtle-story)::backdrop{background:#14281b22}.story-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.story-heading small{font-size:10px;letter-spacing:2px;color:#d3c399}.story-close{font-size:11px;padding:7px 10px;background:transparent}#tree-story h2,#pond-story h2,:is(#gourd-story,#turtle-story) h2{font-size:32px;font-weight:400;letter-spacing:6px;margin:24px 0}.story-words{font-size:17px;line-height:2.1;min-height:140px}.story-choices{display:grid;gap:10px;margin:25px 0}.story-choices button{text-align:left;font-size:13px;line-height:1.7;padding:12px 15px;background:#4c604144;border-color:#cabb8d44}.story-choices button:hover{background:#6a795666}.story-source{display:block;font-size:10px;letter-spacing:1px;line-height:1.8;color:#afb69b}.journal-tree{font-size:12px;line-height:1.9;color:#d9cba8;border-bottom:1px solid #e0d2a533;padding:17px 0}body:has(#tree-story[open]) aside,body:has(#tree-story[open]) footer,body:has(#tree-story[open]) #caption,body:has(#tree-story[open]) #interact,body:has(#tree-story[open]) #map,body:has(#tree-story[open]) #map-toggle,body:has(#tree-story[open]) #journal-toggle{visibility:hidden}
canvas:not(#map):focus{outline:none}

body:has(#pond-story[open]) aside,body:has(#pond-story[open]) footer,body:has(#pond-story[open]) #caption,body:has(#pond-story[open]) #interact,body:has(#pond-story[open]) #map,body:has(#pond-story[open]) #map-toggle,body:has(#pond-story[open]) #journal-toggle{visibility:hidden}
#footsteps-toggle{font-size:11px;padding:7px 11px;background:#354b3977;border-color:#e1dcc144;letter-spacing:1px}#footsteps-toggle[aria-pressed="false"]{opacity:.65}

#ending .ending-afterword{max-width:36em;margin:20px auto 24px;padding:0 24px;white-space:pre-line;font-size:16px;line-height:1.9;letter-spacing:1px;color:#dfdfcb}

.flight-hint{display:none}body[data-phase="dream"] footer .flight-hint{display:inline-flex;align-items:center;gap:5px}

body:has(:is(#gourd-story,#turtle-story)[open]) :is(aside,footer,#caption,#interact,#map,#map-toggle,#journal-toggle){visibility:hidden}

#ending .ending-actions{display:flex;justify-content:center;gap:14px;margin:30px auto 16px}#ending .ending-actions button{margin:0;min-width:190px}#ending #restart{background:transparent;color:#d9ddc3;border-color:#f5ecd533}@media(max-width:700px){#ending .ending-actions{flex-direction:column;align-items:center;gap:10px;margin-top:20px}#ending .ending-actions button{width:min(280px,85vw);padding:12px}}

#context-recovery{position:fixed;inset:0;z-index:1000;background:#233b35f5;display:grid;place-items:center;text-align:center}#context-recovery section{max-width:34em;padding:28px}#context-recovery h2{font-size:30px;font-weight:400;letter-spacing:3px;margin:24px 0}#context-recovery p{line-height:1.9;color:#dfdfcb}#context-recovery button{margin:16px 6px 8px}#context-recovery .context-reload-note{display:block;letter-spacing:1px;font-size:11px;opacity:.65}

#render-quality-control{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px 18px;padding:18px 0;border-top:1px solid #e0d2a533;font-size:13px}#render-quality-control select{padding:7px 12px;background:#293f32;color:#e9e2c7;border:1px solid #cabb8d66;border-radius:2px;font:inherit}#render-quality-control small{grid-column:1/-1;line-height:1.8;font-size:11px;color:#b8bca2}

#fullscreen-toggle{order:6}#fullscreen-status{position:fixed;left:50%;bottom:45px;transform:translateX(-50%);z-index:20;max-width:80vw;padding:12px 18px;background:#22362ff2;border:1px solid #d3c39966;color:#f4e9cc;font-size:12px;line-height:1.8;letter-spacing:1px}body:has(dialog[open]) #fullscreen-toggle{visibility:hidden}

body[data-phase="dream"] footer .hurry-hint{display:none}
@media(max-width:700px){footer .hurry-hint{display:none}}

/* A quiet author credit beneath the invitation to enter. */
#intro .author-home{display:table;margin:16px auto 0;padding:6px 10px;color:#d9ddc3;font-size:12px;letter-spacing:2px;text-decoration:none;text-underline-offset:5px}#intro .author-home span{font-size:11px;letter-spacing:0}#intro .author-home:hover{color:#f7f0d8;text-decoration:underline}#intro .author-home:focus-visible{outline:1px solid #f7f0d8;outline-offset:4px;border-radius:2px}
