/* The 3-line menu button + drawer (hud-menu.js) and ARIA's line + caption (aria.js). Fixed to the VIEWPORT: camera moves never touch them. */
:root { --aria: #bfe4ff; --aria-ink: #f2f9ff; --hud-glass: rgba(22, 19, 16, .94); }

/* ---- the menu button: upper right, always the same place and size */
.hud-burger { position: fixed; z-index: 40; top: 8px; right: max(var(--gutter, 16px), env(safe-area-inset-right)); width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-content: center; gap: 5px; border-radius: 10px; background: rgba(20, 18, 16, .78); border: 1px solid rgba(255, 240, 220, .28); }
.hud-burger span { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: var(--ink, #f4ede3); }
.hud-burger[aria-expanded="true"] { border-color: var(--accent, #e0a464); background: rgba(224, 164, 100, .2); }
.hud-burger:focus-visible { outline: 3px solid var(--focus, #ffd28a); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(0, 0, 0, .7); }
#bar .tools { margin-right: 56px; }   /* room for the button: Back stays to its left */

/* ---- the drawer: slides in from the right, solid dark glass, does not pause the 3D */
.hud-drawer { position: fixed; z-index: 39; top: 0; right: 0; bottom: 0; width: 320px; max-width: calc(100vw - 48px); overflow: auto; overscroll-behavior: contain; padding: 10px 16px 24px; background: var(--hud-glass); border-left: 1px solid var(--line, rgba(255, 240, 220, .16)); backdrop-filter: blur(10px); box-shadow: -12px 0 30px rgba(0, 0, 0, .45);
  transform: translateX(100%); visibility: hidden; transition: transform .24s ease, visibility 0s linear .24s; }
.hud-drawer.open { transform: none; visibility: visible; transition: transform .24s ease, visibility 0s; }
.hud-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-right: 52px; }
.hud-title { margin: 0; font-size: 18px; }
.hud-close { min-height: 40px; }
.hud-sec { border-top: 1px solid var(--line, rgba(255, 240, 220, .16)); padding: 10px 0 12px; display: grid; gap: 8px; }
.hud-sec h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2, #c9bfb1); }
.hud-rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hud-rooms button, .hud-wide { width: 100%; justify-content: flex-start; text-align: left; }
.hud-rooms button[aria-current="page"] { border-color: var(--accent, #e0a464); background: rgba(224, 164, 100, .18); }
.hud-here { margin-left: auto; font-size: 12px; color: var(--accent, #e0a464); }
.hud-small { margin: 0; font-size: 13px; color: var(--ink-2, #c9bfb1); }
.hud-keys { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.hud-keys dt { color: var(--ink, #f4ede3); font-weight: 600; } .hud-keys dd { margin: 0; color: var(--ink-2, #c9bfb1); }
.hud-sec .check { display: flex; gap: 8px; align-items: center; } .hud-sec input[type=checkbox] { width: 20px; height: 20px; }
.hud-sec select { width: 100%; }
#settings.hud-in { position: static; width: auto; background: none; border: 0; padding: 0; z-index: auto; }
#list-toggle.hud-wide { width: 100%; }

/* ---- ARIA on screen = plain-text captions only (her picture is the beam in the room). A quiet bar under the header row, centred, high contrast, fades. */
.aria { position: fixed; z-index: 30; top: 60px; left: 0; right: 0; margin: 0 auto; width: min(560px, calc(100vw - 32px)); display: grid; justify-items: center; pointer-events: none; }
.aria-caption { margin: 4px 0 0; max-width: 100%; padding: 6px 14px; border-radius: 10px; background: rgba(6, 12, 20, .78); color: var(--aria-ink); font-size: 17px; line-height: 1.35; text-align: center; text-shadow: 0 1px 2px #000; border: 1px solid rgba(255, 255, 255, .14);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: 0; transition: opacity .4s ease; }
.aria-caption.show { opacity: 1; }
.aria-caption:empty { display: none; }
.aria-ask, .aria-tour { pointer-events: auto; margin-top: 8px; padding: 10px; border-radius: 12px; background: rgba(8, 14, 22, .92); border: 1px solid rgba(170, 220, 255, .28); display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 100%; }
.aria-ask button, .aria-tour button { border-color: rgba(170, 220, 255, .3); }
.aria-note { flex-basis: 100%; margin: 0 0 2px; font-size: 12px; color: #a9c7dc; text-align: center; }
/* while she speaks, the room's own intro box steps aside (her line says the same thing) so the two never overlap */
body.aria-speaking .intro { opacity: 0; transition: opacity .3s ease; }

@media (max-width: 760px) {
  .hud-drawer { width: calc(100vw - 48px); }
  .aria-caption { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .hud-drawer, .hud-drawer.open { transition: none; } .aria-caption { transition: none; } body.aria-speaking .intro { transition: none; } }

/* BRAIN: the 'Ask ARIA anything' box (aria-ask.js): big touch target, sits at the top so a phone keyboard does not cover it */
.aria-brain { flex-basis: 100%; display: flex; gap: 6px; }
.aria-brain input { flex: 1; min-width: 0; min-height: 44px; font: inherit; font-size: 16px; color: var(--ink, #f4ede3); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: 6px 10px; }
.aria-brain button { min-height: 44px; }
.aria-qa { flex-basis: 100%; } .aria-qa p { margin: 2px 0; } .aria-q { color: #a9c7dc; font-size: 14px; } .aria-a { color: var(--ink, #f4ede3); }
.aria-qa:has(.aria-q:empty) { display: none; }
.aria-chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; } .aria-chips:empty { display: none; }
.aria-more { flex-basis: 100%; } .aria-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: center; color: #a9c7dc; } .aria-more[open] { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
