/* estilos.css — Hache Music v3 (rediseño oct-2026). Colores de Hache X, oscuro y sobrio. */
:root {
  --bg: #07070f; --bg-2: #0b0b16; --superficie: #10101d; --tarjeta: #15152a; --tarjeta-2: #1c1c36;
  --borde: rgba(255, 255, 255, 0.07); --borde-2: rgba(255, 255, 255, 0.13);
  --texto: #fff; --texto-2: rgba(255, 255, 255, 0.66); --texto-3: rgba(255, 255, 255, 0.42);
  /* --rosa = acento principal y --morado = segundo acento (los nombres son del tema Hache X; cada tema los cambia) */
  --rosa: #ff2d78; --morado: #9b00ff; --cian: #00e5ff; --verde: #3ddc84;
  --a1-rgb: 255, 45, 120; --a2-rgb: 155, 0, 255; --bg-rgb: 7, 7, 15;
  --grad: linear-gradient(135deg, #ff2d78, #9b00ff);
  --grad-suave: linear-gradient(135deg, rgba(255, 45, 120, 0.18), rgba(155, 0, 255, 0.18));
  --sobre-acento: #fff; /* el texto encima del degradado */
  --vidrio: rgba(10, 10, 20, 0.86); --vidrio-2: rgba(28, 28, 54, 0.94); --toast: #24244a;
  --trazo: 1.9;
  --r: 14px; --r-g: 20px;
  --alto-pestanas: 62px; --alto-mini: 62px;
  --abajo: env(safe-area-inset-bottom, 0px); --arriba: env(safe-area-inset-top, 0px);
  --ancho: 640px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(90% 50% at 50% -10%, rgba(var(--a2-rgb), 0.16), transparent 70%), var(--bg);
  color: var(--texto); font: 15px/1.45 Inter, "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: var(--trazo); stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic .r { fill: currentColor; stroke: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }

/* ---------- botones ---------- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; background: var(--grad); color: var(--sobre-acento); font-weight: 700; box-shadow: 0 8px 24px rgba(var(--a1-rgb), 0.25); }
.boton:active { transform: scale(0.98); }
.boton-grande { height: 52px; width: 100%; font-size: 16px; }
.boton-sec { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--tarjeta-2); border: 1px solid var(--borde-2); font-weight: 600; font-size: 14px; }
.boton-texto { color: var(--texto-3); font-size: 14px; padding: 10px; }
.boton-icono { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--texto-2); position: relative; }
.boton-icono:hover { color: var(--texto); background: rgba(255, 255, 255, 0.05); }
.boton-icono.activo { color: var(--rosa); }
.boton-icono.grande .ic { width: 30px; height: 30px; }
.enlace { color: var(--cian); font-size: 13px; font-weight: 600; }

/* ---------- entrada ---------- */
.acceso { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(80% 55% at 50% 0%, rgba(var(--a2-rgb), 0.3), transparent 70%), var(--bg); }
.acceso-caja { width: 100%; max-width: 340px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.logo-hx { width: 72px; height: 72px; border-radius: 22px; background: var(--grad); display: grid; place-items: center; font-weight: 900; font-size: 24px; letter-spacing: 0.04em; color: var(--sobre-acento); box-shadow: 0 14px 40px rgba(var(--a1-rgb), 0.35); position: relative; overflow: hidden; }
.logo-hx.chico { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; box-shadow: none; }
.marca { font-size: 30px; font-weight: 900; }
.acceso-sub { color: var(--texto-2); margin: 0 0 14px; }
.acceso-msg { color: var(--texto-2); background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r); padding: 14px 16px; margin: 4px 0 0; line-height: 1.55; }

/* ---------- estructura ---------- */
.app { max-width: var(--ancho); margin: 0 auto; min-height: 100dvh; }
.cabeza { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--arriba) + 10px) 18px 10px; background: linear-gradient(var(--bg) 60%, rgba(var(--bg-rgb), 0)); }
.marca-chica { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800; font-size: 14px; overflow: hidden; flex-shrink: 0; color: var(--sobre-acento); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.chico { width: 38px; height: 38px; }
.avatar.mediano { width: 46px; height: 46px; font-size: 16px; }
.avatar.grande { width: 96px; height: 96px; font-size: 32px; }
.vistas { padding: 4px 16px calc(var(--alto-pestanas) + var(--alto-mini) + var(--abajo) + 28px); }
.vista { animation: aparecer 0.22s ease; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.saludo { font-size: 26px; font-weight: 800; margin: 6px 2px 14px; }
.buscador-falso { width: 100%; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: var(--r); background: var(--tarjeta); border: 1px solid var(--borde); color: var(--texto-3); margin-bottom: 22px; }
.bloque { margin: 0 0 26px; }
.bloque-cabeza { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bloque-titulo { font-size: 18px; font-weight: 800; margin: 0 2px 12px; }

.bloque-sub { color: var(--texto-3); font-size: 13px; margin: -8px 2px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* "Lo más popular": se desliza solo hacia la izquierda cada 2 s (pedido de Hache) */
.carrusel-pop { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.carrusel-pop::-webkit-scrollbar { display: none; }
.pop { position: relative; flex: 0 0 84%; max-width: 420px; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; scroll-snap-align: start; text-align: left; background: var(--tarjeta-2); }
.pop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(var(--bg-rgb), 0.92)); }
.pop-texto { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; display: flex; flex-direction: column; }
.pop-texto b { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-texto span { font-size: 13px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-num { position: absolute; top: 10px; left: 10px; z-index: 1; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--grad); color: var(--sobre-acento); font-weight: 900; font-size: 13px; display: grid; place-items: center; }

/* carrusel horizontal (Seguir escuchando, En línea) */
.carrusel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.carrusel::-webkit-scrollbar { display: none; }
.tarjeta-c { flex: 0 0 136px; scroll-snap-align: start; text-align: left; }
.tarjeta-c .tapa { width: 136px; height: 136px; border-radius: var(--r); }
.tarjeta-c b { display: block; margin-top: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tarjeta-c span { display: block; color: var(--texto-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* portadas (miniaturas de YouTube recortadas en cuadro) */
.tapa { position: relative; display: block; background: var(--tarjeta-2) center / cover no-repeat; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.tapa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tapa-nueva { display: grid; place-items: center; background: var(--grad-suave); color: var(--rosa); border: 1px dashed rgba(var(--a1-rgb), 0.4); }
.tapa-lista { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.tapa-lista img { width: 100%; height: 100%; object-fit: cover; }
.tapa-lista.una { display: block; }
.tapa-vacia { display: grid; place-items: center; background: var(--grad-suave); color: var(--texto-2); }

/* filas de canciones */
.filas { display: flex; flex-direction: column; }
.fila { display: flex; align-items: center; gap: 12px; padding: 7px 0; width: 100%; text-align: left; border-radius: 10px; min-width: 0; }
.fila .tapa { width: 50px; height: 50px; }
.fila-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fila-texto b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-texto span { color: var(--texto-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila.sonando .fila-texto b { color: var(--rosa); }
.fila .boton-icono { width: 38px; height: 38px; }
.fila .boton-icono .ic { width: 20px; height: 20px; }
.fila-nueva { padding: 8px 0 14px; }
.fila-num { width: 22px; color: var(--texto-3); font-size: 13px; text-align: center; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.indicador-sonando { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(var(--bg-rgb), 0.55); color: var(--rosa); }
.globito { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rosa); color: var(--sobre-acento); font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; }
.punto-verde { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--verde); border: 2px solid var(--bg); }
.con-punto { position: relative; display: inline-block; }

.rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tarjeta-l { text-align: left; min-width: 0; }
.tarjeta-l .tapa { width: 100%; aspect-ratio: 1; border-radius: var(--r); }
.tarjeta-l b { display: block; margin-top: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tarjeta-l span { color: var(--texto-3); font-size: 12.5px; }

.vacio-grande { text-align: center; padding: 30px 16px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-g); }
.vacio-grande h2 { font-size: 19px; margin: 14px 0 6px; }
.vacio-grande p { color: var(--texto-2); margin: 0 0 18px; }
.vacio-icono { width: 64px; height: 64px; margin: 0 auto; border-radius: 20px; background: var(--grad-suave); display: grid; place-items: center; color: var(--rosa); }
.vacio-icono .ic { width: 30px; height: 30px; }
.vacio { color: var(--texto-3); text-align: center; padding: 26px 10px; font-size: 14px; }

/* ---------- buscar ---------- */
.buscador { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 6px 0 16px; border-radius: var(--r); background: var(--tarjeta); border: 1px solid var(--borde-2); margin-bottom: 6px; position: sticky; top: calc(var(--arriba) + 58px); z-index: 10; }
.buscador:focus-within { border-color: rgba(var(--a1-rgb), 0.5); }
.buscador .ic { color: var(--texto-3); }
.buscador input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; height: 100%; }
.buscador input::-webkit-search-cancel-button { display: none; }
.boton-buscar { height: 38px; padding: 0 16px; border-radius: 10px; background: var(--grad); color: var(--sobre-acento); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.boton-buscar:active { transform: scale(0.97); }
.aviso-caja small { display: block; margin-top: 8px; color: var(--texto-3); font-size: 12px; }
.nota-cuota { color: var(--texto-3); font-size: 12.5px; margin: 0 4px 16px; min-height: 1em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--tarjeta); border: 1px solid var(--borde-2); font-size: 13.5px; color: var(--texto-2); }
.cargando { display: flex; flex-direction: column; gap: 10px; }
.esqueleto { height: 50px; border-radius: 10px; background: linear-gradient(90deg, var(--tarjeta) 30%, var(--tarjeta-2) 50%, var(--tarjeta) 70%); background-size: 300% 100%; animation: brillo 1.2s infinite linear; }
@keyframes brillo { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.aviso-caja { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r); padding: 16px; color: var(--texto-2); text-align: center; line-height: 1.55; }

/* ---------- biblioteca ---------- */
.segmentos { display: flex; gap: 6px; padding: 4px; background: var(--tarjeta); border-radius: 999px; margin-bottom: 18px; border: 1px solid var(--borde); }
.segmentos button { flex: 1; height: 38px; border-radius: 999px; color: var(--texto-2); font-weight: 600; font-size: 14px; }
.segmentos button.activo { background: var(--tarjeta-2); color: var(--texto); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.lista-cabeza { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.lista-cabeza .tapa { width: 92px; height: 92px; border-radius: var(--r); }
.lista-cabeza h2 { font-size: 22px; font-weight: 800; }
.lista-cabeza p { margin: 2px 0 10px; color: var(--texto-3); font-size: 13px; }
.lista-cabeza .acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.lista-cabeza .boton { height: 40px; padding: 0 18px; font-size: 14px; }
.lista-info { flex: 1; min-width: 0; }
.lista-info h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.volver { display: inline-flex; align-items: center; gap: 4px; color: var(--texto-2); font-weight: 600; margin: 0 0 12px -8px; padding: 6px 8px; }
.volver .ic { width: 20px; height: 20px; }

/* ---------- pestañas y mini ---------- */
.pestanas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-width: var(--ancho); margin: 0 auto; height: calc(var(--alto-pestanas) + var(--abajo)); padding-bottom: var(--abajo); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--vidrio); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--borde); }
.pestanas button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--texto-3); font-size: 11px; font-weight: 600; position: relative; }
.pestanas button.activo { color: var(--texto); }
.pestanas button.activo .ic { color: var(--rosa); }
.globo { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--rosa); color: var(--sobre-acento); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.mini { position: fixed; z-index: 31; left: 0; right: 0; max-width: calc(var(--ancho) - 16px); margin: 0 auto; bottom: calc(var(--alto-pestanas) + var(--abajo) + 8px); width: calc(100% - 16px); height: var(--alto-mini); display: flex; align-items: center; gap: 10px; padding: 0 6px 0 4px; border-radius: 16px; background: var(--vidrio-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--borde-2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); overflow: hidden; }
.mini-progreso { position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; overflow: hidden; }
.mini-progreso i { display: block; height: 100%; width: 0; background: var(--grad); }
.mini-video { width: 96px; height: 54px; border-radius: 10px; background: #000; flex-shrink: 0; }
.mini-info { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; height: 100%; justify-content: center; }
.mini-info b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-info span { font-size: 12.5px; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .boton-icono { color: var(--texto); }

/* ---------- reproductor grande ---------- */
.reproductor { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; padding: calc(var(--arriba) + 6px) 0 calc(var(--abajo) + 10px); background: radial-gradient(90% 55% at 50% 0%, rgba(var(--a2-rgb), 0.32), transparent 70%), linear-gradient(var(--bg-2), var(--bg)); transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); visibility: hidden; }
.reproductor.abierto { transform: none; visibility: visible; }
.r-cabeza { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; max-width: var(--ancho); width: 100%; margin: 0 auto; }
.r-eti { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--texto-3); }
/* Logo de Hache X junto a "Reproduciendo" (pedido de Hache, 10-oct-2026): el mismo del tema, en chiquito.
   (Ojo: NO llamarlo "mini": esa clase es la barra del reproductor de abajo, con position: fixed.) */
.logo-hx.diminuto { width: 24px; height: 24px; border-radius: 7px; font-size: 9.5px; letter-spacing: 0.04em; box-shadow: 0 0 12px rgba(var(--a1-rgb), 0.35); }
.r-cuerpo { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; max-width: var(--ancho); width: 100%; margin: 0 auto; overflow-y: auto; overscroll-behavior: contain; }
.r-sub { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-3); margin: 6px 0 4px; }
/* El video a todo el ancho, arriba (pedido de Hache: "el recuadro del video arriba, más completo"). */
.r-video { width: 100%; max-width: var(--ancho); margin: 8px auto 0; aspect-ratio: 16 / 9; background: #000; flex-shrink: 0; }
@media (min-width: 700px) { .r-video { border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); } }
.r-info { display: flex; align-items: center; gap: 12px; }
.r-textos { flex: 1; min-width: 0; }
.r-textos h2 { font-size: 22px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-textos p { margin: 3px 0 0; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-fav.activo { color: var(--rosa); }
.r-fav.activo .ic { fill: var(--rosa); }
.r-progreso input { width: 100%; -webkit-appearance: none; appearance: none; height: 22px; background: transparent; margin: 0; cursor: pointer; }
.r-progreso input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--rosa), var(--morado)) 0 / var(--p, 0%) 100% no-repeat, rgba(255, 255, 255, 0.14); }
.r-progreso input::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); }
.r-progreso input::-moz-range-progress { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--rosa), var(--morado)); }
.r-progreso input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.r-progreso input::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.r-tiempos { display: flex; justify-content: space-between; font-size: 12px; color: var(--texto-3); font-variant-numeric: tabular-nums; margin-top: 2px; }
.r-controles { display: flex; align-items: center; justify-content: space-between; }
.boton-play { width: 72px; height: 72px; border-radius: 50%; background: #fff; color: #0b0b16; display: grid; place-items: center; box-shadow: 0 12px 34px rgba(255, 255, 255, 0.16); }
.boton-play .ic { width: 30px; height: 30px; }
.boton-play:active { transform: scale(0.96); }
.repetir-1 { position: absolute; top: 6px; right: 5px; font-size: 9px; font-weight: 900; background: var(--rosa); color: #fff; border-radius: 6px; padding: 0 3px; line-height: 13px; }
.r-acciones { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.r-acciones button { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--texto-2); font-size: 13px; font-weight: 600; }
.r-acciones .ic { width: 18px; height: 18px; }
.r-sigue { text-align: center; color: var(--texto-3); font-size: 12.5px; margin: 0; min-height: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* el video: siempre el mismo, colocado encima del hueco que toque */
.video-caja { position: fixed; top: 0; left: 0; width: 96px; height: 54px; z-index: 32; border-radius: 10px; overflow: hidden; background: #000 center / cover no-repeat; transform-origin: 0 0; pointer-events: none; }
/* Pequeño, el video no recibe toques (tocarlo abre el reproductor); grande, se usan los controles de YouTube. */
.video-caja.grande { z-index: 41; border-radius: 0; pointer-events: auto; }
@media (min-width: 700px) { .video-caja.grande { border-radius: 18px; } }
.mini-video { border: 0; padding: 0; cursor: pointer; }
.video-caja.escondido { opacity: 0; pointer-events: none; }
.video-caja #ytPlayer, .video-caja iframe { width: 100%; height: 100%; display: block; border: 0; }
.video-caja:fullscreen { border-radius: 0; }

/* ---------- hojas ---------- */
.velo { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fundir 0.2s ease; }
@keyframes fundir { from { opacity: 0; } }
.hoja { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-width: var(--ancho); margin: 0 auto; max-height: 86dvh; display: flex; flex-direction: column; background: var(--tarjeta); border-radius: 24px 24px 0 0; border: 1px solid var(--borde-2); border-bottom: 0; padding-bottom: var(--abajo); animation: subir 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes subir { from { transform: translateY(100%); } }
.hoja-asa { width: 40px; height: 4px; border-radius: 2px; background: var(--borde-2); margin: 10px auto 4px; flex-shrink: 0; }
.hoja-cuerpo { overflow-y: auto; padding: 6px 18px 18px; }
.hoja-titulo { font-size: 18px; font-weight: 800; margin: 6px 0 14px; }
.hoja-cancion { display: flex; align-items: center; gap: 12px; padding: 4px 0 14px; border-bottom: 1px solid var(--borde); margin-bottom: 6px; }
.hoja-cancion .tapa { width: 54px; height: 54px; }
.opcion { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 4px; text-align: left; border-radius: 10px; font-size: 15px; }
.opcion:hover { background: rgba(255, 255, 255, 0.04); }
.opcion .ic { color: var(--texto-2); }
.opcion.peligro, .opcion.peligro .ic { color: #ff6b8a; }
.opcion.activo .ic { color: var(--rosa); fill: var(--rosa); }
.campo { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--borde-2); background: var(--superficie); padding: 0 14px; font-size: 16px; outline: none; margin-bottom: 14px; }
.campo:focus { border-color: rgba(var(--a1-rgb), 0.55); }
.hoja-botones { display: flex; gap: 10px; justify-content: flex-end; }
.perfil-arriba { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 16px; }
.perfil-arriba .boton-texto { color: var(--cian); padding: 4px; }
.nota { color: var(--texto-3); font-size: 13px; line-height: 1.55; margin: 0 0 12px; }
.seccion-hoja { border-top: 1px solid var(--borde); padding-top: 14px; margin-top: 6px; }
.seccion-hoja h3 { font-size: 14px; margin-bottom: 6px; }

/* ---------- conversación ---------- */
.conversacion { position: fixed; inset: 0; z-index: 58; display: flex; flex-direction: column; background: var(--bg); max-width: var(--ancho); margin: 0 auto; }
.cv-cabeza { display: flex; align-items: center; gap: 10px; padding: calc(var(--arriba) + 8px) 10px 10px 4px; border-bottom: 1px solid var(--borde); }
.cv-quien { display: flex; flex-direction: column; min-width: 0; }
.cv-quien b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-quien span { font-size: 12px; color: var(--texto-3); }
.cv-quien span.en-linea { color: var(--verde); }
.cv-mensajes { flex: 1; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 6px; }
.burbuja { max-width: 78%; padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.4; background: var(--tarjeta-2); align-self: flex-start; word-wrap: break-word; white-space: pre-wrap; }
.burbuja.mia { align-self: flex-end; background: var(--grad); color: var(--sobre-acento); }
.burbuja .hora { display: block; font-size: 10.5px; opacity: 0.6; margin-top: 3px; text-align: right; }
.burbuja { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* 🩹 (9-oct-2026) Fotos en tamaño normal hasta que la abran (antes ocupaban media pantalla). */
.burbuja.foto { padding: 4px; }
.burbuja.foto img { display: block; width: 180px; height: 180px; max-width: 100%; object-fit: cover; border-radius: 14px; cursor: zoom-in; background: rgba(255, 255, 255, 0.06); }
.burbuja.audio { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.audio-play { width: 36px; height: 36px; border-radius: 50%; background: rgba(128, 128, 128, 0.28); display: grid; place-items: center; flex-shrink: 0; }
.audio-play .ic { width: 18px; height: 18px; }
.audio-barra { flex: 1; height: 4px; border-radius: 2px; background: rgba(128, 128, 128, 0.35); overflow: hidden; }
.audio-barra i { display: block; height: 100%; width: 0; background: currentColor; }
.audio-dur { font-size: 12px; opacity: 0.8; font-variant-numeric: tabular-nums; }
.burbuja.archivo { display: flex; align-items: center; gap: 10px; cursor: pointer; max-width: 260px; }
.burbuja.archivo .ic { width: 26px; height: 26px; flex-shrink: 0; }
.archivo-texto { min-width: 0; display: flex; flex-direction: column; }
.archivo-texto b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archivo-texto span { font-size: 12px; opacity: 0.75; }
.cv-grabando { display: flex; align-items: center; gap: 10px; padding: 8px 8px calc(var(--abajo) + 8px); border-top: 1px solid var(--borde); }
.cv-grabando b { font-variant-numeric: tabular-nums; }
.cv-grabando-txt { flex: 1; color: var(--texto-3); font-size: 13px; }
.punto-rojo { width: 10px; height: 10px; border-radius: 50%; background: #ff3b5c; animation: latido 1s infinite; }
@keyframes latido { 50% { opacity: 0.25; } }
.cv-quien span.escribiendo { color: var(--cian); }
.burbuja.cancion { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 8px; }
.burbuja.cancion .tapa { width: 46px; height: 46px; }
.burbuja.cancion .fila-texto b { font-size: 14px; }
.burbuja.cancion .fila-texto span { color: inherit; opacity: 0.75; }
.cv-dia { align-self: center; font-size: 11.5px; color: var(--texto-3); padding: 8px 0 4px; }
.cv-escribir { display: flex; align-items: center; gap: 4px; padding: 8px 8px calc(var(--abajo) + 8px); border-top: 1px solid var(--borde); }
.cv-escribir input { flex: 1; min-width: 0; height: 44px; border-radius: 22px; border: 1px solid var(--borde-2); background: var(--tarjeta); padding: 0 16px; font-size: 16px; outline: none; }
.boton-enviar { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: var(--sobre-acento); flex-shrink: 0; }
.boton-enviar .ic { width: 20px; height: 20px; }
.visor { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.94); display: grid; place-items: center; cursor: zoom-out; }
.visor img { max-width: 96vw; max-height: 90vh; border-radius: 10px; }

/* ---------- aviso flotante ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--alto-pestanas) + var(--alto-mini) + var(--abajo) + 22px); z-index: 95; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; max-width: calc(100% - 40px); padding: 11px 16px; border-radius: 12px; background: var(--toast); border: 1px solid var(--borde-2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-size: 14px; transition: opacity 0.2s, transform 0.2s; }
.toast.ver { opacity: 1; transform: translate(-50%, 0); }

/* ---------- pantallas anchas ---------- */
@media (min-width: 700px) {
  .vistas { padding-left: 22px; padding-right: 22px; }
  .rejilla { grid-template-columns: repeat(3, 1fr); }
  .r-cuerpo { gap: 26px; }
}
@media (max-height: 640px) {
  .r-cuerpo { gap: 14px; }
  .boton-play { width: 62px; height: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ═══════════════ TEMAS (pedido de Hache, 9-oct-2026: "variedad de temas, Hache X
   predeterminado, algunos con animaciones e íconos") ═══════════════
   Cada tema solo cambia variables; las animaciones van en .fondo (detrás de todo,
   solo transform/opacity: no cargan el celular) y en detalles chicos (logo, botones). */
[data-tema="neon"] {
  --bg: #030308; --bg-2: #06060f; --superficie: #0a0a16; --tarjeta: #0d0d1c; --tarjeta-2: #14142a;
  --borde: rgba(0, 225, 255, 0.1); --borde-2: rgba(0, 225, 255, 0.22);
  --rosa: #ff2bd6; --morado: #00e1ff; --cian: #39ff14;
  --a1-rgb: 255, 43, 214; --a2-rgb: 0, 225, 255; --bg-rgb: 3, 3, 8;
  --grad: linear-gradient(135deg, #e010c0, #0090e0);
  --grad-suave: linear-gradient(135deg, rgba(255, 43, 214, 0.16), rgba(0, 225, 255, 0.16));
  --vidrio: rgba(4, 4, 12, 0.84); --vidrio-2: rgba(14, 14, 32, 0.94); --toast: #12122e;
}
[data-tema="aurora"] {
  --bg: #050b12; --bg-2: #07111a; --superficie: #0a1520; --tarjeta: #0e1b27; --tarjeta-2: #142636;
  --borde: rgba(120, 255, 220, 0.08); --borde-2: rgba(120, 255, 220, 0.16);
  --rosa: #2ef2b0; --morado: #7b5cff; --cian: #5ce1ff;
  --a1-rgb: 46, 242, 176; --a2-rgb: 123, 92, 255; --bg-rgb: 5, 11, 18;
  --grad: linear-gradient(135deg, #1fd1a0, #6a7bff);
  --grad-suave: linear-gradient(135deg, rgba(46, 242, 176, 0.15), rgba(123, 92, 255, 0.17));
  --sobre-acento: #04121a;
  --vidrio: rgba(6, 14, 22, 0.86); --vidrio-2: rgba(16, 32, 46, 0.94); --toast: #12263a;
}
[data-tema="atardecer"] {
  --bg: #120806; --bg-2: #180b07; --superficie: #1c0f0a; --tarjeta: #241510; --tarjeta-2: #301d15;
  --borde: rgba(255, 180, 120, 0.09); --borde-2: rgba(255, 180, 120, 0.17);
  --texto-2: rgba(255, 240, 230, 0.7); --texto-3: rgba(255, 230, 215, 0.45);
  --rosa: #ff8a3d; --morado: #ff3d6e; --cian: #ffc857;
  --a1-rgb: 255, 138, 61; --a2-rgb: 255, 61, 110; --bg-rgb: 18, 8, 6;
  --grad: linear-gradient(135deg, #ffb347, #ff5e62);
  --grad-suave: linear-gradient(135deg, rgba(255, 179, 71, 0.16), rgba(255, 94, 98, 0.16));
  --sobre-acento: #2a0c04;
  --vidrio: rgba(22, 10, 7, 0.86); --vidrio-2: rgba(44, 24, 18, 0.94); --toast: #3a2016;
}
[data-tema="oro"] {
  --bg: #0a0a0a; --bg-2: #0f0e0c; --superficie: #12110e; --tarjeta: #171511; --tarjeta-2: #211e18;
  --borde: rgba(233, 196, 106, 0.09); --borde-2: rgba(233, 196, 106, 0.18);
  --texto-2: rgba(255, 248, 230, 0.68); --texto-3: rgba(255, 244, 220, 0.42);
  --rosa: #e9c46a; --morado: #b8862b; --cian: #f4dea0;
  --a1-rgb: 233, 196, 106; --a2-rgb: 184, 134, 43; --bg-rgb: 10, 10, 10;
  --grad: linear-gradient(135deg, #f7e3a3, #d4a24c 55%, #a8761f);
  --grad-suave: linear-gradient(135deg, rgba(247, 227, 163, 0.12), rgba(168, 118, 31, 0.16));
  --sobre-acento: #1a1206;
  --vidrio: rgba(12, 11, 9, 0.88); --vidrio-2: rgba(32, 29, 23, 0.95); --toast: #2a251c;
  --trazo: 1.6;
}

/* ---------- fondo animado ---------- */
.fondo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fondo i { position: absolute; border-radius: 50%; will-change: transform; }
/* Hache X: dos brillos que se mueven despacio */
.fondo i:nth-child(1) { width: 90vmax; height: 90vmax; left: -30vmax; top: -45vmax; background: radial-gradient(circle, rgba(var(--a2-rgb), 0.2), transparent 62%); animation: deriva1 26s ease-in-out infinite alternate; }
.fondo i:nth-child(2) { width: 70vmax; height: 70vmax; right: -30vmax; top: -20vmax; background: radial-gradient(circle, rgba(var(--a1-rgb), 0.13), transparent 62%); animation: deriva2 32s ease-in-out infinite alternate; }
.fondo i:nth-child(3) { display: none; }
@keyframes deriva1 { to { transform: translate(18vmax, 10vmax) scale(1.12); } }
@keyframes deriva2 { to { transform: translate(-16vmax, 14vmax) scale(0.9); } }
@keyframes latir { 50% { opacity: 0.4; } }
/* Neón: luces que laten y una rejilla que avanza */
[data-tema="neon"] .fondo i:nth-child(1) { animation: deriva1 26s ease-in-out infinite alternate, latir 3.2s ease-in-out infinite; }
[data-tema="neon"] .fondo i:nth-child(2) { background: radial-gradient(circle, rgba(var(--a1-rgb), 0.2), transparent 62%); animation: deriva2 30s ease-in-out infinite alternate, latir 4.1s ease-in-out infinite; }
[data-tema="neon"] .fondo i:nth-child(3) {
  display: block; border-radius: 0; left: -50%; right: -50%; width: auto; bottom: -6vh; height: 46vh;
  background-image: linear-gradient(rgba(0, 225, 255, 0.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 43, 214, 0.16) 1px, transparent 1px);
  background-size: 44px 44px; transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(transparent, #000 75%); mask-image: linear-gradient(transparent, #000 75%);
  animation: rejilla 2.6s linear infinite;
}
@keyframes rejilla { from { transform: perspective(260px) rotateX(62deg) translateY(0); } to { transform: perspective(260px) rotateX(62deg) translateY(44px); } }
/* Aurora: cintas de color que ondulan */
[data-tema="aurora"] .fondo i:nth-child(1) { width: 120vmax; height: 70vmax; left: -40vmax; top: -30vmax; background: radial-gradient(60% 40% at 50% 50%, rgba(46, 242, 176, 0.26), transparent 70%); animation: aurora1 18s ease-in-out infinite alternate; }
[data-tema="aurora"] .fondo i:nth-child(2) { width: 110vmax; height: 60vmax; right: -40vmax; top: -10vmax; background: radial-gradient(60% 40% at 50% 50%, rgba(123, 92, 255, 0.26), transparent 70%); animation: aurora2 22s ease-in-out infinite alternate; }
[data-tema="aurora"] .fondo i:nth-child(3) { display: block; width: 100vmax; height: 50vmax; left: -20vmax; top: 12vmax; background: radial-gradient(60% 40% at 50% 50%, rgba(92, 225, 255, 0.16), transparent 70%); animation: aurora3 26s ease-in-out infinite alternate; }
@keyframes aurora1 { to { transform: translate(20vmax, 6vmax) rotate(12deg) scale(1.1); } }
@keyframes aurora2 { to { transform: translate(-22vmax, 10vmax) rotate(-10deg) scale(0.92); } }
@keyframes aurora3 { to { transform: translate(14vmax, -8vmax) rotate(8deg) scale(1.15); } }
/* Atardecer: un sol que respira */
[data-tema="atardecer"] .fondo i:nth-child(1) { width: 110vmax; height: 110vmax; left: 50%; top: -72vmax; margin-left: -55vmax; background: radial-gradient(circle, rgba(255, 170, 80, 0.32), rgba(255, 80, 100, 0.12) 40%, transparent 65%); animation: sol 9s ease-in-out infinite alternate; }
[data-tema="atardecer"] .fondo i:nth-child(2) { background: radial-gradient(circle, rgba(255, 61, 110, 0.12), transparent 62%); }
@keyframes sol { to { transform: scale(1.12); opacity: 0.75; } }
/* Oro: un destello que cruza de vez en cuando */
[data-tema="oro"] .fondo i:nth-child(1) { background: radial-gradient(circle, rgba(233, 196, 106, 0.1), transparent 62%); }
[data-tema="oro"] .fondo i:nth-child(2) { background: radial-gradient(circle, rgba(184, 134, 43, 0.09), transparent 62%); }
[data-tema="oro"] .fondo i:nth-child(3) { display: block; border-radius: 0; top: -50%; bottom: -50%; height: auto; left: 0; width: 26vmax; background: linear-gradient(90deg, transparent, rgba(247, 227, 163, 0.07), transparent); animation: destello 11s ease-in-out infinite; }
@keyframes destello { 0%, 35% { transform: translateX(-40vmax) rotate(20deg); } 100% { transform: translateX(140vmax) rotate(20deg); } }

/* ---------- detalles de cada tema (logo, brillos, íconos) ---------- */
.logo-hx::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
[data-tema="neon"] .logo-hx { box-shadow: 0 0 10px rgba(var(--a1-rgb), 0.8), 0 0 26px rgba(var(--a2-rgb), 0.5); animation: parpadeo 7s infinite; }
@keyframes parpadeo { 0%, 91%, 100% { opacity: 1; } 92% { opacity: 0.35; } 93% { opacity: 1; } 95% { opacity: 0.5; } 96% { opacity: 1; } }
[data-tema="neon"] .boton, [data-tema="neon"] .boton-enviar { box-shadow: 0 0 14px rgba(var(--a1-rgb), 0.5), 0 0 28px rgba(var(--a2-rgb), 0.22); }
[data-tema="neon"] .saludo { text-shadow: 0 0 18px rgba(var(--a2-rgb), 0.55); }
[data-tema="neon"] .pestanas button.activo .ic, [data-tema="neon"] .fila.sonando .fila-texto b { filter: drop-shadow(0 0 6px var(--rosa)); }
[data-tema="aurora"] .logo-hx { animation: matiz 6s ease-in-out infinite alternate; }
@keyframes matiz { from { filter: hue-rotate(-35deg); } to { filter: hue-rotate(35deg); } }
[data-tema="atardecer"] .logo-hx { animation: brillo-sol 3.5s ease-in-out infinite alternate; }
@keyframes brillo-sol { to { box-shadow: 0 0 24px rgba(255, 170, 80, 0.75); } }
[data-tema="oro"] .logo-hx::after, [data-tema="oro"] .boton::after { background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.5) 50%, transparent 65%); background-size: 250% 100%; animation: brillo-oro 5s ease-in-out infinite; }
[data-tema="oro"] .boton { position: relative; overflow: hidden; }
[data-tema="oro"] .boton::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
@keyframes brillo-oro { 0%, 55% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
/* la pestaña activa lleva una rayita con el degradado del tema */
.pestanas button.activo::before { content: ""; position: absolute; top: 0; left: 32%; right: 32%; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad); }
[data-tema="neon"] .pestanas button.activo::before { box-shadow: 0 0 10px var(--rosa); }
.pestanas.tres { grid-template-columns: repeat(3, 1fr); }

/* la canción que suena: barritas que bailan sobre su portada */
.eq { display: none; }
.fila.sonando .eq { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 30%; background: rgba(var(--bg-rgb), 0.5); }
.eq i { width: 4px; height: 40%; border-radius: 2px; background: var(--rosa); transform-origin: bottom; animation: eq 0.8s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -0.35s; }
.eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
body:not(.suena) .eq i { animation-play-state: paused; }

/* elegir tema (perfil). Cada tarjeta lleva data-tema="…": por eso se pinta con los colores de SU tema. */
.temas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.tema-op { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 8px 10px; border-radius: 14px; background: var(--superficie); border: 1px solid var(--borde); text-align: left; min-width: 0; }
.tema-op.activo { border-color: var(--rosa); box-shadow: inset 0 0 0 1px var(--rosa); }
.tema-op.activo::after { content: "✓"; position: absolute; top: 13px; right: 13px; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: var(--sobre-acento); font-size: 13px; font-weight: 900; display: grid; place-items: center; }
.tema-op b { font-size: 14px; padding: 0 2px; }
.tema-op .tema-desc { font-size: 11.5px; color: var(--texto-3); line-height: 1.3; padding: 0 2px; }
.tema-muestra { width: 100%; height: 58px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 6px; overflow: hidden; }
.tema-muestra .ic { width: 28px; height: 28px; stroke-width: 1.8; }
.muestra-hachex { background: radial-gradient(80% 90% at 20% 0%, rgba(155, 0, 255, 0.6), transparent), radial-gradient(60% 80% at 100% 100%, rgba(255, 45, 120, 0.35), transparent), #07070f; color: #ff2d78; }
.muestra-neon { background: radial-gradient(70% 90% at 85% 10%, rgba(0, 225, 255, 0.45), transparent), radial-gradient(60% 80% at 10% 100%, rgba(255, 43, 214, 0.45), transparent), #030308; color: #00e1ff; }
.muestra-neon .ic { filter: drop-shadow(0 0 6px #00e1ff); animation: parpadeo 4s infinite; }
.muestra-aurora { background: radial-gradient(90% 60% at 30% 20%, rgba(46, 242, 176, 0.45), transparent), radial-gradient(80% 60% at 80% 75%, rgba(123, 92, 255, 0.5), transparent), #050b12; color: #2ef2b0; }
.muestra-aurora .ic { animation: matiz 3s ease-in-out infinite alternate; }
.muestra-atardecer { background: radial-gradient(80% 95% at 50% 0%, rgba(255, 170, 80, 0.65), rgba(255, 61, 110, 0.25) 55%, transparent), #120806; color: #ffd28a; }
.muestra-oro { background: linear-gradient(120deg, #0a0a0a 38%, rgba(233, 196, 106, 0.3) 50%, #0a0a0a 62%), #0a0a0a; color: #e9c46a; }

/* ---------- chat: cabecera, ocultar, compositor, adjuntar, emojis (9-oct-2026) ---------- */
.vista-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.aviso-notif { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; margin: 0 0 18px; border-radius: var(--r); background: var(--grad-suave); border: 1px solid var(--borde-2); font-size: 14px; }
.aviso-notif span { color: var(--texto-2); font-size: 13px; }
.aviso-notif .boton { height: 38px; padding: 0 18px; margin-top: 4px; font-size: 14px; }
.boton-chico { height: 34px; padding: 0 12px; font-size: 13px; gap: 6px; color: var(--texto-2); }
.boton-chico .ic { width: 18px; height: 18px; }
.cv-quien { flex: 1; }
.cv-escribir { gap: 6px; }
.cv-caja { flex: 1; min-width: 0; display: flex; align-items: center; height: 46px; border-radius: 23px; border: 1px solid var(--borde-2); background: var(--tarjeta); padding: 0 2px; }
.cv-caja:focus-within { border-color: rgba(var(--a1-rgb), 0.45); }
.cv-escribir .cv-caja input { flex: 1; min-width: 0; height: 100%; border: 0; border-radius: 0; background: none; outline: none; font-size: 16px; padding: 0 2px; }
.cv-caja .boton-icono { width: 38px; height: 38px; flex-shrink: 0; }
.adjuntar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px 0 6px; }
.adj-op { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--texto-2); padding: 6px 0; text-align: center; }
.adj-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.adj-ic .ic { width: 26px; height: 26px; }
.adj-galeria .adj-ic { background: linear-gradient(135deg, #a855f7, #6d28d9); }
.adj-camara .adj-ic { background: linear-gradient(135deg, #ff5c93, #e11d48); }
.adj-archivo .adj-ic { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.adj-cancion .adj-ic { background: linear-gradient(135deg, #34d399, #059669); }
.emojis { height: 300px; display: flex; flex-direction: column; border-top: 1px solid var(--borde); background: var(--superficie); padding-bottom: var(--abajo); flex-shrink: 0; }
.emojis-tabs { display: flex; gap: 2px; padding: 6px 8px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--borde); flex-shrink: 0; }
.emojis-tabs::-webkit-scrollbar { display: none; }
.emojis-tabs button { flex: 0 0 auto; width: 42px; height: 36px; border-radius: 10px; font-size: 21px; line-height: 1; opacity: 0.5; }
.emojis-tabs button.activo { opacity: 1; background: var(--tarjeta-2); }
.emojis-rejilla { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 2px 8px 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); align-content: start; }
.emojis-rejilla h4 { grid-column: 1 / -1; margin: 10px 4px 4px; font-size: 11.5px; font-weight: 700; color: var(--texto-3); text-transform: uppercase; letter-spacing: 0.06em; }
.emojis-rejilla button { height: 46px; font-size: 29px; line-height: 1; border-radius: 12px; display: grid; place-items: center; }
.emojis-rejilla button:active { background: var(--tarjeta-2); transform: scale(0.9); }
/* Los emojis con la fuente de emojis del sistema y en tamaño justo (sin estirarse ni cortarse). */
.emojis button, .burbuja.solo-emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif; font-variant-emoji: emoji; }
.burbuja.solo-emoji { background: none; padding: 0 2px; font-size: 46px; line-height: 1.12; color: var(--texto); }
.burbuja.solo-emoji.mia { background: none; color: var(--texto); }
.burbuja.solo-emoji.dos { font-size: 40px; }
.burbuja.solo-emoji.tres { font-size: 34px; }
.burbuja.solo-emoji .hora { font: 10.5px system-ui, sans-serif; color: var(--texto-3); opacity: 1; }
.visor-cerrar { position: absolute; top: calc(var(--arriba) + 10px); left: 8px; color: #fff; z-index: 1; }
.visor-girando { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: #fff; animation: girar 0.8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.r-siguiente { align-self: stretch; height: 48px; font-size: 15px; flex-shrink: 0; }
.r-siguiente .ic { width: 20px; height: 20px; }
