/* Back at Home + Every Photo, a Story. Original photographs remain untouched. */
:root { --paper:#f4ecdc; --moss:#354b3c; --ink:#303e31; }
html { background:#30271f; }
body { background:linear-gradient(#21180f26,#21180f26),url('photos/table-background.jpg') center/cover no-repeat #987044; }
.layout { padding:0; min-height:100dvh; }
button { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
button:focus-visible { outline:3px solid #a3b49b; outline-offset:4px; }
.room-scene { height:100dvh; min-height:100svh; max-height:none; background:#211e18; isolation:isolate; }
.room-scene::before { content:""; position:absolute; z-index:-1; inset:-30px; background:linear-gradient(#18171375,#18171385),url('room.jpg') center/cover; filter:blur(24px); }
.room-image-frame { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); height:100dvh; width:auto; max-width:none; aspect-ratio:9/16; filter:none; }
.room-image-frame::after { content:""; pointer-events:none; position:absolute; inset:0; background:linear-gradient(180deg,#121810bc 0%,#12181050 22%,transparent 43%,transparent 82%,#181b1555); }
.room-photo { border-radius:0; object-fit:cover; }
.room-caption { z-index:2; left:8%; top:5%; transform:none; width:80%; padding:0; background:none; border:0; box-shadow:none; color:#fff5e5; }
.room-caption h1 { font-size:clamp(3rem,8svh,5rem); line-height:.94; font-weight:400; letter-spacing:-.045em; text-shadow:0 2px 20px #14201570; margin:0 0 18px; }
.room-caption h1 em { color:inherit; }
.room-caption .title-family { font-size:.4em; margin-bottom:.55em; }
.room-caption .title-year { font-size:.32em; margin-top:.65em; letter-spacing:.08em; }
.room-instruction { font:italic clamp(.78rem,1.7svh,.95rem)/1.4 Georgia,serif; max-width:none; color:#f6eddbd9; }
.room-hotspot { z-index:4; left:16.6667%; top:46.1914%; height:13.28125%; width:65.9722%; border:0; }
.room-hotspot::before { content:none; }
.room-album-outline { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; filter:drop-shadow(0 1px 2px #241c18b3); }
.room-album-outline path { stroke:#fff; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; transition:stroke-width .2s; }
.room-hotspot:hover .room-album-outline path,.room-hotspot:focus-visible .room-album-outline path { stroke-width:2.8; }
.room-hotspot:focus-visible { outline:none; box-shadow:none; }
.room-album-pointer { position:absolute; top:calc(100% - 8px); left:55%; transform:translateX(-50%); width:clamp(56px,11svh,80px); height:clamp(56px,11svh,80px); overflow:visible; pointer-events:none; filter:drop-shadow(0 1px 2px #241c18b3); }
.room-album-pointer path { stroke:#fff; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.reader { --book-height:min(760px,calc(100svh - 130px),calc((100vw - 170px) / 1.08)); min-height:100dvh; max-width:1180px; padding:16px 30px 14px; gap:14px; align-content:center; grid-template-rows:auto auto auto; }
.reader-heading { color:#f7edda; gap:16px; padding:0 6px; max-width:960px; }
.reader-heading>div { text-align:center; }
.reader-heading .eyebrow { color:#f6edd2b3; font-size:.56rem; letter-spacing:.16em; }
.reader-title { font:italic 1.2rem Georgia,serif; }
.reader-heading .text-button { color:#f6edd9; font: .86rem Georgia,serif; min-height:44px; padding:6px 0; }
.page-navigation { width:min(100%,calc(var(--book-height) * 1.08 + 104px)); padding-inline:52px; }
.page { border-color:#b7a989; background:repeating-linear-gradient(40deg,#9d825b06 0 1px,transparent 1px 3px),#f0e8d6; padding:14px 13px; gap:11px; box-shadow:-3px 3px #c6baa2,-6px 6px #e2d6bb,-9px 9px #3d5141,-18px 22px 35px #1e150e66; }
.page.right { box-shadow:3px 3px #c6baa2,6px 6px #e2d6bb,9px 9px #3d5141,18px 22px 35px #1e150e66; }
.page.left::before { content:""; position:absolute; top:0; bottom:0; width:12px; left:-13px; border-radius:4px 0 0 4px; background:repeating-linear-gradient(0deg,#c5b893 0 1px,#d7c9a7 1px 3px); box-shadow:inset -3px 0 5px #5e4f3844; }
.sleeve { border-color:#c7bba2; border-radius:3px 3px 7px 7px; box-shadow:inset 0 0 0 3px #fff9e966,inset 0 -4px 4px #9d8e6a22,0 1px #fff8; background:#e7decb; }
.has-note .sleeve { background-color:#eee5d4; }
.sleeve::after { background:linear-gradient(150deg,#fff8 0%,#fff1 18%,transparent 31%,transparent 66%,#fff2 83%,#fff7 100%); box-shadow:inset 2px 2px 3px #fff8; border-radius:inherit; }
.sleeve::before { height:5px; background:linear-gradient(#fff9,#ded3bf80); }
.sleeve-slot.has-note { padding-top:20px; }
.note-tab { animation:none; top:-2px; height:32px; right:12%; width:43%; filter:contrast(1.1); background-size:124% var(--note-image-height); }
.note-stack { width:75%; background:#f3e8cf; padding:8px 8px 14px; font:italic 1rem/1.4 Georgia,serif; box-shadow:3px 4px #e8dec8,6px 8px #b8aa8e,9px 11px #eee1c5,0 15px 22px #453a2e30; }
.note-stack-preview { display:block; position:relative; overflow:hidden; width:100%; aspect-ratio:.667; margin-bottom:12px; }
.note-stack .note-stack-preview img { position:absolute; width:120.5%; height:auto; max-height:none; left:-10.8%; top:-34.3%; margin:0; }
.reader-hint { color:#f2e5c7c2; font:italic .77rem Georgia,serif; }
.photo-note { top:12px; left:50%; transform:translateX(-50%); width:auto; padding:0 17px; border-radius:25px; font: .9rem Georgia,serif; background:#f6ecd7; color:#344635; border-color:#f6ecd7; }
.photo-note[hidden] { display:none; }
#note-viewer { padding:0; align-items:end; justify-items:center; }
#note-viewer::backdrop { background:#211e155c; backdrop-filter:blur(3px); }
.note-panel { position:relative; width:min(100%,780px); max-height:92dvh; padding:12px 28px 20px; border-radius:24px 24px 0 0; background:radial-gradient(ellipse at top,#fffbef,#f3e9d7); box-shadow:0 -12px 60px #18160f44; transform-origin:50% 100%; overscroll-behavior:contain; scrollbar-width:thin; }
.drawer-handle { width:42px; height:4px; background:#b8ab8b; border-radius:4px; margin:0 auto 14px; }
.note-panel header { margin-bottom:12px; }
.drawer-eyebrow { margin:0 0 4px; font: .55rem/1.4 system-ui,sans-serif; letter-spacing:.17em; color:#8a7b60; }
.note-panel h2 { font:italic 1.8rem Georgia,serif; margin:0; }
.note-panel header button { background:none; color:#344332; border:1px solid #b8ab8b77; font-size:1.6rem; }
.note-content,.note-panel:has(#note-continuation:not([hidden])) .note-content { display:block; --note-frame-height:min(34svh,300px); }
.note-carousel { grid-template-columns:44px minmax(0,1fr) 44px; gap:10px; }
.note-panel .note-arrow { background:transparent; color:#42543d; border:1px solid #b8ab8b88; }
.note-panel .note-arrow:hover { background:#e4dac4; }
.note-frame { background:#e7dcc5; box-shadow:1px 5px 10px #483d3026; border-radius:2px; }
#note-highlight { border:0; background:#eebf3950; mix-blend-mode:multiply; border-radius:4px; }
.note-reading { max-height:none; overflow:visible; margin:16px auto 0; padding:0; max-width:620px; }
.note-panel #note-card { background:#f2dfaa65; border:0; border-left:3px solid #c0a054; box-shadow:none; padding:12px 16px; min-height:0; margin:0; }
.note-panel #note-card h3 { font: .64rem/1.3 system-ui,sans-serif; text-transform:uppercase; letter-spacing:.09em; color:#786b50; margin:0 0 7px; }
.note-panel #note-card p { font:1.12rem/1.5 Georgia,serif; color:#34412f; }
.note-panel #note-back { color:#56644e; background:transparent; padding:6px 0; font: .75rem Georgia,serif; border:0; border-radius:0; margin-top:6px; }
.note-match { color:#776e59; border:0; font:italic .76rem/1.5 Georgia,serif; margin:10px 0 0; padding:0; }
.note-sheet-controls { margin:0 0 10px; padding-bottom:10px; border-bottom:1px solid #b8ab8b55; }
.note-panel .note-sheet-controls button { color:#56644e; border:0; background:transparent; font:.77rem Georgia,serif; padding:6px 0; text-align:left; }
.note-panel .note-sheet-controls button:last-child { text-align:right; }
#sheet-count { color:#776e59; font:.67rem system-ui,sans-serif; }
.note-display-controls { font:.73rem Georgia,serif; gap:12px; margin:0 0 8px; }
.note-display-controls input { accent-color:#59694a; width:16px; height:16px; }
.note-display-controls span { font:italic .68rem Georgia,serif; }
#excerpt-count { margin:0 0 10px; font:.62rem system-ui,sans-serif; color:#8a7b60; letter-spacing:.04em; }
.note-panel .note-continuation-links button { font-size:.7rem; }
.note-transcript h3 { font:italic 1.1rem Georgia,serif; }
.note-transcript li { border-bottom:1px solid #b8ab8b33; margin-bottom:7px; }
.note-transcript small { font-size:.68rem; color:#8a7b60; }
@media(min-width:1000px) {
 .note-panel { width:660px; margin-left:auto; margin-right:28px; max-height:94dvh; }
 .note-content,.note-panel:has(#note-continuation:not([hidden])) .note-content { --note-frame-height:min(35svh,360px); }
}
@media(max-width:720px) {
 .room-image-frame { height:max(100dvh,calc(100vw * 16 / 9)); width:max(100vw,calc(100dvh * 9 / 16)); max-width:none; }
 .room-caption { left:12%; top:5%; width:76%; }
 .room-caption h1 { font-size:clamp(2.8rem,7svh,4.7rem); margin-bottom:14px; }
 .room-instruction { font-size:.78rem; }
 .reader { --book-height:min(calc(100svh - 140px),calc((100vw - 80px) / .66)); padding:10px 16px 12px; gap:13px; align-content:center; }
 .reader-heading { padding:0; }
 .reader-heading .eyebrow { display:none; }
 .reader-title { font-size:.94rem; }
 .reader-heading .text-button { font-size:.78rem; }
 .page-navigation,.page-navigation:has(.book.closed):not(:has(.book.turning-open)) { width:100%; padding-inline:24px; }
 .page { padding:10px; gap:9px; }
 .book.mobile-book .page { box-shadow:3px 3px #c6baa2,6px 6px #e2d6bb,9px 9px #3d5141,9px 17px 24px #1e150e66; }
 .book.mobile-book .page::before { content:""; position:absolute; top:0; bottom:0; width:8px; left:-9px; background:repeating-linear-gradient(0deg,#a89670 0 1px,#c1b08c 1px 3px); border-radius:3px 0 0 3px; }
 .reader-hint { font-size:.7rem; max-width:none; }
 .note-panel { padding:10px 16px max(18px,env(safe-area-inset-bottom)); max-height:92dvh; }
 .note-panel header { margin-bottom:4px; }
 .note-panel h2 { font-size:1.65rem; }
 .drawer-handle { margin-bottom:10px; }
 .note-content,.note-panel:has(#note-continuation:not([hidden])) .note-content { --note-frame-height:min(30svh,260px); }
 .note-carousel { gap:5px; grid-template-columns:40px minmax(0,1fr) 40px; }
 .note-panel .note-arrow { min-width:40px; width:40px; }
 .note-display-controls { gap:8px 12px; }
 .note-display-controls span { display:none; }
 .note-panel #note-card p { font-size:1.02rem; }
 .note-sheet-controls { margin-bottom:6px; padding-bottom:4px; }
 .note-reading { margin-top:12px; }
}
@media(prefers-reduced-motion:reduce) { .room-hotspot::before { transition:none; } }

/* The book carries its controls; only a small speaker stays at the screen edge. */
.page-navigation:has(.book.closed):not(:has(.book.turning-open)) { width:min(100%,calc(var(--book-height) * .525 + 104px)); }
.page-navigation>.arrow { width:44px; height:44px; border-radius:50%; background:#f6ecdde8; color:#354b3c; font-size:1.5rem; text-shadow:none; box-shadow:0 2px 9px #21170e33; }
.page-navigation>#previous { left:0; }
.page-navigation>#next { right:0; }
.page-navigation>.arrow:not(:disabled):hover { background:#fff6e4; }
#sound { position:fixed; z-index:15; right:max(12px,env(safe-area-inset-right)); bottom:max(12px,env(safe-area-inset-bottom)); display:grid; place-items:center; width:44px; height:44px; padding:10px; border:1px solid #f3e4c84d; border-radius:50%; color:#f7ecd6; background:#30271c80; }
#sound svg { width:24px; height:24px; }
#sound .sound-muted,#sound[aria-pressed="false"] .sound-waves { display:none; }
#sound[aria-pressed="false"] .sound-muted { display:block; }
#sound:hover { background:#30271cc4; }
@keyframes paper-peek {
  0%,76%,100% { rotate:0deg; translate:0 0; }
  81% { rotate:-2.5deg; translate:0 -2px; }
  86% { rotate:2.5deg; translate:0 -3px; }
  91% { rotate:-1.5deg; translate:0 -2px; }
  96% { rotate:1deg; translate:0 -1px; }
}
@media(prefers-reduced-motion:no-preference) {
 .note-tab { animation:paper-peek 5.8s ease-in-out infinite; transform-origin:50% 100%; }
 .sleeve-slot:nth-child(even) .note-tab { animation-delay:.65s; }
 .note-tab:hover,.note-tab:focus-visible,body:has(dialog[open]) .note-tab,.turning-flap .note-tab { animation:none; }
}
@media(max-width:720px) {
 .reader:has(.opening-spread) { --book-height:min(calc(100svh - 140px),calc((100vw - 80px) / 1.08)); }
 .book.opening-spread { width:100%; }
 .book.opening-spread .page { flex:1 1 50%; width:50%; padding:6px; gap:5px; }
 .book.opening-spread .sleeve-slot.has-note { padding-top:16px; }
 .book.opening-spread .note-tab { height:28px; }
 .book.opening-spread .note-stack { width:83%; padding:4px 4px 8px; font-size:.64rem; }
 .book.opening-spread .note-stack-preview { margin-bottom:6px; }
 .book.opening-spread .page-turn-corner { width:30px; height:30px; }
 .page-navigation:has(.book.closed):not(:has(.book.turning-open)) { width:100%; }
 .page-navigation>#previous { left:-12px; }
 .page-navigation>#next { right:-12px; }
 .reader-hint { padding:0 24px; }
}

.reader-heading,.reader-hint { text-shadow:0 1px 4px #291b10aa; }

/* A quiet discovery in the room: no visible label, border, or hover decoration. */
.wall-frame-hotspot { position:absolute; z-index:5; left:69%; top:1%; width:31%; height:35%; padding:0; border:0; background:transparent; cursor:pointer; clip-path:polygon(0 0,100% 0,100% 100%,81% 100%,81% 90%,14% 90%,14% 43%,0 43%); }
.wall-frame-hotspot:focus-visible { outline:2px solid #f6e9cf; outline-offset:-4px; }
#wall-frame-viewer[open] { display:grid; place-items:center; padding:56px 16px 24px; }
#wall-frame-viewer::backdrop { background:#1e1a15ed; }
#wall-frame-scene { position:relative; width:min(calc(100vw - 32px),calc((100dvh - 80px) * .75)); line-height:0; box-shadow:0 14px 45px #0005; }
#wall-frame-image { display:block; width:100%; height:auto; }
#wall-frame-photos { position:absolute; inset:0; }
#wall-frame-photos button { border:0; background:transparent; border-radius:0; padding:0; }
#wall-frame-back { top:12px; left:16px; width:auto; padding:0 16px; border-radius:24px; font: .9rem Georgia,serif; }
#wall-frame-closeup { max-width:100%; max-height:calc(100dvh - 80px); object-fit:contain; box-shadow:0 12px 30px #0007; }
#wall-frame-viewer [hidden] { display:none!important; }
