/* =====================================================================
   FILM IS ART · SALA PRIVADA «DIAFRAGMA»
   Negro cinematográfico + lima FILM IS ART (#C8FF00, tomado del logotipo).
   Montserrat 700/800 titulares · Manrope interfaz (OFL, locales).
   ===================================================================== */

@font-face { font-family: 'Montserrat FI'; src: url('../assets/fonts/montserrat-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Montserrat FI'; src: url('../assets/fonts/montserrat-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Manrope FI'; src: url('../assets/fonts/manrope-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope FI'; src: url('../assets/fonts/manrope-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Manrope FI'; src: url('../assets/fonts/manrope-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Manrope FI'; src: url('../assets/fonts/manrope-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --negro: #050506;
  --carbon: #0b0b0d;
  --texto: #f4f4f0;
  --texto-2: rgba(244, 244, 240, .72);
  --texto-3: rgba(244, 244, 240, .46);
  --linea: rgba(255, 255, 255, .09);
  --linea-2: rgba(255, 255, 255, .16);
  --lima: #C8FF00;
  --lima-tenue: rgba(200, 255, 0, .16);
  --cristal: rgba(10, 10, 12, .62);
  --f-titular: 'Montserrat FI', 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --f-texto: 'Manrope FI', 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-cine: cubic-bezier(.7, 0, .2, 1);
  --margen: clamp(16px, 3.4vw, 56px);
  --seg-sup: env(safe-area-inset-top, 0px);
  --seg-inf: env(safe-area-inset-bottom, 0px);
  --luz-r: 40; --luz-g: 40; --luz-b: 40;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--negro); color: var(--texto); }
body {
  font-family: var(--f-texto);
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--lima); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- Escena ---------- */
.escena { position: fixed; inset: 0; }
.escena canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.pelicula { position: fixed; width: 2px; height: 2px; opacity: 0; pointer-events: none; left: 0; top: 0; }

/* ---------- Pantalla Híbrida (Google Drive en Sala 3D) ---------- */
.pantalla-drive-wrap {
  position: fixed;
  z-index: 6;
  overflow: hidden;
  background: #000;
  border-radius: 2px;
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.95);
  pointer-events: auto;
  transform-origin: 0 0;
  opacity: 1;
  transition: opacity 0.35s ease;
  will-change: left, top, width, height, opacity;
}
.pantalla-drive-wrap.inactivo {
  opacity: 0 !important;
  pointer-events: none !important;
}
.pantalla-drive-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

/* ---------- Piezas comunes ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: 0 1.4em; border-radius: 999px;
  font-family: var(--f-texto); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.boton--lima { background: var(--lima); color: #050506; }
.boton--lima:hover { background: #d9ff4d; }
.boton--fino { border: 1px solid var(--linea-2); color: var(--texto); }
.boton--fino:hover { border-color: var(--texto-2); }
.boton:active { transform: scale(.97); }
.icono {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  color: var(--texto-2); transition: color .25s, background .25s;
}
.icono:hover { color: var(--texto); background: rgba(255, 255, 255, .07); }
.icono svg, .salir svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icono svg text { fill: currentColor; stroke: none; font: 700 6.5px var(--f-texto); }
.icono[aria-pressed="true"] { color: var(--lima); }

.idioma { display: inline-flex; padding: 3px; border: 1px solid var(--linea-2); border-radius: 999px; }
.idioma button { min-width: 38px; height: 30px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--texto-3); transition: .25s; }
.idioma button[aria-pressed="true"] { background: var(--texto); color: #050506; }

.punto { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--lima); vertical-align: middle; margin: 0 .5em; }

/* =====================================================================
   VESTÍBULO
   ===================================================================== */
.vestibulo {
  position: fixed; inset: 0; z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  padding: calc(var(--seg-sup) + clamp(16px, 2.6vw, 34px)) var(--margen) calc(var(--seg-inf) + clamp(16px, 2.4vw, 30px));
  transition: opacity 1s var(--ease), visibility 0s linear 1s;
}
body:not(.est-vestibulo) .vestibulo { opacity: 0; visibility: hidden; pointer-events: none; }
/* Tras el iris cerrado, el vestíbulo desaparece de golpe (ya está a oscuras). */
body.est-entrando .vestibulo { transition: none; }
.vest__fondo { position: absolute; inset: 0; overflow: hidden; background: #000; }
.vest__fondo img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 1.4s var(--ease), transform 14s linear; filter: saturate(.85) contrast(1.05); }
.vest__fondo img.cargada { opacity: .78; transform: scale(1.0); }
.vest__velo {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 78% 30%, transparent 0%, rgba(5, 5, 6, .35) 45%, rgba(5, 5, 6, .92) 100%),
    linear-gradient(90deg, rgba(5, 5, 6, .95) 0%, rgba(5, 5, 6, .7) 34%, rgba(5, 5, 6, .05) 70%),
    linear-gradient(0deg, rgba(5, 5, 6, 1) 0%, rgba(5, 5, 6, 0) 46%);
}
/* Grano de película muy leve */
.vest__velo::after {
  content: ''; position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .07; mix-blend-mode: overlay; animation: grano 1.2s steps(6) infinite;
}
@keyframes grano { 0% { transform: translate(0, 0); } 33% { transform: translate(-4%, 3%); } 66% { transform: translate(3%, -2%); } 100% { transform: translate(0, 0); } }

.barra { position: relative; grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; }
.barra__logo-link { display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; }
.barra__logo { height: clamp(22px, 2.2vw, 30px); width: auto; }
.barra__chip { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--texto-2); padding-left: 18px; border-left: 1px solid var(--linea-2); }
.barra .idioma { margin-left: auto; }
.barra__volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--texto-2);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--linea-2);
  background: rgba(255, 255, 255, .04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all .2s ease;
  margin-left: 8px;
}
.barra__volver:hover {
  color: var(--lima);
  border-color: var(--lima);
  background: rgba(200, 255, 0, .08);
}
.barra__volver svg { display: block; flex: none; }

.vest__contenido { position: relative; grid-column: 1; align-self: end; max-width: min(760px, 62vw); padding-bottom: clamp(8px, 3vh, 40px); }
.vest__antetitulo { margin: 0 0 18px; font-size: 12px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--lima); }
.vest__titulo {
  margin: 0; font-family: var(--f-titular); font-weight: 800; text-transform: uppercase;
  font-size: clamp(38px, 6.6vw, 104px); line-height: .92; letter-spacing: -.02em; text-wrap: balance;
}
.ficha { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 26px 0 0; }
.ficha div { display: grid; gap: 2px; }
.ficha dt { font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--texto-3); }
.ficha dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--texto); }
.ficha dd.pendiente, .pendiente { color: var(--texto-3); font-weight: 500; font-style: italic; }
.vest__sinopsis { margin: 16px 0 0; max-width: 54ch; color: var(--texto-2); font-size: 15px; }
.vest__aviso { margin: 12px 0 0; font-size: 13px; color: var(--lima); }

/* El botón de apertura: el isotipo oficial dentro de un anillo de carga */
.apertura { display: inline-flex; align-items: center; gap: 20px; margin-top: clamp(26px, 4.5vh, 48px); text-align: left; }
.apertura__disco { position: relative; width: 84px; height: 84px; flex: none; display: grid; place-items: center; }
.apertura__anillo { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.apertura__anillo circle { fill: none; stroke-width: 1.5; }
.apertura__pista { stroke: var(--linea-2); }
.apertura__progreso { stroke: var(--lima); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--carga, 0)); transition: stroke-dashoffset .5s var(--ease); stroke-linecap: round; }
.apertura__iso { width: 60px; height: 60px; transition: transform .6s var(--ease); }
.apertura:not(:disabled):hover .apertura__iso { transform: scale(1.08); }
.apertura:not(:disabled) .apertura__disco::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--lima); opacity: 0;
  animation: latido 2.8s var(--ease) infinite;
}
@keyframes latido { 0% { transform: scale(.9); opacity: .55; } 100% { transform: scale(1.35); opacity: 0; } }
.apertura__texto { display: grid; }
.apertura__accion { font-family: var(--f-titular); font-weight: 800; font-size: 17px; letter-spacing: .12em; text-transform: uppercase; }
.apertura__estado { font-size: 12px; color: var(--texto-3); letter-spacing: .08em; }
.apertura:disabled { cursor: progress; }
.apertura:disabled .apertura__accion { opacity: .5; }
.apertura:not(:disabled) .apertura__estado { display: none; }

/* Cartelera del vestíbulo */
.tira { position: relative; grid-column: 2; grid-row: 2 / 4; align-self: end; width: clamp(200px, 19vw, 280px); margin-bottom: 34px; }
.tira__titulo { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--texto-3); }
.tira__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cartel {
  position: relative; display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 12px; width: 100%;
  padding: 6px; border-radius: 12px; text-align: left; border: 1px solid transparent; transition: background .3s, border-color .3s;
}
.cartel img { width: 92px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; filter: grayscale(.5) brightness(.75); transition: filter .4s; }
.cartel span { font-family: var(--f-titular); font-weight: 700; font-size: 12px; line-height: 1.2; letter-spacing: .04em; text-transform: uppercase; color: var(--texto-2); }
.cartel:hover { background: rgba(255, 255, 255, .05); }
.cartel:hover img, .cartel[aria-current="true"] img { filter: none; }
.cartel[aria-current="true"] { border-color: var(--lima-tenue); background: rgba(200, 255, 0, .05); }
.cartel[aria-current="true"] span { color: var(--texto); }
.cartel[aria-current="true"]::before { content: ''; position: absolute; left: -12px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--lima); }
.vest__pie { position: relative; grid-column: 1 / -1; margin: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--texto-3); }

/* =====================================================================
   IRIS · el diafragma entre el vestíbulo y la sala
   ===================================================================== */
.iris {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; background: #000;
  --r: 0px; --x: 50%; --y: 50%;
  -webkit-mask: radial-gradient(circle at var(--x) var(--y), transparent var(--r), #000 calc(var(--r) + 1.5px));
  mask: radial-gradient(circle at var(--x) var(--y), transparent var(--r), #000 calc(var(--r) + 1.5px));
  opacity: 0;
}
.iris.activo { opacity: 1; }
.iris::after { /* filo lima del diafragma */
  content: ''; position: absolute; left: var(--x); top: var(--y); width: calc(var(--r) * 2); height: calc(var(--r) * 2);
  transform: translate(-50%, -50%); border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(200, 255, 0, var(--filo, 0)), 0 0 40px rgba(200, 255, 0, calc(var(--filo, 0) * .35));
}

.fundido { position: fixed; inset: 0; z-index: 45; background: #000; opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); }
.fundido.activo { opacity: 1; }

/* =====================================================================
   HUD de la sala
   ===================================================================== */
.hud {
  position: fixed; z-index: 10; left: 0; right: 0; top: 0;
  display: flex; align-items: center; gap: 16px;
  padding: calc(var(--seg-sup) + 16px) var(--margen) 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
body.est-vestibulo .hud, body.est-entrando .hud, body.est-saliendo .hud, body.ui-oculta .hud { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.hud__marca { display: flex; align-items: center; gap: 16px; min-width: 0; }
.hud__logo { height: 22px; width: auto; flex: none; }
.hud__sala { display: grid; padding-left: 16px; border-left: 1px solid var(--linea-2); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--texto-2); min-width: 0; }
.hud__peli { color: var(--texto-3); font-weight: 600; letter-spacing: .12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud__acciones { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.salir { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--linea-2); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--texto-2); transition: .25s; margin-left: 6px; }
.salir:hover { color: var(--texto); border-color: var(--texto-2); }
.demo-chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--lima-tenue); color: var(--lima); font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.demo-chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--lima); }

/* ---------- Panel cristal ---------- */
.eleccion, .pase, .mando, .fin, .cartelera__caja {
  background: var(--cristal);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--linea);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
}

/* ---------- Elegir butaca ---------- */
.eleccion {
  position: fixed; z-index: 12; left: 50%; bottom: calc(var(--seg-inf) + 24px);
  width: min(440px, calc(100vw - 32px)); padding: 18px 20px 16px; border-radius: 18px;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
body.est-eligiendo .eleccion { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.eleccion__cabeza h2 { margin: 0; font-family: var(--f-titular); font-weight: 800; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.eleccion__cabeza p { margin: 2px 0 14px; color: var(--texto-3); font-size: 13px; }
.plano { position: relative; padding-top: 22px; }
.plano__pantalla { position: absolute; top: 0; left: 12%; right: 12%; text-align: center; font-size: 9.5px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--texto-3); }
.plano__pantalla::before { content: ''; position: absolute; left: 0; right: 0; top: -6px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); }
.plano__filas { display: grid; gap: 8px; margin-top: 6px; }
.plano__fila { display: grid; grid-template-columns: 18px 1fr 1fr 26px 1fr 1fr 18px; align-items: center; gap: 8px; }
.plano__letra { font-size: 10px; font-weight: 700; color: var(--texto-3); text-align: center; }
.asiento {
  position: relative; height: 34px; border-radius: 9px 9px 6px 6px; border: 1px solid var(--linea-2);
  background: rgba(255, 255, 255, .04); font-size: 11px; font-weight: 700; color: var(--texto-2); transition: .25s var(--ease);
}
.asiento::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: -4px; height: 2px; border-radius: 2px; background: var(--linea-2); }
.asiento:hover, .asiento.señalado { border-color: var(--lima); color: var(--lima); background: var(--lima-tenue); }
.asiento.mejor { border-style: dashed; border-color: rgba(200, 255, 0, .45); }
.asiento[aria-pressed="true"] { background: var(--lima); color: #050506; border-color: var(--lima); }
.asiento:disabled { cursor: not-allowed; opacity: .35; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 3px, transparent 3px 7px); }
.leyenda { list-style: none; display: flex; gap: 16px; margin: 14px 0 0; padding: 0; font-size: 11px; color: var(--texto-3); }
.leyenda li::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--linea-2); }
.leyenda--mejor::before { border-style: dashed !important; border-color: var(--lima) !important; }
.leyenda--reservada::before { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .3) 0 2px, transparent 2px 4px); }

.etiqueta {
  position: fixed; z-index: 13; left: 0; top: 0; pointer-events: none;
  padding: 7px 12px; border-radius: 999px; background: rgba(5, 5, 6, .85); border: 1px solid var(--lima-tenue);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--texto); white-space: nowrap;
  transform: translate(-50%, -140%); opacity: 0; transition: opacity .2s;
}
.etiqueta.visible { opacity: 1; }
.etiqueta b { color: var(--lima); font-weight: 700; }

/* ---------- Pase privado ---------- */
.pase {
  position: fixed; z-index: 14; left: 50%; bottom: calc(var(--seg-inf) + 24px);
  width: min(560px, calc(100vw - 32px)); display: grid; grid-template-columns: 112px 1fr;
  border-radius: 18px; overflow: hidden;
  transform: translate(-50%, 30px) rotate(-1.5deg); opacity: 0; pointer-events: none;
  transition: opacity .55s var(--ease), transform .7s cubic-bezier(.2, 1.2, .3, 1);
}
body.est-pase .pase { opacity: 1; transform: translate(-50%, 0) rotate(0); pointer-events: auto; }
.pase__talon {
  position: relative; display: grid; place-items: center; align-content: center; gap: 14px; padding: 18px 8px;
  background: linear-gradient(160deg, rgba(200, 255, 0, .12), rgba(200, 255, 0, .02));
  border-right: 1.5px dashed rgba(255, 255, 255, .18);
}
.pase__talon::before, .pase__talon::after { /* muescas del troquel */
  content: ''; position: absolute; right: -10px; width: 20px; height: 20px; border-radius: 50%; background: #050506;
}
.pase__talon::before { top: -10px; } .pase__talon::after { bottom: -10px; }
.pase__talon img { width: 58px; height: 58px; }
.pase__vertical { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--lima); }
.pase__cuerpo { padding: 20px 22px 18px; min-width: 0; }
.pase__ante { margin: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--texto-3); }
.pase__peli { margin: 6px 0 14px; font-family: var(--f-titular); font-weight: 800; font-size: clamp(18px, 2.2vw, 24px); line-height: 1.05; text-transform: uppercase; }
.pase__datos { display: grid; grid-template-columns: repeat(4, auto); gap: 10px 18px; margin: 0 0 18px; justify-content: start; }
.pase__datos dt { font-size: 9.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--texto-3); }
.pase__datos dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pase__fila, .pase__butaca { color: var(--lima); font-family: var(--f-titular); font-size: 22px !important; line-height: 1; }
.pase__codigo { font-family: ui-monospace, 'Cascadia Mono', Menlo, monospace; font-size: 13px !important; letter-spacing: .08em; }
.pase__botones { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Mando del reproductor ---------- */
.mando {
  position: fixed; z-index: 12; left: 50%; bottom: calc(var(--seg-inf) + 20px);
  width: min(1000px, calc(100vw - 32px)); padding: 12px 16px 12px; border-radius: 20px;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
body.est-sentado .mando, body.est-fin .mando { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
body.ui-oculta .mando { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }
body.ui-oculta { cursor: none; }
.mando__barra { display: flex; align-items: center; gap: 12px; padding: 0 4px 6px; }
.mando__t { font-size: 11.5px; font-weight: 600; color: var(--texto-3); font-variant-numeric: tabular-nums; min-width: 38px; }
.mando__total { text-align: right; }
input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; height: 24px; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--lima) var(--v, 0%), rgba(255, 255, 255, .16) var(--v, 0%)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .16); }
input[type="range"]::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--lima); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -5px; border-radius: 50%; background: var(--texto); border: 0; box-shadow: 0 0 0 4px rgba(200, 255, 0, 0); transition: box-shadow .2s; }
input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--texto); border: 0; }
input[type="range"]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(200, 255, 0, .25); }
.mando__progreso { flex: 1; }
.mando__fila { display: flex; align-items: center; gap: 14px; }
.mando__play {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; min-width: 48px; padding: 0 20px 0 16px;
  border-radius: 999px; background: var(--lima); color: #050506; font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  transition: transform .25s var(--ease), background .25s;
}
.mando__play:hover { background: #d9ff4d; }
.mando__play:active { transform: scale(.95); }
.mando__play svg { width: 20px; height: 20px; fill: currentColor; }
.mando__play .i-pausa { display: none; }
body.reproduciendo .mando__play { padding: 0; width: 48px; }
body.reproduciendo .mando__play .i-play, body.reproduciendo .mando__proyectar, body.ya-proyectado .mando__proyectar { display: none; }
body.ya-proyectado .mando__play { padding: 0; width: 48px; }
body.reproduciendo .mando__play .i-pausa { display: block; }
.mando__info { min-width: 0; flex: 1; }
.mando__titulo { margin: 0; font-family: var(--f-titular); font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mando__estado { margin: 0; font-size: 12px; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mando__estado .demo { color: var(--lima); }
.mando__grupo { display: flex; align-items: center; gap: 2px; }
.volumen { display: flex; align-items: center; }
.volumen__rango { width: 86px; margin-right: 6px; }
.icono .i-mudo { display: none; }
body.mudo .icono .i-mudo { display: block; }
body.mudo .icono .i-vol { display: none; }
.mando__atajos { margin: 8px 4px 0; font-size: 10.5px; letter-spacing: .06em; color: var(--texto-3); opacity: .7; }
@media (hover: none), (max-width: 760px) { .mando__atajos { display: none; } }

/* ---------- Fin ---------- */
.fin {
  position: fixed; z-index: 15; left: 50%; top: 50%; width: min(460px, calc(100vw - 32px));
  padding: 30px 28px 26px; border-radius: 22px; text-align: center;
  transform: translate(-50%, -46%); opacity: 0; pointer-events: none; transition: opacity .8s var(--ease), transform .8s var(--ease);
}
body.est-fin .fin { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.fin img { width: 54px; height: 54px; margin: 0 auto 14px; }
.fin h2 { margin: 0; font-family: var(--f-titular); font-weight: 800; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; }
.fin__peli { margin: 6px 0 20px; color: var(--texto-3); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.fin__botones { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- Cartelera (en la sala) ---------- */
.cartelera { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .55); }
.cartelera__caja { width: min(860px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border-radius: 22px; padding: 20px 22px 24px; }
.cartelera header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cartelera h2 { margin: 0; font-family: var(--f-titular); font-weight: 800; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; }
.cartelera__contenido { display: grid; gap: 20px; }
.cartelera__seccion { display: grid; gap: 12px; }
.cartelera__saga { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(200, 255, 0, .2); }
.cartelera__seccion-header { display: flex; align-items: center; gap: 10px; }
.cartelera__seccion-titulo { margin: 0; font-family: var(--f-titular); font-weight: 800; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--texto-2); }
.saga-badge { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: rgba(200, 255, 0, .14); color: var(--lima); border: 1px solid rgba(200, 255, 0, .35); }
.cartelera__lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cartelera__item { display: grid; gap: 8px; width: 100%; text-align: left; padding: 0; border-radius: 14px; }
.cartelera__item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--linea); transition: transform .4s var(--ease), border-color .3s; }
.cartelera__item:hover img { transform: scale(1.02); border-color: var(--linea-2); }
.cartelera__item[aria-current="true"] img { border-color: var(--lima); }
.cartelera__item b { font-family: var(--f-titular); font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.cartelera__item small { font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--lima); }

/* ---------- Avisos ---------- */
.aviso {
  position: fixed; z-index: 50; left: 50%; top: calc(var(--seg-sup) + 76px); margin: 0; max-width: calc(100vw - 32px);
  padding: 9px 16px; border-radius: 999px; background: rgba(5, 5, 6, .86); border: 1px solid var(--linea-2);
  font-size: 12.5px; color: var(--texto-2); text-align: center;
  transform: translate(-50%, -8px); opacity: 0; pointer-events: none; transition: .4s var(--ease);
}
.aviso.visible { opacity: 1; transform: translate(-50%, 0); }
.girar { display: none; }

/* =====================================================================
   SIN WEBGL · sala en 2D
   ===================================================================== */
body.sin-webgl .escena { display: none; }
body.sin-webgl .escena2d { display: block !important; }
.escena2d { position: fixed; inset: 0; background: radial-gradient(120% 70% at 50% 34%, rgb(var(--luz-r) var(--luz-g) var(--luz-b) / .4), #050506 62%); transition: background .4s; }
.escena2d__pantalla {
  position: absolute; left: 50%; top: 42%; width: min(86vw, 132vh); aspect-ratio: 16 / 9; transform: translate(-50%, -50%);
  background: #000 center / cover no-repeat; box-shadow: 0 0 120px 10px rgb(var(--luz-r) var(--luz-g) var(--luz-b) / .35); border-radius: 2px;
}
body.sin-webgl .pelicula { position: absolute; left: 50%; top: 42%; width: min(86vw, 132vh); height: auto; aspect-ratio: 16 / 9; transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; background: transparent; }
body.sin-webgl:not(.ya-proyectado) .pelicula { opacity: 0; }
.escena2d__butacas { position: absolute; left: 0; right: 0; bottom: 0; height: 26vh; background:
  radial-gradient(40px 26px at 50% 0, rgba(255,255,255,.05), transparent 70%) 0 0 / 90px 52px repeat-x,
  linear-gradient(180deg, transparent, #000 70%); opacity: .8; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
  .vestibulo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto; }
  .vest__titulo { font-size: clamp(34px, 10.5vw, 72px); }
  .tira { min-width: 0; }
  .ficha { gap: 6px 20px; }
  .vest__contenido { max-width: 100%; grid-column: 1; }
  .tira { grid-column: 1; grid-row: 3; width: auto; margin: 22px calc(var(--margen) * -1) 10px; }
  .tira__titulo { padding: 0 var(--margen); }
  .tira__lista { display: flex; gap: 10px; overflow-x: auto; padding: 0 var(--margen); scroll-snap-type: x mandatory; scrollbar-width: none; }
  .tira__lista::-webkit-scrollbar { display: none; }
  .tira__lista li { flex: none; scroll-snap-align: start; }
  .cartel { grid-template-columns: 1fr; width: 136px; gap: 6px; padding: 0; }
  .cartel img { width: 100%; }
  .cartel span { font-size: 10.5px; }
  .cartel[aria-current="true"]::before { display: none; }
  .vest__velo { background: linear-gradient(0deg, #050506 0%, rgba(5, 5, 6, .88) 38%, rgba(5, 5, 6, .25) 72%, rgba(5, 5, 6, .55) 100%); }
  .vest__pie { display: none; }
  .hud { gap: 10px; }
  .hud__sala, .salir span { display: none; }
  .salir { padding: 0; width: 42px; justify-content: center; margin-left: 0; }
  .hud .idioma button { min-width: 32px; }
  .demo-chip { position: fixed; left: 50%; top: calc(var(--seg-sup) + 70px); transform: translateX(-50%); }
  .mando { padding: 10px 12px 12px; border-radius: 18px; }
  .mando__fila { gap: 10px; flex-wrap: wrap; }
  .mando__info { order: -1; flex-basis: calc(100% - 70px); }
  .mando__play { order: -2; }
  .mando__grupo { width: 100%; justify-content: space-between; }
  .volumen__rango { display: none; }
  .pase { grid-template-columns: 84px 1fr; }
  .pase__talon img { width: 44px; height: 44px; }
  .pase__datos { grid-template-columns: repeat(2, auto); }
}
@media (max-width: 900px) and (orientation: portrait) {
  .girar { display: block; position: fixed; z-index: 11; left: 50%; transform: translateX(-50%); bottom: calc(var(--seg-inf) + 190px); margin: 0; white-space: nowrap;
    font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--texto-3); opacity: 0; transition: opacity .6s; pointer-events: none; }
  body.est-sentado.reproduciendo:not(.ui-oculta) .girar { opacity: 1; }
  body.sin-webgl .pelicula, body.sin-webgl .escena2d__pantalla { top: 34%; width: 100vw; }
}
/* Móvil en horizontal: modo proyección, todo mínimo */
@media (max-height: 520px) and (orientation: landscape) {
  .vestibulo { grid-template-columns: minmax(0, 1fr) 210px; grid-template-rows: auto minmax(0, 1fr); column-gap: 24px; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); overflow-y: auto; }
  .barra { grid-row: 1; }
  .demo-chip { display: none !important; }
  .vest__antetitulo { margin-bottom: 8px; font-size: 10px; }
  .vest__contenido { grid-column: 1; grid-row: 2; align-self: end; padding-bottom: 0; }
  .apertura__disco { width: 60px; height: 60px; }
  .apertura__iso { width: 42px; height: 42px; }
  .tira { align-self: center; }
  .tira__titulo { padding: 0; margin-bottom: 6px; }
  .cartel { padding: 3px; gap: 8px; }
  .cartel img { width: 64px; height: 36px; aspect-ratio: auto; }
  .cartel span { font-size: 10px; }
  .vest__titulo { font-size: clamp(28px, 7vh, 46px); }
  .ficha { margin-top: 12px; }
  .vest__sinopsis { display: none; }
  .apertura { margin-top: 14px; }
  .tira { grid-column: 2; grid-row: 2; margin: 0; width: 200px; }
  .tira__lista { display: grid; gap: 4px; padding: 0; overflow: visible; }
  .cartel { grid-template-columns: 64px 1fr; width: auto; }
  .cartel img { width: 64px; }
  .vest__pie { display: none; }
  .hud { padding-top: 8px; padding-bottom: 8px; }
  .eleccion { bottom: 8px; padding: 12px 14px; width: min(400px, calc(100vw - 32px)); left: auto; right: 16px; transform: translateY(20px); }
  body.est-eligiendo .eleccion { transform: none; }
  .eleccion__cabeza p, .leyenda { display: none; }
  .asiento { height: 26px; }
  .mando { bottom: 8px; padding: 8px 12px; }
  .mando__fila { flex-wrap: nowrap; }
  .mando__info { order: 0; flex-basis: auto; }
  .mando__grupo { width: auto; }
  .pase { bottom: 8px; }
  .pase__cuerpo { padding: 12px 16px; }
  .pase__peli { margin-bottom: 8px; }
  .pase__datos { grid-template-columns: repeat(4, auto); margin-bottom: 10px; }
}

/* Movimiento reducido: cortes por fundido, sin latidos ni grano */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .vest__fondo img { transition: opacity .4s; transform: none !important; }
}

/* =====================================================================
   V02 CLAUDE · Proyección híbrida con el reproductor oficial de Google Drive
   - La pantalla 3D se encuadra (frontal y quieta) en el hueco libre entre
     la cabecera y el mando; el iframe oficial se coloca exactamente encima.
   - El mando solo conserva lo que funciona de verdad con Drive: la película
     se reproduce, pausa y avanza con los controles oficiales de la pantalla.
   ===================================================================== */
body.modo-drive .mando__barra,
body.modo-drive .mando__atajos,
body.modo-drive .mando [data-accion="atras"],
body.modo-drive .mando [data-accion="adelante"],
body.modo-drive .mando .volumen,
body.modo-drive .mando [data-accion="proyeccion"],
body.modo-drive.ya-proyectado .mando__play,
body.modo-drive .girar { display: none !important; }
body.es-ios.modo-drive .mando [data-accion="completa"] { display: none !important; }
body.modo-drive .mando__grupo { width: auto; }
body.modo-drive .mando__fila { flex-wrap: nowrap; }
body.modo-drive .mando__info { min-width: 0; flex: 1 1 auto; flex-basis: auto; order: 0; }
body.modo-drive .mando__estado { white-space: normal; }
.pantalla-drive-wrap { box-shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 0 60px rgba(0, 0, 0, .9); }
/* Móvil apaisado en modo Drive: mando de una sola línea para ganar pantalla */
@media (orientation: landscape) and (max-height: 500px) {
  body.modo-drive .mando { padding: 6px 12px; bottom: calc(var(--seg-inf) + 6px); }
  body.modo-drive .mando__estado { display: none; }
}

/* =====================================================================
   V02 CLAUDE · Vestíbulo en móvil vertical: cartel 9:16 casi completo arriba
   y los textos debajo, sobre negro (no encima de la imagen).
   ===================================================================== */
@media (max-width: 760px) and (orientation: portrait) {
  .vestibulo { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0; background: #050506; }
  .vest__fondo {
    position: relative; inset: auto; width: 100%;
    aspect-ratio: 893 / 1600; max-height: 68svh;
  }
  .vest__fondo picture, .vest__fondo img { display: block; width: 100%; height: 100%; }
  /* anclado arriba: el título pintado en el cartel nunca se corta */
  .vest__fondo img { object-position: 50% 0%; }
  .vest__fondo img.cargada { opacity: .92; }
  .vest__fondo::after { /* solo sombra arriba (barra) y fundido abajo */
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(180deg, rgba(5, 5, 6, .82) 0%, rgba(5, 5, 6, 0) 16%),
      linear-gradient(0deg, #050506 0%, rgba(5, 5, 6, .96) 14%, rgba(5, 5, 6, .55) 26%, rgba(5, 5, 6, 0) 42%);
  }
  .vest__velo { display: none; }

  /* Cabecera compacta en una sola línea */
  .barra {
    position: absolute; z-index: 3; top: calc(var(--seg-sup) + 10px);
    left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right));
    gap: 10px; flex-wrap: nowrap;
  }
  .barra__logo { height: 24px; width: auto; flex: none; }
  .barra__logo-link { flex: none; }
  .barra__chip { display: none; }
  .barra__volver { width: 40px; height: 40px; padding: 0; justify-content: center; margin-left: 0; flex: none; background: rgba(5, 5, 6, .55); }
  .barra__volver span { display: none; }

  /* Textos debajo del cartel, sobre negro */
  .vest__contenido { position: relative; z-index: 2; max-width: none; margin-top: -4.2rem; padding: 0 var(--margen) 0; }
  .vest__antetitulo { margin-bottom: 10px; font-size: 10.5px; letter-spacing: .2em; }
  .vest__titulo { font-size: clamp(30px, 9vw, 44px); line-height: 1; }
  .ficha { gap: 4px 18px; }
  .vest__sinopsis { font-size: 14px; }
  .vest__sinopsis:has(.pendiente) { display: none; }
  .apertura { margin-top: 20px; }
  .tira { margin: 26px 0 calc(var(--seg-inf) + 18px); }
}
@media (max-width: 760px) and (orientation: portrait) {
  /* Cabecera del vestíbulo en su propia franja negra: nada encima del cartel */
  .barra {
    position: relative; top: auto; left: auto; right: auto;
    padding: calc(var(--seg-sup) + 10px) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  }
  .vest__fondo::after { background: linear-gradient(0deg, #050506 0%, rgba(5, 5, 6, .96) 14%, rgba(5, 5, 6, .55) 26%, rgba(5, 5, 6, 0) 42%); }
}
@media (max-width: 760px) and (orientation: portrait) {
  .vestibulo { display: flex; flex-direction: column; }
  .vestibulo > * { flex: none; }
  .barra { order: -1; }
  .vest__fondo { order: 0; }
  .vest__contenido { order: 1; }
  .tira { order: 2; }
}

/* =====================================================================
   V02 CLAUDE · Acceso a DIAFRAGMA siempre a la vista (móvil vertical).
   La primera pantalla = cabecera + cartel + título + «Entrar en la sala».
   El cartel cede la altura necesaria (mismo encuadre 9:16, anclado arriba,
   sin deformar) y el botón se apoya sobre su fundido inferior.
   Ficha técnica y sinopsis pasan debajo del botón. Sin JavaScript:
   funciona igual en el primer acceso, en los siguientes y al volver.
   ===================================================================== */
@media (max-width: 760px) and (orientation: portrait) {
  .vestibulo { --barra-h: calc(var(--seg-sup) + 60px); --bloque: 13.25rem; }
  .vest__fondo {
    aspect-ratio: auto; max-height: none;
    /* nunca más alto que su 9:16 natural; nunca tan bajo que el cartel se pierda */
    height: clamp(40svh, calc(100svh - var(--barra-h) - var(--seg-inf) - var(--bloque) + 5.5rem), calc(100vw * 1600 / 893));
  }
  .vest__contenido { display: flex; flex-direction: column; align-items: flex-start; margin-top: -5.5rem; }
  .vest__antetitulo { order: 0; }
  .vest__titulo { order: 1; }
  .apertura { order: 2; }
  .vest__aviso { order: 3; }
  .ficha { order: 4; margin-top: 26px; }
  .vest__sinopsis { order: 5; }
  .vest__titulo { font-size: clamp(28px, 8.4vw, 40px); }
  /* el botón: cápsula oscura con filo lima, táctil y legible sobre el cartel */
  .apertura {
    margin-top: 14px; gap: 14px; padding: 6px 22px 6px 6px; min-height: 64px;
    border-radius: 999px; border: 1px solid rgba(200, 255, 0, .38);
    background: rgba(5, 5, 6, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  }
  .apertura__disco { width: 52px; height: 52px; }
  .apertura__iso { width: 38px; height: 38px; }
  .apertura__accion { font-size: 15px; }
  .apertura:not(:disabled) { border-color: rgba(200, 255, 0, .7); }
}

/* =====================================================================
   V02 CLAUDE · Sin icono de «abrir en otra ventana» del visor externo.
   El iframe es BARRA (56 px) más alto por arriba y por abajo; el vídeo queda
   centrado entre dos franjas negras: la de arriba (con el icono) se recorta
   y la de abajo, con los controles, queda bajo la pantalla 3D.
   ===================================================================== */
.pantalla-drive-wrap { --barra: 56px; }
.pantalla-drive-iframe { position: absolute; left: 0; top: calc(var(--barra) * -1); width: 100%; height: calc(100% + var(--barra)); }

/* Móvil apaisado durante la proyección: película a pantalla completa.
   Solo queda un botón redondo para salir, en el margen lateral. */
body.apaisado-completo .mando,
body.apaisado-completo .aviso { opacity: 0 !important; pointer-events: none !important; }
body.apaisado-completo .hud { opacity: 1 !important; transform: none !important; background: none; pointer-events: none; }
body.apaisado-completo .hud > *, body.apaisado-completo .hud__acciones > * { visibility: hidden; }
body.apaisado-completo .hud__acciones { visibility: visible; }
body.apaisado-completo .hud .salir {
  visibility: visible; pointer-events: auto; position: fixed;
  left: max(8px, env(safe-area-inset-left)); top: 8px;
  width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; background: rgba(10, 10, 12, .78); margin: 0;
}
body.apaisado-completo .hud .salir span { display: none; }


/* =====================================================================
   VER JUNTOS · sala compartida (fase 1)
   Nada de esto se ve si no hay servidor de salas (body sin .juntos-disponible).
   ===================================================================== */
.hud__juntos, .hud__chat { display: none; }
body.juntos-disponible .hud__juntos {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 12px; border-radius: 999px;
  border: 1px solid rgba(200, 255, 0, .45); color: var(--lima);
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; transition: .25s;
}
.hud__juntos:hover { background: var(--lima-tenue); border-color: var(--lima); }
.hud__juntos svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
body.juntos-disponible .hud__juntos[aria-pressed="true"] { background: var(--lima); color: #050506; border-color: var(--lima); }
.juntos-cuenta { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #050506; color: var(--lima); font-size: 11px; line-height: 20px; text-align: center; letter-spacing: 0; }
body.juntos-activo .hud__chat {
  display: inline-flex; align-items: center; gap: 8px; position: relative; width: auto; height: 42px; padding: 0 16px 0 12px; border-radius: 999px;
  border: 1px solid rgba(200, 255, 0, .45); color: var(--lima);
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
body.juntos-activo .hud__chat:hover { background: var(--lima-tenue); border-color: var(--lima); color: var(--lima); }
body.charla-abierta .hud__chat { background: var(--lima); color: #050506; border-color: var(--lima); }
body.charla-abierta .hud__chat .charla-insignia { background: #050506; color: var(--lima); }
.charla-insignia { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--lima); color: #050506; font-size: 10px; font-weight: 800; line-height: 17px; text-align: center; }
body.juntos-sin-conexion .hud__juntos { opacity: .55; }

/* En una sala compartida la cartelera del vestíbulo no se usa (el título se cambia desde dentro). */
body.juntos-activo .tira { display: none; }
.vest__juntos-chip { font-weight: 700; letter-spacing: .04em; }

/* Butacas de otras personas en el plano */
.asiento.ocupada, .asiento.ocupada:disabled { opacity: 1; cursor: not-allowed; background: rgba(200, 255, 0, .1); border-color: rgba(200, 255, 0, .55); border-style: solid; color: var(--lima); font-weight: 800; }
.leyenda--ocupada { display: none; }
body.juntos-activo .leyenda--ocupada { display: list-item; }
body.juntos-activo .leyenda { flex-wrap: wrap; gap: 6px 14px; }
.leyenda--ocupada::before { background: rgba(200, 255, 0, .2); border-color: var(--lima) !important; }

/* ---------- Panel: crear / invitación / compartir ---------- */
.juntos { position: fixed; inset: 0; z-index: 32; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); overflow: auto; }
.juntos[hidden], .charla[hidden] { display: none; }
.juntos__caja {
  width: min(460px, 100%); border-radius: 22px; padding: 20px 22px 22px;
  background: rgba(10, 10, 12, .9); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--linea-2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
}
.juntos__caja header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.juntos__caja h2 { margin: 0; font-family: var(--f-titular); font-weight: 800; font-size: 20px; letter-spacing: .08em; text-transform: uppercase; color: var(--lima); }
.juntos__texto { margin: 0 0 16px; color: var(--texto-2); font-size: 14px; line-height: 1.5; }
.juntos__texto b { color: var(--texto); font-weight: 700; }
.juntos__form { display: grid; gap: 14px; }
.juntos__form label { display: grid; gap: 6px; }
.juntos__form label span, .juntos__subtitulo { font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--texto-3); }
.juntos__form input, .juntos__enlace input, .charla__texto {
  width: 100%; min-width: 0; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--linea-2);
  background: rgba(255, 255, 255, .05); font-size: 16px; outline: none; transition: border-color .25s;
}
.juntos__form input:focus, .charla__texto:focus { border-color: var(--lima); }
.juntos__form input::placeholder, .charla__texto::placeholder { color: var(--texto-3); }
.juntos .boton:disabled { opacity: .5; pointer-events: none; }
.juntos__enlace-texto { display: block; margin: 14px auto 0; padding: 8px 10px; font-size: 12.5px; color: var(--texto-3); text-decoration: underline; text-underline-offset: 3px; }
.juntos__enlace-texto:hover { color: var(--texto); }
.juntos__codigo { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--texto-3); }
.juntos__codigo b { margin-left: 6px; font-family: ui-monospace, 'Cascadia Mono', Menlo, monospace; font-size: 22px; letter-spacing: .14em; color: var(--texto); vertical-align: -2px; }
.juntos__enlace input { font-size: 13px; color: var(--texto-2); text-overflow: ellipsis; }
.juntos__botones { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 18px; }
.juntos__botones .boton { flex: 1 1 auto; }
.juntos__subtitulo { margin: 0 0 8px; }
.juntos__gente { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 190px; overflow: auto; }
.juntos__gente li { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.juntos__gente b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.juntos__gente i { font-style: normal; font-weight: 500; color: var(--texto-3); }
.juntos__gente small { font-size: 11.5px; color: var(--texto-3); white-space: nowrap; }
.juntos__inicial { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(200, 255, 0, .5); color: var(--lima); font-family: var(--f-titular); font-weight: 800; font-size: 13px; }
.juntos__gente .yo .juntos__inicial { background: var(--lima); color: #050506; }
.juntos__error { margin: 14px 0 0; font-size: 13px; color: #ff8a7a; }

/* ---------- Chat lateral plegable ---------- */
.charla {
  position: fixed; z-index: 13; right: 16px; top: calc(var(--seg-sup) + 84px); bottom: calc(var(--seg-inf) + 150px);
  width: min(320px, calc(100vw - 32px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; border-radius: 18px; overflow: hidden;
  background: rgba(10, 10, 12, .78); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--linea); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
  animation: charla-entra .35s var(--ease);
}
@keyframes charla-entra { from { opacity: 0; transform: translateX(16px); } }
body.est-vestibulo .charla, body.est-entrando .charla, body.est-saliendo .charla { display: none; }
.charla__cabeza { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 6px 16px; border-bottom: 1px solid var(--linea); }
.charla__cabeza h2 { margin: 0; font-family: var(--f-titular); font-weight: 800; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--texto-2); }
.charla__lista { list-style: none; margin: 0; padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.charla__msg { align-self: flex-start; max-width: 88%; padding: 7px 11px 8px; border-radius: 4px 14px 14px 14px; background: rgba(255, 255, 255, .07); font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.charla__msg b { display: block; margin-bottom: 1px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--lima); }
.charla__msg.mio { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: var(--lima); color: #050506; }
.charla__msg.mio b { color: rgba(5, 5, 6, .6); }
.charla__sistema { align-self: center; font-size: 11px; color: var(--texto-3); text-align: center; }
.charla__reacciones { display: flex; justify-content: space-between; gap: 6px; padding: 6px 12px 0; }
.charla__reacciones button { flex: 1; height: 40px; border-radius: 12px; border: 1px solid var(--linea); background: rgba(255, 255, 255, .04); font-size: 20px; line-height: 1; transition: transform .2s var(--ease), border-color .2s, background .2s; }
.charla__reacciones button:hover { border-color: rgba(200, 255, 0, .6); background: var(--lima-tenue); }
.charla__reacciones button:active { transform: scale(.88); }
.charla__form { display: flex; gap: 8px; padding: 10px 12px 12px; }
.charla__texto { height: 42px; font-size: 16px; }
.charla__enviar { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--lima); color: #050506; }
.charla__enviar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Reacciones flotando sobre la pantalla ---------- */
.reacciones { position: fixed; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; }
.reaccion { position: absolute; display: grid; justify-items: center; gap: 2px; line-height: 1; transform: translate(-50%, -50%); animation: reaccion-sube 2.8s cubic-bezier(.2, .7, .3, 1) forwards; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); will-change: transform, opacity; }
.reaccion small { font: 700 11px var(--f-texto); letter-spacing: .08em; color: var(--lima); text-shadow: 0 1px 6px #000; white-space: nowrap; }
@keyframes reaccion-sube {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  12% { opacity: 1; transform: translate(-50%, -62%) scale(1.15); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--lado, 0px)), calc(-50% + var(--sube, -160px))) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .reaccion { animation-duration: 1.6s; }
  .charla { animation: none; }
}

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  body.juntos-disponible .hud__juntos { padding: 0 10px; gap: 6px; }
  .hud__juntos span { display: none; }
  body.juntos-activo .hud__chat { padding: 0; width: 42px; justify-content: center; }
  .hud__chat span { display: none; }
  body.juntos-activo .hud .idioma { display: none; }
}
@media (max-width: 700px) {
  .charla { left: 8px; right: 8px; top: auto; bottom: calc(var(--seg-inf) + 8px); width: auto; height: min(56dvh, 440px); z-index: 16; }
  @keyframes charla-entra { from { opacity: 0; transform: translateY(16px); } }
}
@media (max-height: 520px) and (orientation: landscape) {
  .charla { top: 8px; bottom: 8px; right: max(8px, env(safe-area-inset-right)); width: min(300px, 46vw); height: auto; left: auto; z-index: 16; }
  .charla__reacciones button { height: 34px; font-size: 17px; }
  .juntos { place-items: start center; }
}

/* Ver juntos · QR para entrar con el móvil */
.juntos__qr { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.juntos__qr img { width: 132px; height: 132px; border-radius: 10px; background: #fff; image-rendering: pixelated; flex: none; }
.juntos__qr p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--texto-2); }
@media (max-width: 700px), (pointer: coarse) { .juntos__qr { display: none; } }

/* =====================================================================
   PATROCINIO · anuncio antes de la película (js/anuncio.js)
   En 3D la portada de color y el anuncio salen en la pantalla del cine:
   el <video> solo es la textura. En 2D se ven en el hueco de la pantalla.
   ===================================================================== */
.anuncio { position: fixed; inset: 0; z-index: 11; pointer-events: none; }
.anuncio__video { position: fixed; width: 2px; height: 2px; opacity: 0; pointer-events: none; left: 0; top: 0; }
.anuncio__portada { display: none; }
.anuncio__barra {
  position: fixed; left: 50%; bottom: calc(var(--seg-inf) + 20px); transform: translate(-50%, 0);
  width: min(1000px, calc(100vw - 32px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px 10px 14px; border-radius: 20px; pointer-events: auto;
  background: var(--cristal); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--linea); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.anuncio.en-intro .anuncio__barra { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }
.anuncio__marca { display: flex; align-items: center; gap: 10px; min-width: 0; }
.anuncio__aviso { flex: none; padding: 3px 8px; border-radius: 4px; background: var(--lima); color: #050506; font-weight: 800; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.anuncio__texto { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--texto-2); white-space: nowrap; }
.anuncio__logo { flex: none; display: grid; place-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: #fff; }
.anuncio__logo img { display: block; height: 19px; width: auto; }
.anuncio__botones { display: flex; gap: 10px; }
.anuncio__saltar { min-width: 11.5em; }
.anuncio__saltar:disabled { opacity: .72; cursor: default; }
body.con-anuncio .mando, body.con-anuncio .girar { opacity: 0 !important; pointer-events: none !important; }
@media (max-width: 700px) {
  .anuncio__barra { bottom: calc(var(--seg-inf) + 10px); width: calc(100vw - 16px); padding: 10px; }
  .anuncio__texto { display: none; }
  .anuncio__botones { flex: 1 1 100%; }
  .anuncio__botones .boton { flex: 1; min-width: 0; padding: 0 .8em; font-size: 12px; }
}
/* Sala 2D (sin WebGL): portada y anuncio en el hueco de la pantalla, como la película. */
body.sin-webgl .anuncio__video, body.sin-webgl .anuncio__portada {
  position: absolute; left: 50%; top: 42%; width: min(86vw, 132vh); height: auto; aspect-ratio: 16 / 9; transform: translate(-50%, -50%); opacity: 1; background: #000;
}
body.sin-webgl .anuncio__portada {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%; background: var(--marca); transition: opacity .6s var(--ease);
}
.anuncio__portada span { font-family: var(--f-titular); font-weight: 800; font-size: clamp(10px, 1.4vw, 16px); letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.anuncio__portada img { width: 56%; height: auto; filter: brightness(0) invert(1); animation: anuncioLogo 2.5s ease-out both; }
.anuncio__portada.es-fuera, body.sin-webgl .anuncio__portada.es-fuera { opacity: 0; }
@keyframes anuncioLogo { from { transform: scale(.85); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .anuncio__portada img { animation: none; } }
@media (max-width: 900px) and (orientation: portrait) { body.sin-webgl .anuncio__video, body.sin-webgl .anuncio__portada { top: 34%; width: 100vw; } }
