/* Plano del Salón Reforma — estilos compartidos (landing, selector, panel)
 * REV-F13-01: plano derecho (escenario arriba), cámara 3D, escenario con volumen, vista desde el asiento.
 * Letreros del plano: sans de la interfaz, peso medio, sin versalitas ni tracking, en un solo color. */
.venue { width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; display: block; }
.venue:focus { outline: none; }
.venue:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -4px; }
.venue .wall { fill: color-mix(in oklab, var(--color-paper-2) 78%, transparent); stroke: color-mix(in oklab, var(--color-accent) 55%, transparent); stroke-width: 4; }
.venue .stage { stroke: var(--color-accent); stroke-width: 3; }
.venue .stage-top__s0 { stop-color: color-mix(in oklab, var(--color-accent) 10%, var(--color-paper-2)); }
.venue .stage-top__s1 { stop-color: color-mix(in oklab, var(--color-accent) 30%, var(--color-paper-2)); }
.venue .stage-screen { fill: var(--color-accent); opacity: .55; }
.venue .footlight { fill: var(--color-accent-2); }
.venue .stage-light__l0 { stop-color: var(--color-accent); stop-opacity: .32; }
.venue .stage-light__l1 { stop-color: var(--color-accent); stop-opacity: .08; }
.venue .stage-light__l2 { stop-color: var(--color-accent); stop-opacity: 0; }
.venue .audio { fill: var(--color-paper-3); stroke: var(--color-rule-2); stroke-width: 2.5; }
.venue .table { stroke-width: 0; }
.venue .table--vip { fill: color-mix(in oklab, var(--color-zone-vip) 34%, var(--color-paper-2)); }
.venue .table--plat { fill: color-mix(in oklab, var(--color-zone-plat) 26%, var(--color-paper-2)); }
.venue .zone-halo { fill: transparent; stroke: transparent; stroke-width: 3; transition: fill var(--dur-med) var(--ease-out), stroke var(--dur-med) var(--ease-out); }
.venue[data-focus="vip"] .zone-halo--vip { fill: var(--color-zone-vip-wash); stroke: color-mix(in oklab, var(--color-zone-vip) 50%, transparent); }
.venue[data-focus="plat"] .zone-halo--plat { fill: var(--color-zone-plat-wash); stroke: color-mix(in oklab, var(--color-zone-plat) 50%, transparent); }
.venue[data-focus="gen"] .zone-halo--gen { fill: var(--color-zone-gen-wash); stroke: color-mix(in oklab, var(--color-zone-gen) 50%, transparent); }
.venue text { font-family: var(--font-sans, var(--font-ui)); font-weight: 500; letter-spacing: 0; fill: var(--color-ink-2); pointer-events: none; font-variant-numeric: lining-nums; }
.venue .lbl-stage { font-size: 52px; font-weight: 600; fill: var(--color-ink); }
.venue .lbl-zone { font-size: 58px; font-weight: 600; fill: var(--color-ink); }
.venue .lbl-row { font-size: 28px; font-weight: 600; fill: var(--color-ink-3); }
.venue .lbl-aisle { font-size: 21px; fill: var(--color-ink-3); }
.venue .lbl-audio { font-size: 26px; }

.venue .seat { transition: fill var(--dur-fast) var(--ease-out), stroke var(--dur-fast) var(--ease-out); stroke-width: 0; }
.venue .seat.is-free.seat--vip  { fill: var(--color-zone-vip); }
.venue .seat.is-free.seat--plat { fill: var(--color-zone-plat); }
.venue .seat.is-free.seat--gen  { fill: var(--color-zone-gen); }
.venue .seat.is-taken { fill: var(--color-seat-taken); }
.venue .seat.is-held { fill: var(--hatch, var(--color-seat-held)); }
.venue .hatch-bg { fill: var(--color-seat-taken); } .venue .hatch-fg { fill: var(--color-seat-held); }
.venue .seat.is-selected.is-selected.is-selected { fill: var(--color-seat-selected); stroke: var(--color-accent); stroke-width: 7; paint-order: stroke; }
.venue .seat.is-pulse { animation: seatPulse 460ms var(--ease-out); transform-box: fill-box; transform-origin: center; }
@keyframes seatPulse { 0% { transform: scale(.7); } 55% { transform: scale(1.16); } 100% { transform: scale(1); } }
.venue .ripple { fill: none; stroke: var(--color-accent); stroke-width: 4; transform-box: fill-box; transform-origin: center; animation: ripple 620ms var(--ease-out) forwards; pointer-events: none; }
@keyframes ripple { from { transform: scale(.4); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
@media (hover: hover) and (pointer: fine) { .venue .seat.is-free:hover { stroke: var(--color-ink); stroke-width: 5; cursor: pointer; } }
.venue[data-dim="1"] .seat:not(.is-free):not(.is-selected) { opacity: .55; }

/* ---------- Cámara (venue.js: panzoom) ---------- */
.venue-host { touch-action: none; overflow: hidden; perspective-origin: 50% 50%; cursor: grab; }
.venue-host.is-grabbing, .venue-host.is-grabbing .venue { cursor: grabbing; }
.venue-cam { position: absolute; inset: 0; transform-origin: 50% 50%; transform-style: preserve-3d; }
.venue-host.is-moving .venue-cam { will-change: transform; }
.venue-cam > .venue { position: absolute; inset: 0; }

/* Escenario en 3D: tarima elevada, frente con candilejas, pantalla de pie con la marca. Solo con inclinación. */
.v3d { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; }
.v3d.is-flat { visibility: hidden; }
.v3d > div { position: absolute; transform-origin: 50% 100%; }
.v3d-top { display: grid; place-items: center; border-radius: 0.4em; color: var(--color-ink); font-family: var(--font-sans, var(--font-ui)); font-weight: 600; line-height: 1;
  background: linear-gradient(to bottom, color-mix(in oklab, var(--color-accent) 12%, var(--color-paper-2)), color-mix(in oklab, var(--color-accent) 34%, var(--color-paper-2)));
  box-shadow: inset 0 0 0 0.06em var(--color-accent), inset 0 -0.5em 1em -0.4em color-mix(in oklab, var(--color-accent) 45%, transparent); }
.v3d-front { background:
  radial-gradient(circle at 50% 30%, var(--color-accent-2) 0 0.9px, transparent 1.6px) 0 0 / 14px 100% repeat-x,
  linear-gradient(to bottom, color-mix(in oklab, var(--color-accent) 70%, var(--color-paper)), color-mix(in oklab, var(--color-accent) 18%, var(--color-paper))); }
.v3d-screen { display: grid; place-items: center; border-radius: 2px; color: var(--color-accent);
  background: radial-gradient(70% 80% at 50% 55%, oklch(30% 0.06 262), oklch(13% 0.03 262));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-accent) 70%, transparent), 0 0 40px 4px oklch(80% 0.115 82 / 0.16); }
.v3d-screen .mark { width: 30%; height: auto; aspect-ratio: 1; position: relative; filter: drop-shadow(0 0 6px oklch(80% 0.115 82 / 0.55)); }
.v3d-wall { background: linear-gradient(to top, color-mix(in oklab, var(--color-accent) 16%, transparent), transparent 85%); box-shadow: inset 0 -1px 0 color-mix(in oklab, var(--color-accent) 55%, transparent); }
.v3d-glow { position: absolute; inset: 18% 22%; border-radius: 50%; background: radial-gradient(closest-side, oklch(80% 0.115 82 / 0.22), transparent); }
.has-tilt .venue-cam .venue .lbl-stage { visibility: hidden; }
.has-tilt .venue-cam:has(.v3d.is-flat) .venue .lbl-stage { visibility: visible; }

/* Entrada orquestada (selector): las sillas se encienden del escenario hacia el fondo, una sola vez */
.venue.is-intro .seat { animation: seatOn 520ms var(--ease-out) both; animation-delay: calc(var(--r, 0) * 32ms + 220ms); }
.venue.is-intro .stage-light, .venue.is-intro .footlight { animation: lightOn 900ms var(--ease-out) both; }
.is-intro-3d .v3d { animation: lightOn 700ms var(--ease-out) both; }
@keyframes seatOn { from { opacity: 0; } }
@keyframes lightOn { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .venue.is-intro .seat, .venue.is-intro .stage-light, .venue.is-intro .footlight, .is-intro-3d .v3d { animation: none; }
  .venue .seat.is-pulse, .venue .ripple { animation: none; }
}

/* ---------- Vista desde tu asiento ---------- */
.seatview { display: block; width: 100%; height: 100%; }
.seatview .sv-floor { fill: oklch(21% 0.035 262); }
.seatview .sv-wall { fill: oklch(15% 0.032 262); }
.seatview .sv-wall--side { fill: oklch(12.5% 0.03 262); }
.seatview .sv-ceil { fill: oklch(10% 0.025 262); }
.seatview .sv-pool { fill: oklch(80% 0.115 82 / 0.14); }
.seatview .sv-stage.top { fill: oklch(34% 0.045 75); } .seatview .sv-stage.face { fill: oklch(24% 0.03 262); stroke: oklch(80% 0.115 82 / 0.7); stroke-width: 0.6; } .seatview .sv-stage.side { fill: oklch(20% 0.03 262); }
.seatview .sv-screen { fill: oklch(23% 0.05 262); stroke: oklch(80% 0.115 82 / 0.8); stroke-width: 0.8; }
.seatview .sv-mark { color: oklch(84% 0.11 82); }
.seatview .sv-foot { fill: oklch(92% 0.08 85); }
.seatview .sv-table.top { fill: oklch(36% 0.07 262); } .seatview .sv-table.face { fill: oklch(27% 0.06 262); } .seatview .sv-table.side { fill: oklch(22% 0.05 262); }
.seatview .sv-chair { stroke: oklch(10% 0.03 262 / 0.6); stroke-width: 0.4; }
.seatview .sv-chair--vip { fill: oklch(44% 0.06 82); } .seatview .sv-chair--plat { fill: oklch(46% 0.02 250); } .seatview .sv-chair--gen { fill: oklch(40% 0.05 205); }
.seatview .sv-person { fill: oklch(8% 0.02 262); }

/* Leyenda */
.legend { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); font-size: var(--text-xs); color: var(--color-ink-2); list-style: none; margin: 0; padding: 0; }
.legend li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend .sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.sw--vip { background: var(--color-zone-vip); } .sw--plat { background: var(--color-zone-plat); } .sw--gen { background: var(--color-zone-gen); }
.sw--taken { background: var(--color-seat-taken); box-shadow: inset 0 0 0 1px var(--color-rule-2); }
.sw--held { background: repeating-linear-gradient(45deg, var(--color-seat-held) 0 3px, var(--color-seat-taken) 3px 7px); }
.sw--sel { background: var(--color-seat-selected); box-shadow: 0 0 0 2px var(--color-accent); }

/* Landing: el plano derecho no debe ocupar 2.5 pantallas en escritorio: alto acotado, centrado y con la misma
   inclinación de la vista general del selector (estático, sin JS) */
@media (min-width: 700px) {
  .hero__plan .frame { display: flex; justify-content: center; perspective: 1700px; perspective-origin: 50% 40%; height: min(74vh, 760px); overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent); mask-image: linear-gradient(to bottom, #000 84%, transparent); }
  .hero__plan .frame .venue.is-portrait { width: auto; max-width: 100%; height: 113%; aspect-ratio: 1720 / 3240; flex: none;
    transform: rotateX(34deg); transform-origin: 50% 0; margin-top: 1%; }
}
@media (min-width: 700px) and (prefers-reduced-motion: reduce) { .hero__plan .frame .venue.is-portrait { transform: none; height: 100%; } }
/* Panel: el plano derecho necesita más alto que el horizontal */
@media (min-width: 900px) { .p-map .mapbox { height: min(84vh, 900px); } }
