/* Huddle — tema oscuro neón */
:root {
  --bg: #0a0713;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-solid: rgba(18, 12, 32, 0.85);
  --line: rgba(255, 255, 255, 0.09);
  --txt: #f3eefc;
  --dim: #9d93b5;
  --pink: #ff3ec8;
  --violet: #8b5cf6;
  --cyan: #29e0ff;
  --green: #38e08a;
  --amber: #ffb454;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
.hidden { display: none !important; }
button { font-family: inherit; }
input { font-family: inherit; }

/* ---------- fondo animado ---------- */
.blob {
  position: fixed; border-radius: 50%; filter: blur(90px);
  opacity: 0.35; pointer-events: none; z-index: 0;
}
.blob-a { width: 480px; height: 480px; background: var(--pink); top: -140px; left: -120px; animation: float1 14s ease-in-out infinite alternate; }
.blob-b { width: 420px; height: 420px; background: var(--cyan); bottom: -140px; right: -100px; animation: float2 17s ease-in-out infinite alternate; }

/* en pantallas chicas los blobs se ven como una franja fea: fuera */
@media (max-width: 700px) {
  .blob { display: none; }
}
@keyframes float1 { to { transform: translate(120px, 90px) scale(1.15); } }
@keyframes float2 { to { transform: translate(-110px, -80px) scale(1.1); } }

/* ---------- pantalla de inicio ---------- */
.screen.landing, #landing {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.landing-card {
  width: min(460px, 100%);
  padding: 36px 32px;
  text-align: center;
  background: var(--panel-solid);
  backdrop-filter: blur(16px);
}
.logo-big { display: flex; justify-content: center; margin-bottom: 10px; }
h1 { margin: 0 0 10px; font-size: 40px; letter-spacing: -0.5px; }
.gradient-text {
  background: linear-gradient(90deg, var(--pink), var(--violet) 45%, var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.tagline { color: var(--dim); margin: 0 0 24px; line-height: 1.5; font-size: 15px; }
.tagline b { color: var(--txt); }
.hint { color: var(--dim); font-size: 12px; margin: 18px 0 0; }
.or { color: var(--dim); font-size: 12px; margin: 16px 0 10px; text-transform: uppercase; letter-spacing: 1px; }
.join-inline { display: flex; gap: 10px; }
.join-inline .input { flex: 1; text-align: center; }

/* ---------- componentes base ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--txt);
  padding: 11px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #6f6588; }
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(41, 224, 255, 0.15); }
.input.code { text-transform: uppercase; letter-spacing: 4px; font-weight: 700; }

.icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }
.icon-52 { width: 54px; height: 54px; }
.icon-22 { width: 22px; height: 22px; }
.icon-16 { width: 16px; height: 16px; }
.icon-14 { width: 14px; height: 14px; }
.icon-12 { width: 12px; height: 12px; }

.brand { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 800; }
.brand-icon { color: var(--pink); display: inline-flex; }
.brand-logo { height: 21px; width: auto; display: block; }

.btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--txt);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.12s, filter 0.15s, background 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.15); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.big { padding: 13px 20px; font-size: 16px; width: 100%; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.ghost { background: transparent; }
.btn.primary {
  background: linear-gradient(90deg, var(--pink), var(--violet));
  border: none;
  box-shadow: 0 4px 24px rgba(255, 62, 200, 0.35);
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  background: rgba(10, 7, 19, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 18px; font-weight: 800; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* móvil: la barra de arriba se acomoda en varias filas, sin desplazar la pantalla */
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; padding: 10px 12px; }
  .top-actions { gap: 8px; }
  .room-chip { padding: 5px 8px; }
}
.room-chip {
  font-size: 13px; color: var(--dim);
  border: 1px dashed var(--line); border-radius: 8px; padding: 6px 10px;
}
.ver {
  font-size: 10px; font-weight: 700; color: var(--dim);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 5px; vertical-align: middle; margin-left: 4px;
}
.room-chip b { color: var(--cyan); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 2px; margin-left: 4px; }

/* ---------- layout de la sala ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  padding: 14px;
  max-width: 1440px;
  margin: 0 auto;
  position: relative; z-index: 1;
}
.player-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }

/* ---------- reproductor ---------- */
.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 0 44px rgba(255, 62, 200, 0.14), 0 0 90px rgba(41, 224, 255, 0.07);
}
/* --- pantalla completa: llena más (v13) --- */
.video-shell:fullscreen, .video-shell:-webkit-full-screen {
  border-radius: 0;
  border: none;
  aspect-ratio: auto; /* llena toda la pantalla sin forzar 16:9 */
}
/* en pantalla completa se esconde todo lo que roba espacio */
.video-shell:fullscreen .mirror-bar,
.video-shell:fullscreen .mirror-hint,
.video-shell:fullscreen .video-empty,
.video-shell:fullscreen .video-title,
.video-shell:-webkit-full-screen .mirror-bar,
.video-shell:-webkit-full-screen .mirror-hint,
.video-shell:-webkit-full-screen .video-empty,
.video-shell:-webkit-full-screen .video-title { display: none !important; }
.video-shell:fullscreen #video,
.video-shell:-webkit-full-screen #video { object-fit: contain; width: 100%; height: 100%; }
.video-shell:fullscreen #mirrorImg,
.video-shell:-webkit-full-screen #mirrorImg { object-fit: contain; }
/* modo «Llenar»: cubre 100% de la pantalla (recorta apenas los bordes) */
.video-shell.fit-cover #video,
.video-shell.fit-cover #mirrorImg,
.video-shell:fullscreen.fit-cover #video,
.video-shell:fullscreen.fit-cover #mirrorImg,
.video-shell:-webkit-full-screen.fit-cover #video,
.video-shell:-webkit-full-screen.fit-cover #mirrorImg { object-fit: cover; }
#video:fullscreen, #video:-webkit-full-screen {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
#fitToggle { position: absolute; top: 12px; right: 14px; z-index: 40; display: none; }
body.mirroring #fitToggle,
.video-shell:fullscreen #fitToggle,
.video-shell:-webkit-full-screen #fitToggle { display: inline-flex; }
.chip.amber { top: 54px; }
#video { width: 100%; height: 100%; display: block; background: #000; }
.video-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #171126 0%, #0c0817 70%);
  text-align: center;
}
.big-emoji { font-size: 54px; margin-bottom: 8px; }
.ve-title { margin: 0; font-weight: 700; font-size: 17px; }
.ve-sub { margin: 6px 0 0; color: var(--dim); font-size: 13px; }
.video-title {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 16px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-size: 14px; font-weight: 600;
  pointer-events: none;
}
.chip {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(255, 180, 84, 0.95); color: #241703;
  border: none; border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

/* ---------- controles ---------- */
.controls {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--panel-solid);
}
.ctrl-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 10px; color: var(--txt);
  font-size: 16px; padding: 8px 11px; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: inline-flex; align-items: center; justify-content: center;
}
#btnPlay .icon { width: 20px; height: 20px; }
.crown { color: #f5c14e; display: inline-flex; }
.crown .icon { width: 15px; height: 15px; }
.chip { display: inline-flex; align-items: center; gap: 8px; }
.ctrl-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
.ctrl-btn:disabled { opacity: 0.35; cursor: not-allowed; }
#btnPlay { background: linear-gradient(90deg, var(--pink), var(--violet)); border: none; font-size: 17px; padding: 8px 14px; }
.time { font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; min-width: 96px; text-align: center; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 999px; outline: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: none;
  box-shadow: 0 0 10px rgba(255, 62, 200, 0.8);
}
input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: none;
  box-shadow: 0 0 10px rgba(255, 62, 200, 0.8);
}
input[type="range"]:disabled { opacity: 0.35; cursor: not-allowed; }
.seek { flex: 1; background: linear-gradient(90deg, var(--pink), var(--violet), var(--cyan)); }
.vol { width: 80px; }

.badge {
  font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 5px 10px;
  background: rgba(255, 255, 255, 0.08); color: var(--dim);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.badge .icon { width: 12px; height: 12px; }
.badge.ok { background: rgba(56, 224, 138, 0.14); color: var(--green); }
.badge.warn { background: rgba(255, 180, 84, 0.14); color: var(--amber); }

/* ---------- selector de video ---------- */
.picker { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.picker-row { display: flex; gap: 10px; }
.picker-row .input { flex: 1; }
.samples { display: flex; flex-wrap: wrap; gap: 8px; }
.sample-btn {
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #cbb8ff;
  border-radius: 999px; padding: 7px 13px;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.sample-btn:hover { background: rgba(139, 92, 246, 0.3); }
.picker-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mode-lbl { font-size: 13px; color: var(--dim); display: flex; align-items: center; gap: 8px; cursor: pointer; }
.mode-lbl input { accent-color: var(--violet); width: 15px; height: 15px; cursor: pointer; }
#lockHint { font-size: 12px; color: var(--amber); }

/* ---------- panel lateral ---------- */
.users-card { padding: 14px 16px; }
.users-card h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); }
.count {
  background: rgba(41, 224, 255, 0.15); color: var(--cyan);
  border-radius: 999px; padding: 2px 9px; font-size: 12px; margin-left: 4px;
}
.user-list { list-style: none; margin: 0; padding: 0; }
.user-list li { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14.5px; }
.avatar {
  --h: 280;
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #0a0713;
  background: linear-gradient(135deg, hsl(var(--h), 90%, 62%), hsl(calc(var(--h) + 60), 90%, 52%));
  flex-shrink: 0;
}
.uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crown { font-size: 14px; }

.chat-card { flex: 1; display: flex; flex-direction: column; min-height: 300px; padding: 14px; }
.chat-log { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.chat-log::-webkit-scrollbar, .chat-log *::-webkit-scrollbar { width: 8px; }
.chat-log::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 99px; }
.msg {
  font-size: 14px; line-height: 1.45;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px; padding: 7px 11px;
  overflow-wrap: anywhere;
}
.msg.mine { background: rgba(139, 92, 246, 0.14); }
.msg.system { background: none; color: var(--dim); font-size: 12px; font-style: italic; text-align: center; padding: 2px; }
.cname { color: hsl(var(--h, 280), 85%, 72%); margin-right: 2px; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form .input { flex: 1; }

/* ---------- modo espejo (navegador remoto) ---------- */
.mirror-layer {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  background: #0c0817;
  outline: none;
}
#mirrorImg {
  flex: 1; min-height: 0; width: 100%;
  object-fit: contain;
  background: #000;
  cursor: crosshair;
  user-select: none; -webkit-user-drag: none;
}
.mirror-layer.locked #mirrorImg { cursor: not-allowed; }
.mirror-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: rgba(10, 7, 19, 0.92);
  border-top: 1px solid var(--line);
}
.mirror-bar .input { flex: 1; padding: 8px 12px; font-size: 13px; }
.mirror-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
  animation: pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse { 50% { opacity: 0.4; } }
.mirror-loading {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center;
  background: #0c0817;
  color: var(--txt); font-size: 15px; line-height: 1.5;
}
.mirror-loading small { color: var(--dim); font-size: 12px; }
.spinner {
  width: 38px; height: 38px;
  border: 3px solid rgba(255, 62, 200, 0.2);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* ---------- indicador "en vivo": punto verde con pulso suave ---------- */
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  animation: livePulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 224, 138, 0.5); transform: scale(1); opacity: 1; }
  50%      { box-shadow: 0 0 0 6px rgba(56, 224, 138, 0); transform: scale(1.15); opacity: 0.8; }
}
.conn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 6px 11px;
  white-space: nowrap;
}
.conn.ok { background: rgba(56, 224, 138, 0.1); color: var(--green); }
.conn.bad { background: rgba(255, 90, 90, 0.12); color: #ff6b6b; }
.conn.bad .live-dot { background: #ff5a5a; animation-duration: 1.1s; }
.mirror-hint {
  position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%);
  background: rgba(10, 7, 19, 0.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px; color: var(--dim);
  pointer-events: none; white-space: nowrap;
  transition: opacity 0.3s;
}
.mirror-layer:focus .mirror-hint { opacity: 0; }
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--dim); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 1px;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--line);
}

/* ---------- toasts ---------- */
.toasts {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 100; pointer-events: none; width: min(92vw, 560px);
}
.toast {
  background: rgba(24, 16, 40, 0.95);
  border: 1px solid var(--line);
  border-left: 3px solid var(--pink);
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: pop 0.25s ease;
  max-width: 100%;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .chat-card { min-height: 260px; }
  .controls { flex-wrap: wrap; }
  .time { min-width: 80px; }
  .vol { width: 60px; }
}

.carita-big { height: 76px; width: auto; display: block; }
.logo-letras { height: 48px; width: auto; display: block; }
.landing-title { display: flex; justify-content: center; }

/* ---------- v18: pantalla completa simulada (iPhones no la soportan en divs) ---------- */
.video-shell.pseudo-fs {
  position: fixed; inset: 0; z-index: 2000;
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; aspect-ratio: auto;
  border-radius: 0; border: none;
}
.video-shell.pseudo-fs .video-empty,
.video-shell.pseudo-fs .video-title { display: none !important; }
.video-shell.pseudo-fs #mirrorImg { object-fit: contain; }
.video-shell.pseudo-fs #video { object-fit: contain; }
.video-shell.pseudo-fs.fit-cover #video,
.video-shell.pseudo-fs.fit-cover #mirrorImg { object-fit: cover; }
.video-shell.pseudo-fs #fitToggle { display: inline-flex; }
body.fs-lock { overflow: hidden; }
/* la barra superior crea su propio contexto de apilamiento y quedaría ENCIMA
 * del reproductor a pantalla completa simulada (robándose los toques): fuera */
body.fs-lock .topbar { display: none; }
#fsExit {
  position: absolute; top: 12px; left: 14px; z-index: 41;
  display: none; padding: 8px 10px;
}
.video-shell:fullscreen #fsExit,
.video-shell:-webkit-full-screen #fsExit,
.video-shell.pseudo-fs #fsExit { display: inline-flex; }

/* ---------- v18: opciones escondidas mientras hay video o espejo activo ---------- */
body.playing .picker .picker-row:not(.stop-row),
body.playing .picker .samples,
body.playing .picker .divider { display: none; }
body.mirroring .picker { display: none; }
.stop-row { justify-content: space-between; align-items: center; }
.stop-lbl {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--dim); font-size: 13px;
}
.stop-lbl .icon { color: var(--pink); }
.btn.danger {
  border-color: rgba(255, 82, 99, 0.5);
  color: #ff9aa5;
}
.btn.danger:hover { border-color: rgba(255, 82, 99, 0.85); background: rgba(255, 82, 99, 0.12); }

/* ---------- v18: móvil — código de sala grande y sin zoom raro de iOS ---------- */
@media (max-width: 700px) {
  .layout { padding: 8px; gap: 10px; }
  /* iOS hace zoom automático al enfocar inputs con fuente < 16px */
  .input { font-size: 16px; }
  .mirror-bar .input { font-size: 16px; }
  .join-inline .input.code {
    font-size: 24px;
    letter-spacing: 6px;
    padding: 14px 16px;
  }
  .join-inline .btn { flex: 0 0 auto; }
}

/* ---------- v19: fila "unirme" — el botón .big ya no aplasta el input ---------- */
.join-inline .btn { width: auto; flex: 0 0 auto; }

/* v19: pantalla completa simulada llena DE VERDAD — sin barra ni pista del espejo */
.video-shell.pseudo-fs .mirror-bar,
.video-shell.pseudo-fs .mirror-hint { display: none !important; }
#fitToggle, #fsExit { z-index: 60; }

/* v19: en móvil la barra del espejo (URL/Ir/Detener) no roba espacio al reproductor;
 * detener el espejo se hace desde las opciones (#mirrorStopRow) */
#mirrorStopRow { display: none; }

@media (max-width: 700px) {
  /* unirme: input grande arriba, botón normal abajo (ya no conviven en una fila) */
  .join-inline { flex-direction: column; }
  .landing-card { padding: 26px 20px; }
  h1 { font-size: 32px; }

  .mirror-bar, .mirror-hint { display: none !important; }

  /* mientras espeja: las opciones muestran solo la fila de detener el espejo */
  body.mirroring .picker { display: block; }
  body.mirroring .picker .picker-row,
  body.mirroring .picker .samples,
  body.mirroring .picker .divider,
  body.mirroring .picker .picker-foot { display: none; }
  body.mirroring .picker #mirrorStopRow { display: flex; }
}

/* ---------- v20: el reproductor jamás mide más que la ventana ----------
 * en horizontal, el 16:9 a todo ancho (448px) no cabía en la pantalla (~330px)
 * y rompía el layout; ahora se encoge hasta caber */
.video-shell { max-height: calc(100vh - 132px); max-height: calc(100dvh - 132px); }
.video-shell:fullscreen, .video-shell:-webkit-full-screen,
.video-shell.pseudo-fs { max-height: none; }

/* v20: en horizontal los botones no caen bajo la muesca/notch del iPhone */
#fitToggle { right: calc(14px + env(safe-area-inset-right, 0px)); }
#fsExit { left: calc(14px + env(safe-area-inset-left, 0px)); }

/* ---------- v21: círculos decorativos fuera de TODA pantalla de celular ----------
 * antes solo se ocultaban con ancho ≤700px, pero el celular en HORIZONTAL mide
 * ~812px de ancho → los círculos se colaban por los lados como bandas feas */
html { background: #0a0713; } /* borde a borde en la app instalada (viewport-fit=cover) */
@media (max-width: 950px), (max-height: 520px) {
  .blob { display: none !important; }
}

/* ---------- v23: contenido FUERA de la barra de estado/muesca (iOS) ----------
 * con viewport-fit=cover la página se pinta debajo del reloj/notch y la barra
 * de la sala quedaba arriba del todo, traslapada con la hora/batería.
 * Se empuja el contenido normal bajo el área segura; a pantalla completa el
 * video sigue cubriendo de borde a borde (position:fixed ignora este padding). */
body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* botones flotantes: también bajan para no caer bajo la muesca (arriba) */
.video-shell.pseudo-fs #fitToggle,
.video-shell:fullscreen #fitToggle,
.video-shell:-webkit-full-screen #fitToggle { top: calc(12px + env(safe-area-inset-top, 0px)); }
.video-shell.pseudo-fs #fsExit,
.video-shell:fullscreen #fsExit,
.video-shell:-webkit-full-screen #fsExit { top: calc(12px + env(safe-area-inset-top, 0px)); }
/* toasts: no chocar con la barrita de inicio (gesture bar) */
.toasts { bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
