/* A quiet, upward-opening room chooser replaces the horizontal chapter strip. */
.story-footer { z-index:16; display:flex; align-items:center; gap:16px; bottom:max(24px,calc(100% - 100svh + 16px)); pointer-events:none; }
.story-footer > * { pointer-events:auto; }
.scene-picker { position:relative; flex:0 1 auto; min-width:0; }
.scene-trigger { display:flex; align-items:center; gap:10px; min-height:48px; max-width:100%; padding:10px 14px; border:1px solid #d6bd8b50; border-radius:6px; color:#f0dfc1; background:#131510b8; backdrop-filter:blur(10px); box-shadow:0 3px 12px #0002; font-size:14px; line-height:1.5; white-space:nowrap; cursor:pointer; touch-action:manipulation; transition:background .18s,border-color .18s; }
.scene-trigger:hover,.scene-trigger[aria-expanded=true] { border-color:#e0ab5799; background:#242019ee; }
.scene-trigger:active { background:#30271d; }
.scene-trigger:focus-visible { outline:2px solid #f4e1bb; outline-offset:4px; }
.scene-compass { width:20px; height:20px; flex:none; color:#dcb77b; }
.scene-trigger-current { max-width:130px; overflow:hidden; text-overflow:ellipsis; border-left:1px solid #dfc39233; padding-left:10px; color:#c8b99f; font-size:12px; }
.scene-chevron { width:12px; height:12px; flex:none; margin-left:3px; color:#ddc9a7; transition:transform .18s; }
.scene-trigger[aria-expanded=true] .scene-chevron { transform:rotate(180deg); }
.scene-menu { position:absolute; left:0; bottom:calc(100% + 10px); width:292px; max-width:calc(100vw - 48px); padding:0 6px 6px; border:1px solid #d4b78160; border-radius:9px; background:linear-gradient(145deg,#29231df7,#151b1cf5); color:#f4e1bb; backdrop-filter:blur(18px); box-shadow:0 12px 48px #0007,inset 0 1px #f4e1bb12; }
.scene-menu[hidden] { display:none!important; }
.scene-menu-title { padding:14px 14px 11px; margin:0 4px 4px; border-bottom:1px solid #e0ab5726; color:#bbae94; font-size:12px; line-height:1.5; letter-spacing:.035em; }
.scene-menu .story-chapters { position:relative; display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:2px; width:100%; max-height:min(416px,calc(100svh - 210px)); overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; padding:0 4px 0 0; margin:0; scrollbar-width:thin; scrollbar-color:#b99a6270 transparent; scroll-behavior:auto; }
.scene-menu .story-chapters::-webkit-scrollbar { width:5px; }
.scene-menu .story-chapters::-webkit-scrollbar-thumb { border-radius:4px; background:#b99a6270; }
.scene-menu .story-chapters button { display:grid; grid-template-columns:6px minmax(0,1fr) 32px; align-items:center; justify-content:initial; gap:10px; flex:0 0 auto; width:100%; min-width:0; min-height:48px; padding:7px 12px; margin:0; border:1px solid transparent; border-radius:5px; background:transparent; box-shadow:none; color:#daceb8; font-size:14px; line-height:1.4; letter-spacing:.01em; text-align:left; text-shadow:none; white-space:normal; touch-action:manipulation; transition:background .15s,color .15s; }
.scene-menu .story-chapters button::before { content:''; width:4px; height:4px; border-radius:50%; background:#e0ab57; opacity:0; }
.scene-menu .story-chapters button b { font-weight:400; }
.scene-menu .story-chapters .scene-room-icon { display:block; width:32px; height:32px; object-fit:contain; pointer-events:none; filter:drop-shadow(0 2px 1px #0003); }
.scene-menu .story-chapters button:hover,.scene-menu .story-chapters button:focus-visible { color:#fff0d6; background:#e0ab5714; border-color:transparent; }
.scene-menu .story-chapters button:focus-visible { outline:1px solid #d6b276; outline-offset:-2px; }
.scene-menu .story-chapters button[aria-current=location] { color:#ffe2aa; background:#e0ab571f; border-color:#e0ab5728; box-shadow:none; }
.scene-menu .story-chapters button[aria-current=location]::before { opacity:1; }
.scene-menu .story-chapters button:active { background:#e0ab5730; }
@media(max-width:760px),(max-aspect-ratio:4/5) {
  .story-footer { display:flex; align-items:center; left:24px; right:24px; gap:12px; bottom:max(16px,calc(100% - 100svh + env(safe-area-inset-bottom) + 12px)); }
  .scene-trigger { gap:8px; padding:10px 11px; font-size:13px; }
  .scene-trigger-current { display:none; }
  .scene-compass { width:18px; height:18px; }
  .scene-chevron { width:11px; height:11px; margin-left:0; }
  .scene-menu { width:280px; }
  .scene-menu .story-chapters { max-height:min(384px,calc(100svh - 190px)); }
  .story-footer .story-about-link { flex:0 1 auto; max-width:100px; min-height:44px; justify-content:flex-end; font-size:12px; line-height:1.4; white-space:normal; text-align:right; }
}
@media(prefers-reduced-motion:reduce) { .scene-trigger,.scene-chevron,.scene-menu .story-chapters button { transition:none; } }
/* The fixed audio dock must not sit on top of room choices on narrow screens. */
@media(max-width:640px) {
  .site-experience:has(.scene-trigger[aria-expanded=true]) .music-dock { visibility:hidden; }
}
