:root {
  --accent: #2dd4bf;
  --accent-2: #6366f1;
  --bg: #0d0f14;
  --bg-2: #13161d;
  --panel: #181c25;
  --panel-2: #1f2430;
  --line: #2a3040;
  --text: #e8ebf2;
  --muted: #8b93a7;
  --danger: #f05252;
  --ok: #22c55e;
  --warn: #f59e0b;
  --radius: 12px;
  --fs: 15px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --titlebar: 0px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f5f9; --bg-2: #e9edf3; --panel: #ffffff; --panel-2: #f0f2f7; --line: #dde2ec; --text: #161a23; --muted: #626b80;
  --shadow: 0 10px 40px rgba(20, 30, 60, .15); color-scheme: light;
}
:root.desktop { --titlebar: 36px; }
:root.no-anim * { transition: none !important; animation: none !important; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overscroll-behavior: none; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; touch-action: manipulation; background: var(--bg); color: var(--text); font: var(--fs)/1.45 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; overflow: hidden; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }
img { display: block; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 35%, transparent); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }

.boot { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }

/* ---------- Barra de título (escritorio) ---------- */
.titlebar { height: var(--titlebar); display: none; align-items: center; gap: 10px; padding: 0 12px; -webkit-app-region: drag; font-size: 13px; color: var(--muted); background: var(--bg); }
.desktop .titlebar { display: flex; }
.titlebar img { width: 18px; height: 18px; }
.titlebar .tb-status { margin-left: auto; margin-right: 140px; display: flex; gap: 8px; align-items: center; }

/* ---------- Estructura ---------- */
/* La app ocupa exactamente la pantalla visible (se ajusta al teclado del celular) y respeta muesca y bordes. */
#app { height: var(--app-h, 100vh); display: flex; flex-direction: column; box-sizing: border-box; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); overflow: hidden; }
.shell { display: grid; grid-template-columns: 72px 1fr; flex: 1; min-height: 0; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; background: var(--bg); border-right: 1px solid var(--line); }
.rail .logo { width: 40px; height: 40px; margin-bottom: 10px; }
.rail-btn { position: relative; width: 48px; height: 48px; border-radius: 14px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.rail-btn:hover { background: var(--panel); color: var(--text); }
.rail-btn.on { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.rail-btn .badge { position: absolute; top: 4px; right: 4px; }
.rail .spacer { flex: 1; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.main { position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.page { flex: 1; overflow: auto; padding: 24px 28px 90px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
.page-head .grow { flex: 1; }

/* ---------- Controles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--accent); color: #04211d; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--panel-2); color: var(--text); }
.btn.ghost:hover { background: var(--line); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; transition: .15s; flex: none; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.on { color: var(--accent); }
.icon-btn.red { color: var(--danger); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; outline: none; transition: .15s; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 70px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input.sm { height: 32px; font-size: 13px; }
.lbl { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 18px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 12px; width: fit-content; flex-wrap: wrap; }
.tab { border: 0; background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.tab.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 22px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); }
input[type=range] { accent-color: var(--accent); }
.seg { display: inline-flex; background: var(--bg-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.seg button.on { background: var(--panel); color: var(--text); }

.avatar { position: relative; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; user-select: none; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 30%; height: 30%; min-width: 9px; min-height: 9px; border-radius: 50%; background: var(--ok); border: 2px solid var(--panel); }
.avatar.speaking { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ok); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 42px; margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.chip.accent { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.chip.live { background: var(--danger); color: #fff; }

/* ---------- Toasts, modales, menús ---------- */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 1000; align-items: center; pointer-events: none; }
.toast { background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); animation: up .2s ease; transition: .4s; font-size: 14px; }
.toast.err { border-color: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 500; animation: fade .15s; padding: 20px; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(460px, 100%); max-height: calc(100vh - 60px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); animation: pop .18s ease; }
.modal.wide { width: min(860px, 100%); height: min(680px, calc(100vh - 60px)); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal-head { display: flex; align-items: center; padding: 14px 14px 6px 20px; }
.modal-head h3 { margin: 0; flex: 1; font-size: 18px; }
.modal-body { padding: 6px 20px 20px; overflow: auto; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ctx { position: fixed; z-index: 900; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 5px; min-width: 200px; animation: pop .12s; }
.ctx button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 14px; }
.ctx button:hover { background: var(--panel-2); }
.ctx button.danger { color: var(--danger); }
.ctx .ic { display: grid; opacity: .8; }
.ctx .sep { height: 1px; background: var(--line); margin: 4px 6px; }

/* ---------- Login ---------- */
.login { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 25%, transparent), transparent), radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--accent-2) 25%, transparent), transparent), var(--bg); padding: 20px; }
.login-box { width: min(400px, 100%); padding: 32px; }
.login-box .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-box h1 { margin: 0; font-size: 28px; }
.login-box .err { color: var(--danger); font-size: 14px; min-height: 20px; margin-top: 10px; }
.last-used { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--bg-2); cursor: pointer; margin-top: 12px; }

/* ---------- Salas (inicio) ---------- */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.room-card { overflow: hidden; cursor: pointer; transition: .15s; position: relative; }
.room-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.room-thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--panel-2), var(--bg-2)); position: relative; display: grid; place-items: center; color: var(--muted); }
.room-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.room-thumb .chips { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; }
.room-thumb .count { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.7); color: #fff; }
.room-info { padding: 12px 14px; }
.room-info .title { font-weight: 650; }
.stack { display: flex; }
.stack .avatar { border: 2px solid var(--panel); margin-left: -8px; }
.stack .avatar:first-child { margin-left: 0; }
.room-card .pin { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff; opacity: 0; }
.room-card:hover .pin, .room-card .pin.on { opacity: 1; }
.room-card .pin.on { color: var(--accent); }

/* ---------- Sala ---------- */
.room { flex: 1; display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
.room.no-side { grid-template-columns: 1fr 0; }
.room.side-left { grid-template-columns: 360px 1fr; }
.room.side-left .stage-wrap { order: 2; }
.stage-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #000; position: relative; }
.room-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.room-top .name { font-weight: 700; font-size: 16px; }
.stage { position: relative; flex: 1; min-height: 0; background: #000; overflow: hidden; }
.stage .ambient { position: absolute; inset: -10%; background-size: cover; background-position: center; filter: blur(60px) saturate(1.4); opacity: .35; transform: scale(1.1); pointer-events: none; }
.player-box { position: absolute; inset: 0; }
.player-box iframe, .player-box > div { width: 100%; height: 100%; border: 0; }
.shield { position: absolute; inset: 0; z-index: 2; }
.shield.pass { pointer-events: none; }
.stage-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; color: #cfd5e3; z-index: 3; padding: 20px; }
.stage-empty h2 { margin: 0; }
.stage-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; background: rgba(0,0,0,.78); color: #fff; padding: 16px 20px; border-radius: 14px; text-align: center; max-width: 80%; display: grid; gap: 10px; justify-items: center; }
.controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 26px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; opacity: 0; transition: opacity .2s; }
.stage:hover .controls, .controls.show, .stage.paused .controls { opacity: 1; }
.controls .icon-btn { color: #fff; }
.controls .icon-btn:hover { background: rgba(255,255,255,.15); }
.seekbar { position: relative; height: 16px; cursor: pointer; display: flex; align-items: center; }
.seekbar .track { position: absolute; left: 0; right: 0; height: 4px; border-radius: 3px; background: rgba(255,255,255,.25); transition: height .1s; }
.seekbar:hover .track { height: 6px; }
.seekbar .fill { position: absolute; left: 0; height: 100%; background: var(--accent); border-radius: 3px; }
.seekbar .seg-sponsor { position: absolute; height: 100%; background: #facc15; opacity: .9; }
.seekbar .hover-time { position: absolute; bottom: 18px; transform: translateX(-50%); background: rgba(0,0,0,.85); padding: 2px 6px; border-radius: 6px; font-size: 12px; display: none; }
.seekbar:hover .hover-time { display: block; }
.ctrl-row { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.ctrl-row .time { white-space: nowrap; font-size: 13px; font-variant-numeric: tabular-nums; margin: 0 8px; opacity: .9; }
.ctrl-row .vol { width: 90px; }
.leader-note { font-size: 12px; opacity: .8; display: flex; align-items: center; gap: 4px; }
.emote-layer { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.emote { position: absolute; bottom: 60px; font-size: 34px; animation: floatUp 2.8s ease-out forwards; }
@keyframes floatUp { to { transform: translateY(-60vh) scale(1.3); opacity: 0; } }
.pop-menu { position: absolute; bottom: 64px; right: 14px; z-index: 8; background: rgba(18,20,26,.96); color: #fff; border-radius: 12px; padding: 8px; min-width: 220px; max-height: 60%; overflow: auto; box-shadow: var(--shadow); }
.pop-menu h4 { margin: 4px 8px 6px; font-size: 12px; text-transform: uppercase; opacity: .6; letter-spacing: .05em; }
.pop-menu button { display: flex; width: 100%; justify-content: space-between; border: 0; background: transparent; color: #fff; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.pop-menu button:hover { background: rgba(255,255,255,.1); }
.pop-menu button.on { color: var(--accent); }

.side { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--line); overflow: hidden; }
.side-tabs { display: flex; padding: 8px; gap: 4px; border-bottom: 1px solid var(--line); }
.side-tabs .tab { flex: 1; justify-content: center; padding: 7px 4px; font-size: 13px; }
.side-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scroll { flex: 1; overflow: auto; min-height: 0; }

/* Chat */
.chat-list { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.msg { display: flex; gap: 10px; padding: 4px 6px; border-radius: 10px; position: relative; }
.msg:hover { background: var(--panel-2); }
.msg .body { min-width: 0; flex: 1; }
.msg .who { font-weight: 650; font-size: 14px; margin-right: 6px; }
.msg .when { font-size: 11px; color: var(--muted); }
.msg .text { white-space: pre-wrap; word-wrap: break-word; }
.msg.cont { padding-top: 0; }
.msg.cont .avatar { visibility: hidden; height: 0 !important; }
.msg .actions { position: absolute; right: 6px; top: -12px; display: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.msg:hover .actions { display: flex; }
.msg .reply-ref { font-size: 12px; color: var(--muted); border-left: 2px solid var(--line); padding-left: 6px; margin-bottom: 2px; cursor: pointer; }
.msg img.att { max-width: 100%; max-height: 220px; border-radius: 10px; margin-top: 4px; cursor: zoom-in; }
.reactions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.reactions button { border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 0 7px; height: 24px; cursor: pointer; font-size: 13px; }
.reactions button.mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.sys { text-align: center; font-size: 12.5px; color: var(--muted); padding: 6px 0; }
.sys b { color: var(--text); font-weight: 600; }
.mention { color: var(--accent); font-weight: 600; }
.composer { padding: 10px; border-top: 1px solid var(--line); }
.composer .replying { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; padding: 0 4px 6px; }
.composer .box { display: flex; align-items: flex-end; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.composer textarea { flex: 1; border: 0; background: transparent; color: var(--text); font: inherit; resize: none; outline: none; padding: 7px 6px; max-height: 140px; min-height: 22px; height: 36px; }
.typing { font-size: 12px; color: var(--muted); height: 16px; padding: 0 14px; }
.quick-emotes { display: flex; gap: 2px; padding: 0 10px 6px; }
.quick-emotes button { border: 0; background: transparent; font-size: 18px; cursor: pointer; border-radius: 8px; padding: 2px 4px; transition: transform .1s; }
.quick-emotes button:hover { transform: scale(1.25); }

/* Cola */
.q-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; }
.q-item:hover { background: var(--panel-2); }
.q-item .thumb { width: 96px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--bg-2); flex: none; position: relative; }
.q-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.q-item .thumb .dur { position: absolute; right: 3px; bottom: 3px; background: rgba(0,0,0,.8); color: #fff; font-size: 11px; padding: 0 4px; border-radius: 4px; }
.q-item .t { font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vote-btn { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 3px 8px; cursor: pointer; font-weight: 700; font-size: 13px; }
.vote-btn.on { border-color: var(--accent); color: var(--accent); }
.now-playing { padding: 12px; border-bottom: 1px solid var(--line); }

/* Personas */
.person { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px; cursor: default; }
.person:hover { background: var(--panel-2); }
.person .n { font-weight: 600; }
.lvl { width: 40px; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.lvl i { display: block; height: 100%; background: var(--ok); width: 0; transition: width .08s; }

.voice-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--bg-2); }
.voice-bar .stat { font-size: 12px; color: var(--ok); font-weight: 600; }

.settings-sec { padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.opt:last-child { border-bottom: 0; }
.opt .d { flex: 1; min-width: 0; }
.opt .d .s { font-size: 12.5px; color: var(--muted); }
.mode-list { display: grid; gap: 8px; }
.mode { text-align: left; border: 1px solid var(--line); background: var(--bg-2); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.mode.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg-2)); }
.mode b { display: block; }
.mode span { font-size: 12.5px; color: var(--muted); }

/* Agregar video */
.add-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 4px 0; }
.res { cursor: pointer; border-radius: 12px; overflow: hidden; background: var(--bg-2); border: 1px solid transparent; transition: .12s; position: relative; }
.res:hover { border-color: var(--accent); }
.res .thumb { aspect-ratio: 16/9; position: relative; background: var(--panel-2); }
.res .thumb img { width: 100%; height: 100%; object-fit: cover; }
.res .thumb .dur { position: absolute; right: 5px; bottom: 5px; background: rgba(0,0,0,.8); color: #fff; font-size: 11.5px; padding: 1px 5px; border-radius: 5px; }
.res .meta { padding: 8px 10px; }
.res .meta .t { font-weight: 600; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res .acts { position: absolute; top: 6px; right: 6px; display: none; gap: 4px; }
.res:hover .acts { display: flex; }
.res .acts button { background: rgba(0,0,0,.75); color: #fff; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 30px; text-align: center; color: var(--muted); cursor: pointer; }
.drop.over { border-color: var(--accent); color: var(--text); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* Mini barra cuando sales de la vista de sala */
.mini { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 8px 8px; box-shadow: var(--shadow); max-width: calc(100% - 40px); }
.mini .thumb { width: 64px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--bg-2); flex: none; }
.mini .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Amigos y mensajes ---------- */
.list-card { overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .n { font-weight: 650; }
.dm { display: grid; grid-template-columns: 300px 1fr; height: 100%; min-height: 0; }
.dm-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.dm-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; border-radius: 10px; margin: 2px 6px; }
.dm-item:hover { background: var(--panel); }
.dm-item.on { background: var(--panel-2); }
.dm-item .prev { font-size: 13px; color: var(--muted); }
.dm-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.dm-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dm-msgs { flex: 1; overflow: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.bubble-row { display: flex; gap: 8px; align-items: flex-end; position: relative; }
.bubble-row.mine { flex-direction: row-reverse; }
.bubble { max-width: min(560px, 75%); padding: 8px 12px; border-radius: 16px; background: var(--panel-2); white-space: pre-wrap; word-wrap: break-word; position: relative; }
.bubble-row.mine .bubble { background: color-mix(in srgb, var(--accent) 26%, var(--panel)); }
.bubble img, .bubble video { max-width: 100%; max-height: 280px; border-radius: 10px; display: block; cursor: zoom-in; }
.bubble .meta { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
.bubble-row .actions { display: none; align-self: center; gap: 2px; }
.bubble-row:hover .actions { display: flex; }
.day-sep { text-align: center; font-size: 12px; color: var(--muted); margin: 14px 0 6px; }
.audio-msg { display: flex; align-items: center; gap: 8px; min-width: 220px; }
.audio-msg canvas { flex: 1; height: 32px; }
.recorder { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--bg-2); border-radius: 12px; border: 1px solid var(--line); }
.recorder .rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.hl { animation: hl 1.6s; }
@keyframes hl { 0%, 60% { background: color-mix(in srgb, var(--accent) 25%, transparent); } }

/* ---------- Ajustes ---------- */
.settings { display: grid; grid-template-columns: 220px 1fr; gap: 24px; max-width: 1000px; }
.settings nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; align-self: start; }
.settings nav button { text-align: left; border: 0; background: transparent; color: var(--muted); padding: 9px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.settings nav button.on { background: var(--panel); color: var(--text); }
.settings section { padding: 6px 22px 16px; }
.settings h2 { font-size: 18px; margin: 14px 0 4px; }
.meter { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; position: relative; }
.meter i { display: block; height: 100%; background: var(--ok); width: 0; }
.meter .gate { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--warn); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatches button.on { border-color: var(--text); }
.sub-preview { height: 120px; border-radius: 12px; background: linear-gradient(135deg, #334, #223) center/cover; display: grid; place-items: end center; padding: 14px; }

/* ---------- Notificaciones ---------- */
.notif-panel { position: absolute; left: 80px; bottom: 16px; width: 360px; max-height: 70vh; overflow: auto; z-index: 300; padding: 8px; }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 10px; align-items: flex-start; }
.notif:hover { background: var(--panel-2); }
.history-row { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; cursor: pointer; }
.history-row:hover { background: var(--panel); }
.history-row .thumb { width: 140px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--panel-2); flex: none; }
.history-row .thumb img { width: 100%; height: 100%; object-fit: cover; }

.emoji-pop { position: fixed; z-index: 950; width: 330px; height: 330px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: flex; }
.emoji-picker { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.emoji-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(8, 1fr); align-content: start; }
.emoji-cat { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 6px 4px 2px; font-weight: 700; }
.emoji { border: 0; background: transparent; font-size: 22px; cursor: pointer; border-radius: 8px; padding: 3px 0; }
.emoji:hover { background: var(--panel-2); }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: grid; place-items: center; z-index: 999; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; }

@media (max-width: 900px) {
  .room { grid-template-columns: 1fr; grid-template-rows: 1fr 45%; }
  .room.side-left .stage-wrap { order: 0; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .dm { grid-template-columns: 1fr; }
  .dm.open .dm-list { display: none; }
  .dm:not(.open) .dm-thread { display: none; }
  .settings { grid-template-columns: 1fr; }
  .settings nav { flex-direction: row; overflow: auto; position: static; }
  .page { padding: 16px 16px 90px; }
}
@media (max-width: 560px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr 60px; }
  .rail { flex-direction: row; order: 2; padding: 0 8px; justify-content: space-around; border-right: 0; border-top: 1px solid var(--line); }
  .rail .logo, .rail .spacer { display: none; }
  .notif-panel { left: 8px; right: 8px; width: auto; bottom: 70px; }
}

/* ---------- Menú de servicios ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; padding: 4px 2px 10px; }
.svc-grid.compact { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; width: min(760px, 92%); margin: 6px auto 0; }
.svc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); cursor: pointer; transition: transform .12s, border-color .12s, background .12s; }
.svc:hover:not(:disabled) { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: var(--panel-2); }
.svc:disabled { opacity: .45; cursor: not-allowed; }
.svc-grid.compact .svc { background: rgba(20, 23, 30, .85); color: #fff; border-color: rgba(255,255,255,.08); padding: 12px 6px 10px; }
.svc-ic { border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; box-shadow: 0 4px 14px rgba(0,0,0,.35); flex: none; }
.svc-ic img { border-radius: 6px; }
.svc-name { font-size: 13px; font-weight: 650; text-align: center; line-height: 1.2; }
.svc-note { font-size: 10.5px; color: var(--muted); text-align: center; }
.stage-empty .svc-note { color: #9aa3b5; }

/* ---------- Navegador integrado ---------- */
.stage.page-mode .player-box { top: 46px; }
.stage.page-mode .ambient { display: none; }
.page-bar { position: absolute; top: 0; left: 0; right: 0; height: 46px; z-index: 5; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--bg-2); border-bottom: 1px solid var(--line); color: var(--text); }
.page-bar .addr { flex: 1; min-width: 120px; height: 32px; font-size: 13px; }
.page-bar .chip { white-space: nowrap; }
.page-bar .svc-ic { border-radius: 8px; box-shadow: none; }
.page-bar .svc-ic img { width: 16px; height: 16px; }
@media (max-width: 900px) { .page-bar .chip { display: none; } }

/* Botón de cerrar la app por completo */
.rail-btn.quit-btn:hover { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }

/* Menú de calidad, audio y subtítulos */
.pop-menu { min-width: 260px; max-width: 340px; }
.pop-menu.top { bottom: auto; top: 54px; right: 10px; max-height: calc(100% - 70px); }
.pop-tabs { display: flex; gap: 2px; padding: 2px 2px 8px; position: sticky; top: -8px; background: rgba(18,20,26,.98); z-index: 1; }
.pop-tabs button { flex: 1; justify-content: center !important; font-weight: 600; font-size: 13px !important; opacity: .7; }
.pop-tabs button.on { opacity: 1; background: rgba(255,255,255,.12) !important; color: #fff !important; }
.pop-menu button .sub { margin-left: 8px; font-size: 11px; opacity: .6; text-transform: uppercase; }
.pop-note { font-size: 12px; opacity: .65; padding: 6px 10px; line-height: 1.35; }

/* =====================================================================
   Celular (iPhone/Android) y pantallas táctiles
   ===================================================================== */
.touch input, .touch textarea, .touch select { font-size: 16px; } /* iOS no hace zoom al escribir */
.touch .room-card .pin { opacity: 1; }
.touch .msg .actions, .touch .bubble-row .actions { display: none; }
.touch .msg.sel .actions { display: flex; }
.touch .bubble-row.sel .actions { display: flex; }
.touch .msg:hover { background: transparent; }
.touch .msg.sel { background: var(--panel-2); }
.ios .controls .vol { display: none; }              /* iOS no deja cambiar el volumen de un video desde la página: botones del teléfono */
/* En iPhone un toque deja "pegado" el :hover: los controles se muestran solo con .show (toque) o en pausa */
.touch .stage .controls { opacity: 0; pointer-events: none; }
.touch .stage .controls.show, .touch .stage.paused .controls { opacity: 1; pointer-events: auto; }
.touch .icon-btn { width: 40px; height: 40px; }
.touch .icon-btn.sm { width: 34px; height: 34px; }
.touch ::-webkit-scrollbar { display: none; }
img, video { -webkit-user-drag: none; }
.ios-app body, .ios-app .rail, .ios-app .tab, .ios-app .btn, .ios-app .room-top { -webkit-user-select: none; user-select: none; }
.ios-app .msg .text, .ios-app .bubble, .ios-app input, .ios-app textarea { -webkit-user-select: text; user-select: text; }

/* Pantalla completa propia (iPhone) */
.stage.pseudo-full { position: fixed !important; inset: 0; z-index: 400; width: 100vw; height: var(--app-h, 100vh) !important; max-height: none !important; aspect-ratio: auto !important; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background: #000; }

@media (max-width: 760px) {
  :root { --fs: 15px; }
  /* Barra de navegación abajo, estilo app */
  .shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .rail { flex-direction: row; order: 2; justify-content: space-around; align-items: center; gap: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .rail .logo, .rail .spacer { display: none; }
  .rail-btn { width: 44px; height: 44px; border-radius: 12px; }
  .rail-btn .avatar { width: 30px !important; height: 30px !important; }
  .rail-btn.quit-btn { display: none; }
  .main { min-height: 0; }
  .page { padding: 14px 14px 110px; }
  .page-head { gap: 8px; margin-bottom: 12px; }
  .page-head h1 { font-size: 24px; flex: 1; }
  .page-head .grow { display: none; }
  .page-head > .input { order: 10; width: 100% !important; flex: 1 1 100%; }
  .page-head .btn { height: 36px; padding: 0 12px; font-size: 14px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; width: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tab { flex: none; padding: 7px 12px; font-size: 13.5px; }
  .rooms-grid { grid-template-columns: 1fr; gap: 12px; }
  .history-row .thumb { width: 112px; }
  .list-row { padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .list-row .grow { min-width: 140px; }
  .empty { padding: 28px 12px; }

  /* Ventanas: hojas que suben desde abajo */
  .modal-back { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: calc(var(--app-h, 100vh) - env(safe-area-inset-top) - 24px); border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: sheet .22s ease; }
  .modal.wide { height: calc(var(--app-h, 100vh) - env(safe-area-inset-top) - 24px); }
  .modal-body { padding: 4px 14px 16px; }
  @keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
  .add-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .svc { padding: 12px 4px 10px; border-radius: 14px; }
  .svc-name { font-size: 12px; }
  .svc-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }

  /* Sala: video arriba en 16:9 y el panel (chat, cola, personas) abajo */
  .room, .room.side-left, .room.no-side { display: flex; flex-direction: column; }
  .stage-wrap { flex: none; order: 0 !important; }
  .room-top { padding: 6px 8px; gap: 4px; }
  .room-top .name { font-size: 15px; }
  .room-top .stack, .room-top .icon-btn[title^="Ocultar"], .room-top .icon-btn[title^="Mostrar"] { display: none; }
  .room-top .btn .bt { display: none; }
  .room-top .btn { width: 38px; padding: 0; }
  .stage { flex: none; width: 100%; aspect-ratio: 16 / 9; max-height: 42vh; }
  .stage.page-mode { aspect-ratio: auto; height: 58vh; max-height: none; }
  .stage-empty { overflow: auto; justify-content: start; padding: 14px 10px; }
  .stage-empty h2 { font-size: 18px; margin-top: 4px; }
  .stage-empty p { margin: 0; }
  .side, .room.no-side .side { display: flex; flex: 1; min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  .side-tabs { padding: 6px; }
  .side-tabs .tab { padding: 6px 2px; font-size: 13px; }
  .controls { padding: 18px 8px 6px; }
  .ctrl-row { gap: 0; }
  .ctrl-row .icon-btn { width: 34px; height: 34px; }
  .ctrl-row .cc-btn { display: none; }
  .ctrl-row .time { font-size: 12px; margin: 0 4px; }
  .leader-note { display: none; }
  .pop-menu, .pop-menu.top { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); top: auto; max-width: none; max-height: 60%; z-index: 450; }
  .page-bar { gap: 2px; padding: 0 6px; }
  .page-bar .addr { min-width: 0; }
  .composer { padding: 8px; }
  .quick-emotes { overflow-x: auto; }
  .voice-bar { padding: 6px 8px; }
  .mini { left: 8px; right: 8px; transform: none; bottom: calc(70px + env(safe-area-inset-bottom)); max-width: none; }
  .mini .btn { padding: 0 10px; }
  .mini .thumb { display: none; }
  .mini > .grow { flex: 1; max-width: none !important; }
  .mini { padding: 8px 8px 8px 14px; }

  /* Mensajes directos y ajustes */
  .dm-thread .dm-head { padding: 8px 10px; gap: 6px; }
  .dm-head .btn .btn-txt { display: none; }
  .dm-msgs { padding: 10px; }
  .bubble { max-width: 82%; }
  .settings { gap: 12px; }
  .settings nav { flex-direction: row; overflow-x: auto; position: static; scrollbar-width: none; gap: 4px; }
  .settings nav button { flex: none; padding: 8px 10px; }
  .settings section { padding: 4px 14px 14px; }
  .opt { flex-wrap: wrap; gap: 8px; }
  .opt > select.input, .opt > .seg { width: 100% !important; }
  .notif-panel { left: 8px; right: 8px; width: auto; bottom: calc(70px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  .toast { text-align: center; }
  .emoji-pop { width: calc(100vw - 16px); left: 8px !important; }
  .login { padding: 16px; align-items: start; }
  .login-box { padding: 22px; margin-top: 4vh; }
}

/* ---------- Voz en la barra superior de la sala ---------- */
.top-voice { display: none; align-items: center; gap: 2px; }
.icon-btn.voice-mic.live { color: #04211d; background: var(--ok); }

/* ===================== Rediseño iPhone (≤ 760 px) ===================== */
@media (max-width: 760px) {
  /* Sala: sin barra de navegación ni barra de voz abajo; la voz va arriba */
  .route-room .rail { display: none; }
  .route-room .shell { grid-template-rows: minmax(0, 1fr); }
  .route-room .side { padding-bottom: env(safe-area-inset-bottom); }
  .top-voice { display: inline-flex; }
  #voice-bar { display: none; }
  .quick-emotes { display: none; }
  .room-top { min-height: 52px; }
  .room-top .name { font-size: 16px; }
  .room-top .small.muted.row span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; display: inline-block; }
  .room-top .icon-btn { width: 38px; height: 38px; }
  .side-tabs { padding: 6px 8px; gap: 6px; }
  .side-tabs .tab { border-radius: 10px; padding: 8px 2px; }
  .composer .box { border-radius: 22px; padding: 4px 6px; }
  .composer textarea { padding: 8px 6px; }

  /* Agregar video: lista cómoda de una columna, botones siempre visibles */
  .modal .tabs { margin-top: 2px; }
  .modal .add-grid { grid-template-columns: 1fr; gap: 8px; }
  .res { display: flex; align-items: stretch; gap: 10px; padding: 6px; border-radius: 14px; }
  .res .thumb { width: 132px; flex: none; border-radius: 10px; overflow: hidden; align-self: center; }
  .res .meta { flex: 1; min-width: 0; padding: 2px 0; display: flex; flex-direction: column; justify-content: center; }
  .res .meta .t { font-size: 14px; }
  .res .acts { position: static; display: flex !important; align-self: center; flex-direction: column; gap: 6px; }
  .res .acts button { background: var(--panel-2) !important; color: var(--text) !important; width: 38px; height: 38px; }
  .modal .row > .input + .btn { flex: none; }
  .drop { padding: 22px 14px; }

  /* Cola */
  .q-item { padding: 8px; gap: 10px; }
  .q-item .thumb { width: 104px; }
  .vote-btn { padding: 6px 10px; }

  /* Personas */
  .person { padding: 10px 12px; }

  /* Menús de opciones: hoja inferior estilo iOS con botones grandes */
  .ctx { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); min-width: 0; border-radius: 18px; padding: 6px; animation: sheet .2s ease; max-height: 70vh; overflow: auto; }
  .ctx button { padding: 14px 14px; font-size: 16px; border-radius: 12px; }
  .pop-menu button { padding: 12px 12px; font-size: 15px; }
  .pop-tabs button { padding: 10px 6px; }
}
@media (max-width: 760px) {
  /* Las ventanas ocupan exactamente el ancho del teléfono (antes crecían al ancho de su contenido) */
  .modal-back { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
  .modal, .modal.wide { width: 100%; max-width: 100%; min-width: 0; }
  .modal-body, .modal-body > * { min-width: 0; max-width: 100%; }
  .modal-head h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Avisos sobre el reproductor: fondo opaco que tapa lo que haya debajo (p. ej. pantallas de YouTube) */
.stage-msg-back { position: absolute; inset: 0; z-index: 4; background: rgba(8, 10, 14, .94); display: grid; place-items: center; overflow: auto; padding: 12px; }
.stage-msg-back .stage-msg { position: static; transform: none; background: transparent; max-width: 520px; width: 100%; }
@media (max-width: 760px) { .stage-msg-back .stage-msg { font-size: 14px; gap: 8px; } }

/* =====================================================================
   Diseño iPhone v2 (≤ 760 px): estilo iOS, botones grandes, sin efectos pesados
   ===================================================================== */
.ios { --fs: 16px; }
.ios body { font-family: -apple-system, "SF Pro Text", system-ui, sans-serif; }
#net-banner { position: fixed; top: calc(env(safe-area-inset-top) + 8px); left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 20px; background: #f59e0b; color: #1a1300; font-weight: 700; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.4); pointer-events: none; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  :root { --bg: #0b0c10; --bg-2: #15171d; --panel: #16181f; --panel-2: #22252e; --line: #262a34; }
  /* Los desenfoques (backdrop-filter) hacen lento el WebView del iPhone: colores sólidos */
  .modal-back, .rail, .ctx, .pop-menu { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .btn { height: 44px; border-radius: 12px; font-size: 15.5px; padding: 0 18px; }
  .btn.sm { height: 36px; border-radius: 10px; font-size: 14px; }
  .input, select.input { height: 46px; border-radius: 12px; background: var(--panel-2); border-color: transparent; }
  textarea.input { border-radius: 12px; background: var(--panel-2); border-color: transparent; }
  .lbl { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin: 18px 2px 8px; }
  .seg { display: flex; width: 100%; padding: 3px; border-radius: 12px; background: var(--panel-2); flex-wrap: nowrap; }
  .seg button { flex: 1; padding: 9px 4px; border-radius: 9px; font-size: 14px; white-space: nowrap; }
  .seg button.on { background: #3a3f4b; color: #fff; }

  /* ---- Barra de abajo tipo iOS: ícono + nombre ---- */
  .rail { padding: 6px 2px calc(4px + env(safe-area-inset-bottom)); background: #101217; border-top: 1px solid var(--line); }
  .rail-btn { flex: 1; width: auto; min-width: 0; height: 50px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #7d8496; }
  .rail-btn:hover { background: transparent; color: #7d8496; }
  .rail-btn.on, .rail-btn.on:hover { background: transparent; color: var(--accent); }
  .rail-btn::after { content: attr(data-l); font-size: 10.5px; font-weight: 600; line-height: 1; white-space: nowrap; }
  .rail-btn svg { width: 25px; height: 25px; }
  .rail-btn .badge { top: 0; right: calc(50% - 22px); }
  .rail-btn .avatar { width: 26px !important; height: 26px !important; font-size: 12px !important; }
  .rail-btn .avatar .dot { display: none; }

  /* ---- Páginas: título grande como en iOS ---- */
  .page { padding: 10px 16px calc(120px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
  .page-head { flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 14px; }
  .page-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; flex: 1; }
  .page-head .head-join { width: 44px; padding: 0; border-radius: 50%; }
  .page-head .head-join .bt { display: none; }
  .page-head .head-create { border-radius: 22px; padding: 0 16px 0 12px; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
  .page-head > .input { order: 10; flex: 1 1 100%; width: 100% !important; height: 42px; padding-left: 14px; }
  /* Filtros: píldoras que se deslizan de lado */
  .page .tabs { background: transparent; padding: 0 16px 2px; margin: 0 -16px 16px !important; gap: 8px; border-radius: 0; flex-wrap: nowrap; overflow-x: auto; width: auto; max-width: none; scrollbar-width: none; }
  .page .tabs .tab { flex: none; height: 36px; padding: 0 16px; border-radius: 18px; background: var(--panel-2); color: #c3c8d4; font-size: 14.5px; box-shadow: none; }
  .page .tabs .tab.on { background: #f2f4f8; color: #0b0c10; }
  .page .tabs .tab .chip { height: 20px; min-width: 20px; padding: 0 6px; background: rgba(127,127,127,.25); color: inherit; }
  .rooms-grid { grid-template-columns: 1fr; gap: 14px; }
  .room-card { border-radius: 20px; border: 0; background: var(--panel); }
  .room-card:hover { transform: none; }
  .room-card:active { transform: scale(.985); }
  .room-info { padding: 12px 16px 14px; }
  .room-info .title { font-size: 17px; }
  .room-thumb .chips .chip { background: rgba(0,0,0,.6); color: #fff; }
  .empty { padding: 36px 16px; background: var(--panel); border-radius: 22px; margin-top: 4px; }
  .empty p { margin: 8px 0 18px; font-size: 15.5px; }
  .empty .btn { height: 48px; padding: 0 26px; border-radius: 24px; }
  .list-card { border-radius: 18px; border: 0; }

  /* ---- Hojas (ventanas) que suben desde abajo, al tamaño de su contenido ---- */
  .modal-back { background: rgba(0, 0, 0, .55); }
  .modal, .modal.wide { border: 0; border-radius: 22px 22px 0 0; background: #17191f; box-shadow: 0 -10px 40px rgba(0,0,0,.5); height: auto; max-height: calc(var(--app-h, 100vh) - env(safe-area-inset-top) - 12px); padding-bottom: calc(env(safe-area-inset-bottom) + 6px); }
  .modal.wide { height: calc(var(--app-h, 100vh) - env(safe-area-inset-top) - 12px); }
  .modal::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: #3c414d; margin: 8px auto 0; flex: none; }
  .modal-head { padding: 10px 12px 8px 20px; }
  .modal-head h3 { font-size: 19px; font-weight: 750; }
  .modal-head .icon-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--panel-2); color: #c3c8d4; }
  .modal-body { padding: 4px 16px 14px; -webkit-overflow-scrolling: touch; }
  .modal .row.end { margin-top: 20px; gap: 10px; }
  .modal .row.end .btn { flex: 1; height: 50px; border-radius: 14px; font-size: 16.5px; }
  .modal .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .modal .svc { padding: 16px 4px 12px; border-radius: 18px; background: var(--panel-2); border: 0; gap: 10px; }
  .modal .svc-name { font-size: 13px; }

  /* ---- Sala ---- */
  .room-top { min-height: 56px; padding: 6px 8px 6px 4px; gap: 4px; background: var(--bg); }
  .room-top .name { font-size: 17px; font-weight: 750; }
  .room-top > .icon-btn:first-child { width: 36px; color: var(--text); }
  .room-top .btn.sm { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
  .room-top .btn.ghost.sm { background: var(--panel-2); }
  .room-top .icon-btn { width: 40px; height: 40px; border-radius: 50%; }
  .room-top .top-voice .icon-btn { background: var(--panel-2); color: #c3c8d4; margin-left: 2px; }
  .room-top .top-voice .icon-btn.voice-mic.live { background: var(--ok); color: #04211d; }
  .room-top .icon-btn.red { background: color-mix(in srgb, var(--danger) 16%, transparent); margin-left: 2px; }
  /* Sin video: título y servicios en una fila que se desliza (antes se salía del recuadro) */
  .stage-empty { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 10px; padding: 12px 0; overflow: hidden; }
  .stage-empty h2 { font-size: 19px; margin: 0; padding: 0 16px; text-align: left; }
  .stage-empty p { font-size: 14px; padding: 0 16px; text-align: left; margin: -6px 0 0; }
  .stage-empty .svc-grid.compact { display: flex; overflow-x: auto; gap: 10px; padding: 2px 16px 4px; margin: 0; width: 100%; scrollbar-width: none; }
  .stage-empty .svc-grid.compact .svc { flex: none; width: 92px; padding: 12px 4px 10px; border-radius: 16px; background: rgba(255,255,255,.07); border: 0; }
  .stage-empty .svc-note { display: none; }
  /* Pestañas de la sala: control segmentado */
  .side { background: var(--bg); }
  .side-tabs { margin: 8px 10px 4px; padding: 3px; gap: 2px; background: var(--panel-2); border-radius: 12px; border-bottom: 0; }
  .side-tabs .tab { height: 34px; padding: 0 2px; border-radius: 9px; font-size: 14px; color: #aab1c0; }
  .side-tabs .tab.on { background: #3a3f4b; color: #fff; box-shadow: none; }
  .side-tabs .tab .chip { height: 18px; min-width: 18px; padding: 0 5px; }
  .chat-list { padding: 8px 12px; }
  .msg .who { font-size: 14.5px; }
  .msg .text { font-size: 16px; line-height: 1.4; }
  .composer { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 0; background: var(--bg); }
  .route-room .side { padding-bottom: 0; }
  .composer .box { min-height: 46px; align-items: center; border-radius: 23px; border: 0; background: var(--panel-2); padding: 3px 4px 3px 6px; }
  .composer textarea { font-size: 16px; padding: 10px 6px; }
  .composer .box .icon-btn:last-child { background: var(--accent); color: #04211d; border-radius: 50%; width: 38px; height: 38px; }
  .settings-sec { padding: 6px 16px 24px; }
  .opt { padding: 14px 0; }
  .mode { padding: 14px 16px; border-radius: 16px; }
  .person { padding: 10px 14px; }
  .q-item { padding: 10px 12px; }

  .notif-panel { bottom: calc(100px + env(safe-area-inset-bottom)); max-height: 60vh; border-radius: 20px; border: 0; background: #1d2027; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
  .toasts { bottom: calc(108px + env(safe-area-inset-bottom)); }
  .route-room .toasts { bottom: calc(90px + env(safe-area-inset-bottom)); }
  /* Menús: hoja inferior */
  .ctx { border-radius: 20px; padding: 8px; background: #1d2027; }
  .ctx button { padding: 15px 14px; font-size: 16.5px; }

  /* Inicio de sesión */
  .login { background: radial-gradient(600px 400px at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent), radial-gradient(500px 400px at 100% 100%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent), var(--bg); }
  .login-box { border: 0; border-radius: 24px; background: rgba(22, 24, 31, .92); }
  .login-box .btn { height: 50px; border-radius: 14px; font-size: 16.5px; width: 100%; }
}

/* ---------- Navegador integrado de la app de iPhone (vista nativa encima del hueco del video) ---------- */
.native-view { position: relative; }
.native-view::before { content: "Abriendo…"; position: absolute; inset: 0; display: grid; place-items: center; color: #8b93a7; font-size: 14px; }
/* YouTube completo: la vista nativa tapa lo que haya encima, así que los controles de Juntos van debajo del video, siempre visibles */
.stage.native-nav:not(.page-mode) .player-box { bottom: 62px; }
.stage.native-nav:not(.page-mode) .controls, .touch .stage.native-nav:not(.page-mode) .controls { opacity: 1; pointer-events: auto; background: #0b0c10; padding: 4px 8px 6px; }
.stage.native-nav .shield, .stage.native-nav .ambient { display: none; }
@media (max-width: 760px) {
  .stage.native-nav:not(.page-mode) { aspect-ratio: auto; height: calc(56.25vw + 62px); max-height: 52vh; }
  .stage.native-nav.page-mode { height: 62vh; }
}

/* pantalla completa nativa */
.stage.pseudo-full.native-nav { height: var(--app-h, 100vh) !important; max-height: none !important; }
.stage.pseudo-full .stage-empty { display: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .stage.pseudo-full.native-nav:not(.page-mode) .player-box { bottom: 46px; }
  .stage.pseudo-full.native-nav:not(.page-mode) .controls { padding: 0 12px 2px; }
  .stage.pseudo-full.native-nav:not(.page-mode) .controls .seekbar { height: 12px; }
}

/* Líder: volver al navegador a elegir otro video */
.pick-other { position: absolute; top: 10px; left: 10px; z-index: 6; background: rgba(0,0,0,.7) !important; color: #fff !important; gap: 6px; height: 34px !important; border-radius: 17px !important; padding: 0 12px !important; font-size: 13px !important; }
.stage.native-nav .pick-other { display: none; }

/* Botón "Reproducir" del líder: video reconocido en la página → pasarlo al reproductor de la sala */
.play-offer { position: absolute; right: 16px; bottom: 16px; z-index: 9; height: 48px !important; padding: 0 22px 0 16px !important; border-radius: 24px !important; font-size: 16px !important; font-weight: 700; gap: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.55), 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); animation: offerIn .25s ease; }
@keyframes offerIn { from { transform: translateY(12px); opacity: 0; } }
/* En el iPhone la página real tapa lo que haya encima: se le deja una franja abajo para el botón */
.stage.native-nav.page-mode.has-offer .player-box { bottom: 64px; }
.stage.native-nav.page-mode.has-offer .play-offer { right: 10px; bottom: 8px; }
.stage.native-nav.page-mode.has-offer::after { content: "Video reconocido"; position: absolute; left: 14px; bottom: 22px; color: #c3c8d4; font-size: 14px; font-weight: 600; }

/* Cuenta regresiva antes del siguiente video */
.countdown { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(5, 7, 10, .72); animation: fade .2s; padding: 12px; }
.cd-box { display: grid; justify-items: center; gap: 8px; max-width: 92%; text-align: center; color: #fff; }
.cd-ring { --p: 1; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 360deg), rgba(255,255,255,.14) 0); }
.cd-num { width: 70px; height: 70px; border-radius: 50%; background: #0b0c10; display: grid; place-items: center; font-size: 34px; font-weight: 800; }
.cd-text { display: grid; gap: 2px; max-width: 100%; }
.cd-text b { font-size: 16px; max-width: 80vw; }
/* Botón «Ahora» junto a «Reproducir después» */
.play-offer-now { position: absolute; right: 16px; bottom: 74px; z-index: 9; height: 40px !important; border-radius: 20px !important; background: rgba(0,0,0,.7) !important; color: #fff !important; }
.stage.native-nav.page-mode.has-offer .play-offer-now { right: auto; left: 150px; bottom: 12px; }
@media (max-width: 760px) { .cd-ring { width: 64px; height: 64px; } .cd-num { width: 52px; height: 52px; font-size: 26px; } }

/* Comentarios en pantalla completa */
.chat-ticker { position: absolute; left: 0; right: 0; bottom: 18px; height: 34px; z-index: 7; overflow: hidden; pointer-events: none; }
.stage.paused .chat-ticker, .stage .controls.show ~ .chat-ticker, .stage:hover .controls ~ .chat-ticker { bottom: 84px; }
.tk-item { position: absolute; left: 0; top: 0; height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px 0 6px; border-radius: 17px; background: rgba(0,0,0,.62); color: #fff; font-size: 15px; white-space: nowrap; will-change: transform; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.tk-item b { color: var(--accent); font-weight: 700; }
.tk-item .avatar { width: 22px !important; height: 22px !important; font-size: 11px !important; }
.tk-item .avatar .dot { display: none; }
/* iPhone con el video en la vista nativa (YouTube completo): esa vista tapa todo lo de encima, así que la cinta va
   en una franja propia entre el video y los controles */
.stage.pseudo-full.native-nav.ticker-on:not(.page-mode) .player-box { bottom: 100px; }
.stage.pseudo-full.native-nav:not(.page-mode) .chat-ticker { bottom: 64px !important; }
@media (orientation: landscape) and (max-height: 500px) {
  .stage.pseudo-full.native-nav.ticker-on:not(.page-mode) .player-box { bottom: 82px; }
  .stage.pseudo-full.native-nav:not(.page-mode) .chat-ticker { bottom: 46px !important; }
}

/* pantalla completa: sin barras de desplazamiento */
.stage.pseudo-full, .stage.pseudo-full * { scrollbar-width: none; }
.stage.pseudo-full ::-webkit-scrollbar { display: none; }
.stage.pseudo-full video { object-fit: contain; }
/* Android: la pantalla completa ocupa exactamente la pantalla (fija a los 4 bordes, sin depender del alto medido) */
.android .stage.pseudo-full, .android .stage.pseudo-full.native-nav { top: 0; right: 0; bottom: 0; left: 0; width: auto; height: auto !important; }

/* Barra de tiempo deslizable: perilla visible, zona de toque amplia en celular, minuto exacto al arrastrar */
.seekbar { touch-action: none; user-select: none; -webkit-user-select: none; }
.touch .seekbar { height: 26px; }
.seekbar .knob { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(0,0,0,.35); transform: scale(0); transition: transform .12s; pointer-events: none; }
.seekbar:hover .knob, .touch .seekbar .knob, .seekbar.dragging .knob { transform: scale(1); }
.seekbar.dragging .knob { transform: scale(1.35); }
.seekbar.dragging .track { height: 6px; }
.seekbar.dragging .hover-time { display: block; font-size: 14px; padding: 4px 9px; bottom: 24px; font-weight: 600; }
/* La sala espera a que cargue el líder */
.wait-note { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; font-size: 13px; pointer-events: none; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.wait-note .spinner { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: var(--accent); animation: wn-spin .8s linear infinite; }
@keyframes wn-spin { to { transform: rotate(360deg); } }

/* Mezcla de volumen (video / voz del líder / voz de invitados) */
.mix-row { padding: 6px 10px 8px; }
.mix-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.mix-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-range { width: 100%; accent-color: var(--accent); }

/* Barra del navegador de la sala en celular: todo cabe en una línea (la dirección nunca desaparece) */
.page-bar { overflow: hidden; }
.page-bar > * { flex-shrink: 0; }
.page-bar .addr { flex: 1 1 auto; min-width: 72px; }
.page-bar .go-room { flex-shrink: 0; white-space: nowrap; padding-left: 10px; padding-right: 10px; }

/* =====================================================================
   REDISEÑO 2026 — superficies sobrias, tipografía Inter, acento con el degradado de la marca
   (va al final de app.css: manda sobre lo anterior sin tocar la estructura)
   ===================================================================== */
:root {
  --bg: #0a0b0f; --bg-2: #111318; --panel: #14161c; --panel-2: #1c1f27; --panel-3: #282c36;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
  --text: #f1f3f7; --muted: #8b92a4; --muted-2: #656c7d;
  --brand: linear-gradient(135deg, #0d9488 0%, #4f46e5 100%);
  --radius: 16px; --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="light"] { --bg: #f5f6f9; --bg-2: #eceef3; --panel: #ffffff; --panel-2: #f1f3f7; --panel-3: #e4e7ee; --line: rgba(15, 20, 40, .08); --line-2: rgba(15, 20, 40, .15); --text: #12151d; --muted: #5f6779; --muted-2: #8a91a1; }
html, body { font-family: var(--font); -webkit-font-smoothing: antialiased; }
.ios body { font-family: -apple-system, "SF Pro Text", var(--font); }
h1, h2, h3, .page-head h1, .modal-head h3 { letter-spacing: -.02em; }

/* Botones */
.btn { background: var(--brand); color: #fff; font-weight: 650; box-shadow: 0 8px 20px -10px rgba(79, 70, 229, .7), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--panel-3); filter: none; }
.btn.danger { background: #e5484d; box-shadow: none; }
.icon-btn:hover { background: var(--panel-2); }
.chip.accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }

/* Campos */
.input, select.input, textarea.input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.input::placeholder, textarea::placeholder { color: var(--muted-2); }
.input:focus { background: var(--panel); border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.lbl { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.page-head > .input { padding-left: 44px; background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23656c7d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14zM20 20l-4.2-4.2'/%3E%3C/svg%3E") 14px center / 20px no-repeat; }
.page-head > .input:focus { background-color: var(--panel); }

/* Tarjetas y listas */
.card, .list-card { background: var(--panel); border: 1px solid var(--line); }
.list-row { border-bottom-color: var(--line); }
.tabs { background: var(--panel-2); }
.tab.on { background: var(--panel-3); }
.seg { background: var(--panel-2); }
.seg button.on { background: var(--panel-3); color: var(--text); }

/* ---- Inicio: salas ---- */
.rooms-grid { gap: 16px; }
.room-card { border-radius: 20px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 14px 34px -22px rgba(0, 0, 0, .9); transition: transform .15s, border-color .15s; }
.room-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.room-thumb { background: #0d0f14; overflow: hidden; }
.room-thumb img { z-index: 0; }
.room-thumb::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .38) 0%, transparent 32%, transparent 58%, rgba(0, 0, 0, .58) 100%); }
.cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(110% 90% at 0% 0%, color-mix(in srgb, var(--svc) 55%, transparent), transparent 62%), radial-gradient(90% 90% at 100% 100%, rgba(79, 70, 229, .45), transparent 62%), #10131a; }
.cover-fallback .svc-ic { box-shadow: 0 16px 36px rgba(0, 0, 0, .5); border-radius: 16px; }
.cover-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .1); }
.room-thumb .chips { z-index: 2; top: 10px; left: 10px; }
.chip.glass, .room-thumb .chips .chip.glass { height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(8, 10, 14, .62); color: #fff; border: 1px solid rgba(255, 255, 255, .12); font-weight: 600; }
.room-thumb .count { z-index: 2; right: 10px; bottom: 10px; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .28); margin-right: 3px; }
.room-info { display: flex; align-items: center; gap: 12px; padding: 14px 16px 16px; }
.ri-text { flex: 1; min-width: 0; }
.room-info .title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.room-info .sub { margin-top: 3px; font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.room-info .sub svg { flex: none; color: var(--accent); fill: currentColor; }
.room-info .stack { flex: none; align-items: center; }
.stack .avatar { border: 2px solid var(--panel); margin-left: -9px; }
.stack .more { margin-left: 6px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.empty { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 40px 20px; }
.empty-ic { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: var(--brand); box-shadow: 0 16px 36px -12px rgba(79, 70, 229, .7); }
.empty h3 { margin: 0 0 6px; font-size: 19px; color: var(--text); }
.empty p { margin: 0 auto 20px; max-width: 320px; line-height: 1.45; }

/* ---- Sala ---- */
.room-top { background: var(--bg); border-bottom: 1px solid var(--line); }
.room-top .name { font-weight: 700; letter-spacing: -.01em; }
.side { background: var(--bg); }
.side-tabs .tab.on { background: var(--panel-3); color: var(--text); }
.sys { width: fit-content; max-width: 92%; margin: 6px auto; padding: 4px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.msg .when { color: var(--muted-2); }
.composer .box { background: var(--panel-2); border: 1px solid var(--line); }
.composer .box .icon-btn:last-child { background: var(--brand); color: #fff; }
.mini { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8); }
.toast { background: #1d2029; border: 1px solid var(--line-2); border-radius: 14px; }
.ctx, .notif-panel, .emoji-pop { background: var(--panel-2); border-color: var(--line-2); }
.ctx button:hover, .notif:hover { background: var(--panel-3); }

/* ---- Perfil ---- */
.profile-cover { height: 104px; margin: -4px -20px 0; border-radius: 14px 14px 0 0; background: radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--pc) 75%, transparent), transparent 70%), var(--brand); }
.profile-head { margin-top: -50px; }
.profile-head .avatar { box-shadow: 0 0 0 4px var(--panel); }
.me-links { flex: 1 1 100%; width: 100%; margin-top: 14px; display: flex; flex-direction: column; background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.me-link { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.me-link + .me-link { border-top: 1px solid var(--line); }
.me-link:active { background: var(--panel-3); }
.ml-ic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ml-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ml-t b { font-size: 15px; font-weight: 650; }
.ml-t span { font-size: 12.5px; color: var(--muted); }
.ml-go { color: var(--muted-2); display: grid; }

/* ---- Ajustes ---- */
.settings nav button.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.settings section.card { border-radius: 20px; }

/* ---- Inicio de sesión ---- */
.login { background: radial-gradient(700px 420px at 50% -12%, rgba(20, 184, 166, .26), transparent 70%), radial-gradient(620px 420px at 105% 110%, rgba(79, 70, 229, .26), transparent 70%), var(--bg); }
.login-box { background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.login-box h1 { font-weight: 800; letter-spacing: -.03em; }
.login-box .brand img { border-radius: 14px; box-shadow: 0 12px 30px -10px rgba(45, 212, 191, .6); }

@media (max-width: 760px) {
  /* Barra de abajo: 5 pestañas (Historial y Ajustes van dentro de «Yo»), con indicador en píldora */
  .rail { background: rgba(11, 12, 16, .98); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .rail-btn.nav-history, .rail-btn.nav-settings, .rail-btn.nav-room { display: none; }
  .rail-btn { position: relative; height: 54px; gap: 4px; color: var(--muted-2); }
  .rail-btn:hover { color: var(--muted-2); }
  .rail-btn svg, .rail-btn .avatar { position: relative; z-index: 1; }
  .rail-btn::before { content: ""; position: absolute; top: 4px; left: 50%; width: 56px; height: 30px; margin-left: -28px; border-radius: 15px; background: transparent; transition: background .2s; }
  .rail-btn.on::before, .rail-btn.me-btn.on-sub::before { background: color-mix(in srgb, var(--accent) 16%, transparent); }
  .rail-btn.on, .rail-btn.on:hover { color: var(--accent); }
  .rail-btn::after { font-size: 11px; font-weight: 600; letter-spacing: .01em; }
  .rail-btn.on::after, .rail-btn.me-btn.on-sub::after { color: var(--text); }
  .rail-btn .badge { z-index: 2; }
  .rail-btn svg { width: 24px; height: 24px; }

  /* Encabezados de página */
  .page { padding-top: 12px; }
  .page-head { margin: 6px 0 14px; }
  .page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.035em; }
  .page-head .head-join { width: 44px; height: 44px; border-radius: 50%; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
  .page-head .head-create { height: 44px; border-radius: 22px; padding: 0 18px 0 14px; box-shadow: 0 10px 24px -10px rgba(79, 70, 229, .8); }
  .page-head > .input { height: 46px; border-radius: 14px; }
  /* Filtros: píldoras con borde; la activa con el color de acento */
  .page .tabs .tab { height: 36px; padding: 0 15px; border-radius: 18px; background: transparent; border: 1px solid var(--line-2); color: #b6bccb; font-size: 14px; font-weight: 600; }
  .page .tabs .tab.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); }
  .page .tabs .tab .chip { background: rgba(255, 255, 255, .08); color: inherit; }
  .page .tabs .tab.on .chip { background: color-mix(in srgb, var(--accent) 24%, transparent); }
  .room-card { border-radius: 20px; border: 1px solid var(--line); }
  .room-card:active { transform: scale(.985); }
  .empty { padding: 38px 18px; }

  /* Hojas que suben desde abajo */
  .modal, .modal.wide { background: var(--panel); border-top: 1px solid var(--line-2); }
  .modal::before { background: var(--panel-3); }
  .modal-head h3 { font-size: 20px; font-weight: 750; }
  .modal-head .icon-btn { background: var(--panel-2); color: var(--muted); }
  .modal .svc { background: var(--panel-2); border: 1px solid var(--line); border-radius: 18px; }
  .modal .svc:active { transform: scale(.97); }
  .profile-cover { margin: -4px -16px 0; }

  /* Sala */
  .room-top { min-height: 58px; }
  .room-top .name { font-size: 16.5px; }
  .room-top .icon-btn, .room-top .top-voice .icon-btn { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
  .room-top > .icon-btn:first-child { background: transparent; box-shadow: none; }
  .room-top .btn.ghost.sm { background: var(--panel-2); }
  .room-top .icon-btn.red { background: rgba(229, 72, 77, .14); color: #ff6b6f; box-shadow: none; }
  .room-top .top-voice .icon-btn.voice-mic.live { background: #22c55e; color: #04140a; box-shadow: none; }
  .side-tabs { background: var(--panel-2); border: 1px solid var(--line); margin: 10px 12px 6px; }
  .side-tabs .tab { color: var(--muted); font-weight: 600; }
  .side-tabs .tab.on { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
  .composer { background: var(--bg); }
  .composer .box { background: var(--panel-2); border: 1px solid var(--line); }
  .ctx { background: var(--panel-2); border: 1px solid var(--line-2); }
  .notif-panel { background: var(--panel-2); border: 1px solid var(--line-2); }
  .settings nav button { border-radius: 18px; }
}
/* Perfil: la portada llega a las orillas de la hoja y la "X" queda encima de ella */
.modal:has(.profile-cover) .modal-head { position: absolute; top: 14px; right: 10px; z-index: 3; padding: 0; }
.modal:has(.profile-cover) .modal-head .icon-btn { background: rgba(0, 0, 0, .35); color: #fff; }
.modal:has(.profile-cover) { position: relative; }
.profile-cover { align-self: stretch; width: auto; margin: 0 -20px; border-radius: 16px 16px 0 0; flex: none; }
@media (max-width: 760px) { .profile-cover { margin: 4px -16px 0; border-radius: 18px 18px 0 0; } }
/* Vacíos dentro del panel de la sala: más compactos y sin tarjeta */
.side .empty { background: transparent; border: 0; padding: 28px 16px; }
.side .empty-ic { width: 56px; height: 56px; border-radius: 18px; margin-bottom: 12px; }
.modal-body > .profile-cover { max-width: none; }
@media (max-width: 760px) {
  /* Inicio de sesión centrado, con más aire */
  .login { align-items: center; }
  .login-box { margin-top: 0; padding: 28px 22px 26px; }
  .login-box .brand img { width: 52px; height: 52px; }
  .login-box h1 { font-size: 32px; }
}
.dm-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.dm-empty { margin: 8px 12px; }
@media (max-width: 760px) { .dm-title { font-size: 30px; } }
/* Miniaturas: fondo de respaldo con ícono de película (se ve si la imagen no carga) */
.q-item .thumb, .now-playing .thumb, .history-row .thumb, .mini .thumb, .res .thumb { background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23656c7d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v14H4zM8 5v14M16 5v14M4 9.5h4M4 14.5h4M16 9.5h4M16 14.5h4'/%3E%3C/svg%3E") center / 26px no-repeat; border: 1px solid var(--line); }
.dm-list .input { padding-left: 40px; background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23656c7d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14zM20 20l-4.2-4.2'/%3E%3C/svg%3E") 12px center / 18px no-repeat; }

/* Hueco del anuncio (app de Android): franja fija arriba de la barra de abajo; el banner lo pone la app encima */
#ad-slot { position: fixed; left: 0; right: 0; height: 58px; z-index: 40; background: var(--bg); border-top: 1px solid var(--line); pointer-events: none; }
#ad-slot span { position: absolute; left: 8px; top: 4px; font-size: 9.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
.has-ad .page { padding-bottom: calc(178px + env(safe-area-inset-bottom)); }
.has-ad .mini { bottom: calc(128px + env(safe-area-inset-bottom)); }
.has-ad .toasts { bottom: calc(166px + env(safe-area-inset-bottom)); }

/* ===================== Juntos Plus ===================== */
.plus-tag { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; margin: 0 6px 0 0; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: .06em; color: #fff; background: linear-gradient(135deg, #f59e0b, #ec4899 55%, #8b5cf6); vertical-align: 2px; }
.plus-modal { overflow: hidden; }
.plus-modal .modal-head { position: absolute; top: 12px; right: 10px; z-index: 3; padding: 0; }
.plus-modal .modal-head .icon-btn { background: rgba(0, 0, 0, .35); color: #fff; }
.plus-modal .modal-body { padding-top: 0; }
.plus-hero { position: relative; margin: 0 -20px; padding: 34px 20px 22px; text-align: center; color: #fff; overflow: hidden; background: radial-gradient(120% 90% at 0% 0%, rgba(245, 158, 11, .55), transparent 60%), radial-gradient(120% 90% at 100% 0%, rgba(236, 72, 153, .55), transparent 60%), linear-gradient(160deg, #4c1d95, #1e1b4b); }
.plus-glow { position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, .12), transparent 30%); animation: plusSpin 9s linear infinite; pointer-events: none; }
@keyframes plusSpin { to { transform: rotate(360deg); } }
.plus-badge-big { position: relative; width: 68px; height: 68px; margin: 0 auto 10px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, #f59e0b, #ec4899 55%, #8b5cf6); box-shadow: 0 14px 34px -8px rgba(236, 72, 153, .7); }
.plus-hero h2 { position: relative; margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.plus-word { background: linear-gradient(90deg, #fde68a, #f9a8d4, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plus-hero p { position: relative; margin: 6px 0 12px; opacity: .85; }
.plus-price { position: relative; display: inline-flex; align-items: baseline; gap: 2px; padding: 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); }
.plus-price b { font-size: 24px; font-weight: 800; }
.plus-price span { font-size: 13px; opacity: .85; }
.plus-active { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, #22c55e 14%, transparent); color: #4ade80; font-weight: 600; }
.plus-perks { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 4px; }
.plus-perk { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; }
.plus-perk.hl { background: color-mix(in srgb, #ec4899 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, #ec4899 45%, transparent); }
.pp-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #f9a8d4; background: color-mix(in srgb, #ec4899 14%, transparent); }
.pp-t { display: flex; flex-direction: column; min-width: 0; }
.pp-t b { font-size: 15px; }
.pp-t span { font-size: 12.5px; color: var(--muted); }
.plus-cta { margin-top: 14px; height: 52px; border-radius: 16px; font-size: 16.5px; background: linear-gradient(135deg, #f59e0b, #ec4899 55%, #8b5cf6) !important; box-shadow: 0 12px 30px -10px rgba(236, 72, 153, .8) !important; }
.plus-cta:disabled { opacity: .55; }
.plus-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.45; }

/* Stickers y emojis animados en el chat */
.msg img.sticker { display: block; width: 132px; height: 132px; margin-top: 4px; }
.big-emoji { display: flex; gap: 4px; margin-top: 2px; }
.anim-emoji { display: inline-grid; place-items: center; line-height: 1; }
.anim-emoji img { width: 100%; height: 100%; }
.emote.anim { font-size: 0; }
.sticker-pop { position: fixed; z-index: 960; width: 330px; max-height: 360px; overflow: auto; padding: 10px; border-radius: 18px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pop .15s ease; }
.sp-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.sp-head b { flex: 1; }
.sp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sp-grid button { border: 0; background: transparent; padding: 4px; border-radius: 12px; cursor: pointer; }
.sp-grid button:active, .sp-grid button:hover { background: var(--panel-3); }
.sp-grid img { width: 100%; aspect-ratio: 1; }
@media (max-width: 760px) { .sticker-pop { left: 8px !important; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom)); max-height: 55vh; } }
.composer .stk-btn { color: #f472b6; }

/* Lluvia de corazones */
.rain-heart { position: absolute; top: -40px; animation: rainFall linear forwards; pointer-events: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); }
@keyframes rainFall { 0% { transform: translateY(0) rotate(-10deg); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(110vh) rotate(25deg); opacity: .9; } }
.controls .rain-btn { color: #f472b6; }

/* Videollamada: ventanitas encima del video */
.cam-strip { position: absolute; top: 10px; right: 10px; z-index: 7; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.cam-tile { position: relative; width: 92px; height: 122px; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 10px 24px rgba(0, 0, 0, .55), 0 0 0 2px rgba(255, 255, 255, .14); }
.cam-tile video { width: 100%; height: 100%; object-fit: cover; }
.cam-tile.mine video { transform: scaleX(-1); }
.cam-name { position: absolute; left: 6px; right: 6px; bottom: 5px; font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .cam-strip { flex-direction: row; top: 8px; right: 8px; } .cam-tile { width: 70px; height: 94px; border-radius: 14px; } }
.stage.pseudo-full .cam-tile { width: 110px; height: 146px; }
.icon-btn.voice-cam.live { background: linear-gradient(135deg, #ec4899, #8b5cf6) !important; color: #fff !important; box-shadow: none !important; }

/* ===================== Inicio de sesión (nuevo) ===================== */
.auth { position: relative; flex: 1; min-height: 0; overflow: auto; display: flex; background: #07080c; }
.auth-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.auth-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: authFloat 14s ease-in-out infinite alternate; }
.auth-bg .b1 { width: 420px; height: 420px; left: -140px; top: -120px; background: #0d9488; }
.auth-bg .b2 { width: 380px; height: 380px; right: -160px; top: 30%; background: #4f46e5; animation-delay: -5s; }
.auth-bg .b3 { width: 340px; height: 340px; left: 10%; bottom: -180px; background: #db2777; opacity: .35; animation-delay: -9s; }
@keyframes authFloat { to { transform: translate(40px, 30px) scale(1.08); } }
.auth-wrap { position: relative; z-index: 1; margin: auto; width: min(420px, 100%); padding: 28px 20px calc(24px + env(safe-area-inset-bottom)); }
.auth-card { display: flex; flex-direction: column; animation: authIn .35s ease; }
@keyframes authIn { from { opacity: 0; transform: translateY(14px); } }
.auth-card.welcome { align-items: center; text-align: center; min-height: calc(var(--app-h, 100vh) - 60px); justify-content: flex-end; }
.auth-logo { width: 96px; height: 96px; border-radius: 28px; padding: 0; margin-bottom: 18px; box-shadow: 0 24px 60px -12px rgba(45, 212, 191, .55), 0 0 0 1px rgba(255, 255, 255, .08); overflow: hidden; animation: authPop .6s cubic-bezier(.2, 1.4, .4, 1); }
.auth-logo img { width: 100%; height: 100%; }
@keyframes authPop { from { transform: scale(.6); opacity: 0; } }
.auth-title { margin: 0; font-size: 44px; font-weight: 800; letter-spacing: -.045em; background: linear-gradient(180deg, #fff, #b9c2d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-sub { margin: 8px auto 0; max-width: 320px; color: #a3abbd; font-size: 16px; line-height: 1.45; }
.auth-feats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 6px; }
.auth-feats span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; font-size: 13px; font-weight: 600; color: #d6dbe6; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09); }
.auth-feats i { display: grid; color: var(--accent); }
.auth-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 34px; }
.auth-actions.compact { margin-top: 18px; }
.auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; border-radius: 16px; border: 0; font: inherit; font-size: 16px; font-weight: 650; cursor: pointer; transition: transform .1s, filter .15s; }
.auth-btn:active, .auth-main:active { transform: scale(.98); }
.auth-btn span { display: grid; }
.auth-btn.google { background: #fff; color: #1f2937; }
.auth-btn.apple { background: #000; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.auth-main { height: 52px !important; border-radius: 16px !important; font-size: 16px !important; }
.auth-or { display: flex; align-items: center; gap: 12px; color: #6b7387; font-size: 13px; margin: 4px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .1); }
.auth-legal { margin: 18px 0 0; font-size: 12px; color: #6b7387; max-width: 300px; line-height: 1.45; }
.auth-card.form { padding-top: 8px; }
.auth-back { align-self: flex-start; width: 42px; height: 42px; margin: 0 0 18px -6px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .07); color: #fff; display: grid; place-items: center; cursor: pointer; }
.auth-h { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.035em; color: #fff; }
.auth-card.form .auth-sub { margin: 6px 0 4px; max-width: none; }
.auth-card.form .auth-or { margin: 16px 0 6px; }
.auth-field { display: flex; align-items: center; gap: 10px; height: 54px; margin-top: 12px; padding: 0 14px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09); transition: border-color .15s, background .15s; }
.auth-field:focus-within { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.auth-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: #fff; font: inherit; font-size: 16px; }
.auth-field input::placeholder { color: #6b7387; }
.af-ic { display: grid; color: #7d869a; }
.af-eye { border: 0; background: transparent; color: #7d869a; display: grid; cursor: pointer; padding: 6px; }
.auth-card.form .auth-main { margin-top: 20px; }
.auth-err { color: #ff7a7f; font-size: 14px; min-height: 20px; margin-top: 10px; text-align: center; }
.auth-switch { text-align: center; color: #8e96a8; font-size: 14.5px; margin: 10px 0 0; }
.auth-switch a { color: var(--accent); font-weight: 650; text-decoration: none; }
@media (min-width: 761px) {
  .auth-wrap { padding: 40px; border-radius: 28px; background: rgba(16, 18, 24, .72); border: 1px solid rgba(255, 255, 255, .07); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
  .auth-card.welcome { min-height: 0; }
}

/* ===================== Anuncio antes de crear sala ===================== */
.ad-gate { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 6px 0 4px; }
.ag-ic { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: var(--brand); box-shadow: 0 16px 36px -12px rgba(79, 70, 229, .7); }
.ad-gate h3 { margin: 6px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ad-gate p { margin: 0 0 8px; color: var(--muted); max-width: 320px; line-height: 1.45; }
.ad-gate .plus-cta { margin-top: 0; }

/* ===================== Ajustes en lista (celular) ===================== */
.set-me, .set-plus, .set-row { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.set-me { padding: 14px; margin-bottom: 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.sm-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sm-t b { font-size: 17px; font-weight: 700; display: flex; align-items: center; }
.sm-t span { font-size: 13px; color: var(--muted); }
.set-plus { padding: 14px; margin-bottom: 18px; border-radius: 20px; color: #fff; background: radial-gradient(120% 120% at 0% 0%, rgba(245, 158, 11, .5), transparent 60%), linear-gradient(135deg, #6d28d9, #db2777); box-shadow: 0 16px 34px -16px rgba(219, 39, 119, .8); }
.set-plus .sm-t span { color: rgba(255, 255, 255, .85); }
.set-plus .ml-go { color: rgba(255, 255, 255, .8); }
.spl-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.set-group { margin-bottom: 16px; border-radius: 18px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.set-row { padding: 13px 14px; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row:active { background: var(--panel-2); }
.sr-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.sr-l { flex: 1; font-size: 15.5px; font-weight: 550; }
.set-row.danger { color: #ff6b6f; }
.set-row.danger .sr-ic { color: #ff6b6f; background: rgba(229, 72, 77, .14); }
.set-back { margin-left: -8px; }
.plus-themes button { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; }
.me-link.plus .ml-ic { color: #fff; background: linear-gradient(135deg, #f59e0b, #ec4899 55%, #8b5cf6); }
.sm-t .plus-tag { color: #fff; }
.plus-modal { position: relative; }
@media (max-width: 760px) {
  /* Barra de la sala: "Invitar" ya está en la pestaña Personas; así cabe el nombre de la sala */
  .room-top .btn.ghost.sm { display: none; }
  .room-top .icon-btn, .room-top .top-voice .icon-btn { width: 38px; height: 38px; }
  .room-top .top-voice { gap: 4px; }
}
.side > .cam-strip { position: static; flex-direction: row; padding: 8px 12px 0; pointer-events: auto; overflow-x: auto; }

/* ===== Inicio con Google/Apple desde la app de PC (espera al navegador) ===== */
.auth-legal a { color: #8fd8cf; text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }
.auth-wait { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(6, 7, 10, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: aw-in .18s ease-out; }
.auth-wait-card { width: min(360px, calc(100vw - 32px)); padding: 30px 26px 22px; border-radius: 24px; text-align: center; background: #14161c; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.auth-wait-ic { width: 60px; height: 60px; margin: 0 auto 4px; border-radius: 18px; display: grid; place-items: center; background: #fff; color: #000; }
.auth-wait-ic svg { width: 28px; height: 28px; }
.auth-wait .spinner { width: 22px; height: 22px; margin: 4px auto; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .15); border-top-color: var(--accent, #2dd4bf); animation: wn-spin .8s linear infinite; }
.auth-wait h3 { margin: 4px 0 0; font-size: 19px; }
.auth-wait p { margin: 0 0 8px; color: #9aa1b2; font-size: 14px; line-height: 1.5; }
@keyframes aw-in { from { opacity: 0; } }
