/* ═══ Salas (prefijo .rm-): lista estilo Discord, paneles apilados, tiles, píldora de controles, dock global y llamada entrante ═══
   Diseño v2: todo color sale de tokens de base.css; piezas flotantes = .liquid, etiquetas sobre video = .glass (las clases se ponen en el JS). */

/* ── columna izquierda ── */
.rm-list-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 8px; }
.rm-list-head h1 { font-size: 22px; }
.rm-room { border-radius: 18px; margin: 2px 0; transition: background var(--t) var(--ease); }
.rm-room.mine { background: var(--primary-soft); }
.rm-room-head { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border-radius: 16px; cursor: pointer; outline: none;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.rm-room-head:hover, .rm-room-head:focus-visible { background: var(--card-2); } .rm-room.mine .rm-room-head:hover { background: transparent; }
.rm-room-head:active { transform: scale(.985); }
.rm-room-emoji { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--card); box-shadow: var(--shadow); transition: transform var(--t) var(--spring); }
.rm-room-head:hover .rm-room-emoji { transform: scale(1.08) rotate(-4deg); }
.rm-req { color: var(--muted); display: inline-flex; } .rm-req .icon { width: 15px; height: 15px; }
.rm-enter { font-size: 11.5px; font-weight: 800; color: var(--primary); opacity: 0; transform: translateX(-4px); transition: all var(--t) var(--ease); }
.rm-room-head:hover .rm-enter, .rm-room-head:focus-visible .rm-enter { opacity: 1; transform: none; }
.rm-edit { opacity: 0; transition: opacity var(--t) var(--ease); } .rm-room-head:hover .rm-edit, .rm-edit:focus-visible { opacity: 1; }
.rm-members { display: flex; flex-direction: column; gap: 1px; padding: 0 8px 8px 28px; }
.rm-member { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 8px; border-radius: 12px; font-size: 13px; color: var(--text-2); transition: background var(--t-fast) var(--ease); }
.rm-member:hover { background: var(--card-2); }
.rm-icons { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; } .rm-icons span { display: inline-flex; } .rm-icons .icon { width: 14px; height: 14px; }
.rm-icons .ok { color: var(--ok); } .rm-icons .bad { color: var(--danger); }
.rm-timer { font-size: 11.5px; font-weight: 700; color: var(--text-2); background: var(--card-2); padding: 2px 7px; border-radius: 8px; min-width: 40px; text-align: center; }
.rm-room.mine .rm-timer { background: var(--card); }
.rm-back-call { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 16px; margin: 4px 0 10px; border-radius: var(--r-pill); font-weight: 700; color: #fff;
  background: var(--ok); box-shadow: 0 10px 24px var(--ok-soft), inset 0 1px 0 rgba(255, 255, 255, .25); }
.rm-back-call.rm-fresh { animation: rm-drop 520ms var(--spring) backwards; }
.rm-back-call .dot.live { background: #fff; }

/* ── héroe + tarjetas de salas ── */
.rm-main { position: relative; }
/* Todo al mismo borde izquierdo que el título "Tus salas" (antes: max-width 980 + margin auto → en monitores anchos el saludo, el héroe y las tarjetas
   quedaban centrados con un hueco a la izquierda mientras el título seguía pegado a la izquierda). Mismo criterio que Inicio: 1640px, sin centrar. */
.rm-home { padding-top: 18px; } .rm-home > * { max-width: 1640px; margin-left: 0; margin-right: 0; }
.rm-rise { animation: rise 520ms var(--ease) backwards; }
.rm-greet { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rm-hero { position: relative; overflow: hidden; isolation: isolate; min-height: 210px; padding: 24px; border-radius: 28px; color: #fff; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: linear-gradient(100deg, rgba(8, 8, 24, .46) 0%, rgba(8, 8, 24, .12) 70%), var(--backdrop); box-shadow: var(--lg-hi), var(--shadow-lg); border: 1px solid var(--lg-border); }
/* Esferas que flotan: SIN `filter: blur` (un filtro sobre algo que se mueve se recalcula en cada cuadro). El borde suave lo da el degradado y solo se anima transform. */
.rm-hero::before, .rm-hero::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; animation: rm-float 9s ease-in-out infinite; will-change: transform; }
.rm-hero::before { width: 276px; height: 276px; right: -78px; top: -98px; background: radial-gradient(circle closest-side, rgba(255, 255, 255, .15) 0 80%, rgba(255, 255, 255, .07) 91%, rgba(255, 255, 255, 0) 100%); }
.rm-hero::after { width: 206px; height: 206px; right: 82px; bottom: -118px; background: radial-gradient(circle closest-side, rgba(255, 255, 255, .115) 0 78%, rgba(255, 255, 255, .05) 90%, rgba(255, 255, 255, 0) 100%); animation-delay: -4s; }
.rm-hero h2 { font-size: 26px; line-height: 1.15; max-width: 420px; } .rm-hero h2 em { font-style: normal; color: #cdf2a0; }
.rm-hero p { max-width: 430px; color: rgba(255, 255, 255, .86); font-size: 13.5px; }
.rm-hero-btn { margin-top: auto; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px 0 7px; border-radius: var(--r-pill); background: var(--solid); color: var(--text); font-weight: 800;
  box-shadow: 0 12px 26px rgba(10, 10, 60, .28), inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease); }
.rm-hero-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 34px rgba(10, 10, 60, .36); } .rm-hero-btn:active { transform: scale(.96); }
.rm-hero-btn-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); }
.rm-glass-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; white-space: nowrap; }   /* + .glass */
.rm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.rm-stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.rm-stat b { font-size: 18px; } .rm-stat .icon { width: 17px; height: 17px; color: var(--accent); }
.rm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.rm-card { --tone: #ffe9d6; min-height: 168px; padding: 16px; border-radius: 24px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; outline: none; background: var(--tone); border: 1px solid rgba(20, 20, 60, .04);
  transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease); }
.rm-card:hover, .rm-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); } .rm-card:active { transform: scale(.97); }
.rm-card.tone-0 { --tone: #ffe4ea; } .rm-card.tone-1 { --tone: #dceaff; } .rm-card.tone-2 { --tone: #dcf7e6; } .rm-card.tone-3 { --tone: #fff1cf; } .rm-card.tone-4 { --tone: #ffe9d6; }
:root[data-theme='dark'] .rm-card { border-color: var(--line); }
:root[data-theme='dark'] .rm-card.tone-0 { --tone: rgba(244, 114, 182, .16); } :root[data-theme='dark'] .rm-card.tone-1 { --tone: rgba(96, 165, 250, .16); } :root[data-theme='dark'] .rm-card.tone-2 { --tone: rgba(74, 222, 128, .14); }
:root[data-theme='dark'] .rm-card.tone-3 { --tone: rgba(251, 191, 36, .14); } :root[data-theme='dark'] .rm-card.tone-4 { --tone: rgba(251, 146, 60, .14); }
.rm-card-emoji { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; background: var(--solid); box-shadow: var(--shadow); }
.rm-card p { color: var(--text-2); } .rm-card .avatar-stack .avatar { border-color: var(--solid); } .rm-more { background: var(--text) !important; color: var(--card); font-size: 11px; }
.rm-join { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12.5px; } .rm-join .icon { width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); transition: transform var(--t) var(--spring); }
.rm-card:hover .rm-join .icon { transform: rotate(90deg) scale(1.08); }

/* ── paneles apilados ── */
.rm-stack { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 12px 14px 14px; scrollbar-width: thin; scrollbar-color: var(--card-3) transparent; }
.rm-panel { flex: 1 0 auto; min-height: 350px; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: rm-panel-in 560ms var(--spring) backwards; }
.rm-stack[data-count='1'] .rm-panel { flex: 1 1 0; }
.rm-panel.leaving { animation: rm-panel-out 300ms var(--ease) forwards; pointer-events: none; }
.rm-panel-head { display: flex; align-items: center; gap: 8px; flex: none; min-width: 0; }
.rm-panel-head h3 { font-size: 15px; } .rm-panel-meta { white-space: nowrap; min-width: 0; } .rm-panel-meta > * { flex: none; } .rm-panel-meta > .truncate { flex: 0 1 auto; min-width: 0; }   /* cronómetro · personas · depto: una sola línea (antes se partía en 2-3 renglones); el depto se corta con … */
.rm-panel-head .btn.on { background: var(--primary); color: var(--on-primary); }
.rm-panel-emoji { width: 40px; height: 40px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 20px; background: var(--card-2); }
.rm-panel-body { flex: 1; min-height: 0; display: flex; gap: 12px; }
.rm-stage-wrap { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.rm-banners { display: flex; flex-direction: column; gap: 6px; flex: none; } .rm-banners:empty { display: none; }
.rm-banner { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 12px; border-radius: 14px; font-size: 12.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); animation: rm-drop 480ms var(--spring) backwards; }
.rm-banner.warn { background: var(--warn-soft); color: #a86400; } :root[data-theme='dark'] .rm-banner.warn { color: #fbbf24; }
.rm-banner .btn { background: var(--solid); color: var(--text); flex: none; }
.rm-banner.quiet { background: var(--card-2); color: var(--text-2); font-weight: 500; }
/* calidad de la pantalla compartida: lo que sale de verdad (banner), lo que llega (rincón del tile) y el selector */
.rm-qstat { margin-top: 1px; font-size: 11.5px; font-weight: 600; opacity: .82; font-variant-numeric: tabular-nums; }
.rm-qbadge { height: 24px; font-size: 11px; font-variant-numeric: tabular-nums; opacity: .9; }
.rm-qrow { border: 1.5px solid transparent; min-height: 58px; } .rm-qrow.active { border-color: var(--primary); background: var(--primary-soft); }
.rm-qcheck { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); color: var(--on-primary); transition: background var(--t) var(--ease), border-color var(--t) var(--ease); }
.rm-qcheck .icon { width: 15px; height: 15px; } .rm-qrow.active .rm-qcheck { background: var(--primary); border-color: var(--primary); }
.rm-qcost { color: var(--text-2); padding: 10px 12px; border-radius: 14px; background: var(--card-2); }
.rm-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.rm-main-slot { flex: 1; min-height: 0; display: flex; }
.rm-strip { flex: none; height: 116px; display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; } .rm-strip::-webkit-scrollbar { display: none; }
.rm-stack[data-count='2'] .rm-strip, .rm-stack[data-count='3'] .rm-strip { height: 86px; }
.rm-stack[data-count='2'] .rm-strip .timer, .rm-stack[data-count='3'] .rm-strip .timer { display: none; }
.rm-stage.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); grid-auto-rows: minmax(150px, 1fr); overflow: auto; }
.rm-stage.grid .rm-main-slot, .rm-stage.grid .rm-strip { display: contents; }
.rm-veil { position: absolute; inset: 0; z-index: 5; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; font-weight: 700;
  background: rgba(12, 14, 30, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade var(--t) var(--ease) backwards; }
.rm-spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .9s linear infinite; }

/* ── tiles ── */
.rm-tile { --c: var(--primary); position: relative; overflow: hidden; isolation: isolate; min-width: 0; border-radius: 20px; color: #fff; cursor: pointer; background: var(--stage);
  background: radial-gradient(120% 130% at 25% 15%, color-mix(in srgb, var(--c) 52%, var(--stage)) 0%, var(--stage) 78%); animation: rm-tile-in 520ms var(--spring) backwards; }
.rm-main-slot > .rm-tile { flex: 1; border-radius: 24px; cursor: default; }
.rm-strip > .rm-tile { flex: none; height: 100%; aspect-ratio: 16 / 10; transition: transform var(--t) var(--spring); } .rm-strip > .rm-tile:hover { transform: translateY(-2px) scale(1.015); }
.rm-tile::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 3px var(--ok), inset 0 0 26px var(--ok-soft); opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.rm-tile.speaking::after { opacity: 1; }
.rm-tile video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity var(--t) var(--ease); }
.rm-tile.has-video video { opacity: 1; } .rm-tile.screen video { object-fit: contain; background: #05060c; } .rm-tile.self:not(.screen) video { transform: scaleX(-1); }
.rm-tile-ui { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; padding: 8px; pointer-events: none; } .rm-tile-ui button { pointer-events: auto; }
.rm-main-slot .rm-tile-ui { padding: 14px; }
.rm-ph { position: absolute; inset: 0; z-index: -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 12px; text-align: center; color: rgba(255, 255, 255, .8); }
.rm-ph .avatar { box-shadow: 0 0 0 4px rgba(255, 255, 255, .16), 0 16px 40px rgba(0, 0, 0, .35); transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease); }
.rm-tile.speaking .rm-ph .avatar { transform: scale(1.06); box-shadow: 0 0 0 4px var(--ok), 0 0 0 12px var(--ok-soft), 0 16px 40px rgba(0, 0, 0, .35); }
.rm-strip .rm-ph .avatar { --s: 44px; } .rm-stack[data-count='2'] .rm-strip .rm-ph .avatar, .rm-stack[data-count='3'] .rm-strip .rm-ph .avatar { --s: 34px; }
.rm-tile-top { display: flex; align-items: center; gap: 6px; min-height: 34px; }
.rm-tbtn { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center;
  opacity: 0; transform: scale(.85); transition: opacity var(--t) var(--ease), transform var(--t) var(--spring), background var(--t) var(--ease); }
.rm-tbtn .icon { width: 17px; height: 17px; } .rm-tbtn:hover { background: rgba(255, 255, 255, .3); transform: scale(1.08); } .rm-tbtn.on { background: var(--solid); color: var(--text); opacity: 1; transform: none; }
.rm-tile:hover .rm-tbtn, .rm-tile:focus-within .rm-tbtn, .rm-tile.main .rm-tbtn { opacity: 1; transform: none; }
@media (hover: none) { .rm-tbtn { opacity: 1; transform: none; } .rm-enter { opacity: .75; transform: none; } .rm-edit { opacity: 1; } }
.rm-glass-chip.hand { font-size: 15px; padding: 0 8px; animation: rm-wiggle 1.2s var(--ease) infinite; }
.rm-watch { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: var(--r-pill); font-weight: 800;
  transition: transform var(--t) var(--spring), background var(--t) var(--ease); animation: rm-pop 520ms var(--spring) backwards; }
.rm-watch:hover { background: rgba(255, 255, 255, .32); transform: translate(-50%, -50%) scale(1.05); }
.rm-tile-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-width: 0; }
.rm-caption { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 5px 10px; border-radius: 13px; font-size: 12px; }   /* + .glass */
.rm-tile.main .rm-caption { padding: 9px 14px 9px 9px; border-radius: 18px; font-size: 14px; min-height: 50px; }
.rm-caption-wave { display: none; width: 22px; height: 22px; flex: none; border-radius: 8px; place-items: center; color: #86efac; background: rgba(255, 255, 255, .14); } .rm-caption-wave .wave { height: 11px; gap: 2px; } .rm-caption-wave .wave i { width: 2px; }
.rm-tile.main .rm-caption-wave { width: 34px; height: 34px; border-radius: 12px; display: grid; color: rgba(255, 255, 255, .55); } .rm-tile.main .rm-caption-wave .wave { height: 16px; } .rm-tile.main .rm-caption-wave .wave i { width: 3px; animation-play-state: paused; }
.rm-tile.speaking .rm-caption-wave { display: grid; color: #86efac; } .rm-tile.main.speaking .rm-caption-wave .wave i { animation-play-state: running; }
.rm-caption-sub { color: rgba(255, 255, 255, .75); } .when-talking { display: none; color: #86efac; font-weight: 700; } .rm-tile.speaking .when-talking { display: inline; } .rm-tile.speaking .when-quiet { display: none; }
.rm-bad { display: inline-flex; flex: none; color: #ff97a1; } .rm-bad .icon { width: 15px; height: 15px; }
/* sobre una pantalla compartida (casi siempre blanca) el vidrio claro con letra blanca no se lee: ahí el vidrio es oscuro */
.rm-tile.screen .glass, .rm-viewer .glass { background: rgba(12, 14, 30, .58); border-color: rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 24px rgba(0, 0, 0, .3); }
.rm-tile.screen .glass::before, .rm-viewer .glass::before { background: linear-gradient(135deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 45%); }
.rm-tile.screen .rm-tbtn.on, .rm-viewer .rm-tbtn.on { background: var(--solid); color: var(--text); }
.rm-tile:fullscreen { border-radius: 0; } .rm-tile:fullscreen video { object-fit: contain; }
.rm-tile.fs { position: fixed; inset: 0; z-index: 95; border-radius: 0; height: auto !important; aspect-ratio: auto !important; } .rm-tile.fs video { object-fit: contain; }
/* a pantalla completa la píldora de controles se muda ADENTRO del tile (si se queda afuera el navegador no la dibuja y te quedás sin micrófono ni "Salir") */
.rm-controls.over-fs { position: absolute; left: 0; right: 0; bottom: calc(18px + var(--safe-b)); z-index: 9; }
.rm-tile:fullscreen .rm-tile-ui, .rm-tile.fs .rm-tile-ui { padding-bottom: calc(80px + var(--safe-b)); }

/* ── píldora flotante de controles ── */
.rm-controls { flex: none; display: flex; justify-content: center; pointer-events: none; }
.rm-pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px; border-radius: var(--r-pill); animation: rm-pill-in 640ms var(--spring) backwards; }   /* + .liquid */
.rm-cb { width: 46px; height: 46px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 12.5px; white-space: nowrap; background: var(--card-2); color: var(--text);
  transition: transform var(--t) var(--spring), background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.rm-cb:hover { transform: translateY(-2px); background: var(--card-3); } .rm-cb:active { transform: scale(.9); }
.rm-cb.off { background: var(--danger-soft); color: var(--danger); }
.rm-cb.active { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 18px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, .18); }
.rm-cb.solo, .rm-cb.leave { width: auto; padding: 0 18px; border-radius: var(--r-pill); }
.rm-cb.leave { background: var(--danger); color: #fff; box-shadow: 0 8px 18px var(--danger-soft), inset 0 1px 0 rgba(255, 255, 255, .25); } .rm-cb.leave:hover { background: var(--danger); filter: brightness(1.08); box-shadow: 0 12px 26px var(--danger-soft); }
.rm-cb.sm { width: 38px; height: 38px; padding: 0; } .rm-cb.sm .icon { width: 17px; height: 17px; }
.rm-sep { width: 1px; height: 26px; background: var(--line); margin: 0 2px; }
/* efectos de la sala (soundboard.js): botón de la píldora + fila de respaldo en la hoja de participantes de teléfonos muy angostos */
.rm-cb.sb > span { font-size: 19px !important; line-height: 1; }
.rm-sb-row { display: none; width: 100%; gap: 12px; min-height: 60px; margin-bottom: 10px; text-align: left; border: 1px solid var(--line); }
.rm-au-row { display: flex; width: 100%; gap: 12px; min-height: 60px; margin-bottom: 10px; text-align: left; border: 1px solid var(--line); }
.rm-sb-ic { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 21px; background: var(--card-2); }
.rm-sb-ic .icon { width: 20px; height: 20px; }

/* ── audio: micrófono y salida (bloque único, lo arma rtc.audio.panel(); se usa en la hoja de la llamada y en Ajustes → Audio y video) ── */
.rm-audio { display: flex; flex-direction: column; gap: 18px; }
.rm-audio-block { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rm-audio-head { gap: 10px; flex-wrap: wrap; min-height: 34px; } .rm-audio-head .label { margin: 0; }
.rm-audio .select { width: 100%; }
.rm-level { position: relative; height: 10px; border-radius: var(--r-pill); overflow: hidden; background: var(--card-2); }
.rm-level i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--muted); transform: scaleX(.005); transform-origin: left center; transition: transform 90ms linear, background var(--t) var(--ease); }
.rm-level.live i { background: linear-gradient(90deg, var(--ok), var(--accent)); }
.rm-audio-note { margin: 0; line-height: 1.4; }
.rm-audio-help { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 11px 13px; border-radius: 14px; line-height: 1.45; background: var(--card-2); }
.rm-audio-help .icon { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.rm-audio-spk { align-self: flex-start; min-height: 44px; }
/* puerta de voz («Transmitir solo cuando hablo»): interruptor + indicador de si tu voz está saliendo en este instante */
.rm-gate { padding: 14px; border-radius: 18px; background: var(--card-2); }
.rm-gate-row { display: flex; align-items: flex-start; gap: 14px; } .rm-gate-row .rm-audio-note { margin-top: 4px; }
.rm-gate-now { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; min-height: 26px; padding: 0 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; color: var(--muted); background: var(--card-3); transition: color var(--t) var(--ease); }
.rm-gate-now i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; opacity: .55; } .rm-gate-now.tx { color: var(--ok); } .rm-gate-now.tx i { opacity: 1; }
.rm-level.live.gated i { background: var(--muted); }     /* la barra sigue midiendo, pero en gris: lo que entra ahora NO se está enviando */

/* ── lateral de cada sala ── */
.rm-side { width: 300px; flex: none; display: none; flex-direction: column; gap: 10px; overflow: auto; scrollbar-width: thin; }
.rm-panel.with-side .rm-side { display: flex; animation: rm-side-in 460ms var(--ease) backwards; } .rm-side.in-sheet { display: flex; width: auto; }
.rm-ai { padding: 14px; border-radius: 20px; background: var(--card-2); flex: none; }
.rm-ai-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--ok); } .rm-ai-ic .icon { width: 17px; height: 17px; }
.rm-ai-row { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); } .rm-ai-row p { color: var(--text-2); margin: 2px 0; }
.rm-tabs { display: flex; flex: none; } .rm-tabs .tab { flex: 1; justify-content: center; padding: 0 8px; }
.rm-plist { display: flex; flex-direction: column; }
.rm-prow { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 7px 4px; border-bottom: 1px solid var(--line); } .rm-prow:last-child { border-bottom: 0; }
/* «Silenciar para mí» + volumen por persona: se despliega debajo de la fila del participante */
.rm-pitem { border-bottom: 1px solid var(--line); } .rm-pitem:last-child { border-bottom: 0; } .rm-pitem > .rm-prow { border-bottom: 0; }
.rm-listen { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; padding: 12px; border-radius: 16px; background: var(--card-2); }
.rm-listen.in { animation: rm-listen-in 320ms var(--ease) backwards; }     /* solo al ABRIRLA: la lista se reconstruye con cada evento de la sala y la caja titilaba mientras se usaba */
@keyframes rm-listen-in { from { opacity: 0; transform: translateY(-6px); } }
.rm-listen-btn { min-height: 44px; justify-content: center; } .rm-listen-help { margin: 0; line-height: 1.4; } .rm-listen-kick { min-height: 44px; justify-content: center; color: var(--danger); }
.rm-vol-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.rm-vol-val { width: 48px; flex: none; text-align: right; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
/* El control mide 44 px de alto ENTERO (zona táctil real); el riel de 6 px se dibuja con los pseudo-elementos. Antes el input medía 6 px y solo se podía agarrar del pulgar. */
.rm-vol { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 44px; margin: 0; padding: 0; border: 0; outline: none; cursor: pointer; background: transparent; touch-action: pan-y; }
.rm-vol::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--card-3); }
.rm-vol::-moz-range-track { height: 6px; border-radius: 3px; background: var(--card-3); }
.rm-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; border: 2.5px solid var(--primary); box-shadow: 0 4px 10px rgba(0, 0, 0, .22); }
.rm-vol::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2.5px solid var(--primary); box-shadow: 0 4px 10px rgba(0, 0, 0, .22); }
.rm-vol:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--primary-soft); } .rm-vol:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--primary-soft); } .rm-vol:disabled { opacity: .4; cursor: default; }
.rm-prow-sub { min-width: 0; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; } .rm-prow-sub > * { flex: none; } .rm-prow-sub > .truncate { flex: 0 1 auto; min-width: 0; }     /* el segundo renglón de la fila nunca se parte (panel de 260 px) */
.rm-hushed-note { color: var(--danger); font-weight: 700; } .rm-hushed { align-items: center; gap: 4px; }
.rm-flag { width: 28px; height: 28px; flex: none; display: grid; place-items: center; } .rm-flag .icon { width: 17px; height: 17px; } .rm-flag.ok { color: var(--ok); } .rm-flag.bad { color: var(--danger); opacity: .75; }
.rm-ic-xs { width: 12px; height: 12px; }
.rm-side-note { display: flex; align-items: center; gap: 8px; padding: 10px 6px 0; line-height: 1.35; } .rm-side-note .icon { width: 15px; height: 15px; flex: none; }

/* ── dock global (estás en sala y navegás por otra vista) ── */
.rm-dock { position: fixed; right: 26px; bottom: 26px; z-index: 80; width: min(370px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 26px;
  opacity: 0; pointer-events: none; transform: translateY(26px) scale(.92); transition: transform var(--t-slow) var(--spring), opacity var(--t) var(--ease); }
.rm-dock:not(.show) { visibility: hidden; transition: transform var(--t-slow) var(--spring), opacity var(--t) var(--ease), visibility 0s linear var(--t); }
.rm-dock.show { opacity: 1; pointer-events: auto; transform: none; }
.rm-dock-row { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 20px; transition: background var(--t-fast) var(--ease); } .rm-dock-row:hover { background: var(--card-2); }
.rm-dock-hushed { display: inline-flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; color: var(--danger); font-weight: 700; } .rm-dock-hushed .icon { width: 13px; height: 13px; flex: none; }
.rm-dock-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 46px; text-align: left; }
.rm-dock-emoji { width: 42px; height: 42px; flex: none; border-radius: 15px; display: grid; place-items: center; font-size: 20px; background: var(--primary-soft); transition: box-shadow var(--t-fast) var(--ease), transform var(--t) var(--spring); }
.rm-dock-emoji.talking { box-shadow: 0 0 0 3px var(--ok); transform: scale(1.05); }
.rm-dock-note { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 8px 12px; border-radius: 16px; font-size: 11.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); } .rm-dock-note .icon { width: 15px; height: 15px; }
.rm-dials { position: fixed; z-index: 120; left: 50%; top: 18px; transform: translateX(-50%); width: min(340px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; transition: transform var(--t) var(--ease); }
/* Los toasts caen en el mismo lugar (arriba al centro, z-index 200) y tapaban "Llamando a…" con su botón de cancelar: mientras haya un toast, la pastilla baja. */
body:has(#toasts > .toast) .rm-dials { transform: translateX(-50%) translateY(74px); }
.rm-dial { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: var(--r-pill); animation: rm-drop 520ms var(--spring) backwards; }   /* + .liquid */
.rm-dial.out { animation: rm-drop 280ms var(--ease) reverse forwards; }
.rm-dial-avatar { border-radius: 50%; animation: pulse 1.6s infinite; }

/* ── llamada entrante ── */
.rm-ring { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 18px; background: rgba(10, 10, 30, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade var(--t) var(--ease) backwards; }
.rm-ring.out { animation: fade var(--t) var(--ease) reverse forwards; } .rm-ring.out .rm-ring-card { animation: rm-panel-out var(--t) var(--ease) forwards; }
.rm-ring-card { position: relative; overflow: hidden; width: min(380px, 100%); min-height: min(560px, 88vh); min-height: min(560px, 88dvh); padding: 22px; border-radius: 36px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center;
  background: radial-gradient(420px 320px at 50% 36%, rgba(255, 255, 255, .2), transparent 70%), linear-gradient(180deg, rgba(8, 8, 24, .3), rgba(8, 8, 24, .55)), var(--backdrop); border: 1px solid var(--lg-border); box-shadow: var(--lg-hi), var(--shadow-lg); animation: modal-in 620ms var(--spring) backwards; }
.rm-ring-who { display: flex; flex-direction: column; align-items: center; gap: 6px; } .rm-ring-who h2 { font-size: 24px; margin-top: 14px; } .rm-ring-who p { color: rgba(255, 255, 255, .85); }
.rm-ring-avatar { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.rm-ring-avatar i { position: absolute; inset: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); animation: rm-ripple 2.4s var(--ease) infinite; } .rm-ring-avatar i:nth-child(2) { animation-delay: .8s; } .rm-ring-avatar i:nth-child(3) { animation-delay: 1.6s; }
.rm-ring-avatar .avatar { --s: 104px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .3), 0 18px 40px rgba(0, 0, 0, .3); }
.rm-ring-actions { width: 100%; display: flex; justify-content: space-around; padding: 16px; border-radius: 28px; }
.rm-ring-btn { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease); } .rm-ring-btn .icon { width: 28px; height: 28px; }
.rm-ring-btn:hover { transform: scale(1.08); } .rm-ring-btn:active { transform: scale(.9); }
.rm-ring-btn.no { background: var(--danger); box-shadow: 0 12px 26px var(--danger-soft), inset 0 1px 0 rgba(255, 255, 255, .3); } .rm-ring-btn.yes { background: var(--ok); box-shadow: 0 12px 26px var(--ok-soft), inset 0 1px 0 rgba(255, 255, 255, .3); animation: rm-shake 1.6s var(--ease) infinite; }

/* ── visor a pantalla completa (celular): pellizco/zoom + giro a horizontal ── */
.rm-viewer { position: fixed; inset: 0; z-index: 140; overflow: hidden; background: #000; color: #fff; touch-action: none; -webkit-user-select: none; user-select: none; animation: fade var(--t) var(--ease) backwards; }
.rm-viewer.out { animation: fade 200ms var(--ease) reverse forwards; }
.rm-viewer-frame { position: absolute; left: 50%; top: 50%; width: 100vw; height: 100vh; height: 100dvh; transform: translate(-50%, -50%); }
.rm-viewer-frame.rot { width: 100vh; width: 100dvh; height: 100vw; transform: translate(-50%, -50%) rotate(90deg); }
.rm-viewer-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.rm-viewer-zoom { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }
.rm-viewer-zoom video { width: 100%; height: 100%; max-width: none; object-fit: contain; pointer-events: none; opacity: 1; }
.rm-viewer-top, .rm-viewer-bottom { position: absolute; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 8px; min-width: 0; pointer-events: none; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.rm-viewer-top > *, .rm-viewer-bottom > * { pointer-events: auto; } .rm-viewer-top .grow, .rm-viewer-chips .grow { pointer-events: none; }
/* abajo van dos filas: los chips (zoom y calidad) y, debajo, la píldora de controles de la llamada */
.rm-viewer-bottom { flex-direction: column; align-items: stretch; gap: 10px; }
.rm-viewer-chips { display: flex; align-items: center; gap: 8px; min-width: 0; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.rm-viewer-ctrls { display: flex; justify-content: center; pointer-events: none; } .rm-viewer-ctrls > .rm-pill { pointer-events: auto; }
/* Los cuatro lados esquivan el recorte de pantalla: con el teléfono en horizontal el notch queda a un COSTADO y el botón de cerrar se metía debajo. */
.rm-viewer-top { top: 0; padding: calc(10px + var(--safe-t)) calc(12px + var(--safe-r)) 10px calc(12px + var(--safe-l)); }
.rm-viewer-bottom { bottom: 0; padding: 10px calc(12px + var(--safe-r)) calc(12px + var(--safe-b)) calc(12px + var(--safe-l)); }
/* Girado 90°: lo de arriba del marco cae a la DERECHA de la pantalla y lo de abajo a la izquierda, así que los cuatro valores rotan con él. */
.rm-viewer-frame.rot .rm-viewer-top { padding: calc(10px + var(--safe-r)) calc(12px + var(--safe-b)) calc(10px + var(--safe-l)) calc(12px + var(--safe-t)); }
.rm-viewer-frame.rot .rm-viewer-bottom { padding: calc(10px + var(--safe-r)) calc(12px + var(--safe-b)) calc(12px + var(--safe-l)) calc(12px + var(--safe-t)); }
.rm-viewer .rm-tbtn { width: 44px; height: 44px; opacity: 1; transform: none; } .rm-viewer .rm-tbtn .icon { width: 19px; height: 19px; }
.rm-viewer .rm-glass-chip { height: 32px; padding: 0 12px; font-size: 12.5px; min-width: 0; } .rm-viewer-zoomchip { height: 40px !important; }
/* el toque que "despeja" la pantalla esconde el rótulo y los chips, PERO NUNCA los controles de la llamada ni el botón de volver: siempre tiene que haber cómo silenciarse, colgar o salir del visor */
.rm-viewer-top > * { transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.rm-viewer.bare .rm-viewer-top > *:not(.rm-viewer-close) { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.rm-viewer.bare .rm-viewer-chips { opacity: 0; transform: translateY(12px); } .rm-viewer.bare .rm-viewer-chips > * { pointer-events: none; }
.rm-viewer .rm-pill { background: var(--solid); background: color-mix(in srgb, var(--solid) 86%, transparent); color: var(--text); }
.rm-viewer .rm-cb:not(.off):not(.active):not(.leave) { background: var(--card-2); }
.rm-viewer-ctrls .rm-cb, .rm-viewer-ctrls .rm-cb.leave { width: 48px; height: 48px; padding: 0; border-radius: 50%; }
.rm-viewer-frame.wb-on .rm-viewer-chips { display: none; }     /* dibujando, la barra del pizarrón necesita el lugar: quedan los controles y nada más */

/* ── pizarrón sobre la pantalla compartida (prefijo .wb-; lógica en whiteboard.js) ──
   La capa va justo después del <video> y dentro de su mismo contenedor: hereda zoom, paneo y el giro por CSS del visor. Pasiva (no roba clics ni el pellizco)
   hasta que se activa el modo dibujo; touch-action: none SOLO dibujando. */
.wb-layer { position: absolute; z-index: 1; overflow: hidden; pointer-events: none; }
.wb-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.wb-layer.draw { pointer-events: auto; touch-action: none; cursor: crosshair; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.wb-layer.draw[data-tool='eraser'] { cursor: cell; } .wb-layer.draw[data-tool='laser'] { cursor: pointer; }
.wb-bar.liquid { --wb-b: 44px; position: absolute; z-index: 6; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); padding: 4px; border-radius: var(--r-pill); color: var(--text); max-width: calc(100% - 12px); cursor: default;
  background: var(--solid); background: color-mix(in srgb, var(--solid) 84%, transparent); }
.wb-row { display: flex; align-items: center; gap: 2px; }
.wb-btn { width: var(--wb-b); height: var(--wb-b); flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--text); transition: background var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--spring); }
.wb-btn .icon { width: 20px; height: 20px; } .wb-btn:hover { background: var(--card-2); } .wb-btn:active { transform: scale(.9); }
.wb-btn.on { background: var(--primary); color: var(--on-primary); } .wb-btn.wb-done { background: var(--ok); color: #fff; margin-left: 2px; }
.wb-style-dot { display: block; border-radius: 50%; box-shadow: 0 0 0 2px var(--solid), 0 0 0 3.5px var(--line), inset 0 0 0 1px rgba(128, 128, 128, .5); }
.wb-sep { width: 1px; height: 24px; flex: none; margin: 0 5px; background: var(--line); }
.wb-group { display: flex; align-items: center; gap: 2px; }
.wb-colors, .wb-sizes { display: flex; align-items: center; justify-content: center; gap: 2px; }
.wb-color, .wb-size { width: 34px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; transition: background var(--t) var(--ease), transform var(--t) var(--spring); }
.wb-color:active, .wb-size:active { transform: scale(.88); }
.wb-color i { display: block; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(128, 128, 128, .55); transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease); }
.wb-color.on i { transform: scale(.82); box-shadow: inset 0 0 0 1.5px rgba(128, 128, 128, .55), 0 0 0 2.5px var(--solid), 0 0 0 4.5px var(--text); }
.wb-size i { display: block; border-radius: 50%; background: var(--text); } .wb-size.on { background: var(--card-3); }
.wb-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 14px; font-weight: 700; font-size: 13.5px; color: var(--text); white-space: nowrap; text-align: left; transition: background var(--t-fast) var(--ease); }
.wb-item:hover { background: var(--card-2); } .wb-item.danger { color: var(--danger); } .wb-item .icon { width: 17px; height: 17px; flex: none; }
/* ancha (escritorio con mouse): todo en una fila */
.wb-bar:not(.compact) .only-compact { display: none; }
.wb-bar:not(.compact) .wb-group { position: static; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; } .wb-bar:not(.compact) .wb-group::before { display: none; }
.wb-bar:not(.compact) .wb-item { min-height: 36px; padding: 0 11px; font-size: 12.5px; border-radius: var(--r-pill); }
/* compacta (celular, táctil o tile angosto): color/grosor y "más" son globos sobre la barra, con objetivos de 44px */
.wb-bar.compact .only-wide { display: none; }
.wb-bar.compact .wb-group { display: none; position: absolute; bottom: calc(100% + 8px); padding: 8px; border-radius: 22px; color: var(--text); background: var(--solid); background: color-mix(in srgb, var(--solid) 90%, transparent); }
.wb-bar.compact .wb-group.open { display: flex; animation: rm-drop 260ms var(--spring) backwards; }
.wb-bar.compact .wb-group.style { left: 50%; margin-left: -146px; width: 292px; flex-direction: column; align-items: stretch; gap: 4px; }
.wb-bar.compact .wb-group.more { right: 0; min-width: 214px; flex-direction: column; align-items: stretch; gap: 2px; }
.wb-bar.compact .wb-color, .wb-bar.compact .wb-size { width: 44px; height: 44px; } .wb-bar.compact .wb-color i { width: 26px; height: 26px; }
/* dibujando: el rótulo del tile y el zoom del visor le dejan el lugar a la barra */
.rm-tile.wb-on .rm-tile-bottom { opacity: 0; pointer-events: none; } .rm-tile.wb-on .rm-tile-bottom * { pointer-events: none; } .rm-tile.wb-on { cursor: default; }
.rm-viewer-frame.wb-on .rm-viewer-bottom { bottom: calc(60px + var(--safe-b)); }
.rm-viewer .wb-bar.liquid { max-width: calc(100% - 12px - var(--safe-l) - var(--safe-r)); }   /* a pantalla completa la barra tampoco se mete bajo el notch lateral */
.rm-marks-off { height: 34px; gap: 7px; pointer-events: auto; cursor: pointer; } .rm-marks-off .icon { width: 15px; height: 15px; }
.rm-own-note { white-space: normal; line-height: 1.3; max-width: 46ch; }
/* compartir desde el celular + acciones del aviso "estás compartiendo" */
.rm-share-row { min-height: 76px; align-items: center; border: 1px solid var(--line); } .rm-share-row > .icon { width: 18px; height: 18px; flex: none; color: var(--muted); }
.rm-share-ic { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); } .rm-share-ic .icon { width: 21px; height: 21px; }
.rm-share-note { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 14px; background: var(--card-2); line-height: 1.4; } .rm-share-note .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
/* aviso "estás compartiendo": el texto nunca se aprieta a una palabra por renglón; si los botones no entran al lado, bajan a su propia fila */
.rm-banner-share { flex-wrap: wrap; } .rm-banner-share > .grow { flex: 1 1 260px; min-width: 0; }
.rm-banner-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: 0 1 auto; margin-left: auto; } .rm-banner .btn.on { background: var(--primary); color: var(--on-primary); } .rm-banner-actions .btn .icon { width: 15px; height: 15px; }

/* ── pestañas por sala (celular, jefe en 2+ salas) y chip "hablar solo acá" ── */
.rm-roomtabs { display: none; }
.rm-solo-chip { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-pill); font-weight: 800; font-size: 13px; color: var(--text); transition: transform var(--t) var(--spring), background var(--t) var(--ease), color var(--t) var(--ease); }
.rm-solo-chip .icon { width: 17px; height: 17px; } .rm-solo-chip:active { transform: scale(.95); }
.rm-solo-chip.active { background: var(--ok); color: #fff; border-color: transparent; }

/* ── animaciones ── */
@keyframes rm-panel-in { from { opacity: 0; transform: translateY(34px) scale(.96); } }
@keyframes rm-panel-out { to { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes rm-tile-in { from { opacity: 0; transform: scale(.86); } }
@keyframes rm-pill-in { from { opacity: 0; transform: translateY(28px) scale(.8); } }
@keyframes rm-side-in { from { opacity: 0; transform: translateX(18px); } }
@keyframes rm-drop { from { opacity: 0; transform: translateY(-14px) scale(.94); } }
@keyframes rm-pop { from { opacity: 0; scale: .7; } }
@keyframes rm-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-18px, 14px); } }
@keyframes rm-ripple { from { transform: scale(.8); opacity: .9; } to { transform: scale(1.75); opacity: 0; } }
@keyframes rm-shake { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } }
@keyframes rm-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }

/* ── escritorio angosto: el lateral tapa menos ── */
@media (max-width: 1180px) and (min-width: 861px) { .rm-side { width: 260px; } .rm-cols > .col-list { width: 264px; }
  /* la cabecera del panel no entra (al jefe se le iba el nombre de la sala a 0px y los botones se salían de la tarjeta): botón de pantallas solo ícono (tiene title) y sin pila de avatares */
  .rm-panel-head .avatar-stack, .rm-watchall > span { display: none !important; } }

/* ── móvil ── */
@media (max-width: 860px) {
  .rm-hero { min-height: 196px; padding: 20px; border-radius: 26px; } .rm-hero h2 { font-size: 22px; }
  .rm-stat { padding: 10px 12px; border-radius: 16px; } .rm-list .rm-stats { margin-bottom: 8px; }
  /* misma cabecera que el resto de las vistas: título a 16px del borde y a la misma altura (la lista ya trae 8px arriba + 16px a los lados) */
  .rm-list-head { padding: calc(6px + var(--safe-t)) 0 10px; } .rm-list-head h1 { font-size: 24px; } .rm-list-head .btn.icon.sm { width: 44px; height: 44px; }
  .rm-list .section-title { padding-left: 6px; padding-right: 6px; }   /* el rótulo del departamento arranca donde arranca el emoji de la sala */
  .rm-list.col-list { padding: 8px 16px calc(96px + var(--safe-b) + var(--dock-h, 0px)); }
  .rm-room-head { min-height: 60px; padding: 8px 6px; } .rm-room-emoji { width: 42px; height: 42px; font-size: 20px; border-radius: 14px; } .rm-room-head .bold { font-size: 15px; }
  .rm-enter { opacity: 1; transform: none; font-size: 12.5px; padding: 0 4px; } .rm-edit.btn.icon.sm { width: 40px; height: 40px; opacity: 1; }
  .rm-members { padding: 0 4px 8px 22px; } .rm-member { min-height: 40px; font-size: 13.5px; }
  .rm-greet h2 { font-size: 19px; } .rm-hero p { font-size: 13px; }
  .rm-stack { padding: 0; gap: 8px; scroll-snap-type: y proximity; }
  .rm-panel { border-radius: 0; border: 0; box-shadow: none; min-height: 74vh; min-height: 74dvh; padding: calc(10px + var(--safe-t)) 12px 0; scroll-snap-align: start; background: transparent; }
  .rm-stack[data-count='1'] .rm-panel { min-height: 100%; }
  .rm-panel-head .btn.icon.sm, .rm-panel-head .btn.sm { width: 44px; height: 44px; padding: 0; flex: none; } .rm-panel-head { gap: 8px; min-height: 48px; }
  .rm-panel-head h3 { font-size: 16px; } .rm-panel-head > .grow { overflow: hidden; } .rm-panel-meta { overflow: hidden; }
  .rm-meta-people { display: none; }               /* en el teléfono la cantidad va como globito sobre el botón de participantes (el renglón no entra a 360px) */
  .rm-panel-head .btn { position: relative; } .rm-head-count { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 2px var(--solid); }
  .rm-multi .rm-panel-emoji { display: none; }      /* el emoji ya está en la pestaña de arriba */
  .rm-banner { align-items: center; font-size: 12.5px; line-height: 1.35; padding: 8px 12px; border-radius: 16px; } .rm-banner > .icon { width: 18px; height: 18px; flex: none; } .rm-banner .btn.sm { height: 40px; }
  /* jefe en 2+ salas: cada sala a pantalla entera, carrusel horizontal + pestañas arriba (antes: paneles apilados de 1/3 de pantalla) */
  .rm-roomtabs { display: flex; align-items: center; gap: 8px; flex: none; min-width: 0; padding: calc(8px + var(--safe-t)) 12px 4px; }
  .rm-roomtabs-back { width: 44px !important; height: 44px !important; flex: none; }
  .rm-roomtabs-scroll { flex: 1; min-width: 0; display: flex; gap: 6px; padding: 3px 18px 3px 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
  .rm-roomtabs-scroll::-webkit-scrollbar { display: none; }
  .rm-roomtab { flex: none; max-width: 210px; height: 44px; padding: 0 12px 0 6px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--text-2); background: var(--card-2);
    transition: background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
  .rm-roomtab.active { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px var(--primary-glow); }
  .rm-roomtab.talking { box-shadow: 0 0 0 2px var(--ok); } .rm-roomtab.active.talking { box-shadow: 0 0 0 2px var(--ok), 0 6px 16px var(--primary-glow); }
  .rm-roomtab-emoji { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 16px; background: var(--solid); }
  .rm-roomtab-wave { display: none; color: var(--ok); } .rm-roomtab.talking .rm-roomtab-wave { display: inline-flex; } .rm-roomtab-wave .wave { height: 12px; gap: 2px; } .rm-roomtab-wave .wave i { width: 2.5px; } .rm-roomtab.active .rm-roomtab-wave { color: #86efac; }
  .rm-roomtab-mic { display: inline-flex; color: var(--danger); } .rm-roomtab-mic.ok { color: var(--ok); } .rm-roomtab-mic .icon { width: 15px; height: 15px; } .rm-roomtab.active .rm-roomtab-mic { color: #ff97a1; } .rm-roomtab.active .rm-roomtab-mic.ok { color: #86efac; }
  .rm-multi .rm-stack { flex-direction: row; gap: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; } .rm-multi .rm-stack::-webkit-scrollbar { display: none; }
  .rm-multi .rm-panel, .rm-multi .rm-stack[data-count] .rm-panel { flex: 0 0 100%; width: 100%; min-height: 0; height: 100%; padding-top: 4px; scroll-snap-align: start; scroll-snap-stop: always; }
  .rm-multi .rm-panel-head > .btn.only-mobile:first-child { display: none !important; }
  .rm-stage, .rm-stage.grid { display: flex; flex-direction: column; overflow-y: auto; padding-bottom: calc(92px + var(--safe-b)); scrollbar-width: none; border-radius: 24px 24px 0 0; }
  .rm-stage.grid .rm-main-slot { display: none; } .rm-stage.grid .rm-strip { display: grid; }
  .rm-main-slot { flex: none; height: auto; } .rm-main-slot > .rm-tile { height: 46vh; height: min(46dvh, 420px); }
  /* solo en la sala (sin tira de tiles): el tile ocupa todo el alto libre, como una llamada de teléfono, en vez de dejar media pantalla vacía. Mejora progresiva (:has, iOS 15.4+). */
  .rm-stage:not(.grid):has(> .rm-strip.hidden) > .rm-main-slot { flex: 1 1 auto; min-height: 0; }
  .rm-stage:not(.grid):has(> .rm-strip.hidden) > .rm-main-slot > .rm-tile:not(.screen) { height: auto; }
  /* pantalla compartida como tile principal: a su proporción (sin franjas negras); se toca para abrirla en el visor */
  .rm-main-slot > .rm-tile.screen { height: auto; aspect-ratio: 16 / 10; cursor: pointer; } .rm-main-slot .rm-tile.screen .rm-tile-ui { padding: 8px; }
  .rm-tile.screen.main .rm-caption { min-height: 0; padding: 5px 10px; border-radius: 13px; font-size: 12px; } .rm-tile.screen.main .rm-caption-wave { display: none; }
  .rm-tbtn { width: 44px; height: 44px; } .rm-tile-top { min-height: 44px; } .rm-watch { height: 48px; }
  .rm-tile.screen .rm-tbtn[data-ic='pin'] { display: none; }     /* en el teléfono la pantalla se abre en el visor con un toque: fijar sobra y tapa contenido */
  .rm-strip, .rm-stack[data-count='2'] .rm-strip, .rm-stack[data-count='3'] .rm-strip { height: auto; display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .rm-strip > .rm-tile { height: auto; aspect-ratio: 1 / 1.05; } .rm-strip > .rm-tile:only-child { grid-column: span 2; aspect-ratio: 16 / 9; }
  .rm-stack .rm-strip .timer { display: inline-flex !important; } .rm-stack .rm-strip .rm-ph .avatar { --s: 56px !important; }
  .rm-controls { position: absolute; left: 0; right: 0; bottom: calc(12px + var(--safe-b)); z-index: 6; flex-direction: column; align-items: center; gap: 8px; }
  .rm-multi .rm-stage, .rm-multi .rm-stage.grid { padding-bottom: calc(148px + var(--safe-b)); }
  .rm-pill .rm-cb.solo { display: none; }
  .rm-pill { gap: 5px; padding: 6px; }
  .rm-pill .rm-cb:not(.off):not(.active):not(.leave) { background: var(--solid); } .rm-pill .rm-cb.off { background: var(--danger-soft); background: color-mix(in srgb, var(--danger) 16%, var(--solid)); } .rm-sep { display: none; }
  .rm-cb { width: 46px; height: 46px; } .rm-cb.solo, .rm-cb.leave { width: 46px; padding: 0; } .rm-cb.solo span, .rm-cb.leave span { display: none; }
  .rm-dock { left: calc(12px + var(--safe-l)); right: calc(12px + var(--safe-r)); width: auto; bottom: calc(88px + var(--safe-b)); border-radius: 24px; }
  .rm-dock .rm-cb.sm { width: 44px; height: 44px; } .rm-dock-main { min-height: 48px; } .rm-dock-note { line-height: 1.3; }
  /* dentro de una conversación abierta: pastilla chica arriba (como la píldora de llamada del teléfono); se despliega con un toque */
  .rm-dock.top { bottom: auto; top: calc(64px + var(--safe-t)); }
  .rm-dock.mini { left: calc(12px + var(--safe-l)); right: calc(12px + var(--safe-r)); width: -webkit-fit-content; width: fit-content; max-width: calc(100vw - 24px - var(--safe-l) - var(--safe-r)); margin: 0 auto; padding: 4px; border-radius: var(--r-pill); }
  .rm-dock-pill { display: flex; align-items: center; gap: 8px; min-width: 0; height: 40px; padding: 0 12px 0 4px; font-size: 13px; color: var(--text); } .rm-dock-pill > .icon { width: 16px; height: 16px; color: var(--muted); }
  .rm-dock-emoji.sm { width: 32px; height: 32px; border-radius: 50%; font-size: 15px; font-weight: 800; } .rm-dock-pill-mic { display: inline-flex; color: var(--danger); } .rm-dock-pill-mic.ok { color: var(--ok); } .rm-dock-pill-mic .icon { width: 15px; height: 15px; }
  .rm-dock-collapse { align-self: center; width: 72px; height: 44px; display: grid; place-items: center; color: var(--muted); } .rm-dock-collapse .icon { width: 18px; height: 18px; }
  .rm-prow { min-height: 60px; } .rm-prow .btn.icon.sm { width: 44px; height: 44px; } .rm-prow .btn.sm { height: 44px; } .rm-flag { width: 30px; }
  /* hoja Nueva/Editar sala: Emoji y Orden lado a lado y los emojis sugeridos en una grilla 4×2 debajo (antes: columna angosta de 2×4 entre los dos campos, con huecos a los costados) */
  .rm-emoji-row { flex-wrap: wrap; } .rm-emoji-row > .field { flex: 1 1 0; min-width: 0; } .rm-emoji-row > .field .input { width: 100% !important; }
  .rm-emoji-row > .row.wrap { order: 3; flex: 1 1 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .rm-emoji-row > .row.wrap .chip { justify-content: center; height: 44px; font-size: 18px; }
  /* "Llamando a…" tapaba ENTERA la cabecera (botón atrás, nombre de la sala, participantes) porque caía a 10px del borde: va debajo
     de la cabecera, a la misma altura que la pastilla del dock, y si el dock ya está arriba se apila abajo de él (--dock-top-h). */
  .rm-dials { top: calc(64px + var(--safe-t) + var(--dock-top-h, 0px)); }
  .rm-banner-share { flex-wrap: wrap; } .rm-banner-share > .grow { flex: 1 1 200px; } .rm-banner-actions { flex: 1 1 100%; justify-content: flex-start; padding-left: 28px; }
  .rm-marks-off { height: 44px; } .rm-own-note { display: none; }
  /* a pantalla completa: los laterales también esquivan el notch (en horizontal cae de costado) */
  .rm-ring { padding: 0; } .rm-ring-card { width: 100%; min-height: 100vh; min-height: 100dvh; border-radius: 0; border: 0; padding: calc(28px + var(--safe-t)) calc(22px + var(--safe-r)) calc(28px + var(--safe-b)) calc(22px + var(--safe-l)); }
}
/* 7 botones en la píldora del teléfono (mic, cám, pantalla, mano, efectos, escuchar, salir): 44px en los de 400px o menos; en los muy angostos los efectos pasan a la hoja */
@media (max-width: 400px) { .rm-pill { gap: 4px; padding: 5px; } .rm-pill .rm-cb { width: 44px; height: 44px; } }
@media (max-width: 370px) { .rm-pill .rm-cb.sb { display: none; } .rm-sb-row { display: flex; } }
/* En el chat el dock sube para no tapar la caja de escritura (escritorio). */
@media (min-width: 861px) { body:has(.view[data-view='chat']) .rm-dock { bottom: 96px; } }

/* ── teléfono en HORIZONTAL: la nav es una pastilla vertical a la izquierda y la pantalla mide ~390px de alto ── */
@media (max-width: 860px) and (orientation: landscape) and (max-height: 520px) {
  /* el dock iba de borde a borde y tapaba los últimos botones de la nav vertical: se achica y se pega a la derecha */
  .rm-dock:not(.top) { left: auto; right: calc(12px + var(--safe-r)); width: min(370px, calc(100vw - 100px - var(--safe-l) - var(--safe-r))); bottom: calc(12px + var(--safe-b)); }
  /* la llamada entrante no entraba en 390px de alto: el chip de arriba y los botones quedaban cortados */
  .rm-ring-card { min-height: 0; height: 100vh; height: 100dvh; padding: calc(10px + var(--safe-t)) calc(22px + var(--safe-r)) calc(10px + var(--safe-b)) calc(22px + var(--safe-l)); }
  .rm-ring-avatar { width: 92px; height: 92px; } .rm-ring-avatar .avatar { --s: 68px; } .rm-ring-avatar i { inset: 12px; }
  .rm-ring-who h2 { font-size: 19px; margin-top: 6px; } .rm-ring-who p { font-size: 13px; }
  .rm-ring-actions { padding: 8px 16px; } .rm-ring-btn { width: 56px; height: 56px; } .rm-ring-btn .icon { width: 24px; height: 24px; }
}
