/* Story controls and dialogue; private /test/ only. */
/* Daytime kitchen scenery uses the same contour glow as the night objects. */
.chapter-scenery-outline{opacity:.8;filter:drop-shadow(0 0 2px #5c400c99) drop-shadow(0 0 3px #ffe34d88)}
.chapter-scenery-outline.active{opacity:1;filter:drop-shadow(0 0 2px #ffe34ddd) drop-shadow(0 0 8px #e3bb3588)}
.chapter-scenery:focus-visible .label{opacity:1}
#clue.chapter-dialog.chapter-terrace-dialog{width:min(1080px,calc(100vw - 28px));padding:44px 26px 24px;max-height:90dvh}
.kitchen-terrace h2{font:27px Georgia,serif;margin:8px 0 18px}
.kitchen-terrace-image{display:block;width:100%;height:auto;max-height:62dvh;object-fit:contain;border-radius:6px}
.kitchen-terrace p{font-size:14px;line-height:1.6;margin:14px 0}
.kitchen-terrace .chapter-choices{margin-top:14px}
@media(max-width:600px){#clue.chapter-dialog.chapter-terrace-dialog{padding:44px 14px 20px}.kitchen-terrace h2{font-size:23px}.kitchen-terrace-image{max-height:55dvh}}
#chapter-ribbon{position:fixed;left:30px;bottom:94px;z-index:5;display:flex;gap:7px;max-width:calc(100vw - 60px);flex-wrap:wrap}
#chapter-ribbon button,.chapter-notebook button{min-height:44px;border:1px solid #ad9163;border-radius:7px;background:#211b13ed;color:#f2ddaf;padding:10px 14px;font-size:12px;line-height:1.4;box-shadow:0 3px 16px #0003}
.daylight-public #chapter-ribbon button{background:#fff5e6f2;color:#49371f}
#chapter-ribbon button:focus-visible,.chapter-choices button:focus-visible{outline:2px solid #c09843;outline-offset:3px}
#clue.chapter-dialog{width:min(720px,calc(100vw - 28px));padding:30px;max-height:88dvh}
.chapter-dialogue{font-size:15px}.chapter-dialogue h2{font-size:29px;margin:10px 0 14px}
.chapter-speech{font-size:16px!important;line-height:1.8}
.chapter-portrait{margin:0 0 20px;border-radius:8px;overflow:hidden;max-height:210px;background:#513c26}
.chapter-portrait img{display:block;width:100%;height:210px;object-fit:cover;object-position:center}
.chapter-choices{display:grid;grid-template-columns:1fr;gap:9px;margin:24px 0 0}
.chapter-choices button{min-height:46px;text-align:left;border:1px solid #89704a;background:#292115;color:#ead8b8;border-radius:6px;padding:11px 15px;font-size:14px;line-height:1.6}
.daylight-public .chapter-choices button{background:#eedec1;color:#42321f;border-color:#b79b6b}
.chapter-choices button:hover{filter:brightness(1.08)}
.chapter-overheard>div{padding:16px 0;border-bottom:1px solid #a68b5733}
.chapter-overheard p{margin:7px 0;font-size:15px!important}.chapter-speaker{font-size:11px;color:#b59761;letter-spacing:1px}
.chapter-translation{border-left:2px solid #a78b53;padding-left:14px;color:#ddcb9f}
.chapter-facts{padding-left:22px;font-size:14px;line-height:1.8;margin-top:24px}.chapter-facts li{margin:10px 0}
.chapter-person:focus-visible{outline:2px solid #e5bd57!important;outline-offset:3px}
.chapter-person:hover{box-shadow:inset 0 0 0 1px #e5bd5799,0 0 16px #e5bd5744;border-radius:5px}
.chapter-toy-pistol{width:100px;margin:12px auto -8px}.chapter-toy-pistol svg{display:block;width:100%;filter:drop-shadow(0 3px 4px #0004)}
.chapter-door-notice{position:absolute;left:44%;top:24%;color:#253c25;background:#e7e5c4;border:1px solid #87946a;padding:5px 7px;font-size:10px;pointer-events:none}
.daylight-preview .mobile-time::after{content:attr(data-story-time)}
#chapter-noodle-splash{position:fixed;inset:0;z-index:90;background:#291c0bf5;color:#fff0c5;overflow:hidden;display:grid;place-items:center}
#chapter-noodle-splash p{position:absolute;top:10%;font:24px Georgia,serif;z-index:3}
.noodle-barrel{width:110px;height:110px;border:21px solid #889080;border-radius:50%;background:radial-gradient(circle,#161815 60%,#454d40);box-shadow:0 0 0 8px #323a30,0 20px 80px #0008;animation:barrel-approach 3.4s ease-in forwards}
.flying-noodles{position:absolute;inset:0;perspective:400px}
.flying-noodles i{position:absolute;left:50%;top:50%;width:20px;height:50px;border:9px solid #f2c65c;border-radius:45%;transform-origin:50% 0;opacity:0;animation:chapter-noodle 3.8s ease-in forwards;animation-delay:calc(var(--i)*15ms);box-shadow:inset 2px 0 3px #fff0ac99,2px 3px 4px #6c41183d}
#chapter-skip-splash{position:absolute;right:20px;bottom:20px;z-index:4;min-height:44px;padding:10px 15px;background:#312820;border:1px solid #ecd196;color:#fff0c5;border-radius:5px}
.chapter-slow-motion #world{filter:blur(2px);transition:filter 1.5s}.chapter-slow-motion #friends-test-toolbar{visibility:hidden}
@keyframes barrel-approach{to{transform:scale(1.7)}}
@keyframes chapter-noodle{0%,18%{opacity:0;transform:rotate(var(--angle)) scale(.1)}25%{opacity:1}100%{opacity:1;height:130vmax;width:38vmax;border-width:8vmax;border-radius:43%;transform:rotate(var(--angle)) scale(1.2)}}
@media(max-width:900px){#chapter-ribbon{left:16px;bottom:calc(142px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 32px)}#chapter-ribbon button{font-size:11px;padding:9px 12px}#clue.chapter-dialog{width:100%;padding:12px 20px 24px;max-height:calc(100dvh - 20px)}.chapter-dialogue h2{font-size:25px}.chapter-portrait,.chapter-portrait img{height:160px;max-height:160px}.chapter-choices button{font-size:14px}}
@media(max-width:900px) and (orientation:landscape){#chapter-ribbon{bottom:calc(86px + env(safe-area-inset-bottom,0px))}#clue.chapter-dialog{width:min(680px,calc(100vw - 60px));padding:12px 24px 20px}.chapter-portrait,.chapter-portrait img{height:110px;max-height:110px}}
@media(prefers-reduced-motion:reduce){.noodle-barrel{animation:none}.flying-noodles i{opacity:1;height:130vmax;width:38vmax;border-width:8vmax;transform:rotate(var(--angle));animation:none}}

/* Daylight office discoveries use the actual scene artwork as their close view. */
.office-family-prints{margin:0 0 22px;width:100%;aspect-ratio:1.65;border-radius:8px;background:#6b492c url("assets/chapter-day/office-day-v3.webp") 65% 20%/350% auto no-repeat}
.office-player-thought{margin:22px 0;padding:14px 18px;border-left:3px solid #a77731;background:#cdb27922}.office-player-thought small{font-size:11px;text-transform:uppercase;letter-spacing:1px}.office-player-thought p{font-size:15px!important;line-height:1.8}
.office-registry-paper{margin:20px 0;padding:22px;background:#eee0bc;color:#472b1d;border:1px solid #b19a6b;box-shadow:0 3px 12px #0002}.office-propaganda-cover{width:min(100%,340px);aspect-ratio:1.9;margin:0 auto 18px;background:#d5bf94 url("assets/chapter-day/office-day-v3.webp") 83% 67%/625% auto no-repeat}.office-registry-paper h3{font:24px Georgia,serif;margin:12px 0}.office-registry-byline{font-size:11px!important;letter-spacing:.5px}.office-registry-paper ol{padding-left:22px;font-size:15px;line-height:1.8}.office-registry-paper li{margin:12px 0}.office-day-recording audio{display:block;width:100%;margin:16px 0}.office-day-recording details{margin:16px 0}.office-day-recording summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.office-day-recording details p{font-size:15px!important;line-height:1.8}
@media(max-width:600px){.office-registry-paper{padding:16px}.office-registry-paper h3{font-size:21px}.office-family-prints{aspect-ratio:1.35;background-size:350% auto;background-position:65% 20%}}

/* The witnessed street exchange stays over the scene so both actors remain visible. */
#chapter-street-exchange{position:fixed;z-index:7;left:50%;bottom:104px;transform:translateX(-50%);width:min(690px,calc(100vw - 36px));max-height:44dvh;overflow:auto;padding:18px 22px;border:1px solid #af9469;border-radius:9px;background:#fff4e6f5;color:#3f3020;box-shadow:0 8px 36px #30200b44;backdrop-filter:blur(8px)}
#chapter-street-exchange[hidden]{display:none}.street-exchange-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.street-exchange-heading h2{font:22px Georgia,serif;margin:0 0 10px}.street-exchange-heading>span{font-size:11px;white-space:nowrap}.street-speaker{font-size:11px;letter-spacing:.6px;color:#79512c}.street-japanese{font-size:20px;line-height:1.65;margin:6px 0}.street-translation{font-size:14px;line-height:1.7;margin:6px 0 12px;padding-left:12px;border-left:2px solid #9b7036}.street-glasses-hint{font-size:13px;line-height:1.65;margin:10px 0;color:#775d42}.street-exchange-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.street-exchange-actions button{min-height:44px;border:1px solid #a78c61;border-radius:5px;background:#ead9b9;color:#3f3020;padding:9px 13px;font-size:13px;line-height:1.4}.street-exchange-actions button:focus-visible{outline:2px solid #74501b;outline-offset:3px}
@media(max-width:900px){#chapter-street-exchange{bottom:calc(142px + env(safe-area-inset-bottom,0px));width:calc(100vw - 24px);max-height:42dvh;padding:14px 16px}.street-exchange-heading h2{font-size:20px}.street-japanese{font-size:17px}.street-translation,.street-glasses-hint{font-size:13px}.street-exchange-actions button{font-size:12px;padding:9px 11px}}
@media(max-width:900px) and (orientation:landscape){#chapter-street-exchange{bottom:calc(82px + env(safe-area-inset-bottom,0px));width:min(620px,calc(100vw - 32px));max-height:48dvh;padding:10px 16px}.street-exchange-heading h2{font-size:17px}.street-japanese{font-size:15px}}

/* Short, illustrated owner dialogue. The static scene carries the staging. */
#clue.chapter-dialog.owner-encounter{width:min(800px,calc(100vw - 28px));padding:20px 26px 24px}
.owner-encounter .chapter-portrait{max-height:320px;margin:0 0 16px;background:transparent}
.owner-encounter .chapter-portrait img{height:auto;max-height:320px;object-fit:contain;border-radius:6px}
.owner-encounter .chapter-dialogue h2{font:25px Georgia,serif;margin:8px 0 10px}
.owner-encounter .chapter-speech{font-size:16px!important;line-height:1.65;margin:10px 0}
.owner-encounter .chapter-choices{margin-top:18px;gap:8px}
.owner-beat{letter-spacing:0;white-space:nowrap}
.chapter-notebook .chapter-facts{margin-top:12px}
@media(max-width:600px){#clue.chapter-dialog.owner-encounter{padding:36px 16px 20px}.owner-encounter .chapter-portrait,.owner-encounter .chapter-portrait img{height:auto;max-height:28dvh}.owner-encounter .chapter-dialogue h2{font-size:22px}.owner-encounter .chapter-speech{font-size:15px!important}}
@media(max-height:500px){.owner-encounter .chapter-portrait,.owner-encounter .chapter-portrait img{max-height:24dvh}}
