/* La videollamada: la sala del equipo (a pantalla completa, dentro de la app), la página del invitado, la antesala que
   comparten y la tarjeta con el acta en el chat. Usa las variables de app.css; el escenario de vídeo es siempre oscuro. */

/* La sala dentro de la app */
.meeting { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--ground); color: var(--ink); overflow: hidden; }
.meeting[open] { display: grid; animation: work-in .25s ease both; }
.meeting::backdrop { background: var(--ground); }

/* Antesala */
.meet-lobby { display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.meet-lobby-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.meet-lobby-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 36px; align-items: center; width: min(1080px, 100%); margin: 0 auto; padding: 12px 24px 40px; overflow: auto; }
.meet-lobby-side { display: grid; gap: 14px; align-content: center; }
.meet-lobby-title { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -.01em; }
.meet-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 12px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.meet-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.meet-enter { justify-self: start; height: 44px; padding: 0 22px; font-size: 15px; }
.meet-enter svg { width: 16px; height: 16px; fill: currentColor; }

.meet-pre { display: grid; gap: 12px; }
.meet-pre-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; background: #0b0c10; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.meet-pre-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.meet-pre-off { position: absolute; inset: 0; display: grid; place-items: center; color: #c9c5cf; font-size: 15px; background: #0b0c10; }
.meet-pre-off[hidden] { display: none; }
.meet-pre-controls { position: absolute; left: 50%; bottom: 16px; display: flex; gap: 10px; translate: -50% 0; }
.meet-round { min-height: 40px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(20, 20, 26, .72); color: #f2f0f4; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; backdrop-filter: blur(8px); }
.meet-round[aria-pressed="false"] { border-color: transparent; background: #d8473c; }
.meet-round:disabled { border-color: rgba(255, 255, 255, .22); background: rgba(20, 20, 26, .72); opacity: .6; cursor: default; }
.meet-round:focus-visible { outline: 3px solid rgba(67, 232, 101, .6); outline-offset: 2px; }
.meet-level { position: absolute; left: 16px; bottom: 22px; width: 6px; height: 46px; border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.meet-level-bar { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--level, 0) * 100%); border-radius: inherit; background: #5fd49a; transition: height .08s linear; }
.meet-pre-problem { margin: 0; padding: 10px 12px; border: 1px solid var(--danger-line); border-radius: 12px; background: var(--danger-bg); color: var(--danger-ink); font-size: 13.5px; line-height: 1.45; }
.meet-pre-problem[hidden] { display: none; }
.meet-pre-devices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.meet-field { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.meet-select { width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid rgba(var(--fg-rgb), .16); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; font-size: 13px; }
.meet-link { justify-self: start; padding: 0; border: 0; background: none; color: var(--violet-soft); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.meet-link[hidden] { display: none; }

/* Dentro */
.meet-room { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 0; height: 100dvh; background: #0b0c10; color: #f2f0f4; --ink: #f2f0f4; --muted: #c3bec7; --placeholder: #9a95a0; --hairline: rgba(255, 255, 255, .14); --fg-rgb: 255, 255, 255; --field: rgba(255, 255, 255, .06); --panel: #17181d; }
.meet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; }
.meet-top-main, .meet-top-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.meet-title { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.meet-timer { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.meet-live { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #5fd49a; box-shadow: 0 0 0 4px rgba(95, 212, 154, .18); }
.meet-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border: 1px solid var(--hairline); border-radius: 999px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.meet-badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.meet-badge.is-rec { border-color: rgba(216, 71, 60, .5); color: #ffd4cf; }
.meet-rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #e5574b; animation: meet-pulse 1.6s ease-in-out infinite; }
@keyframes meet-pulse { 50% { opacity: .35; } }

.meet-banner { display: flex; align-items: center; gap: 10px; margin: 0 18px 8px; padding: 10px 12px 10px 14px; border: 1px solid rgba(67, 232, 101, .55); border-radius: 14px; background: rgba(67, 232, 101, .16); animation: chat-in .3s var(--ease-out) both; }
.meet-banner[hidden] { display: none; }
.meet-banner-text { display: flex; align-items: center; gap: 8px; margin-right: auto; font-size: 14px; font-weight: 600; }
.meet-banner-text svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.meet-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 0; gap: 12px; padding: 0 18px; }
.meet-center { position: relative; min-width: 0; min-height: 0; }

.meet-stage { position: absolute; inset: 0; display: grid; gap: 10px; min-height: 0; }
.meet-stage.is-grid { grid-template-rows: minmax(0, 1fr); }
.meet-stage.is-focus { grid-template-columns: minmax(0, 1fr) 200px; }
.meet-stage.is-solo { grid-template-rows: minmax(0, 1fr); }
.meet-main { position: relative; display: grid; gap: 10px; min-width: 0; min-height: 0; }
.meet-stage.is-grid .meet-main { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); grid-auto-rows: minmax(0, 1fr); align-content: center; }
.meet-stage.is-grid .meet-main[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.meet-stage.is-grid .meet-main[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.meet-strip { display: grid; grid-auto-rows: 120px; gap: 10px; align-content: start; min-height: 0; overflow-y: auto; }
.meet-strip[hidden] { display: none; }
.meet-stage.is-solo .meet-strip { position: absolute; right: 14px; bottom: 14px; z-index: 2; width: min(240px, 34%); grid-auto-rows: auto; overflow: visible; }
.meet-stage.is-solo .meet-strip .meet-tile { aspect-ratio: 16 / 10; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

.meet-tile { position: relative; min-width: 0; min-height: 0; border-radius: 16px; background: #1a1b21; overflow: hidden; cursor: pointer; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .15s ease; }
.meet-tile:focus-visible { outline-color: rgba(67, 232, 101, .8); }
.meet-tile.is-talking { outline: 3px solid #5fd49a; outline-offset: -3px; }
.meet-tile.is-pinned { outline-color: rgba(67, 232, 101, .8); }
.meet-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #0b0c10; }
.meet-tile.is-me:not(.is-screen) video { transform: scaleX(-1); }
.meet-tile.is-screen video { object-fit: contain; }
/* En grande, la cámara entera y centrada (sin recortarla para llenar el recuadro): si el recuadro es más alto o más
   ancho que la cámara, sobra fondo arriba y abajo o a los lados. Solo las miniaturas de la tira se recortan. */
.meet-main .meet-tile video { object-fit: contain; }
.meet-tile video[hidden] { display: none; }
.meet-avatar { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: clamp(48px, 22%, 96px); aspect-ratio: 1; border-radius: 50%; background: linear-gradient(140deg, #43e865, #1f9e3c); color: #062a10; font-size: clamp(18px, 3vw, 36px); font-weight: 700; translate: -50% -50%; }
.meet-tile:not(.is-novideo) .meet-avatar { display: none; }
.meet-tile.is-talking .meet-avatar { box-shadow: 0 0 0 6px rgba(95, 212, 154, .3); }
.meet-name { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); padding: 4px 9px; border-radius: 8px; background: rgba(10, 10, 14, .62); color: #fff; font-size: 12.5px; font-weight: 600; backdrop-filter: blur(6px); }
.meet-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meet-mic-off, .meet-hand { display: inline-grid; }
.meet-mic-off[hidden], .meet-hand[hidden], .meet-connecting[hidden] { display: none; }
.meet-mic-off svg { width: 14px; height: 14px; fill: none; stroke: #ff8a80; stroke-width: 2; stroke-linecap: round; }
.meet-hand { position: absolute; top: 10px; left: 10px; padding: 6px; border-radius: 10px; background: #f2cf80; }
.meet-hand svg { width: 18px; height: 18px; fill: none; stroke: #2a2112; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.meet-connecting { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 8px; background: rgba(10, 10, 14, .62); color: #d8d4dc; font-size: 11.5px; }

.meet-captions { position: absolute; left: 50%; bottom: 18px; z-index: 3; display: grid; gap: 4px; width: min(760px, calc(100% - 40px)); padding: 10px 14px; border-radius: 12px; background: rgba(8, 8, 12, .78); font-size: 15px; line-height: 1.45; translate: -50% 0; backdrop-filter: blur(6px); }
.meet-captions[hidden] { display: none; }
.meet-coach { position: absolute; top: 14px; right: 14px; z-index: 4; display: grid; gap: 6px; width: min(360px, calc(100% - 28px)); padding: 12px 14px; border-radius: 12px; background: rgba(20, 14, 40, .9); border: 1px solid rgba(207, 196, 255, .35); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
.meet-coach[hidden] { display: none; }
.meet-coach header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.meet-coach .icon-btn { color: inherit; }
.meet-coach p { margin: 0; }
.meet-coach-kicker { color: #8ff3a4; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.meet-coach-say { font-size: 16px; line-height: 1.4; font-weight: 600; }
.meet-coach-say.is-silence { color: #ffd479; }
.meet-coach-why, .meet-coach-wait { color: rgba(255, 255, 255, .72); font-size: 12.5px; }
.meet-coach-objection { font-size: 12.5px; color: #ffb4b4; }
.meet-coach-error { font-size: 12px; color: #ffd479; }
.meet-captions p { margin: 0; }
.meet-captions b { color: #8ff3a4; }

.meet-floats { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.meet-float { position: absolute; left: var(--x, 50%); bottom: 10px; display: grid; justify-items: center; animation: meet-float 3.2s ease-out forwards; }
.meet-float-emoji { font-size: 34px; }
.meet-float-who { padding: 2px 7px; border-radius: 6px; background: rgba(10, 10, 14, .6); font-size: 11px; }
@keyframes meet-float { from { opacity: 0; translate: 0 0; } 12% { opacity: 1; } to { opacity: 0; translate: 0 -260px; } }

.meet-side { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: 340px; min-height: 0; border: 1px solid var(--hairline); border-radius: 18px; background: var(--panel); overflow: hidden; animation: detail-in .3s var(--ease-out) both; }
.meet-side[hidden] { display: none; }
.meet-side-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px 16px; }
.meet-side-head h3 { margin: 0; font-size: 15px; }
.meet-side > .meet-section:last-child, .meet-side > section { padding: 0 16px 14px; }
.meet-side:has(.meet-section) { display: block; overflow-y: auto; }
.meet-section h4 { margin: 8px 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.meet-section .btn { margin-top: 8px; }
.meet-people { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.meet-people li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 4px 8px; border-radius: 10px; }
.meet-people li.is-talking { background: rgba(95, 212, 154, .1); }
.meet-person { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.meet-person b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.meet-person-actions { display: flex; gap: 6px; }
.meet-person-actions .btn, .meet-people .btn { height: 30px; margin: 0; padding: 0 10px; font-size: 12.5px; }
.meet-person-state { display: flex; gap: 6px; color: var(--muted); }
.meet-person-state svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.meet-invite { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
.meet-invite .btn { margin: 0; }
.meet-chat { display: grid; align-content: start; gap: 10px; margin: 0; padding: 4px 16px 12px; overflow-y: auto; list-style: none; }
.meet-chat li { display: grid; gap: 2px; }
.meet-chat-who { display: flex; gap: 8px; align-items: baseline; margin: 0; font-size: 12.5px; }
.meet-chat-who span { color: var(--placeholder); font-size: 11.5px; }
.meet-chat-text { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.meet-chat li.is-mine .meet-chat-who b { color: #8ff3a4; }
.meet-empty { color: var(--placeholder); font-size: 13px; line-height: 1.45; }
.meet-chat-send { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: end; padding: 10px 12px 12px; border-top: 1px solid var(--hairline); }
.meet-chat-input { min-height: 40px; resize: none; }

.meet-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px 16px; }
.meet-bar-group { display: flex; align-items: center; gap: 8px; }
.meet-ctl { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 46px; height: 46px; padding: 0 12px; border: 0; border-radius: 999px; background: #2a2b32; color: #f2f0f4; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background-color .15s ease, translate .15s ease; }
.meet-ctl:hover:not(:disabled) { background: #363741; }
.meet-ctl:focus-visible { outline: 3px solid rgba(67, 232, 101, .65); outline-offset: 2px; }
.meet-ctl:disabled { opacity: .45; cursor: default; }
.meet-ctl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.meet-ctl.is-off { background: #d8473c; }
.meet-ctl.is-off:hover:not(:disabled) { background: #c23c32; }
.meet-ctl.is-on:not([aria-label^="Silenciar"]):not([aria-label^="Apagar"]) { background: rgba(67, 232, 101, .32); color: #e6e0ff; }
.meet-ctl.is-danger { background: #d8473c; }
.meet-ctl.is-danger:hover { background: #c23c32; }
.meet-ctl.is-wide { padding: 0 16px; }
.meet-ctl-badge { position: absolute; top: -3px; right: -3px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #43e865; color: #062a10; font-size: 11px; }
.meet-react-wrap { position: relative; }
.meet-react-pop { position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 5; display: flex; gap: 2px; padding: 6px; border: 1px solid var(--hairline); border-radius: 999px; background: #1d1e24; translate: -50% 0; box-shadow: 0 14px 40px rgba(0, 0, 0, .45); }
.meet-react { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 22px; cursor: pointer; }
.meet-react:hover, .meet-react:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.meet-confirm { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.btn-danger { background: #d8473c; color: #fff; }
.btn-danger:hover { background: #c23c32; }

.meet-left { display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; }
.meet-left h2 { margin: 0; font-size: 24px; }
.meet-left .call-muted { max-width: 460px; }
.meet-left.has-minutes { place-content: start center; max-height: 100%; overflow-y: auto; }
.meet-left.has-minutes .meet-card { width: min(640px, 100%); text-align: left; }

/* La tarjeta en el chat */
.meet-card.is-open { border-color: rgba(67, 232, 101, .55); }
/* El enlace corto (`/v/<código>`) con «Copiar» y «WhatsApp»: en la tarjeta de la reunión y en la de una demo agendada */
.meet-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0 2px; }
.meet-link { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 1px dashed rgba(var(--fg-rgb), .3); }
.meet-link:hover { border-bottom-style: solid; }
.meet-min { display: grid; gap: 12px; }
.meet-min-summary { margin: 0; font-size: 14.5px; line-height: 1.55; }
.meet-min-section h4 { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.meet-min-list { display: grid; gap: 4px; margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.meet-min-tasks { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.meet-min-tasks li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: start; font-size: 14px; line-height: 1.45; }
.meet-min-tasks svg { width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: var(--ok-ink); stroke-width: 2; }
.meet-min-topics details { padding: 6px 0; border-top: 1px solid var(--line); }
.meet-min-topics summary { font-size: 14px; font-weight: 600; cursor: pointer; }
.meet-min-topics .meet-min-list { margin-top: 6px; }
.meet-transcript { max-height: 320px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 12px; overflow-y: auto; }
.meet-transcript ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; line-height: 1.5; }

/* Página del invitado */
.guest-page { min-height: 100dvh; margin: 0; background: var(--ground); color: var(--ink); font-family: 'Public Sans', system-ui, sans-serif; }
.guest-screen { min-height: 100dvh; }
.guest-screen[hidden] { display: none; }
.guest-center { display: grid; place-content: center; justify-items: center; gap: 12px; min-height: 100dvh; padding: 24px; text-align: center; }
.guest-center h1 { margin: 0; font-size: 26px; }
.guest-brand { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.guest-brand img { width: 28px; height: 28px; border-radius: 8px; }
.guest-join { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); gap: 36px; align-items: center; width: min(1040px, 100%); min-height: 100dvh; margin: 0 auto; padding: 24px; }
.guest-form { display: grid; gap: 14px; }
.guest-form h1 { margin: 0; font-size: 28px; line-height: 1.2; }
.guest-name { min-height: 46px; font-size: 16px; }
.guest-wait-dots { display: flex; gap: 6px; }
.guest-wait-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--violet-soft); animation: meet-pulse 1.2s ease-in-out infinite; }
.guest-wait-dots i:nth-child(2) { animation-delay: .2s; }
.guest-wait-dots i:nth-child(3) { animation-delay: .4s; }
.guest-error { margin: 0; color: var(--danger-soft); font-size: 13.5px; }
.guest-error[hidden] { display: none; }

@media (max-width: 860px) {
  .meet-lobby-body, .guest-join { grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }
  .meet-lobby-title, .guest-form h1 { font-size: 22px; }
  .meet-side { position: absolute; inset: 56px 8px 84px; z-index: 6; width: auto; }
  .meet-body { position: relative; padding: 0 8px; }
  .meet-stage.is-focus { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 96px; }
  .meet-stage.is-focus .meet-strip { grid-auto-flow: column; grid-auto-columns: 140px; grid-auto-rows: 96px; overflow-x: auto; overflow-y: hidden; }
  .meet-stage.is-grid .meet-main[data-count="2"] { grid-template-columns: minmax(0, 1fr); }
  .meet-bar { flex-wrap: wrap; justify-content: center; padding: 10px 8px 14px; }
  .meet-ctl { min-width: 42px; height: 42px; }
  .meet-ctl.is-wide span { display: none; }
  .meet-top { padding: 10px 12px; }
  .meet-captions { font-size: 13.5px; }
  .meet-coach { top: 8px; right: 8px; left: 8px; width: auto; }
  .meet-coach-say { font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .meeting[open], .meet-banner, .meet-side, .meet-float, .meet-rec-dot, .guest-wait-dots i { animation: none; }
}
.meet-flash { position: absolute; left: 50%; top: 14px; z-index: 6; max-width: min(520px, calc(100% - 32px)); margin: 0; padding: 9px 14px; border: 1px solid var(--hairline); border-radius: 12px; background: rgba(20, 20, 26, .92); color: #f2f0f4; font-size: 13.5px; translate: -50% 0; animation: chat-in .3s var(--ease-out) both; }
.meet-flash[hidden] { display: none; }

/* --- Lo que se trajo de ORQUEST: minimizar, ventana flotante, ajustes, fondos, calidad, archivos y demo --- */

/* «En llamada», arriba */
.meet-live-chip { display: inline-flex; align-items: center; gap: 8px; border-color: rgba(95, 212, 154, .5); background: rgba(95, 212, 154, .1); color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.meet-live-chip[hidden] { display: none; }
.meet-live-chip b { color: var(--ok-ink); font-weight: 700; }
:root[data-theme="light"] .meet-live-chip b { color: #17764a; }
.meet-live-chip .meet-live { width: 8px; height: 8px; animation: meet-pulse 1.6s ease-in-out infinite; }
.meet-live-chip:hover { background: rgba(95, 212, 154, .18); }
.meet-live-chip:focus-visible { outline: 3px solid rgba(67, 232, 101, .55); outline-offset: 2px; }

.meet-top-btn { color: #f2f0f4; }
.meet-top-btn svg { width: 20px; height: 20px; }

/* La ventanita: dentro de la app (capa superior) o en la ventana flotante */
.meet-mini { position: fixed; inset: auto; z-index: 300; display: grid; width: 320px; margin: 0; padding: 0; border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; background: #111216; color: #f2f0f4; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); overflow: hidden; touch-action: none; font-family: 'Public Sans', system-ui, sans-serif; }
.meet-mini.is-dragging { cursor: grabbing; opacity: .92; }
.meet-mini-view { position: relative; display: block; aspect-ratio: 16 / 10; width: 100%; padding: 0; border: 0; background: #0b0c10; cursor: grab; overflow: hidden; }
.meet-mini-main { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0b0c10; }
.meet-mini-main[hidden] { display: none; }
.meet-mini.is-mirrored .meet-mini-main { transform: scaleX(-1); }
.meet-mini .meet-avatar[hidden] { display: none; }
.meet-mini .meet-avatar.is-talking { box-shadow: 0 0 0 6px rgba(95, 212, 154, .35); }
.meet-mini-name { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 90px); padding: 3px 8px; overflow: hidden; border-radius: 7px; background: rgba(10, 10, 14, .65); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.meet-mini-selfbox { position: absolute; right: 8px; bottom: 8px; display: none; width: 28%; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.meet-mini.has-self .meet-mini-selfbox { display: block; }
.meet-mini-self { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.meet-mini-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; }
.meet-mini-title { min-width: 0; overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.meet-mini-title span { color: #c3bec7; font-variant-numeric: tabular-nums; }
.meet-mini-buttons { display: flex; flex: none; gap: 6px; }
.meet-ctl.is-small { min-width: 34px; height: 34px; padding: 0 8px; }
.meet-ctl.is-small svg { width: 17px; height: 17px; }
.meet-mini-resize { position: absolute; top: 0; left: 0; width: 18px; height: 18px; cursor: nwse-resize; background: linear-gradient(135deg, rgba(255, 255, 255, .35) 0 2px, transparent 2px 5px, rgba(255, 255, 255, .25) 5px 7px, transparent 7px); opacity: .7; }
.meet-mini.is-pip { position: static; width: 100%; height: 100vh; border: 0; border-radius: 0; box-shadow: none; grid-template-rows: minmax(0, 1fr) auto; }
.meet-mini.is-pip .meet-mini-view { aspect-ratio: auto; height: 100%; cursor: pointer; }
.meet-mini.is-pip .meet-mini-resize { display: none; }
.meet-pip-body { margin: 0; overflow: hidden; background: #111216; }

/* Aviso de que presentas, y la tarjeta de la calculadora encima del vídeo */
.meet-banner.is-presenting { border-color: rgba(95, 212, 154, .5); background: rgba(95, 212, 154, .12); }
.meet-banner-slot { display: grid; }
.meet-calc-slot { position: absolute; left: 50%; top: 14px; z-index: 5; width: min(30rem, calc(100% - 32px)); translate: -50% 0; }
.meet-calc-slot:empty { display: none; }
.meet-calc-card { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid rgba(242, 207, 128, .7); border-radius: 16px; background: rgba(21, 18, 12, .94); box-shadow: 0 10px 40px rgba(0, 0, 0, .6); text-align: center; animation: chat-in .3s var(--ease-out) both; }
.meet-calc-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.meet-calc-figures div { display: grid; gap: 2px; }
.meet-calc-figures b, .meet-calc-result b { color: #ffe3ad; font-size: clamp(22px, 4vw, 30px); font-variant-numeric: tabular-nums; }
.meet-calc-figures span, .meet-calc-result span { color: #c3bec7; font-size: 12.5px; }
.meet-calc-card .call-kicker { color: #f2cf80; }

/* Calidad de cada conexión: tres barras */
.meet-quality { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-left: 2px; }
.meet-quality[hidden] { display: none; }
.meet-quality i { width: 3px; border-radius: 1px; background: rgba(255, 255, 255, .3); }
.meet-quality i:nth-child(1) { height: 5px; }
.meet-quality i:nth-child(2) { height: 8px; }
.meet-quality i:nth-child(3) { height: 12px; }
.meet-quality[data-quality="good"] i { background: #5fd49a; }
.meet-quality[data-quality="fair"] i:nth-child(-n+2) { background: #f2cf80; }
.meet-quality[data-quality="poor"] i:nth-child(1) { background: #ff8a80; }
.meet-tile.is-me:not(.is-screen) video { transform: none; }
.meet-tile.is-me.is-mirror:not(.is-screen) video { transform: scaleX(-1); }
.meet-tile.is-agent .meet-avatar { background: linear-gradient(140deg, #f2cf80, #c98a2b); color: #2a2112; }
.meet-pre-video { transform: none; }
.meet-pre-video.is-mirror { transform: scaleX(-1); }

/* Ajustes dentro de la llamada y fondos */
.meet-settings { position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 6; display: grid; gap: 10px; width: 300px; padding: 14px; border: 1px solid var(--hairline); border-radius: 16px; background: #1d1e24; translate: -50% 0; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); }
.meet-effects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.meet-effect { display: grid; gap: 4px; justify-items: center; padding: 6px; border: 1px solid var(--hairline); border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 11.5px; line-height: 1.25; text-align: center; cursor: pointer; }
.meet-effect.is-on { border-color: rgba(67, 232, 101, .85); background: rgba(67, 232, 101, .16); }
.meet-effect:disabled { opacity: .5; cursor: default; }
.meet-effect-thumb { width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; background: #2a2b32; }
.meet-effect.is-blur .meet-effect-thumb { background: radial-gradient(circle at 50% 70%, #a7aea7 0 18%, transparent 19%), linear-gradient(135deg, #2b302b, #4a524a); }
.meet-effect.is-brand .meet-effect-thumb { background: radial-gradient(circle at 15% 100%, rgba(67, 232, 101, .45), transparent 60%), linear-gradient(rgba(242, 244, 241, .06) 1px, transparent 1px) 0 0 / 12px 12px, #0b0c0b; }
.meet-pre .meet-effects { max-width: 420px; }

/* Archivos en el chat */
.meet-chat-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 2px; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 10px; color: var(--ink); font-size: 13px; text-decoration: none; }
.meet-chat-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meet-chat-file small { flex: none; color: var(--placeholder); }
.meet-chat-file svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.meet-chat-file:hover { border-color: rgba(67, 232, 101, .7); }
.meet-chat-send { grid-template-columns: auto minmax(0, 1fr) auto; }
.meet-uploading { padding: 0 14px 10px; }

/* Panel Demo: guion, calculadora y agente */
.meet-side.is-demo { width: 400px; grid-template-rows: auto minmax(0, 1fr); }
.meet-side-scroll { min-height: 0; padding: 0 16px 16px; overflow-y: auto; }
.meet-demo { display: grid; gap: 12px; }
.meet-demo-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.meet-demo-mode { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.meet-demo-headache { display: grid; gap: 2px; margin: 0; padding: 8px 10px; border-left: 3px solid rgba(242, 207, 128, .7); border-radius: 8px; background: rgba(242, 207, 128, .08); font-size: 13.5px; line-height: 1.45; }
.meet-demo-headache.is-focus { border-left-color: rgba(67, 232, 101, .9); background: rgba(67, 232, 101, .14); font-weight: 600; }
.meet-demo-headache small { color: var(--placeholder); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.meet-demo-tabs .call-chip.is-close { border-color: rgba(242, 207, 128, .5); }
.meet-demo-step { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--hairline); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.meet-demo-step.is-close { border-color: rgba(242, 207, 128, .5); }
.meet-demo-step header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.meet-demo-step header small { color: var(--placeholder); font-size: 12px; }
.meet-demo-say { display: grid; gap: 8px; margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.meet-demo-note { margin: 0; padding: 8px 10px; border-left: 3px solid rgba(67, 232, 101, .7); color: var(--muted); font-size: 13px; line-height: 1.5; }
.meet-demo-tool { display: grid; gap: 10px; padding: 12px; border-radius: 12px; background: rgba(67, 232, 101, .1); }
.meet-demo-never { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--danger-line); border-radius: 12px; background: var(--danger-bg); color: var(--danger-ink); font-size: 13px; }
.meet-demo-never ul { margin: 0; padding-left: 18px; }
.meet-demo-nav { display: flex; justify-content: space-between; gap: 8px; }
.meet-calc-field { display: grid; gap: 4px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.meet-calc-more { display: grid; gap: 10px; }
.meet-calc-more summary { cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.meet-calc-more[open] { padding-bottom: 4px; }
.meet-calc-field small { color: var(--placeholder); font-weight: 400; }
.meet-calc-result { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: center; }
.meet-calc-result div { display: grid; gap: 2px; padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, .25); }
.meet-agent { display: grid; gap: 8px; }
.meet-agent p { margin: 0; }
.meet-agent-line { display: grid; gap: 2px; font-size: 13.5px; }
.meet-agent-line small { color: var(--placeholder); }

/* Tu propia pantalla: un aviso en vez del vídeo (si no, la sala sale dentro de sí misma una y otra vez). */
.meet-tile.is-own-screen { display: grid; place-items: center; background: rgba(95, 212, 154, .1); outline: 1px solid rgba(95, 212, 154, .45); outline-offset: -1px; }
.meet-tile.is-own-screen .meet-avatar { display: none; }
.meet-tile.is-own-screen::before { content: 'Los demás ven tu pantalla'; padding: 0 12px; color: #c8f2dc; font-size: 13px; font-weight: 600; text-align: center; }

@media (max-width: 860px) {
  .meet-side.is-demo { width: auto; }
  .meet-settings { left: auto; right: 0; translate: none; width: min(300px, calc(100vw - 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .meet-live-chip .meet-live, .meet-calc-card { animation: none; }
}

/* Subtítulos: verlos y en qué idioma */
.meet-check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.meet-check input { width: 18px; height: 18px; accent-color: #8b7cff; }
.meet-captions-menu .call-hint { margin: 0; }

/* La card de la videollamada cuando ya hay una sala abierta: lleva a esa */
.start-card.is-live .start-card-icon { background: rgba(34, 197, 94, .14); color: #22c55e; }

/* Los menús de dentro de la llamada son oscuros siempre: su desplegable, también (si no, en tema claro sale blanco con letra clara) */
.meet-settings { color-scheme: dark; }
.meet-settings .meet-select { background: #2a2b33; color: #f2f0f4; border-color: rgba(255, 255, 255, .16); }
.meet-settings .meet-select option { background: #1d1e24; color: #f2f0f4; }
.meet-settings .meet-select option:checked { background: #4b3fb3; color: #fff; }

/* Un subtítulo que aún se traduce: como se dijo, atenuado, hasta que llega la traducción */
.meet-captions p.is-pending span { opacity: .6; }
.meet-caption-wait { color: #a9a3b8; font-size: .85em; animation: meet-wait 1.2s ease-in-out infinite alternate; }
@keyframes meet-wait { from { opacity: .45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .meet-caption-wait { animation: none; } }
.call-demo-meet { display: grid; gap: 2px; margin-top: 8px; }
/* La grabación en vídeo en la tarjeta de la reunión */
.meet-rec-block { display: grid; gap: 8px; }
.meet-rec-part { display: grid; gap: 4px; }
.meet-rec-wait { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px; border-radius: 10px; background: rgba(127, 127, 127, .12); font-size: 14px; }
.meet-rec-video { width: 100%; max-height: 360px; border-radius: 10px; background: #0b0c10; }
.meet-rec-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.meet-rec-delete:hover { color: #f87171; }
/* El aviso de grabación del invitado: antes de entrar y, al entrar, unos segundos sobre la llamada */
.meet-rec-notice { align-items: center; border-color: rgba(239, 68, 68, .55); background: rgba(239, 68, 68, .08); color: var(--ink); }
.meet-rec-notice > span:last-child { display: grid; gap: 2px; }
.meet-rec-notice b { font-size: 14.5px; }
.meet-rec-notice .meet-rec-dot, .meet-rec-banner .meet-rec-dot { flex: none; }
.meet-rec-banner { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 10px 16px; border: 1px solid rgba(239, 68, 68, .6); border-radius: 999px; background: rgba(20, 10, 12, .92); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
