:root { color-scheme: dark; font: 500 15px/1.4 "Helvetica Neue", Arial, sans-serif; color: #faf6eb; background:#33392e; }
* { box-sizing:border-box; }
body { margin:0; overflow:hidden; }
[hidden] { display:none!important; }
#stage,#view { display:block; width:100%; height:100vh; height:100dvh; }
#stage { position:relative; overflow:hidden; }
#view { touch-action:none; outline:none; }
#view.ready { cursor:grab; }
#view.dragging { cursor:grabbing; }
.upper { position:absolute; top:max(20px, env(safe-area-inset-top)); left:max(22px, env(safe-area-inset-left)); right:max(22px, env(safe-area-inset-right)); display:flex; align-items:flex-start; justify-content:space-between; gap:12px; pointer-events:none; }
header,nav button,.panel,#caption,#notice,.dpad button { background:rgba(25,29,24,.88); color:#f7f4eb; border:1px solid rgba(255,255,255,.17); box-shadow:0 2px 16px #171a151e; }
header { padding:8px 14px 8px 12px; border-radius:7px; display:flex; align-items:center; gap:11px; }
.name { font:normal 23px/.98 "Iowan Old Style",Georgia,serif; letter-spacing:-.065em; }
.separator { height:16px; border-left:1px solid #96988b; }
h1 { margin:0; font-size:13px; line-height:1.1; font-weight:500; }
nav { display:flex; gap:6px; pointer-events:auto; }
button { cursor:pointer; font:inherit; }
nav button,.reference-head button { font-size:12px; padding:8px 12px; border-radius:7px; }
button:disabled { opacity:.62; cursor:default; }
button:focus-visible { outline:2px solid #f6db97; outline-offset:3px; }
button:not(:disabled):hover { filter:brightness(1.13); }
.panel { border-radius:9px; }
#welcome,#hints { position:absolute; left:max(22px, env(safe-area-inset-left)); bottom:max(22px, env(safe-area-inset-bottom)); }
#welcome { max-width:min(360px,calc(100% - 44px)); padding:20px 24px 22px; }
#welcome h2,dialog h2 { margin:0; font:normal 32px/1.03 "Iowan Old Style",Georgia,serif; letter-spacing:-.045em; }
#welcome p { margin:9px 0 16px; font-size:14px; color:#dddcd1; }
#enter { border:none; border-radius:5px; padding:8px 12px; background:#eee8d5; color:#252a23; font-size:13px; font-weight:600; }
#enter span { margin-left:14px; }
#hints { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:9px 13px; font-size:12px; }
#replay-reply { background:transparent; border:0; padding:2px; color:inherit; text-decoration:underline; font-size:12px; }
#reply-status { flex-basis:100%; max-width:36ch; color:#e8d8ac; }
kbd { padding:2px 4px; border:1px solid #acb0a777; border-radius:3px; font:500 10px/1.3 ui-monospace,"SFMono-Regular",monospace; margin-right:2px; }
.dot { margin:0 4px; color:#bbbfae; }
#talk { border:0; border-left:1px solid #999f8e77; border-radius:0; padding:0 0 0 12px; background:transparent; color:inherit; font-size:12px; }
#caption,#notice { position:absolute; bottom:max(82px,calc(env(safe-area-inset-bottom) + 60px)); left:50%; transform:translateX(-50%); border-radius:5px; padding:8px 15px; font-size:16px; text-align:center; pointer-events:none; }
#caption b { font-size:12px; font-weight:600; color:#dfd2ab; margin-right:7px; }
#notice { max-width:92%; width:max-content; font-size:13px; background:#603d29; }
dialog { color:inherit; background:#21241e; border:1px solid #ffffff33; border-radius:12px; max-width:min(760px,92vw); padding:16px; }
dialog::backdrop { background:rgba(17,19,16,.7); }
.reference-head { display:flex; gap:30px; justify-content:space-between; align-items:center; margin-bottom:12px; }
dialog h2 { font-size:24px; }
.reference-head button { background:transparent; border:1px solid #ffffff55; color:inherit; }
#vimeo-screening { width:min(92vw,calc(70dvh * var(--film-aspect,1) + 34px)); max-width:1060px; }
#vimeo-frame { width:100%; aspect-ratio:var(--film-aspect,1); background:black; }
#vimeo-player,#studio-player { display:block; border:0; height:100%; width:100%; max-height:none; object-fit:contain; }
#vimeo-external { display:inline-block; color:#e2d4ae; font-size:13px; text-underline-offset:3px; }
#studio-player-status { margin:8px 0 0; font-size:13px; }
video { display:block; width:min(710px,82vw); max-height:68vh; }
#ref-note { font-size:12px; color:#c8cbbf; margin:10px 0 0; }
.touch-hint,.dpad { display:none; }
@media (pointer:coarse) {
 .desktop-hint { display:none; }
 .touch-hint { display:inline; }
 .dpad { position:absolute; bottom:max(14px,env(safe-area-inset-bottom)); right:14px; display:grid; grid-template-columns:repeat(3,36px); gap:4px; }
 .dpad button { touch-action:none; border-radius:6px; height:34px; }
 [data-key="KeyW"] { grid-column:2; }
 [data-key="KeyA"] { grid-column:1; }
 #hints { max-width:calc(100% - 158px); }
}
@media (max-width:550px) {
 .upper { top:12px; left:12px; right:12px; }
 header { padding:8px 9px; gap:7px; }
 nav button { font-size:11px; padding:8px; }
 #welcome,#hints { left:12px; bottom:14px; }
 #talk { padding:0; border:0; }
}

#conversation { position:absolute; left:max(22px,env(safe-area-inset-left)); bottom:max(22px,env(safe-area-inset-bottom)); width:min(390px,calc(100% - 44px)); padding:14px 16px; }
.chat-heading,.chat-input { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.chat-heading { margin-bottom:9px; }
#conversation-label { font:normal 22px/1.15 "Iowan Old Style",Georgia,serif; }
#close-chat { background:transparent; color:#e8e6d9; border:0; padding:3px; font-size:12px; }
#question { min-width:0; flex:1; background:#f4f1e7; color:#242820; border:1px solid #d5cfbb; border-radius:5px; padding:9px; font:inherit; }
#question:focus-visible { outline:2px solid #d3b76e; outline-offset:2px; }
#send { padding:9px 12px; color:#242820; background:#e8d8ac; border:0; border-radius:5px; }
#chat-hint { font-size:12px; color:#d9d9cb; margin:8px 0 0; }
#caption { width:max-content; max-width:min(680px,calc(100% - 28px)); }
#notice { background:rgba(25,29,24,.88); }
#stage.chat-open #caption,#stage.chat-open #notice { bottom:max(172px,calc(env(safe-area-inset-bottom) + 160px)); }
#stage.chat-open .dpad { display:none; }
#artwork-controls { position:absolute; top:max(74px,calc(env(safe-area-inset-top) + 66px)); left:max(22px,env(safe-area-inset-left)); max-width:calc(100% - 44px); padding:12px 15px; }
#artwork-controls h2 { margin:0; font:normal 22px/1.1 "Iowan Old Style",Georgia,serif; }
#artwork-controls p { margin:3px 0 0; color:#dedfd3; font-size:12px; }
.player-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:9px; }
.player-actions button { background:#393d34; color:inherit; border:1px solid #ffffff3d; border-radius:4px; font-size:12px; padding:5px 9px; }
#artwork-controls #artwork-status { color:#e8d8ac; margin-top:8px; }
#stage.chat-open #artwork-controls { display:none; }
@media (max-width:550px) {
 #conversation { left:12px; bottom:14px; width:calc(100% - 24px); }
 #caption,#notice { bottom:98px; }
 #artwork-controls { top:57px; left:12px; max-width:calc(100% - 24px); padding:9px 12px; }
}
#voice-only:not([hidden]) { display:block; margin-top:14px; color:inherit; text-underline-offset:3px; }
