/* The same lockup as the Filmstrip home: a Times Now corner caption,
   a light NB International headline and the solid Archivo masthead. */
:root {
  --cinema-sans: 'NB International', Arial, sans-serif;
  --cinema-serif: 'Times Now', Georgia, serif;
  --cinema-paper: #111;
  --cinema-ink: #f3f1eb;
  --cinema-muted: #aaa9a4;
  --cinema-rule: #ffffff2b;
  --cinema-gutter: clamp(20px, 2.2vw, 42px);
  --cinema-header: 84px;
  color: var(--cinema-ink);
  background: var(--cinema-paper);
  font-family: var(--cinema-sans);
}
.hud, .entry-mast, .panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--cinema-header) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--cinema-gutter) 0;
}
.hud {
  inset: 0 0 auto;
  color: #fff;
  letter-spacing: 0;
  text-shadow: 0 1px 4px #000a;
  background: linear-gradient(to bottom, #0006, transparent);
}
#experience:has(#world:is([data-room="whitehall"], [data-room="construct"], [data-room="neuro"])) .hud {
  color: #151515;
  text-shadow: 0 1px 4px #ffffffe0;
  background: linear-gradient(to bottom, #fffd, #ffffff75 60%, transparent);
}
.hud .wordmark, .entry-mast .wordmark, .panel-heading .wordmark {
  font: 400 clamp(25px, 2.4vw, 38px)/1 ArchivoBlack, Arial, sans-serif;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.hud-actions { width: auto; gap: clamp(12px, 2vw, 28px); }
.hud-actions button, .entry-mast > span, .panel-heading button {
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  font: 400 14px/1 var(--cinema-sans);
  letter-spacing: 0;
  white-space: nowrap;
}
.hud #menu-button { min-width: 44px; justify-content: end; }
.hud #fullscreen-button { min-width: 44px; min-height: 44px; justify-content: center; }
.hud #fullscreen-button svg { display: block; width: 20px; height: 20px; pointer-events: none; }
.touch-instructions { display: none; }
.hud #library-button { gap: .25em; }
.hud .wordmark:hover, .entry-mast a:hover,
.hud-actions button:hover, .panel button:hover, .panel a:hover {
  background: transparent;
  color: inherit;
}
.hud-actions button:hover, .panel button:hover:not(:disabled), .panel a:hover, #welcome #enter:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.hud #flashlight-button[aria-pressed=true] { color: inherit; text-decoration: underline; text-underline-offset: 5px; text-shadow: inherit; }

#welcome {
  padding: 0;
  color: white;
  background: linear-gradient(to bottom, #0006, transparent 16%, transparent 80%, #0008);
  text-shadow: 0 1px 12px #0009;
}
.entry-mast, #welcome .entry-actions {
  position: absolute;
  inset: 0 0 auto;
}
#welcome .entry-title {
  width: fit-content;
  max-width: calc(100% - 2 * var(--cinema-gutter));
  margin: 0;
  font: 300 clamp(52px, 6vw, 94px)/.9 var(--cinema-sans);
  letter-spacing: -.005em;
  text-align: left;
}
.entry-title small, .panel-intro .eyebrow {
  display: block;
  margin: 0 0 6px;
  font: 400 14px/1.2 var(--cinema-serif);
  letter-spacing: 0;
  text-transform: none;
}
#welcome .entry-actions {
  inset: auto var(--cinema-gutter) max(20px, env(safe-area-inset-bottom));
  width: auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
.entry-caption, #welcome #enter {
  font: 400 14px/1.25 var(--cinema-sans);
  letter-spacing: 0;
}
#welcome #enter {
  min-width: 0;
  min-height: 44px;
  padding: 0;
  color: white;
  background: transparent;
  border: 0;
}
#enter[aria-busy=false]::after { content: '↗'; margin-left: .45em; }
#load-status {
  position: absolute;
  bottom: max(90px, 14dvh);
  margin: 0 var(--cinema-gutter);
  padding: 10px 14px;
  background: var(--cinema-paper);
  color: var(--cinema-ink);
}
body:has(#load-status:not(:empty)) .entry-mast { visibility: hidden; }
body:has(#welcome:not([hidden])) .cinema-map { display: none; }

/* Use the breathable black navigation plane from the portfolio. The game
   pauses while it is open. Lists share the page scroll with the close control. */
.panel, .panel.project-index, .panel.projection-library {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0 var(--cinema-gutter) max(42px, env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 0;
  background: var(--cinema-paper);
  color: var(--cinema-ink);
  box-shadow: none;
  scrollbar-color: #ffffff40 var(--cinema-paper);
  font-family: var(--cinema-sans);
}
.panel::backdrop { background: var(--cinema-paper); backdrop-filter: none; }
.panel .panel-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 calc(0px - var(--cinema-gutter));
  background: var(--cinema-paper);
}
.panel .panel-heading button { gap: 12px; margin: 0; }
.panel-heading button span { font-size: 20px; }
.panel-layout {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: clamp(34px, 7vw, 140px);
  max-width: 1400px;
  margin: 0 auto;
  padding-top: clamp(25px, 6dvh, 78px);
}
.panel-intro { position: sticky; top: calc(var(--cinema-header) + env(safe-area-inset-top) + 20px); }
.panel-intro h2 {
  margin: 0 0 22px;
  font: 300 clamp(42px, 4.2vw, 68px)/.96 var(--cinema-sans);
  letter-spacing: -.005em;
  text-wrap: balance;
}
.panel .muted, .panel .fine {
  opacity: 1;
  color: var(--cinema-muted);
  font: 400 14px/1.5 var(--cinema-sans);
}
.panel .fine { font-size: 12px; }
.panel-intro .muted { max-width: 36ch; }
.panel .text-link, .settings-footer a, .settings-footer button, .panel #visit-booth {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  font: 400 14px/1.25 var(--cinema-sans);
}
.panel .menu-actions {
  display: flex; align-items: start; flex-direction: column;
  gap: 0;
  margin: clamp(18px, 5dvh, 56px) 0 18px;
}
.panel .menu-actions button {
  min-height: 44px;
  padding: 3px 0;
  border: 0;
  font: 400 clamp(25px, 2.7vw, 43px)/1.1 var(--cinema-serif);
  text-align: left;
  letter-spacing: -.025em;
}
.menu-actions button span { font-size: .67em; vertical-align: .1em; }
.settings-sections h3 {
  margin: 0 0 20px;
  font: 400 14px/1.2 var(--cinema-serif);
}
.setting-section, details.setting-section.lighting-panel { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--cinema-rule); }
.setting-section > summary {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 58px;
  margin: 0;
  padding: 13px 0;
  font: 300 clamp(22px, 2.2vw, 33px)/1 var(--cinema-sans);
  list-style: none;
  cursor: pointer;
}
.setting-section > summary::-webkit-details-marker { display: none; }
.setting-section > summary::after { content: '+'; font: 400 18px var(--cinema-sans); color: var(--cinema-muted); }
.setting-section[open] > summary::after { content: '−'; }
.setting-section > summary:focus-visible { outline: 2px solid var(--cinema-ink); outline-offset: -2px; }
.setting-fields { padding: 5px 2px 26px; }
.setting-fields .picture-controls:first-child, .setting-fields .sound-controls:first-child { margin-top: 0; padding-top: 0; border: 0; }
.setting-fields label[for=graphics-quality] { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.setting-fields .check { min-height: 36px; margin: 8px 0; font-size: 14px; }
.panel :is(input[type=range], input[type=checkbox]), .tv-panel input { accent-color: var(--cinema-ink); }
.panel select, .tv-panel select, .film-program {
  min-height: 38px; padding: 6px 10px; border: 1px solid var(--cinema-rule);
  background: #222; color: var(--cinema-ink); border-radius: 0; font: inherit;
}
.settings-footer { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 14px 0; border-top: 1px solid var(--cinema-rule); }
.setting-fields .picture-presets { margin-top: 0; }
.panel :is(.picture-presets button, .setting-fields button, .room-links button, .chest-link) { border-color: var(--cinema-rule); font: 400 13px/1.3 var(--cinema-sans); }

/* Film titles sit against their client's own left edge, as on the live list. */
.project-index .project-list { max-height: none; overflow: visible; }
.project-row, .library-row { min-height: 88px; padding: 16px 0; border-top-color: var(--cinema-rule); }
.project-number, .project-row.discovered .project-number { color: var(--cinema-muted); font-size: 11px; font-variant-numeric: tabular-nums; opacity: 1; }
.project-name, .library-row p {
  display: flex; flex-direction: column; align-items: start; gap: 6px;
  margin: 0;
  font: 300 clamp(28px, 2.65vw, 42px)/.94 var(--cinema-sans);
  letter-spacing: -.005em; overflow-wrap: anywhere;
}
.project-name small, .library-row p small {
  order: -1; margin: 0; opacity: 1; color: var(--cinema-ink);
  font: 400 14px/1.2 var(--cinema-serif); letter-spacing: 0;
}
.project-actions { gap: 14px; }
.project-actions button, .library-row button {
  min-height: 44px;
  border: 0;
  padding: 0;
  font: 400 13px/1.2 var(--cinema-sans);
}
.library-row.locked { opacity: .59; }
.library-row.locked .film-placeholder { background: #1c1c1c; color: var(--cinema-muted); }
#project-search { background: transparent; color: inherit; border: 0; border-bottom: 1px solid #ffffff65; padding: 10px 0; font-size: 16px; }
.search-label { font-size: 12px; }
.room-links .eyebrow { grid-column: 1 / -1; margin-top: 15px; font: 400 16px var(--cinema-serif); text-transform: none; letter-spacing: 0; }
.project-index .room-links { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.room-links button { min-height: 44px; padding: 10px 0; border: 0; border-top: 1px solid var(--cinema-rule); }
.panel .chest-link { padding: 15px 0; border: 0; border-block: 1px solid var(--cinema-rule); }

.tv-panel, .screen-hover, .interaction, .notice {
  background: #111e; color: var(--cinema-ink);
  border: 1px solid var(--cinema-rule);
  border-radius: 0; box-shadow: none;
  font-family: var(--cinema-sans);
}
.tv-panel .eyebrow, .media-heading .eyebrow {
  font: 400 14px/1.2 var(--cinema-serif);
  color: inherit; opacity: 1; text-transform: none; letter-spacing: 0;
}
.tv-panel #tv-title, .media-heading #media-title {
  margin: 6px 0 12px;
  font: 300 clamp(23px, 2.25vw, 34px)/1 var(--cinema-sans);
  letter-spacing: -.005em;
}
.media-dialog .media-heading { padding-inline: var(--cinema-gutter); }
.media-dialog .media-heading button { min-height: 44px; border: 0; background: transparent; color: #fff; font: 400 14px var(--cinema-sans); }
.tv-buttons button, .tv-volume-label { font-size: 12px; }
.screen-hover:hover, .screen-hover:focus-visible { background: var(--cinema-ink); color: #111; }
.resident-subtitle { color: #fff; }
.subtitle-line { font-family: var(--cinema-serif); }
.subtitle-speaker, .subtitle-actions, .subtitle-note, .subtitle-question { font-family: var(--cinema-sans); }
.subtitle-speaker { font-size: 12px; text-transform: none; letter-spacing: 0; }
.subtitle-question { color: inherit; border-color: #ffffff80; }
.subtitle-question::before { border-color: #ffffff60; }
.cinema-map.radar { left: var(--cinema-gutter); font-family: var(--cinema-sans); }
.radar .map-toggle { font: 400 12px/1.3 var(--cinema-sans); text-transform: none; letter-spacing: 0; color: #fff; }
.radar .map-location { font: 400 14px/1.2 var(--cinema-serif); color: white; }
.radar .map-heading { font: 400 9px/1.4 var(--cinema-sans); color: #c3c3be; }
.walking-help, .tape-data { font-family: var(--cinema-sans); letter-spacing: 0; }
.tape-data { color: white; text-shadow: 0 1px 3px black; }
#experience:has(#world:is([data-room="whitehall"], [data-room="construct"], [data-room="neuro"])) :is(.tape-data, .walking-help) {
  color: #151515;
  text-shadow: 0 1px 3px white;
}

@keyframes cinema-index-in { from { opacity: 0; transform: translateY(5px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  body:not(:has(#still:checked)) :is(.entry-title, .panel[open] .panel-layout) { animation: cinema-index-in .32s ease-out both; }
  body:not(:has(#still:checked)) .project-row .project-name { transition: opacity .18s, transform .25s; }
  body:not(:has(#still:checked)) .project-row:is(:hover, :focus-within) .project-name { transform: translateX(4px); }
}
body:has(#still:checked) :is(.screen-hover, .subtitle-line.arriving) { animation: none; }
body:has(#still:checked) #screen-loading span, body:has(#still:checked) #enter[aria-busy=true]::after { animation: none; }
@media (max-width: 760px), (pointer: coarse) {
  :root { --cinema-header: 68px; }
  .hud .wordmark { display: inline-flex!important; }
  .hud-actions { width: auto; justify-content: end; gap: 16px; }
  .hud-actions button, .hud-actions #library-button, .hud #menu-button { min-height: 44px; padding: 0; border: 0; width: auto; height: auto; background: transparent; opacity: 1; font-size: 13px; }
  .hud .wordmark, .entry-mast .wordmark, .panel-heading .wordmark { font-size: 26px; }
  #welcome .entry-title { font-size: clamp(42px, 10vw, 60px); }
  .entry-title small, .panel-intro .eyebrow, .project-name small, .library-row p small { font-size: 12px; }
  #welcome .entry-actions { gap: 8px; }
  .entry-caption, #welcome #enter { font-size: 12px; }
  .panel-layout { display: block; padding-top: 22px; }
  .panel-intro { position: static; margin-bottom: 24px; }
  .panel .menu-actions { gap: 0; margin: 12px 0; }
  .panel-intro h2 { font-size: 40px; margin-bottom: 14px; }
  .setting-section > summary { min-height: 50px; font-size: 24px; }
  .project-index .project-row { grid-template-columns: 22px minmax(0, 1fr); gap: 6px 12px; }
  .project-row .project-actions { grid-column: 2; gap: 16px; }
  .project-name, .library-row p { font-size: 30px; }
  .radar .map-toggle { font-size: 11px; }
  .radar .map-location { font-size: 12px; }
  .cinema-map.radar { left: 10px; }
  #interaction, .swim-pad button, .dpad button, .tv-panel { border-radius: 2px; }
  body:has(#load-status:not(:empty)) .hud #index-button { display: inline-flex; }
  body:has(#load-status:not(:empty)) .hud #library-button { display: none; }
}
@media (min-width: 701px) and (max-height: 570px) {
  :root { --cinema-header: 56px; }
  .panel-layout { padding-top: 12px; }
  .panel-intro { position: static; }
  .cinema-map.radar { width: 130px; bottom: 22px; }
  .radar canvas { width: 130px; }
}

.move-pad { display: none; }

/* One movement stick leaves the right side open for direct drag-to-look.
   The navigator and Sprint stay above the left thumb in either orientation. */
@media (max-width: 760px), (pointer: coarse) {
  :root {
    --cinema-edge-left: max(16px, env(safe-area-inset-left));
    --cinema-edge-right: max(16px, env(safe-area-inset-right));
    --cinema-edge-bottom: max(16px, env(safe-area-inset-bottom));
    --cinema-touch-size: 54px;
    --cinema-touch-gap: 6px;
    --cinema-move-size: 112px;
    --cinema-run-height: 44px;
  }
  .hud, .entry-mast, .panel .panel-heading {
    padding-left: var(--cinema-edge-left);
    padding-right: var(--cinema-edge-right);
  }
  .hud { gap: 10px; }
  .hud .wordmark { min-height: 44px; font-size: clamp(22px, 6.15vw, 26px); flex-shrink: 0; }
  .hud-actions { gap: 8px; }
  .hud-actions :is(#menu-button, #fullscreen-button, #library-button) { min-width: 44px; min-height: 44px; justify-content: center; }
  .hud-actions #library-button { gap: 3px; font-size: 0; }
  .hud #library-button #film-count, .hud #library-button::after { font: 400 12px/1 var(--cinema-sans); }
  .hud #library-button::after { content: 'films'; }
  .hud #fullscreen-button svg { display: block; width: 20px; height: 20px; pointer-events: none; }
  .hud #fullscreen-button { touch-action: manipulation; }
  #fullscreen-menu-button { min-height: 44px; }
  .touch-instructions { display: block; }
  .keyboard-instructions, .keyboard-instructions + .muted, .keyboard-hint, #capture, #capture + .fine { display: none; }
  #fullscreen-help { max-width: 44ch; }

  #touch-controls {
    left: var(--cinema-edge-left);
    bottom: var(--cinema-edge-bottom);
  }
  .swim-pad button.pressed { background: #f3f1eb; color: #111; border-color: #f3f1eb; }
  .move-pad {
    position: relative;
    display: grid;
    grid-template-columns: var(--cinema-move-size);
    justify-items: center;
    gap: 8px;
    pointer-events: auto;
    -webkit-user-select: none; user-select: none;
  }
  #touch-sprint {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; min-height: var(--cinema-run-height);
    padding: 8px; border: 1px solid #ffffff45;
    border-radius: 8px; background: #111b; color: #f3f1eb;
    font: 400 13px/1 var(--cinema-sans);
    white-space: nowrap;
    touch-action: none;
  }
  #touch-sprint::before { content: ''; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; border: 1px solid currentColor; }
  #touch-sprint[aria-pressed="true"], #touch-sprint.pressed { background: #f3f1eb; color: #111; border-color: #f3f1eb; }
  #touch-sprint[aria-pressed="true"]::before { background: currentColor; }
  #move-stick {
    position: relative;
    width: var(--cinema-move-size); height: var(--cinema-move-size);
    border: 1px solid #ffffff45; border-radius: 50%;
    background: radial-gradient(circle, #ffffff0a 0 49%, transparent 50%), #1119;
    box-shadow: inset 0 0 0 8px #ffffff04;
    touch-action: none; overflow: hidden;
    cursor: grab;
  }
  #move-stick::before, #move-stick::after { content: ''; position: absolute; pointer-events: none; background: #ffffff22; }
  #move-stick::before { width: 1px; height: 10px; top: 8px; left: 50%; box-shadow: 0 calc(var(--cinema-move-size) - 28px) 0 #ffffff22; }
  #move-stick::after { height: 1px; width: 10px; left: 8px; top: 50%; box-shadow: calc(var(--cinema-move-size) - 28px) 0 0 #ffffff22; }
  .move-stick-knob {
    position: absolute; left: 50%; top: 50%;
    width: 42px; height: 42px; border: 1px solid #ffffff80; border-radius: 50%;
    background: #f3f1eb33; box-shadow: 0 2px 8px #0004;
    transform: translate(calc(-50% + var(--move-x, 0px)), calc(-50% + var(--move-y, 0px)));
    pointer-events: none;
  }
  #move-stick.active { border-color: #f3f1eb; cursor: grabbing; }
  #move-stick.active .move-stick-knob { background: #f3f1ebcc; border-color: #f3f1eb; }
  #interaction {
    right: var(--cinema-edge-right);
    bottom: var(--cinema-edge-bottom);
    max-width: min(220px, calc(100vw - var(--cinema-edge-left) - var(--cinema-edge-right) - var(--cinema-move-size) - 24px));
    min-width: 0; min-height: var(--cinema-touch-size);
    padding: 9px 13px; border-radius: 8px; font-size: 13px; line-height: 1.3;
  }
  .screen-hover {
    right: var(--cinema-edge-right);
    bottom: calc(var(--cinema-edge-bottom) + var(--cinema-touch-size) + 8px);
    min-height: var(--cinema-touch-size);
    max-width: min(220px, calc(100vw - var(--cinema-edge-left) - var(--cinema-edge-right) - var(--cinema-move-size) - 24px));
    padding: 9px 13px; border-radius: 8px; gap: 8px; font-size: 12px; line-height: 1.3;
  }
  .cinema-map.radar {
    left: var(--cinema-edge-left); top: auto;
    bottom: calc(var(--cinema-edge-bottom) + var(--cinema-move-size) + var(--cinema-run-height) + 22px);
    width: 120px; max-height: none;
  }
  .radar canvas { width: 120px; filter: drop-shadow(0 2px 6px #0005); }
  .radar .map-toggle { min-height: 44px; padding: 4px 8px; }
  .radar .map-location { margin: 3px 8px 0; font-size: 11px; line-height: 1.2; }
  .radar .map-heading { display: none; }
  .cinema-map.radar.collapsed { width: 120px; }
  #experience:has(#world:is([data-water="submerged"], [data-water="surface"])) .cinema-map.radar {
    bottom: calc(var(--cinema-edge-bottom) + var(--cinema-move-size) + var(--cinema-run-height) + 22px);
  }
  #experience:has(#world:is([data-water="submerged"], [data-water="surface"])) .swim-pad { display: grid; left: calc(100% + 12px); bottom: 0; gap: 6px; pointer-events: auto; }
  .swim-pad button { min-width: 64px; min-height: 44px; border-radius: 8px; background: #111d; }
  .tv-panel {
    inset: calc(var(--cinema-header) + env(safe-area-inset-top) + 5px) var(--cinema-edge-right) auto auto;
    max-width: calc(100vw - var(--cinema-edge-left) - var(--cinema-edge-right));
    border-radius: 6px; padding: 3px 6px;
  }
  .tv-panel .tv-buttons { gap: 2px; }
  .tv-panel button { min-height: 44px; min-width: 44px; padding: 8px; font-size: 12px; border: 0; }
  .notice {
    top: calc(var(--cinema-header) + env(safe-area-inset-top) + 62px); bottom: auto;
    left: 50%; right: auto; transform: translateX(-50%);
    max-width: min(380px, calc(100vw - var(--cinema-edge-left) - var(--cinema-edge-right)));
    padding: 10px 12px; font-size: 12px;
  }
  .panel { padding-inline: var(--cinema-edge-left) var(--cinema-edge-right); }
  .panel .panel-heading { margin-left: calc(0px - var(--cinema-edge-left)); margin-right: calc(0px - var(--cinema-edge-right)); }
  .panel .panel-heading button { min-width: 64px; justify-content: end; }
  .panel :is(select, input[type=search]) { font-size: 16px; }
  .panel .room-links button { min-height: 48px; }
  #welcome .entry-actions { left: var(--cinema-edge-left); right: var(--cinema-edge-right); bottom: var(--cinema-edge-bottom); }

  .media-dialog .media-heading {
    padding: max(10px, env(safe-area-inset-top)) var(--cinema-edge-right) 14px var(--cinema-edge-left);
    align-items: start; gap: 16px;
  }
  .media-heading > div { min-width: 0; }
  .media-dialog .media-heading #media-title { font-size: 23px; line-height: 1.05; overflow-wrap: anywhere; margin-bottom: 0; }
  .media-dialog .media-heading .eyebrow { font-size: 12px; overflow-wrap: anywhere; }
  .media-dialog .media-heading button { flex-shrink: 0; font-size: 12px; }
  .media-dialog .film-program-label { right: var(--cinema-edge-right); bottom: calc(70px + env(safe-area-inset-bottom)); opacity: 1; }
  .media-dialog .study-tabs { max-height: 90px; overflow: auto; opacity: 1; }
  .subtitle-actions kbd { display: none; }
  .subtitle-actions button { min-height: 44px; padding: 9px 4px; }
  .subtitle-question { min-height: 44px; }
}

@media (orientation: landscape) and (max-height: 540px) and (pointer: coarse),
       (orientation: landscape) and (max-height: 540px) and (max-width: 760px) {
  :root { --cinema-header: 54px; --cinema-touch-size: 48px; --cinema-touch-gap: 5px; --cinema-move-size: 88px; }
  .hud .wordmark, .entry-mast .wordmark, .panel-heading .wordmark { font-size: 24px; }
  .hud #index-button { display: none; }
  .hud-actions { gap: 12px; }
  .cinema-map.radar,
  #experience:has(#world:is([data-water="submerged"], [data-water="surface"])) .cinema-map.radar {
    top: calc(var(--cinema-header) + env(safe-area-inset-top));
    bottom: auto; width: 100px;
  }
  .radar canvas { width: 100px; }
  .radar .map-location { display: none; }
  .radar .map-toggle { font-size: 10px; min-height: 44px; }
  .cinema-map.radar.collapsed { width: 100px; }
  #experience #room-arrival[data-title-style] {
    inset: calc(var(--cinema-header) + env(safe-area-inset-top) + 8px) auto auto calc(var(--cinema-edge-left) + 122px)!important;
    max-width: min(400px, 55vw)!important;
  }
  #experience #room-arrival[data-title-style] #room-name { font-size: 25px; }
  .tv-panel { top: calc(var(--cinema-header) + env(safe-area-inset-top) + 5px); }
  .screen-hover, #interaction {
    bottom: var(--cinema-edge-bottom);
    max-width: 180px;
  }
  #experience:has(.screen-hover:not([hidden])) #interaction { right: calc(var(--cinema-edge-right) + 188px); }
  .panel-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 28px; padding-top: 14px; }
  .panel-intro h2 { font-size: 32px; }
  .panel .menu-actions button { font-size: 27px; }
  .project-name, .library-row p { font-size: 27px; }
  .project-index .room-links { grid-template-columns: 1fr; }
  .media-dialog .media-heading #media-title { font-size: 20px; }
  .media-dialog .film-program-label { bottom: calc(54px + env(safe-area-inset-bottom)); max-width: 230px; }
  .media-dialog .study-tabs { max-height: 68px; bottom: calc(54px + env(safe-area-inset-bottom)); }
  .subtitle-line { font-size: 20px; }
  .subtitle-actions { margin-top: 5px; }
  .subtitle-speaker { margin-bottom: 5px; }
}

/* Autoplay can start muted after the approach animation on mobile Safari.
   Its one-time sound affordance stays clear of both versions and transport. */
.media-dialog #media-content .film-sound-enable {
  position: absolute;
  z-index: 3;
  top: calc(env(safe-area-inset-top) + 84px);
  left: 50%;
  transform: translateX(-50%);
  min-height: 44px;
  max-width: calc(100% - max(32px, env(safe-area-inset-left)) - max(32px, env(safe-area-inset-right)));
  padding: 10px 18px;
  border: 1px solid #ffffff5c;
  border-radius: 6px;
  background: #111e;
  color: #f3f1eb;
  box-shadow: 0 2px 14px #0005;
  font: 400 14px/1.2 var(--cinema-sans);
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}
.media-dialog #media-content .film-sound-enable:is(:hover, :focus-visible) {
  background: #f3f1eb; color: #111;
}
.media-dialog #media-content .film-sound-enable:focus-visible { outline: 2px solid white; outline-offset: 4px; }
