:root{color-scheme:dark;--ink:#25152e;--paper:#f7edda;--gold:#e8b768;--muted:#c6b2ca}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 0,#49304a,#211524 68%);color:var(--paper);font-family:Georgia,'Times New Roman',serif}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;font:inherit;color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #ffe6a8;outline-offset:5px}button:disabled{cursor:default;opacity:.45}header{max-width:1440px;margin:auto;padding:23px 44px;display:flex;justify-content:space-between;align-items:center;gap:20px}.wordmark{color:var(--paper);text-decoration:none;font-size:17px}.wordmark em{color:var(--gold)}.tools{display:flex;gap:6px}.tools button,.hint{border:1px solid #b696b44a;border-radius:30px;background:transparent;padding:12px 16px;font:12px system-ui,sans-serif;min-height:44px}.tools button:hover,.hint:hover{background:#ffffff10}main{max-width:1352px;padding:0 30px;margin:auto}.chapter{display:flex;align-items:center;justify-content:center;gap:16px;font:10px system-ui;letter-spacing:.22em;color:var(--gold);margin:12px 0 19px}.chapter i{height:1px;width:42px;background:#ad7c54}.theatre{position:relative;isolation:isolate;overflow:hidden;min-height:590px;height:min(66vw,720px);border-radius:16px 16px 5px 5px;box-shadow:0 18px 80px #0e071f80,inset 0 0 0 1px #f2bf6b70;border:1px solid #e6af624a;background:#56304f}.room,.shade{position:absolute;inset:0;z-index:-2}.room{background:url('assets/bedroom.webp') 55% 50%/cover}.shade{z-index:-1;background:linear-gradient(90deg,#21162ced 0%,#24152bbf 32%,#35203930 66%,#2212290a),linear-gradient(0deg,#22152bdb,transparent 25%)}.character{position:absolute;right:0;bottom:28px;width:64%;height:95%;display:flex;align-items:flex-end;justify-content:center;transform-origin:60% 90%;animation:breathe 6s ease-in-out infinite;pointer-events:none}.character img{height:100%;width:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 14px 12px #21132755);transition:opacity .18s}.story{position:absolute;left:5%;top:20%;width:35%;z-index:3}.eyebrow{font:10px system-ui,sans-serif;letter-spacing:.18em;color:var(--gold);font-weight:600}h1{font-weight:400;font-size:clamp(44px,5.7vw,82px);line-height:.98;letter-spacing:-.035em;margin:20px 0 23px}h1 em{color:#efd3a1}p{font-size:18px;line-height:1.5;margin:0 0 15px}.aside{color:#cab4c6;font-size:15px;max-width:300px}.primary{border:1px solid #f4ce8c;background:#edc17d;color:#302034;border-radius:7px;padding:16px 22px;font:600 14px system-ui,sans-serif;box-shadow:0 4px 0 #8b5c40;min-height:50px;transition:transform .15s,background .15s}.primary:hover:not(:disabled){background:#ffdaa0;transform:translateY(-2px)}.primary span{margin-left:16px}.story .primary{margin-top:13px}.scene-label{position:absolute;right:30px;top:28px;font:12px/1.6 Georgia;color:#fff0d1;text-shadow:0 2px 6px #25152e;text-align:right;z-index:2}.scene-label em{opacity:.8}.scene-footer{position:absolute;bottom:0;left:0;right:0;padding:18px 28px;display:flex;justify-content:space-between;font:10px system-ui;letter-spacing:.12em;color:#eddbc7;background:linear-gradient(transparent,#24172b90)}.play-panel{padding:28px 34px;background:#302136;border:1px solid #84607f60;border-top:0;border-radius:0 0 14px 14px}.prompt-row{display:flex;justify-content:space-between;align-items:center;gap:15px}h2{font-weight:400;font-size:28px;line-height:1.2;margin:8px 0 18px}.choices{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:5px}.item{display:flex;align-items:center;text-align:left;gap:20px;padding:12px 18px;background:#47334c;border:1px solid #896881;border-radius:10px;min-height:110px;transition:.15s}.item:hover{background:#553d58;transform:translateY(-2px)}.item[aria-pressed=true]{border:2px solid var(--gold);padding:11px 17px;background:#57404e}.item strong{display:block;font-size:21px;font-weight:400}.item small{font:13px/1.4 system-ui;color:#d8c8db;display:block;margin-top:6px}.object{display:block;width:78px;height:78px;flex-shrink:0;border-radius:50%;background-image:url('assets/objects.webp');background-size:200% 100%;background-color:white;box-shadow:0 3px 10px #170b2833}.object.flute{background-position:left center}.object.brush{background-position:right center}.select-mark{font:24px system-ui;margin-left:auto;color:var(--gold)}.action-row{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:22px}.action-row p{font:14px/1.5 system-ui;color:#d7c2d4;margin:0}.closing{padding:32px 38px;background:#f2e6cd;color:#382c3b;border-radius:0 0 14px 14px;display:grid;grid-template-columns:1fr 130px;gap:20px}.closing .eyebrow{color:#87603a}.closing p{font-size:16px;max-width:600px}.closing .note{font:12px system-ui;color:#766579}.closing .primary{grid-column:1/-1;justify-self:start}.keepsake{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font:13px system-ui}.keepsake strong{margin-top:5px}.keepsake .object{width:95px;height:95px}footer{text-align:center;font:11px/1.6 system-ui;color:#b69db8;padding:22px 10px 30px}footer span{margin:0 8px}[hidden]{display:none!important}.dust{position:absolute;inset:0;background:radial-gradient(circle at 70% 21%,#fff3bb90 0 1px,transparent 2px),radial-gradient(circle at 40% 35%,#fff3bb60 0 1px,transparent 3px),radial-gradient(circle at 85% 50%,#fff3bb60 0 1px,transparent 2px);animation:drift 9s alternate ease-in-out infinite;pointer-events:none}[data-state=success] .character{animation:sway 3s ease-in-out infinite}[data-state=fail] .character{animation:shake .5s ease-in-out 2}[data-state=choose] .story,[data-state=fail] .story,[data-state=success] .story{top:25%}[data-state=choose] h1,[data-state=fail] h1,[data-state=success] h1{font-size:clamp(38px,4.8vw,64px)}@keyframes breathe{50%{transform:translateY(-4px) rotate(.3deg)}}@keyframes sway{50%{transform:rotate(-1deg) translateY(-3px)}}@keyframes shake{25%{transform:rotate(-2deg)}75%{transform:rotate(2deg)}}@keyframes drift{to{transform:translate(12px,-13px);opacity:.4}}
@media(max-width:700px){header{padding:14px 16px;gap:10px}.wordmark{font-size:14px;max-width:150px;line-height:1.25}.wordmark em{display:block}.tools{gap:4px}.tools button{font-size:10px;padding:9px 10px}main{padding:0 12px}.chapter{font-size:8px;gap:9px;margin:10px 0 13px;letter-spacing:.14em}.theatre{height:auto;min-height:0;padding-top:100%;overflow:hidden}.room{background-position:55% top;background-size:auto 76%;background-repeat:no-repeat;background-color:#342137}.shade{background:linear-gradient(0deg,#26182e 0%,#26182e 23%,transparent 65%)}.character{width:92%;right:3%;top:12px;bottom:auto;height:64%;z-index:0}.scene-label{top:14px;right:15px;font-size:9px}.story{position:relative;left:auto;top:auto!important;width:auto;padding:0 23px 53px;margin-top:-13%;min-height:240px}.eyebrow{font-size:8px;letter-spacing:.14em}h1,[data-state] h1{font-size:39px!important;line-height:1.02;margin:11px 0 13px}h1 br{display:none}h1 br:after{content:' '}h1 em{display:inline}p{font-size:16px;line-height:1.4;margin-bottom:10px}.aside{font-size:13px;max-width:none}.story .primary{margin-top:9px;width:100%}.scene-footer{padding:14px 15px;font-size:8px;letter-spacing:.05em}.scene-footer #goal{max-width:160px;text-align:right}.play-panel{padding:20px 16px}.prompt-row{align-items:flex-start}.hint{font-size:10px;padding:8px 12px;white-space:nowrap;margin-top:8px}h2{font-size:23px}.choices{gap:10px}.item{flex-direction:column;padding:12px 9px;gap:8px;position:relative;text-align:center;min-height:180px}.item[aria-pressed=true]{padding:11px 8px}.object{width:66px;height:66px}.item strong{font-size:18px}.item small{font-size:11px}.select-mark{position:absolute;right:9px;top:3px;font-size:18px}.action-row{display:block;margin-top:17px}.action-row .primary{width:100%;margin-top:13px}.action-row p{font-size:12px;min-height:34px}.closing{padding:24px 22px;grid-template-columns:1fr}.closing h2{font-size:27px}.keepsake{flex-direction:row;justify-content:flex-start;gap:12px}.keepsake .object{width:60px;height:60px}.closing .primary{width:100%}footer{font-size:9px}footer span{display:none}#game:not([data-state=intro]) .story{min-height:180px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:700px){.character{height:90vw;max-height:355px;top:16px}.story{margin-top:0;padding-top:14px;background:linear-gradient(#26182e00,#26182e 22%)}h1 em{margin-left:.16em}.room{background-size:auto 65%}}
/* Grounded stage: full-length character, fixed foot contact and a visible floor. */
.room{background-image:url('assets/room-grounded.webp');background-position:55% center}
.character{right:4%;bottom:8%;width:46%;height:87%;animation:none;transform:none}
.character img{filter:none;object-position:center bottom;position:relative;z-index:1}
.character:before{content:'';position:absolute;width:40%;height:2.6%;bottom:.6%;left:30%;background:#241326a8;border-radius:50%;filter:blur(5px)}
[data-state=success] .character,[data-state=fail] .character{animation:none;transform:none}
@media(max-width:700px){
body{min-height:100svh}header{height:56px;padding:6px 12px}.tools button{min-height:44px}.wordmark{font-size:12px}
main{height:calc(100svh - 56px);min-height:540px;display:flex;flex-direction:column;padding:0 10px 8px}.chapter{flex:none;height:21px;margin:0;font-size:8px}
.theatre{flex:1;min-height:300px;height:auto;padding:0;overflow:hidden}
.room{inset:0 0 110px;background-size:cover;background-position:57% center}.shade{inset:0 0 100px;background:linear-gradient(0deg,#26182e99,transparent 30%)}
.character{top:3%;right:12%;bottom:126px;width:54%;height:calc(97% - 126px);max-height:none;z-index:0}.character:before{bottom:.7%;height:2.5%}
.story{position:absolute;left:0;right:0;bottom:0;top:auto!important;width:auto;min-height:0!important;height:110px;padding:11px 16px;background:#28192f;display:flex;flex-direction:column;justify-content:center}
.story .eyebrow,.story .aside{display:none}h1,[data-state] h1{font-size:24px!important;margin:0 0 6px;line-height:1.08}.story p{font-size:13px;line-height:1.35;margin:0}.story h1 em{margin-left:.12em}.story .primary{margin-top:9px;padding:10px 12px;min-height:44px}.scene-label{font-size:8px;top:8px;right:10px}.scene-footer{display:none}
#game[data-state=intro] .room{bottom:158px}#game[data-state=intro] .shade{bottom:148px}#game[data-state=intro] .character{bottom:174px;height:calc(97% - 174px)}#game[data-state=intro] .story{height:158px}
.play-panel{flex:none;padding:9px 11px 10px}.prompt-row{align-items:center;gap:8px;min-height:42px}.prompt-row .eyebrow{display:none}.prompt-row h2{font-size:16px;line-height:1.2;margin:0}.hint{font-size:10px;padding:6px 9px;margin:0;min-height:44px}.choices{margin-top:7px;gap:8px}.item{min-height:63px;height:63px;flex-direction:row;text-align:left;gap:8px;padding:7px}.item[aria-pressed=true]{padding:6px}.item .object{width:43px;height:43px}.item strong{font-size:15px}.item small,.select-mark{display:none}.action-row{margin-top:6px;display:flex;align-items:center;gap:8px}.action-row p{font-size:10px;line-height:1.25;min-height:0;flex:1}.action-row .primary{width:49%;font-size:11px;padding:9px 8px;margin:0;min-height:44px}
.closing{flex:none;padding:12px 16px;display:block}.closing h2{font-size:21px;margin:4px 0 7px}.closing p{font-size:12px;line-height:1.3;margin-bottom:7px}.closing .note,.keepsake{display:none}.closing .primary{font-size:12px;min-height:44px;padding:10px 14px}.closing .eyebrow{font-size:8px}main>footer{display:none}
}
@media(max-width:700px){.theatre{max-height:480px}.character{width:72%;right:0}#game[data-state=intro] .theatre{max-height:500px}}
/* Close storybook framing, with the illustrated action above its controls. */
.room{background-image:url('assets/bedroom.webp');background-position:55% center}
.character{right:0;bottom:0;width:64%;height:97%;overflow:hidden;top:auto}
.character:before{display:none}.character img{position:absolute;height:110%;width:100%;object-fit:contain;bottom:-12%;object-position:center bottom}
.bed-book{position:absolute;left:39%;bottom:14%;width:100px;height:120px;object-fit:contain;transform:rotate(-13deg);filter:drop-shadow(3px 7px 4px #1b122965);z-index:0}
.theatre{border:2px solid #a57c50;box-shadow:0 0 0 5px #301e32,0 0 0 6px #806042,0 15px 50px #160d25}
.wordmark{font-family:Georgia,serif;letter-spacing:.02em}.wordmark em{font-size:1.08em}.chapter{font-family:Georgia,serif;letter-spacing:.17em}
.play-panel{background:linear-gradient(110deg,#f1e2c4,#e7d2b1);color:#38273c;border-color:#ba9164;box-shadow:inset 0 0 22px #8c623119}
.play-panel .eyebrow{color:#845b35}.prompt-row h2{font-style:italic}.hint{color:inherit;font-family:Georgia,serif;border-color:#ad8a6566}
.item{background:linear-gradient(140deg,#fff5de,#e6cfa8);border:1px solid #a58359;box-shadow:inset 0 0 0 3px #f9ead1,0 3px 0 #b08e67;color:#392c3c;border-radius:6px}
.item:hover{background:#fff0cc}.item[aria-pressed=true]{background:#e5c58b;border-color:#684d38;box-shadow:inset 0 0 0 2px #eacf9a,0 2px 0 #8c6e48}
.item small,.action-row p{color:#6b5364}.select-mark{color:#755533}.item .object{box-shadow:0 2px 7px #523e2f2b}.primary{font-family:Georgia,serif;font-size:16px;font-weight:700;letter-spacing:.015em;border-radius:5px;background:linear-gradient(#f9dca2,#dfaf65);border-color:#9f7140;box-shadow:inset 0 0 0 2px #f5d395,0 3px 0 #85573d}.tools button{font-family:Georgia,serif}.closing{border:1px solid #ba9164}
@media(max-width:700px){
.theatre{box-shadow:0 0 0 2px #301e32,0 0 0 3px #806042;max-height:480px}
.room{bottom:110px;background-size:cover;background-position:center 43%}.character{right:-4%;top:auto;bottom:110px;width:86%;height:calc(100% - 110px);max-height:none}
.character img{height:118%;width:100%;bottom:-16%;object-fit:contain}
#game[data-state=intro] .character{top:auto;bottom:158px;height:calc(100% - 158px)}
.bed-book{left:4%;bottom:128px;width:72px;height:92px;transform:rotate(-12deg)}#game[data-state=intro] .bed-book{bottom:176px}
.story{background:#2e1e35;border-top:1px solid #c0996d6b}.story h1{font-size:25px!important}.play-panel{margin-top:3px;border-radius:0 0 10px 10px}.item strong{font-size:16px}.action-row .primary{font-size:12px}.hint{font-size:11px}.scene-label{font-size:9px;line-height:1.45;text-shadow:0 1px 4px #201126}
}
@media(min-width:701px){.bed-book{left:32%;bottom:10%;width:110px;height:135px}}
@media(max-width:700px){.character img{height:110%;bottom:-8%}}

/* A short illustrated page-turn, not another puzzle. */
.wordmark{font-size:20px;font-weight:700}.tools button,.hint,.action-row p,.item small,.keepsake,footer{font-family:Georgia,'Times New Roman',serif}
.chapter-actions{grid-column:1/-1;display:flex;align-items:center;gap:20px}
.quiet{border:0;background:none;color:inherit;font:italic 14px Georgia,serif;text-decoration:underline;text-underline-offset:4px;min-height:44px;padding:10px}
.interlude{overflow:hidden;border:2px solid #a57c50;border-radius:14px;background:#f2e6cd;color:#38273c;box-shadow:0 0 0 5px #301e32,0 0 0 6px #806042}
.interlude-art{background:#372035;aspect-ratio:3/2;max-height:64vh}.interlude-art img{display:block;width:100%;height:100%;object-fit:contain}
.interlude-caption{padding:24px 32px;text-align:center}.interlude-caption .eyebrow{color:#795333}.interlude-caption h2{font-size:36px;margin:9px 0 12px}.interlude-caption h2 em{color:#795333}.interlude-caption p{font-size:17px;margin-bottom:8px}.interlude-aside{font-style:italic}.ferry-link{display:inline-block;text-decoration:none;margin-top:12px}.interlude-caption .quiet{display:block;margin:8px auto 0}
@media(max-width:700px){.wordmark{font-size:13px}.chapter-actions{gap:5px;display:flex}.chapter-actions .primary{width:auto;flex:1}.chapter-actions .quiet{font-size:11px}.closing h2{font-size:19px}.closing p{font-size:12px}.interlude{display:flex;flex-direction:column;flex:1;min-height:0;box-shadow:0 0 0 2px #301e32,0 0 0 3px #806042}.interlude-art{flex:1;min-height:0;max-height:none;aspect-ratio:auto;display:flex;align-items:center}.interlude-art img{height:100%;object-fit:contain}.interlude-caption{flex:none;padding:13px 16px 8px}.interlude-caption h2{font-size:25px;margin:6px 0 9px;line-height:1.1}.interlude-caption p{font-size:13px;line-height:1.35}.interlude-caption .eyebrow{font-size:8px}.ferry-link{display:block;font-size:15px;margin-top:11px;padding:12px;min-height:46px}.interlude-caption .quiet{font-size:12px;margin:2px auto 0;padding:8px}}
@media(min-width:701px){.interlude-art{width:100%;height:50vh;max-height:600px;aspect-ratio:auto}.interlude-caption{padding:18px 28px}.interlude-caption h2{font-size:32px}.interlude-caption p{font-size:15px}}
/* Friday-night prologue: the whole painting, then one clear page-turn. */
[data-state=opening]>.chapter,[data-state=opening]>footer{display:none}
.opening{border:2px solid #a57c50;border-radius:14px;overflow:hidden;background:#f2e6cd;color:#38273c;box-shadow:0 0 0 4px #301e32,0 0 0 5px #806042;max-width:1100px;margin:8px auto 28px}
.opening-art{background:#302035;min-height:0;height:min(58vh,650px)}
.opening-art img{display:block;width:100%;height:100%;object-fit:contain}
.opening-caption{text-align:center;padding:20px 24px 18px}.opening-caption .eyebrow{color:#795333}.opening-caption h1{font-size:38px;margin:10px 0;line-height:1.1}.opening-caption h1 em{color:#795333}.opening-caption p{font-size:17px;margin:0 auto 12px;max-width:620px}.opening-actions{display:flex;justify-content:center;align-items:center;gap:12px}.opening-actions .primary{min-height:46px}
@media(max-width:700px){
#game[data-state=opening]{min-height:0;height:calc(100svh - 56px);padding-bottom:max(8px,env(safe-area-inset-bottom))}
.opening{display:flex;flex-direction:column;flex:1;min-height:0;margin:3px 0 0;width:100%;box-shadow:none;border-radius:10px}
.opening-art{flex:1;height:auto;display:flex;align-items:center;min-height:100px}.opening-art img{height:100%;object-fit:contain}
.opening-caption{flex:none;padding:14px 15px 8px}.opening-caption h1{font-size:29px!important;margin:8px 0}.opening-caption p{font-size:14px;line-height:1.4;margin-bottom:10px}.opening-caption .eyebrow{font-size:8px}.opening-actions{flex-direction:column;gap:0}.opening-actions .primary{width:100%;font-size:15px}.opening-actions .quiet{font-size:12px;min-height:44px}
}
@media(max-height:500px) and (orientation:landscape){.opening{display:grid;grid-template-columns:1.4fr 1fr}.opening-art{height:70vh}.opening-caption{padding:12px}.opening-caption h1{font-size:26px!important}.opening-caption p{font-size:13px}.opening-actions{flex-direction:column;gap:0}}
/* Continuity pass: refined adult Medusa; bed is a distant room detail. */
.room{background-image:url('assets/bedroom-spacious.webp');background-size:cover;background-position:center}
.character{width:59%;right:1%;height:96%;bottom:0}
.character img{height:100%;width:100%;bottom:0;object-fit:contain;object-position:center bottom}
.bed-book{left:22%;bottom:25%;width:55px;height:65px}
@media(max-width:700px){
.room{background-position:38% center}
.character{width:100%;right:0;height:calc(100% - 110px);bottom:110px}
.character img{height:100%;width:100%;bottom:0;object-position:center bottom}
#game[data-state=intro] .character{height:calc(100% - 158px);bottom:158px}
.bed-book{left:5%;bottom:130px;width:40px;height:50px}
}
.character img{bottom:-3%;height:103%}
@media(max-width:700px){.character img{bottom:-3%;height:103%}}
