/* Seccion "Elenco": negocios que se encienden y abren una sala de chat de prueba.
   Todo vive bajo .elx para no chocar con styles.css. */
.elx { font-family: var(--sans); }
.elx *, .elx *::before, .elx *::after { box-sizing: border-box; }
.elx button, .elx a { cursor: pointer; }
.elx input { cursor: text; }
.elx button { font: inherit; }
.elx {
.wall { position: relative; display: grid; gap: 6px; padding: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); --mx: -400px; --my: -400px; }
.wall::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 12px; z-index: 3;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(167,139,250,.14), transparent 70%); }
@media (max-width: 900px) {
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) { .wall { grid-template-columns: minmax(0, 1fr); } }

.cell { aspect-ratio: 16 / 10; cursor: pointer; position: relative; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: #0a0a18; isolation: isolate; font: inherit; color: inherit; text-align: left;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .35s; }
.cell:hover { transform: translateY(-2px) scale(1.012); z-index: 2; }
.cell:focus-visible { outline: 2px solid var(--indigo-hi); outline-offset: 2px; z-index: 2; }
.wall:has(.cell:hover) .cell:not(:hover) { filter: brightness(.72); }
.cell .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.cell .cap, .cell .go { position: absolute; bottom: 9px; z-index: 2; font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
.cell .cap { left: 11px; color: #d6d6ee; }
.cell .go { right: 11px; color: var(--ink); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s; }
.cell:hover .go, .cell:focus-visible .go { opacity: 1; transform: none; }

/* ---- Escena provisional de cada negocio ---- */
.scene { display: block; }
.awn { filter: brightness(.55) saturate(.7); transition: filter .5s; }
.neon { font-family: var(--display); font-variation-settings: "wght" 800, "wdth" 70; fill: #2d2d4d; transition: fill .4s, filter .4s; }
.room, .doorlight, .spill, .t-on { opacity: 0; transition: opacity .45s; }
.t-off { opacity: 1; transition: opacity .3s; }
.tagtxt { font: 500 10.5px var(--mono); letter-spacing: .1em; }
.actor { transform: translateX(26px); opacity: 0; transition: transform .8s cubic-bezier(.2,.8,.2,1) .35s, opacity .4s .35s; }
.arm { transform-box: fill-box; transform-origin: 50% 100%; }
.on .awn { filter: none; }
.on .neon { fill: var(--h); filter: drop-shadow(0 0 3px var(--h)) drop-shadow(0 0 12px var(--h)); animation: flick .9s steps(1, end) 1; }
.on .room { opacity: 1; animation: flick .9s steps(1, end) 1; }
.on .doorlight { opacity: .8; }
.on .spill { opacity: 1; }
.on .t-on { opacity: 1; }
.on .t-off { opacity: 0; }
.on .actor { transform: none; opacity: 1; }
.on .arm { animation: wave 1.5s ease-in-out .9s infinite alternate; }

/* ---- Negocio con video real (barberia) ---- */
.vid { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; background: #0a0a18; }
.vid img, .vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; }
.stage .vid img, .stage .vid video { object-position: 36% 50%; }
.dlg:has(.vid) { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
.dlg:has(.vid) .stage { align-self: center; aspect-ratio: 4 / 3; }
@media (max-width: 760px) { .dlg:has(.vid) .stage { aspect-ratio: auto; align-self: stretch; } }
.vid video { opacity: 0; }
.vid.live video { opacity: 1; }
.vid::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,6,14,.65), transparent 38%); pointer-events: none; }

/* ---- Sala de prueba ---- */
.sheet { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .35s, visibility 0s .35s;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet.open { opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.scrim { position: absolute; inset: 0; background: rgba(6,6,12,.6); -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1); }
.dlg { position: relative; width: min(1120px, 100%); height: min(660px, 100%); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 18px; }
.stage { position: relative; border-radius: 24px; overflow: hidden; background: #0a0a18; border: 1px solid rgba(129,140,248,.35);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.85), 0 0 90px -10px rgba(99,102,241,.4); }
.stage .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage .tl { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 500 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #dcdcf5; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
.stage .tl i { font-style: normal; color: var(--mute); }
.chat { display: flex; flex-direction: column; min-height: 0; border-radius: 24px; overflow: hidden; background: rgba(14,14,30,.88); border: 1px solid rgba(129,140,248,.25);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 800 20px/1 var(--display); color: #0a0a18;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.55), transparent 55%), var(--h); box-shadow: 0 0 20px -2px var(--h); }
.who { min-width: 0; flex: 1; }
.who b { display: block; font: 600 15px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { display: flex; align-items: center; gap: 6px; margin-top: 4px; font: 400 11.5px/1 var(--mono); color: var(--mute); }
.who span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 8px var(--wa); }
.demo { flex: none; font: 500 9.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--violet); border: 1px solid rgba(167,139,250,.4); border-radius: 999px; padding: 6px 10px; }
.x { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.x:hover { background: rgba(255,255,255,.12); }
.x:focus-visible, .chip:focus-visible, .cta:focus-visible, .composer button:focus-visible { outline: 2px solid var(--indigo-hi); outline-offset: 2px; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.b { max-width: 86%; padding: 10px 13px; border-radius: 16px; font: 400 14.5px/1.4 var(--sans); opacity: 0; transform: translateY(8px); animation: pop .3s forwards; overflow-wrap: anywhere; }
.b.bot { align-self: flex-start; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-top-left-radius: 6px; }
.b.me { align-self: flex-end; background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; border-top-right-radius: 6px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #a5b4fc; animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; min-height: 8px; }
.chip { font: 500 13px/1 var(--sans); color: #e0e7ff; background: rgba(99,102,241,.14); border: 1px solid rgba(129,140,248,.45); padding: 10px 14px; border-radius: 999px; cursor: pointer; }
.chip:hover { background: rgba(99,102,241,.3); }
.composer { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.composer input { flex: 1; min-width: 0; font: 400 14px var(--sans); color: var(--ink); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 11px 16px; }
.composer input::placeholder { color: #6e6e8a; }
.composer input:focus { outline: 2px solid var(--indigo-hi); outline-offset: 1px; }
.composer button { flex: none; width: 42px; border-radius: 50%; border: 0; background: var(--indigo); color: #fff; font-size: 17px; cursor: pointer; }
.cta { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 14px 14px; padding: 14px 16px; border-radius: 14px; background: var(--wa); color: #05250f; font: 700 14px/1 var(--sans); text-decoration: none; }
.cta:hover { filter: brightness(1.06); }
.cta.nudge { animation: nudge 1.2s ease-in-out 2; }

@media (max-width: 760px) {
  .dlg { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 30%) minmax(0, 1fr); height: 100%; gap: 12px; }
  .demo { display: none; }
  .stage, .chat { border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .on .neon, .on .room, .on .arm { animation: none; }
  .actor, .cell, .sheet { transition: none; }
}

}
@keyframes flick { 0% { opacity: .15; } 9% { opacity: 1; } 14% { opacity: .2; } 22% { opacity: .95; } 28% { opacity: .35; } 40%, 100% { opacity: 1; } }
@keyframes wave { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
@keyframes pop { to { opacity: 1; transform: none; } }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes nudge { 50% { transform: scale(1.025); box-shadow: 0 0 0 6px rgba(37,211,102,.22); } }
