/* One full-screen room in its own colours; the site theme sets the time of day. */
:root{color-scheme:dark;font-family:Arial,Helvetica,sans-serif;background:#120f0c;color:#f3ece2}
*{box-sizing:border-box}
html,body{height:100%;margin:0;overflow:hidden;background:#120f0c}
main{position:fixed;inset:0;overflow:hidden}
canvas{position:absolute;inset:0;display:block;width:100%;height:100%;cursor:grab;touch-action:none}
canvas.over,canvas.still.over{cursor:pointer}
canvas.dragging{cursor:grabbing}
canvas.still,canvas.still.dragging{cursor:default}
/* The porch clip, over the canvas until the panorama behind it takes over. */
video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;transition:opacity .4s}
video.gone{opacity:0}
/* Letterboxing uses the scene background, concealing interactive book/room layers behind the film. */
video.letterbox{background:#120f0c}
@media(prefers-reduced-motion:reduce){video{transition:none}}
canvas:focus-visible{outline:2px solid #f3ece2;outline-offset:-4px}
[hidden]{display:none!important}
button:focus-visible{outline:2px solid #f3ece2;outline-offset:2px}
/* A short hint beside the native pointer. The controls are the page's, in its corner (Walk.tsx). */
.cursor{position:absolute;left:0;top:0;pointer-events:none}
.tip{position:absolute;left:0;top:0;max-width:calc(100vw - 16px);padding:3px 6px;font:.875rem/1.4 ui-monospace,Menlo,Consolas,monospace;white-space:nowrap;color:#120f0c;background:#f3ece2;border-radius:3px;box-shadow:0 1px 4px rgb(0 0 0 / .3)}
.loading{position:absolute;left:0;right:0;top:50%;margin:0;text-align:center;font-size:1rem;color:rgb(243 236 226 / .8);text-shadow:0 1px 6px rgb(0 0 0 / .85);pointer-events:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* The book is an object in the room; the note belongs to its picked-up view. */
canvas.room-book{pointer-events:none}
.book-dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:20px;border:0;background:transparent;color:#302d23;overflow:auto}
.book-dialog[open]{display:grid;place-items:center}
.book-dialog::backdrop{background:rgb(12 10 8 / .68)}
.book-stage{--cover-left:.06;--cover-top:.08;--cover-width:.88;--cover-height:.84;position:relative;container-type:size;width:min(100%,460px);height:min(660px,calc(100svh - 60px));min-height:320px;animation:pick-up .35s cubic-bezier(.16,1,.3,1) both}
canvas.held-book{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;touch-action:auto;filter:drop-shadow(4px 20px 20px rgb(0 0 0 / .32))}
/* A square sticky note stuck to the cover's right side, beside the seal and clear of the title and
   author. Its text follows the reader's font preference; the note grows and the dialog scrolls
   when more room is needed. Its glued top lies flat; the free edge lifts a little. */
@font-face{font-family:'Gochi Hand';src:url(/walk/gochi-hand-latin.woff2) format('woff2');font-display:swap}
.book-note{position:absolute;right:0;top:calc((var(--cover-top) + var(--cover-height) * .4) * 100cqh);width:min(12rem,calc(100% - 1.5rem));min-height:12rem;margin:0;padding:.75rem;color:#1f2740;font:1rem/1.3 'Gochi Hand',cursive;text-wrap:pretty;overflow-wrap:anywhere;transform:rotate(4deg);transform-origin:top right}
.book-note::before,.book-note::after{content:'';position:absolute}
.book-note::before{z-index:-1;inset:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .33 0 0 0 0 .08 .16 0 0 0 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23f)'/%3E%3C/svg%3E"),linear-gradient(transparent 55%,rgb(150 110 20 / .08) 90%,rgb(255 252 225 / .22)),#f7e98f;box-shadow:0 0 0 .5px rgb(120 95 30 / .3),0 1px 1px rgb(40 30 10 / .22)}
.book-note::after{z-index:-2;left:4%;right:4%;bottom:2%;height:40%;border-radius:0 0 50% 50%/0 0 14% 14%;box-shadow:0 calc(var(--cover-width) * 1.3cqw) calc(var(--cover-width) * 1.7cqw) rgb(40 28 8 / .38)}
.put-book-down{position:absolute;right:0;top:0;display:grid;place-items:center;width:44px;height:44px;border:1px solid rgb(243 236 226 / .5);border-radius:50%;background:rgb(18 15 12 / .45);color:#f3ece2;cursor:pointer}
/* The page navigation overlays this frame; keep the close target below it on short screens. */
@media(max-height:500px){.put-book-down{top:64px}}
@keyframes pick-up{from{opacity:0;transform:translateY(32px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){.book-stage{animation:none}}

/* Quiet physical targets make the authored safe route discoverable without labelling the room. */
.targets{position:absolute;inset:0;pointer-events:none}
.place{position:absolute;left:0;top:0;display:grid;place-items:center;min-width:44px;min-height:44px;padding:0;border:0;border-radius:3px;background:none;color:#f3ece2;pointer-events:none}
/* Leave a quiet cue at rest, including on touch; the dark edge keeps it legible on pale upholstery. */
.place svg{width:44px;height:44px;overflow:visible;fill:none;stroke:currentColor;stroke-width:1.5;filter:drop-shadow(0 0 1px rgb(0 0 0 / .9)) drop-shadow(0 1px 1px rgb(0 0 0 / .9));opacity:.65}
.place span{position:absolute;bottom:100%;font:.75rem/1.4 ui-monospace,Menlo,Consolas,monospace;text-shadow:0 1px 3px #120f0c;opacity:0;pointer-events:none}
.place.active svg{opacity:1;stroke-width:2}
.place.active span{opacity:1}

.cue{position:absolute;inset:auto;left:0;top:0;width:auto;height:auto;transform-origin:0 0;pointer-events:none;transition:opacity .18s ease}
@media(prefers-reduced-motion:reduce){.cue{transition:none}}
