:root{color-scheme:dark;--cream:#f5e8ce;--gold:#e2ba71;--green:#c4dfc8;--dark:#15563b}
*{box-sizing:border-box}[hidden]{display:none!important}
body{margin:0;min-height:100vh;background:#111b18;color:var(--cream);font-family:Georgia,'Times New Roman',serif;display:flex;align-items:center;justify-content:center;padding:12px}
.shell{width:100%;max-width:min(1400px,calc((100vh - 76px)*16/9))}.masthead,footer{display:flex;justify-content:space-between;gap:10px;font:11px/1.5 system-ui,sans-serif;color:#bfbfa8}.masthead{margin-bottom:8px}.masthead span:first-child{letter-spacing:.18em;color:var(--gold);font-weight:750}footer{margin-top:7px;font-size:10px}
.stage{position:relative;isolation:isolate;width:100%;height:0;padding-bottom:56.25%;border:2px solid #ae9563;border-radius:12px;overflow:hidden;background:#29352e;box-shadow:0 20px 60px #0008;container-type:inline-size}
.background,.shade,.menu,.game{position:absolute;inset:0;width:100%;height:100%}.background{z-index:-3;object-fit:cover}.shade{z-index:-1;pointer-events:none;background:linear-gradient(#04150dc9,transparent 24%,transparent 75%,#04150d8c)}
button{font:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #ffdf92;outline-offset:3px}button:disabled{cursor:default;opacity:.55}.primary{padding:12px 25px;border:1px solid #f3d994;border-radius:6px;color:#203125;background:linear-gradient(#f1d999,#ba9553);font-weight:700;box-shadow:0 3px 0 #4b3e23}.quiet{padding:7px 10px;border:1px solid #b4beaa80;border-radius:5px;background:#143324e6;color:var(--cream);font:600 clamp(9px,1.2cqw,14px)/1.3 system-ui,sans-serif}
.eyebrow{font:750 clamp(8px,1.1cqw,13px)/1.4 system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:var(--gold)}.menu{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;background:#0c211ae6}.menu h1{font-size:clamp(22px,5.5cqw,72px);line-height:1;margin:5px 0;font-weight:400}.menu em{color:var(--gold)}.menu p{margin:6px 0 12px;font-size:clamp(11px,1.6cqw,19px);line-height:1.4}.menu-luggage{width:13%;height:25%;object-fit:contain;filter:drop-shadow(0 7px 8px #0008)}.menu .quiet{margin:9px 0}.menu small{font:clamp(8px,1cqw,12px) system-ui,sans-serif;color:#bbc2aa}
.hud{position:absolute;inset:2.5% 2.5% auto;display:flex;align-items:start;justify-content:space-between;gap:8px}.hud h2{font-size:clamp(13px,2.3cqw,31px);font-weight:400;margin:3px 0;max-width:58cqw;text-shadow:0 2px 6px #000}.hud-buttons{display:flex;gap:5px}.quest{position:absolute;top:14%;left:2.5%;right:2.5%;display:flex;justify-content:space-between;gap:10px;font:600 clamp(9px,1.15cqw,14px)/1.4 system-ui,sans-serif;text-shadow:0 1px 5px #000}.quest>span:first-child{max-width:67%}.quest>span:last-child{max-width:30%;text-align:right}
.sprite{position:absolute;object-fit:contain;object-position:center bottom;transform-origin:center bottom;filter:drop-shadow(0 6px 5px #0005);pointer-events:none}.luggage{left:17%;bottom:8%;width:22%;height:34%;z-index:5}.luggage.face-west{left:12%}.captor{left:56%;bottom:10%;width:26%;height:49%;z-index:3}.companion{left:78%;bottom:8%;width:15%;height:22%;z-index:4}.follower{left:3%;bottom:8%;width:15%;height:22%;z-index:4}.follower.west{transform:scaleX(-1)}.chef{left:65%;bottom:10%;width:23%;height:45%;z-index:2}.bag{left:48%;bottom:8%;width:13%;height:20%;z-index:3;animation:hot .7s alternate infinite}.at-sanctuary.companion{left:50%}.at-witches.companion{left:68%}
@keyframes hot{to{filter:drop-shadow(0 0 10px #ffab30);transform:scale(1.06)}}.luggage.scuttle{animation:scuttle .18s alternate 4}@keyframes scuttle{to{transform:translateY(-4px) rotate(1deg)}}
.dialogue{position:absolute;inset:0;z-index:8;pointer-events:none}.speech{position:absolute;margin:0;left:var(--x,49%);top:var(--y,24%);width:var(--w,24%);padding:.6em .9em;background:#fff2d9;color:#30251e;border:2px solid #67513c;border-radius:50%;text-align:center;font:650 clamp(9px,1.45cqw,18px)/1.3 system-ui,sans-serif;box-shadow:0 3px 5px #0002}.speech strong{display:block;font-size:.75em;color:#735735;margin-bottom:3px}.speech:after{content:'';position:absolute;left:48%;bottom:-.6em;width:1em;height:.8em;background:inherit;clip-path:polygon(0 0,100% 0,10% 100%)}
.caption,footer{font-family:"Comic Sans MS","Comic Sans","Chalkboard SE",system-ui,sans-serif}
.caption{position:absolute;z-index:7;bottom:3%;left:28%;width:49%;padding:7px 10px;border-radius:6px;background:#0c221be6;text-align:center}.caption p{margin:0;font-size:clamp(10px,1.3cqw,16px);line-height:1.35}.caption #paths{margin-top:4px;color:#e0c789;font-weight:600;font-size:clamp(8px,1cqw,12px);line-height:1.4}
.direction-pad{position:absolute;z-index:10;left:2%;bottom:3%;width:23%;display:grid;grid-template-columns:repeat(3,1fr);gap:4px;touch-action:none}.direction{width:100%;aspect-ratio:1;padding:12%;border:1px solid #e5f4db;border-radius:50%;background:var(--green);color:#24563c;box-shadow:0 3px 0 #183824;touch-action:none}.direction svg{width:100%;height:100%;display:block;fill:currentColor}.direction .fold{fill:var(--green)}.direction.pressed,.direction:active{background:var(--dark);color:#f3f6df;transform:translateY(2px)}.direction.pressed .fold,.direction:active .fold{fill:var(--dark)}.direction.up{grid-area:1/2}.direction.left{grid-area:2/1}.direction.down{grid-area:2/2}.direction.right{grid-area:2/3}.direction.closed{border-color:#8ba58c}
.bite{position:absolute;z-index:10;right:2%;bottom:3%;width:13%;padding:4px 4px 6px;border:2px solid #e6c580;border-radius:12px;color:#eae9cc;background:#16432c;box-shadow:0 3px 0 #4b412a}.bite img{display:block;width:100%;aspect-ratio:1.2;object-fit:contain;border-radius:6px;background:#515151}.bite span,.bite small{display:block;font:800 clamp(9px,1.4cqw,16px)/1.2 system-ui,sans-serif}.bite small{font-size:clamp(7px,.8cqw,10px);opacity:.7;margin-top:2px}.bite.pressed,.bite:active{transform:translateY(2px);background:#39724b}
.timer-box{position:absolute;z-index:9;top:20%;left:4%;width:29%;padding:7px 10px;border:1px solid #e3bc73;border-radius:6px;background:#4e2723ef;color:#ffebc8;font:700 clamp(9px,1.2cqw,15px)/1.4 system-ui,sans-serif}.timer-box #timer{float:right;font-variant-numeric:tabular-nums}.track{height:4px;background:#fff3;margin-top:4px}.track div{height:100%;background:#ffce74}
.effect{position:absolute;z-index:9;left:60%;top:43%;font:900 clamp(24px,5cqw,60px) system-ui,sans-serif;color:#ffe7a4;text-shadow:2px 3px #68412a}.effect.heart{color:#ff8fba;animation:heart 1s ease-out forwards}@keyframes heart{to{transform:translateY(-100%) scale(1.25);opacity:0}}.effect.smoke{color:#dbe8e0;animation:heart 1s ease-out forwards}.loading{position:absolute;z-index:12;inset:0;display:grid;place-items:center;background:#0e271b88;color:#fff1cd;font:700 14px system-ui,sans-serif}
dialog{color:var(--cream);background:#163227;width:min(850px,94%);max-height:85vh;overflow:auto;padding:24px;border:1px solid #c5ac72;border-radius:10px;box-shadow:0 15px 70px #0009}dialog::backdrop{background:#000a}dialog h2{color:var(--gold);margin-top:0}dialog p{line-height:1.5}dialog .quiet{margin:10px}.map-table{width:100%;border-collapse:collapse;font:12px/1.4 system-ui,sans-serif;margin-bottom:20px}.map-table th,.map-table td{padding:7px;border-bottom:1px solid #667e59;text-align:left}.map-table .current{background:#416540}.map-table caption{text-align:left;color:var(--gold);font-size:18px;margin:12px 0}.map-table th{color:#d9dbbe}.map-table td:first-child{min-width:140px}
@media(max-width:650px){body{padding:4px}.shell{max-width:100%}.masthead,footer{font-size:8px}.hud-buttons{gap:3px}.quiet{padding:5px 7px}.hud h2{max-width:47cqw}.quest{font-size:9px;top:16%}.speech{border-width:1px;padding:.45em .65em;font-size:clamp(8px,1.5cqw,11px)}.primary{padding:7px 16px;font-size:12px}.menu .quiet{margin:5px}.menu p{margin:4px 0 8px}.caption{left:28%;width:54%;bottom:2%;padding:5px}.caption p{font-size:9px}.caption #paths{font-size:8px}.bite{border-radius:8px}.map-table{font-size:10px}.map-table th,.map-table td{padding:5px}.map-table td:first-child{min-width:90px}}
@media(prefers-reduced-motion:reduce){.bag,.luggage.scuttle{animation:none}.effect{animation-duration:.1s!important}}
/* Keep actors above the thumb controls and caption strip. */
.luggage{left:32%;bottom:12%;width:20%;height:31%}
.follower{left:19%;bottom:12%;width:14%;height:23%;z-index:6}
.direction-pad{width:18%;left:2%;bottom:2%;gap:3px}
.bite{width:10%;right:2%;bottom:2%;padding:3px;border-radius:9px}
.bite span{font-size:clamp(9px,1.2cqw,14px)}
.hud-buttons .quiet{padding:4px 7px;font-size:clamp(9px,1cqw,12px);min-height:30px}
.quest>span:first-child{max-width:36%}
.speech{font-size:clamp(9px,1.3cqw,16px);padding:.5em .8em}
.caption{left:23%;width:63%;bottom:2%}
.timer-box{top:auto;bottom:23%;left:2%;width:28%}
body.playing{padding:0;min-height:100vh;min-height:100dvh}
body.playing .masthead,body.playing footer{display:none}
body.playing .shell{max-width:min(100vw,calc(100vh * 16 / 9));max-width:min(100vw,calc(100dvh * 16 / 9))}
:fullscreen{background:#111b18}
.stage{height:auto;padding-bottom:0;aspect-ratio:16/9}
/* Only one speaker at a time; tails point towards the nearby mouth. */
.speech:after{left:auto;right:-.9em;top:35%;bottom:auto;width:1em;height:1em;clip-path:polygon(0 0,100% 65%,0 100%)}
.speech[data-tail="left"]:after{right:auto;left:-.9em;clip-path:polygon(100% 0,0 65%,100% 100%)}
.speech[data-tail="top"]:after{right:auto;left:38%;top:-.85em;clip-path:polygon(0 100%,40% 0,100% 100%)}
.speech[data-tail="bottom"]:after{right:auto;left:45%;top:auto;bottom:-.85em;clip-path:polygon(0 0,100% 0,40% 100%)}
.speech[data-tail="none"]:after{display:none}
.bag{animation:none}
.music-toggle{position:absolute;z-index:25;right:2%;top:2%;font-size:clamp(9px,1cqw,12px)}
body.playing .music-toggle{right:25%}
