/* The room keeps its own proportions; the movie itself stays 16:9 and uncropped. */
.theater { --ceiling-color: #ffd6a0; --ceiling-level: .35; --sides-color: #ff9230; --sides-level: .3; --screen-color: #ffd6a0; --screen-level: .25; --spotlight: 0; position: relative; isolation: isolate; width: 100%; aspect-ratio: 16 / 11; background: #080809; border-radius: 22px; overflow: hidden; }
.theater-scenery, .theater-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.theater-art { fill: none; stroke: none; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.theater .screen, .screen-halo { position: absolute; left: 13%; top: 22.54545%; width: 74%; height: auto; aspect-ratio: 16 / 9; border-radius: 2px; }
.theater .screen { z-index: 2; background: #000; box-shadow: 0 3px 12px #000a; }
.theater .screen video:not(.started) { object-fit: contain; }
.screen-halo { z-index: 1; color: var(--screen-color); outline: 2px solid currentColor; box-shadow: 0 0 16px 5px currentColor, 0 0 65px 12px currentColor; opacity: calc(var(--screen-level) * var(--intro-screen, 1)); transition: opacity .35s, color .35s; }
.ceiling-light { transition: opacity .35s; }
.lamp-ceiling-left { opacity: calc(var(--ceiling-level) * var(--intro-ceiling-left, 1)); }
.lamp-ceiling-right { opacity: calc(var(--ceiling-level) * var(--intro-ceiling-right, 1)); }
.side-light { transition: opacity .35s; }
.lamp-side-left { opacity: calc(var(--sides-level) * var(--intro-side-left, 1)); }
.lamp-side-right { opacity: calc(var(--sides-level) * var(--intro-side-right, 1)); }
.ring-light, .ring-glint { opacity: calc(var(--spotlight) * var(--intro-ring, 1)); transition: opacity .35s; }
.engagement-ring { filter: brightness(calc(.52 + var(--spotlight) * 1.25)); transition: filter .7s; }
.theater-room, .theater-edge { opacity: var(--room-visibility, 1); transition: opacity .4s; }
.audience-figure { opacity: 1; filter: brightness(calc(.3 + var(--house-level, 1) * .55)) url(#audience-screen-light); transition: opacity .3s, filter .4s; }
.intro-theater { background: #000; }
.intro-theater .lamp-ceiling-left { opacity: calc(max(.45, var(--ceiling-level)) * var(--intro-ceiling-left)); }
.intro-theater .lamp-ceiling-right { opacity: calc(max(.45, var(--ceiling-level)) * var(--intro-ceiling-right)); }
.intro-theater .lamp-side-left { opacity: calc(max(.4, var(--sides-level)) * var(--intro-side-left)); }
.intro-theater .lamp-side-right { opacity: calc(max(.4, var(--sides-level)) * var(--intro-side-right)); }
.intro-theater .screen-halo { opacity: calc(max(.3, var(--screen-level)) * var(--intro-screen)); }
.intro-theater .ring-light, .intro-theater .ring-glint { opacity: calc(.8 * var(--intro-ring)); }
.hide-woman .audience-woman, .hide-man .audience-man { opacity: 0; }
.cinema-player:fullscreen { justify-content: center; align-items: center; }
.cinema-player:fullscreen .theater { width: min(100%, calc((100dvh - 100px) * 16 / 11)); flex: none; }
.cinema-player:fullscreen .theater .screen { aspect-ratio: 16 / 9; flex: none; }
.cinema-player:fullscreen .transport { width: min(100%, 960px); flex: none; }
.remote-dock { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); right: 24px; z-index: 16; }
body:not(.home-view) .remote-dock { display: none; }
.remote-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: var(--floating-control-height); padding: 0 19px 0 15px; border: 1px solid #ffffff26; border-radius: 100px; background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 6px 24px #0007; color: var(--accent); font-size: 15px; font-weight: 600; }
.remote-button:hover, .remote-button[aria-expanded=true] { background: #343436ee; }
.remote-button>span:first-child svg { width: 24px; height: 24px; }
.home-view .toast { bottom: calc(190px + env(safe-area-inset-bottom)); }
.theater-remote { position: fixed; inset: auto 24px calc(var(--floating-control-height) + 32px + env(safe-area-inset-bottom)) auto; margin: 0; width: 336px; max-width: calc(100vw - 32px); max-height: calc(100dvh - var(--floating-control-height) - 64px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; padding: 20px; background: var(--glass); backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%); color: var(--text); border: 1px solid #ffffff20; border-radius: 26px; box-shadow: 0 18px 64px #000a; scrollbar-width: thin; }
.theater-remote::backdrop { background: transparent; }
.remote-heading { margin-bottom: 16px; }
.remote-heading h2 { font-size: 23px; letter-spacing: -.5px; }
.audience-controls button { display: block; width: 100%; min-height: 44px; padding: 10px 14px; background: #ffffff08; border: 1px solid #ffffff0c; border-radius: 12px; font-size: 15px; font-weight: 500; color: var(--accent); }
.remote-card { padding: 16px 14px 4px; border: 1px solid #ffffff09; background: #ffffff06; border-radius: 16px; }
.remote-dimmer label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.remote-dimmer output { color: var(--text); font-variant-numeric: tabular-nums; }
.remote-dimmer input { display: block; width: 100%; height: 40px; margin: 4px 0 0; }
.remote-lights { padding: 0; margin: 20px 0 0; }
.remote-lights legend { margin-bottom: 12px; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--muted); }
.light-zones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; border-radius: 12px; background: #141416a6; margin-bottom: 12px; }
.light-zones button { min-height: 40px; padding: 0 5px; border-radius: 9px; color: var(--muted); font-size: 14px; }
.light-zones button[aria-pressed=true] { color: var(--text); background: #424244; box-shadow: 0 2px 4px #0002; }
.color-controls { margin-top: 12px; }
.remote-label { margin: 0 0 6px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.light-colors { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
.light-colors>button { position: relative; display: grid; place-items: center; min-width: 0; height: 44px; padding: 0; border-radius: 8px; }
.light-colors>button::before { content: ''; width: 23px; height: 23px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px #ffffff24; }
.light-colors>button[aria-pressed=true]::before { outline: 1.5px solid var(--swatch); outline-offset: 3px; }
.light-colors>button[aria-pressed=true]::after { position: absolute; content: ''; width: 7px; height: 4px; border-bottom: 1.5px solid #101012; border-left: 1.5px solid #101012; transform: translateY(-1px) rotate(-45deg); }
.custom-light-color { position: relative; height: 44px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; cursor: pointer; }
.custom-light-color>span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: conic-gradient(#ffa286,#f38abf,#9fa6ff,#89d8ca,#f6eab3,#ffa286); color: #222; }
.custom-light-color svg { width: 16px; height: 16px; }
.custom-light-color input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.custom-light-color:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.custom-light-color.is-selected>span { outline: 1.5px solid #ddd; outline-offset: 3px; }
.remote-actions { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 4px; }
.remote-actions button { min-height: 44px; padding: 0 2px 0 12px; color: var(--accent); font-size: 15px; }
@media (max-width: 700px) {
  .theater { border-radius: 18px; }
  .remote-dock { right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .theater-remote { right: 16px; bottom: calc(var(--floating-control-height) + 28px + env(safe-area-inset-bottom)); }
}
@media (max-width: 500px) {
  .theater-remote { padding: 18px; }
  .cinema-player:fullscreen .theater { width: min(100%, calc((100dvh - 158px) * 16 / 11)); }
}
@media (prefers-reduced-motion: reduce) { .theater * { transition: none !important; } }
