/* ==========================================================================
   JANULUS ÁGIL · PWA MÓVIL Y ESCRITORIO
   Sistema de diseño premium de alto rendimiento:
   Paleta: Obsidiana profunda + Ámbar cálido + Turquesa sereno + Coral urgencia.
   Zero-cost rendering: gradientes estáticos por GPU, fuentes de sistema con Inter
   y transiciones compositadas sin sobrecoste de CPU ni batería.
   ========================================================================== */

:root {
  /* Superficies de obsidiana profunda */
  --bg: #0a0e1a;
  --bg-2: #0e1424;
  --bg-3: #131a2e;
  --card: rgba(20, 27, 46, 0.72);
  --card-hover: rgba(28, 37, 60, 0.88);
  --glass: rgba(255, 255, 255, 0.04);
  --borde: rgba(255, 255, 255, 0.08);
  --borde-fuerte: rgba(255, 255, 255, 0.16);

  /* Acentos de marca (Electric Indigo & Teal Esmeralda como en Landing) */
  --primario: #6366f1;
  --primario-2: #818cf8;
  --primario-glow: rgba(99, 102, 241, 0.35);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --ambar: #f5b13d;
  --ambar-suave: rgba(245, 177, 61, 0.12);

  /* Acentos serenos (Turquesa / Audio / Aprendizaje) */
  --teal: #2dd4bf;
  --teal-2: #5eead4;
  --teal-glow: rgba(45, 212, 191, 0.3);
  --teal-suave: rgba(45, 212, 191, 0.12);

  /* Acento de urgencia (Coral / Rescate / Errores) */
  --coral: #f87171;
  --coral-glow: rgba(248, 113, 113, 0.3);
  --coral-suave: rgba(248, 113, 113, 0.12);
  --rosa: #f87171;

  /* Texto de alto contraste */
  --texto: #f3f5fb;
  --texto-2: #b0b9d0;
  --texto-3: #6b7693;
  --texto-4: #444f6e;

  /* Radios */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-full: 9999px;

  /* Sombras aceleradas por GPU */
  --sombra: 0 18px 40px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --sombra-ambar: 0 10px 28px -6px rgba(245, 177, 61, 0.35);
  --sombra-teal: 0 10px 28px -6px rgba(45, 212, 191, 0.3);

  /* Tipografía y layout */
  --fuente: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fuente-display: 'Fraunces', Georgia, serif;
  --alto-tab: 68px;
  --seg-arriba: env(safe-area-inset-top, 0px);
  --seg-abajo: env(safe-area-inset-bottom, 0px);
  --easing: cubic-bezier(0.22, 1, 0.36, 1);
  --easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: clip;
  font-family: var(--fuente);
  color: var(--texto);
  background:
    radial-gradient(1200px 600px at 110% -10%, rgba(245, 177, 61, 0.11), transparent 60%),
    radial-gradient(900px 500px at -20% 30%, rgba(45, 212, 191, 0.09), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(139, 92, 246, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
:focus-visible { outline: 2px solid var(--ambar-2); outline-offset: 2px; }
h1, h2, h3 { letter-spacing: -0.02em; margin: 0 0 0.35rem; }
h1 { font-family: var(--fuente-display); font-size: clamp(1.5rem, 5.5vw, 2.1rem); font-weight: 800; color: #fff; }
h2 { font-size: 1.2rem; font-weight: 700; color: #fff; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }

/* ---------- Barra superior ---------- */
.barra-superior {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: calc(0.65rem + var(--seg-arriba)) 1.1rem 0.65rem;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--borde);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.marca { display: flex; align-items: center; gap: 0.55rem; color: inherit; text-decoration: none; font-weight: 800; flex-shrink: 0; }
.marca-logo {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primario), #06b6d4);
  color: #ffffff; font-weight: 900;
  box-shadow: 0 4px 14px var(--primario-glow);
  flex-shrink: 0;
}
.marca-texto { font-family: var(--fuente-display); font-size: 1.22rem; font-weight: 800; letter-spacing: -0.02em; }
.acciones-superiores { display: flex; align-items: center; gap: 0.45rem; min-width: 0; flex-shrink: 1; }

.btn-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 38px; padding: 0.35rem 0.8rem;
  border: 1px solid var(--borde); border-radius: var(--r-full);
  background: var(--glass);
  font-size: 0.88rem; font-weight: 600; white-space: nowrap; color: var(--texto-2);
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  flex-shrink: 0;
}
.btn-chip:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--borde-fuerte); color: var(--texto); }
.btn-chip:active { transform: scale(0.96); }
.btn-chip img { border-radius: 3px; object-fit: cover; flex-shrink: 0; }
.chevron { color: var(--texto-3); font-size: 0.75rem; flex-shrink: 0; }

#btn-idioma {
  max-width: 145px;
}
#btn-idioma span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-plan {
  min-height: 38px; padding: 0.35rem 0.85rem; border-radius: var(--r-full); border: 1px solid var(--borde);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(148, 163, 184, 0.16); color: var(--texto-2);
  transition: transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}
.badge-plan:not([data-plan="free"]) {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #e0e7ff;
  box-shadow: 0 2px 12px var(--primario-glow);
}
.badge-plan:active { transform: scale(0.96); }

.btn-chip-instalar {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}
.btn-chip-instalar:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.7);
  color: #ffffff;
}

.tarjeta-instalar-app {
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.35) 0%, rgba(15, 23, 42, 0.6) 100%);
  position: relative;
  overflow: hidden;
}

@media (max-width: 600px) {
  .btn-texto-custom, .btn-texto-instalar { display: none; }
  .barra-superior {
    padding: calc(0.5rem + var(--seg-arriba)) 0.75rem 0.5rem;
    gap: 0.5rem;
  }
  .acciones-superiores { gap: 0.4rem; }
  .marca-texto { font-size: 1.05rem; }
  .btn-chip { min-height: 32px; padding: 0.25rem 0.55rem; font-size: 0.82rem; }
  #btn-idioma { max-width: 155px; }
  .badge-plan { min-height: 32px; padding: 0.25rem 0.55rem; font-size: 0.72rem; }
}

/* Silencio visual en barra superior: 'Mis Frases' vive de forma limpia en el tabbar dock */
.barra-superior #btn-custom {
  display: none !important;
}

/* ---------- Vista principal ---------- */
.vista {
  width: min(740px, 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 1.1rem 1rem calc(var(--alto-tab) + var(--seg-abajo) + 2rem);
}
.vista.entrando > * { animation: subir 0.35s var(--easing) both; }
.vista.entrando > *:nth-child(2) { animation-delay: 0.04s; }
.vista.entrando > *:nth-child(3) { animation-delay: 0.08s; }
@keyframes subir { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.cabecera-vista { margin-bottom: 1.1rem; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; max-width: 100%; gap: 0.75rem; }
.sub { color: var(--texto-2); line-height: 1.5; font-size: 0.95rem; }
.nota { color: var(--texto-3); font-size: 0.85rem; line-height: 1.45; }
.aviso { color: var(--ambar); font-weight: 600; margin-top: 0.4rem; }
.vacio { color: var(--texto-3); text-align: center; padding: 2.5rem 1rem; }

/* ---------- Consistencia Radical y Silencio Visual ---------- */
.view-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1.1rem;
}
.view-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.view-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}
.view-count-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--texto-2);
  border: 1px solid var(--borde);
  white-space: nowrap;
}
.view-count-badge.pro-active {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

/* Buscador minimalista y limpio */
.search-bar-clean {
  position: relative;
  width: 100%;
}
.search-icon-inside {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--texto-3);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.search-input-clean {
  width: 100%;
  height: 44px;
  background: rgba(18, 25, 42, 0.6);
  border: 1px solid var(--borde);
  border-radius: var(--r-full);
  padding: 0 16px 0 42px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.search-input-clean:focus {
  background: rgba(20, 30, 52, 0.9);
  border-color: var(--primario);
  box-shadow: 0 0 0 3px var(--primario-glow);
}

/* Píldoras de filtro */
.filter-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -0.5rem;
  padding: 2px 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.filter-pills-row::-webkit-scrollbar { display: none; }
.chip-pill {
  flex: none;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--texto-2);
  border: 1px solid var(--borde);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.chip-pill:hover, .chip-pill[aria-pressed="true"], .chip-pill.active {
  background: rgba(99, 102, 241, 0.2);
  color: #ffffff;
  border-color: var(--primario);
  box-shadow: 0 0 10px var(--primario-glow);
}

.esqueleto { display: grid; gap: 0.8rem; }
.esqueleto span {
  height: 88px; border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--glass), rgba(255, 255, 255, 0.08), var(--glass));
  background-size: 200% 100%; animation: brillo 1.4s infinite linear;
}
@keyframes brillo { to { background-position: -200% 0; } }

/* ---------- Buscador, chips, toggles ---------- */
.buscador {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0 1rem; min-height: 48px;
  border: 1px solid var(--borde); border-radius: var(--r-md); background: var(--glass);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.buscador:focus-within { border-color: var(--ambar); box-shadow: 0 0 0 3px var(--ambar-brillo); }
.buscador input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--texto); font: inherit; font-size: 16px; }

.chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1rem;
  padding: 0.35rem 1rem 0.65rem;
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 38px;
  padding: 0 1rem;
  box-sizing: border-box;
  border: 1px solid var(--borde);
  border-radius: var(--r-full);
  background: var(--glass);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  color: var(--texto-2);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s var(--easing);
}
.chip:hover {
  border-color: var(--borde-fuerte);
  color: var(--texto);
  background: rgba(255, 255, 255, 0.08);
}
.chip[aria-pressed="true"] {
  background: var(--teal-suave);
  border-color: rgba(45, 212, 191, 0.6);
  color: var(--teal-2);
  box-shadow: 0 2px 10px var(--teal-glow);
}

.fila-controles { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.subtabs-practica {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
  width: 100%;
  max-width: 100%;
}
.subtabs-practica .chip-pill {
  flex: 1 1 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
  padding: 0.45rem 0.85rem;
  font-weight: 600;
}
.subtabs-practica .chip-pill.activo {
  font-weight: 700;
  background: var(--azul, #3b82f6);
  color: #fff;
  border-color: transparent;
}
.toggle {
  min-height: 40px; padding: 0.4rem 0.95rem; border-radius: var(--r-full);
  border: 1px solid var(--borde); background: var(--glass); font-weight: 600; font-size: 0.88rem; color: var(--texto-3);
  transition: all 0.2s var(--easing);
}
.toggle:hover { color: var(--texto-2); }
.toggle[aria-pressed="true"] { color: var(--teal-2); border-color: rgba(45, 212, 191, 0.5); background: var(--teal-suave); }
.toggle[aria-pressed="true"]::before { content: "✓ "; font-weight: 800; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 48px; padding: 0.65rem 1.2rem;
  border: 1px solid transparent; border-radius: var(--r-md);
  font-weight: 700; font-size: 0.98rem;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn.ancho { width: 100%; }
.btn-primario {
  background: linear-gradient(135deg, var(--primario), #4f46e5); color: #ffffff;
  box-shadow: 0 4px 18px var(--primario-glow);
}
.btn-primario:hover { box-shadow: 0 12px 30px -4px var(--primario-glow); transform: translateY(-1px); }
.btn-teal {
  background: linear-gradient(135deg, #0d9488, #14b8a6); color: #ffffff;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.35);
}
.btn-teal:hover { box-shadow: 0 10px 24px -4px rgba(20, 184, 166, 0.45); transform: translateY(-1px); }
.btn-secundario { background: var(--glass); border-color: var(--borde); color: var(--texto); }
.btn-secundario:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--borde-fuerte); }
.btn-fantasma { background: transparent; color: var(--texto-2); }
.btn-fantasma:hover { color: var(--texto); }
.btn-mal { background: var(--coral-suave); color: #fca5a5; border-color: rgba(248, 113, 113, 0.4); }
.btn-bien { background: var(--teal-suave); color: #5eead4; border-color: rgba(45, 212, 191, 0.4); }
.btn-facil { background: var(--ambar-suave); color: var(--ambar-2); border-color: rgba(245, 177, 61, 0.4); }
.btn-link { background: none; border: 0; color: var(--texto-3); text-decoration: underline; padding: 0.5rem; }
.btn-volver { justify-self: start; background: none; border: 0; color: var(--ambar-2); font-weight: 700; padding: 0.4rem 0; min-height: 40px; }

/* Iconos vectoriales SVG limpios */
.icon-svg {
  display: inline-block;
  vertical-align: middle;
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.icon-svg.icon-lg { width: 1.8rem; height: 1.8rem; }
.icon-svg.icon-xl { width: 2.8rem; height: 2.8rem; }
.icon-svg.icon-sm { width: 1em; height: 1em; }
.btn-redondo .icon-svg { width: 17px; height: 17px; }
.btn-play .icono-play .icon-svg { width: 16px; height: 16px; transform: translateX(1px); }
.key-icon svg { width: 16px; height: 16px; }
.pack-icono svg { width: 24px; height: 24px; }
.badge-score-pron .icon-svg,
.badge-audio-custom .icon-svg,
.frase-nota .icon-svg {
  width: 14px;
  height: 14px;
  margin-right: 2px;
  vertical-align: -2px;
}
.btn-micro .icon-svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}
.btn-dictar .icon-svg {
  width: 16px;
  height: 16px;
}
.icono-grande-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem auto 1rem;
}
.icono-grande-wrap svg {
  width: 52px;
  height: 52px;
}
.pron-chip-palabra small .icon-svg {
  width: 12px;
  height: 12px;
  vertical-align: middle;
}
.srs-audio-acciones .btn-micro .icon-svg {
  margin-right: 4px;
}

/* ---------- Botones mecánicos estilo Reproductor Hi-Fi (Tarjetas de Frase) ---------- */
.btn-redondo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(180deg, #2b364b 0%, #1c2536 60%, #121824 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 3.5px solid #060910;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  position: relative;
  cursor: pointer;
  user-select: none;
  gap: 3px;
  padding: 4px 2px;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  color: var(--texto);
}

/* Ranura mecánica inferior táctil idéntica al reproductor */
.btn-redondo::after {
  content: '';
  width: 14px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.btn-redondo:hover:not(:disabled) {
  background: linear-gradient(180deg, #36445c 0%, #242f44 60%, #161e2e 100%);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-redondo:active:not(:disabled),
.btn-redondo.active-pressed {
  transform: translateY(2.5px);
  border-bottom-width: 1px;
  background: linear-gradient(180deg, #131a26 0%, #1c2536 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.btn-redondo:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* 1. Tecla Zoom (Lupa azul/cian luminosa) */
.btn-redondo.btn-zoom .icon-svg,
.btn-redondo[data-accion="zoom"] .icon-svg {
  color: #38bdf8;
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.75));
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-redondo.btn-zoom:hover .icon-svg,
.btn-redondo[data-accion="zoom"]:hover .icon-svg {
  color: #7dd3fc;
  filter: drop-shadow(0 0 7px rgba(56, 189, 248, 0.95));
  transform: scale(1.08);
}

/* 2. Tecla Grabación / Micrófono (Rojo REC luminoso) */
.btn-redondo[data-accion="grabar"] .icon-svg {
  color: #ef4444;
  filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.75));
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-redondo[data-accion="grabar"]:hover .icon-svg {
  color: #f87171;
  filter: drop-shadow(0 0 7px rgba(239, 68, 68, 0.95));
  transform: scale(1.08);
}

/* 3. Tecla Reproducción / Play (Verde esmeralda luminoso) */
.btn-redondo.btn-play,
.btn-play {
  background: linear-gradient(180deg, #2b364b 0%, #1c2536 60%, #121824 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 3.5px solid #060910;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #10b981;
}

.btn-play .icono-play {
  color: #10b981;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(1px);
  transition: all 0.15s ease;
}

.btn-play:hover .icono-play {
  color: #34d399;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 1));
  transform: translateX(1px) scale(1.08);
}

.btn-play.grande {
  width: 58px;
  height: 54px;
  border-radius: 10px;
  margin: 0.6rem auto 0;
}
.btn-play.grande::after {
  width: 18px;
}
.btn-play.grande .icono-play .icon-svg {
  width: 24px;
  height: 24px;
}

/* Ecualizador animado táctil en verde esmeralda */
.btn-play .eq-onda {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5px;
  height: 14px;
  width: 14px;
}
.btn-play .eq-barra {
  width: 2.5px;
  background: #10b981;
  border-radius: 1px;
  height: 4px;
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.8);
}
.btn-play.sonando {
  transform: translateY(2.5px);
  border-bottom-width: 1px;
  background: linear-gradient(180deg, #131a26 0%, #0d2822 100%);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 14px rgba(16, 185, 129, 0.35);
}
.btn-play.sonando .icono-play {
  display: none;
}
.btn-play.sonando .eq-onda {
  display: flex;
}
.btn-play.sonando .eq-barra:nth-child(1) {
  animation: eq-salto 0.45s ease-in-out infinite alternate;
}
.btn-play.sonando .eq-barra:nth-child(2) {
  animation: eq-salto 0.45s ease-in-out infinite alternate 0.15s;
}
.btn-play.sonando .eq-barra:nth-child(3) {
  animation: eq-salto 0.45s ease-in-out infinite alternate 0.3s;
}
@keyframes eq-salto {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* ---------- Tarjetas de frase ---------- */
.lista { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; max-width: 100%; gap: 0.75rem; }
.frase {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--borde);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s, transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.frase:hover { border-color: var(--borde-fuerte); background: var(--card-hover); }
.frase:active { transform: scale(0.985); }
.frase.activa {
  border-color: var(--teal); background: var(--card-hover);
  box-shadow: 0 0 24px -4px var(--teal-glow);
}
.frase-cuerpo { width: 100%; display: grid; gap: 0.35rem; }
.frase-t {
  font-family: var(--fuente-display);
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
  color: #fff;
  letter-spacing: -0.01em;
}
.frase-t.grande { font-size: 1.45rem; margin: 0.8rem 0 0.3rem; }
.frase-f {
  color: var(--teal-2);
  font-size: 0.92rem;
  font-style: italic;
  overflow-wrap: break-word;
  word-break: break-word;
}
.frase-es {
  color: var(--texto-2);
  font-size: 0.95rem;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}
.frase-acciones {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.frase.bloqueada { position: relative; overflow: hidden; }
.frase.bloqueada .frase-cuerpo { filter: blur(5px); user-select: none; }
.frase.bloqueada::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  background-color: var(--ambar, #f5b13d);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- SRS (Repaso espaciado) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.stat {
  padding: 0.75rem 0.35rem; border-radius: var(--r-sm); background: var(--glass);
  border: 1px solid var(--borde); text-align: center; display: grid; gap: 0.15rem;
}
.stat b { font-size: 1.25rem; }
.stat span { font-size: 0.72rem; color: var(--texto-3); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-racha b { color: var(--ambar); }
.barra { height: 8px; border-radius: var(--r-full); background: var(--glass); overflow: hidden; }
.barra span {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--ambar)); transition: width 0.4s ease-out;
}

.tarjeta-srs {
  display: grid; gap: 0.8rem; text-align: center;
  padding: 1.8rem 1.3rem; border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(245, 177, 61, 0.12), rgba(45, 212, 191, 0.06)), var(--card);
  border: 1px solid var(--borde); box-shadow: var(--sombra);
}
.srs-contador { color: var(--texto-3); font-size: 0.82rem; font-weight: 700; }
.srs-pregunta { color: var(--texto-2); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.srs-es { font-size: 1.4rem; font-weight: 800; line-height: 1.3; color: #fff; }
.srs-respuesta {
  padding: 1.1rem; border-radius: var(--r-md); background: rgba(0, 0, 0, 0.35);
  display: grid; gap: 0.35rem; animation: subir 0.3s var(--easing) both;
}
.srs-respuesta .frase-t { font-size: 1.3rem; }
.srs-botones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.srs-botones button.sugerido {
  position: relative;
  box-shadow: 0 0 0 2px var(--primario), 0 4px 14px var(--primario-glow);
  transform: translateY(-2px);
  font-weight: 800;
}
.srs-botones button.sugerido::after {
  content: "Sugerido";
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.64rem;
  background: var(--primario);
  color: #1a1208;
  padding: 1px 6px;
  border-radius: var(--r-full);
  white-space: nowrap;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.srs-previo-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--ambar-2);
  background: rgba(245, 177, 61, 0.12);
  border: 1px solid rgba(245, 177, 61, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-full);
  margin: 0 auto;
}

.srs-banner-mejora {
  border-radius: var(--r-md);
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.srs-banner-mejora.ok {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
}
.srs-banner-mejora.aviso {
  background: rgba(245, 177, 61, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 177, 61, 0.45);
}
.srs-banner-mejora.info {
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.45);
}

.srs-audio-acciones {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.4rem 0;
}

.srs-evaluacion-panel {
  background: rgba(14, 20, 36, 0.85);
  border: 1px solid var(--borde-fuerte);
  border-radius: var(--r-md);
  padding: 0.85rem;
  text-align: left;
  margin: 0.5rem 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.emoji-grande { font-size: 2.8rem; }

/* ---------- Packs (Diseño limpio y moderno) ---------- */
.packs, .packs-grid-clean {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pack, .pack-card-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--r-lg, 16px);
  border: 1px solid var(--borde);
  background: var(--card);
  transition: transform 0.15s, border-color 0.2s, background 0.2s;
  cursor: pointer;
  width: 100%;
  color: inherit;
  font: inherit;
}
.pack:hover:not(:disabled), .pack-card-clean:hover {
  border-color: var(--borde-fuerte);
  background: var(--card-hover);
  transform: translateY(-1px);
}
.pack:active:not(:disabled), .pack-card-clean:active {
  transform: scale(0.98);
}
.pack-icono, .pack-icon-circle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.pack-texto, .pack-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pack-texto b, .pack-card-title {
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pack-texto small, .pack-card-meta {
  color: var(--texto-2);
  line-height: 1.35;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pack-texto .pack-meta {
  color: var(--texto-3);
  font-size: 0.76rem;
}
.etiqueta, .pack-status-pill {
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 0.74rem;
  font-weight: 800;
  flex-shrink: 0;
  white-space: nowrap;
}
.etiqueta.precio, .pack-status-pill.precio {
  background: var(--ambar-suave);
  color: var(--ambar-2);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.etiqueta.ok, .pack-status-pill.ok {
  background: var(--teal-suave);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.3);
}
.etiqueta.gris, .pack-status-pill.gris {
  background: var(--glass);
  color: var(--texto-3);
  border: 1px solid var(--borde);
}

.cta-flotante {
  position: sticky; bottom: calc(var(--alto-tab) + var(--seg-abajo) + 0.6rem);
  margin-top: 1rem; padding: 1rem; border-radius: var(--r-lg);
  background: rgba(14, 20, 36, 0.94); border: 1px solid rgba(245, 177, 61, 0.4);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5); display: grid; gap: 0.6rem; text-align: center;
}

/* ---------- Pro / Planes (Estética Premium Obsidian & Electric Indigo) ---------- */
.tarjeta {
  padding: 1.25rem 1.15rem;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--borde);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.45);
}

.tarjeta-offline {
  border-color: rgba(20, 184, 166, 0.25);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(14, 20, 36, 0.8) 100%);
}

.offline-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.offline-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.estado-plan:not([data-plan="free"]) {
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), transparent), var(--card);
}

.planes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  align-items: stretch;
}

.plan {
  position: relative;
  padding: 1.6rem 1.35rem 1.35rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--borde);
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  box-sizing: border-box;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.plan:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
}

.plan.destacado {
  border: 1px solid rgba(99, 102, 241, 0.55);
  background: linear-gradient(180deg, rgba(26, 35, 64, 0.9) 0%, rgba(14, 20, 36, 0.95) 100%);
  box-shadow: 0 20px 48px -10px rgba(99, 102, 241, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.plan.destacado:hover {
  border-color: #818cf8;
  box-shadow: 0 24px 52px -10px rgba(99, 102, 241, 0.4);
}

.plan-header {
  margin-bottom: 0.2rem;
}

.plan-header h3 {
  font-family: var(--fuente);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin: 0;
}

.plan-langs {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal-2);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 0.2rem;
}

.plan-price-box {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.2rem 0 0;
}

.plan-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.plan-period {
  font-size: 0.85rem;
  color: var(--texto-3);
  font-weight: 600;
}

.plan-subprice {
  font-size: 0.8rem;
  color: var(--texto-3);
  margin: 0;
  line-height: 1.4;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.plan-features li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.88rem;
  color: var(--texto-2);
  line-height: 1.45;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal-2);
  font-weight: 800;
  font-size: 0.9rem;
}

.plan-features li strong {
  color: #ffffff;
  font-weight: 700;
}

.plan > .btn {
  margin-top: auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: var(--r-md);
  box-sizing: border-box;
}

.btn-link-vitalicio:hover {
  color: #ffffff;
  text-decoration: underline;
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1, #14b8a6);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 14px;
  border-radius: var(--r-full);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  white-space: nowrap;
}

.cinta {
  position: absolute; top: -12px; right: 1rem; padding: 0.25rem 0.75rem; border-radius: var(--r-full);
  font-size: 0.72rem; font-weight: 800; background: linear-gradient(135deg, #6366f1, #14b8a6); color: #ffffff;
}

.form-codigo { display: grid; gap: 0.6rem; }
.form-codigo textarea {
  width: 100%; resize: vertical; padding: 0.85rem; border-radius: var(--r-sm);
  border: 1px solid var(--borde); background: rgba(0, 0, 0, 0.35); color: var(--texto);
  font: 0.88rem ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all;
}
.form-codigo textarea:focus { outline: 0; border-color: var(--primario); }
.pie-legal { text-align: center; color: var(--texto-3); font-size: 0.82rem; display: grid; gap: 0.3rem; padding: 0.5rem 0 1rem; }

/* ---------- Barra de pestañas (Dock flotante moderno con SVG) ---------- */
.tabbar, .app-dock-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: calc(64px + var(--seg-abajo));
  padding-bottom: var(--seg-abajo);
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border-top: 1px solid var(--borde, rgba(255, 255, 255, 0.08));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}

.tabbar button, .dock-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: none;
  color: var(--texto-3, #64748b);
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 2px;
  user-select: none;
}

.tabbar button:active, .dock-tab-btn:active {
  transform: scale(0.92);
}

.dock-tab-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dock-tab-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-tab-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.2s;
}

/* Pestaña activa */
.tabbar button[aria-current="page"], .dock-tab-btn.active {
  color: #ffffff;
}

.tabbar button[aria-current="page"] .dock-tab-label, .dock-tab-btn.active .dock-tab-label {
  color: #ffffff;
  font-weight: 700;
}

.tabbar button[aria-current="page"] .dock-tab-icon svg, .dock-tab-btn.active .dock-tab-icon svg {
  stroke: #818cf8;
  filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.7));
  transform: translateY(-1px);
}

.tabbar button[aria-current="page"]::before, .dock-tab-btn.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
}

/* Variaciones cromáticas específicas por pestaña activa */
#tab-rescate[aria-current="page"] .dock-tab-icon svg, #tab-rescate.active .dock-tab-icon svg {
  stroke: #f43f5e;
  filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.7));
}
#tab-rescate[aria-current="page"]::before, #tab-rescate.active::before {
  background: linear-gradient(90deg, #f43f5e, #fbbf24);
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.5);
}

#tab-custom[aria-current="page"] .dock-tab-icon svg, #tab-custom.active .dock-tab-icon svg {
  stroke: #14b8a6;
  filter: drop-shadow(0 0 6px rgba(20, 184, 166, 0.7));
}
#tab-custom[aria-current="page"]::before, #tab-custom.active::before {
  background: linear-gradient(90deg, #14b8a6, #6366f1);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.5);
}

#tab-repaso[aria-current="page"] .dock-tab-icon svg, #tab-repaso.active .dock-tab-icon svg {
  stroke: #f59e0b;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7));
}
#tab-repaso[aria-current="page"]::before, #tab-repaso.active::before {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
}

#tab-packs[aria-current="page"] .dock-tab-icon svg, #tab-packs.active .dock-tab-icon svg {
  stroke: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.7));
}
#tab-packs[aria-current="page"]::before, #tab-packs.active::before {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.5);
}

#tab-pro[aria-current="page"] .dock-tab-icon svg, #tab-pro.active .dock-tab-icon svg {
  stroke: #a855f7;
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.7));
}
#tab-pro[aria-current="page"]::before, #tab-pro.active::before {
  background: linear-gradient(90deg, #a855f7, #fbbf24);
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.5);
}

/* ---------- Módulo de Frases Personalizadas (Custom) ---------- */
.badge-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-full);
  background: rgba(45, 212, 191, 0.25);
  color: var(--teal-2);
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: 4px;
}

.chip-cat-custom {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal-2);
  background: var(--teal-suave);
  padding: 2px 8px;
  border-radius: var(--r-full);
  border: 1px solid rgba(45, 212, 191, 0.3);
  margin-bottom: 0.35rem;
}

.frase-nota {
  font-size: 0.82rem;
  color: var(--texto-3);
  margin-top: 0.35rem;
  font-style: italic;
}

.btn-editar, .btn-borrar {
  font-size: 0.95rem;
}

.btn-borrar:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #fca5a5 !important;
}

.empty-custom {
  text-align: center;
  padding: 2.5rem 1.2rem;
  border: 1px dashed var(--borde-fuerte);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.02);
  margin: 1.5rem 0;
}

.empty-icono {
  font-size: 2.8rem;
  margin-bottom: 0.6rem;
}

.empty-custom h3 {
  color: var(--texto);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.empty-custom p {
  color: var(--texto-2);
  font-size: 0.9rem;
  max-width: 380px;
  margin: 0 auto 1.4rem;
}

.sugerencias-titulo {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--texto-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 1.8rem 0 0.8rem;
  text-align: left;
}

.sugerencias-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sug-item {
  text-align: left;
  background: var(--glass);
  border: 1px solid var(--borde);
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.2s var(--easing);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sug-item:hover {
  border-color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  transform: translateY(-2px);
}

.sug-t {
  font-weight: 700;
  color: var(--texto);
  font-size: 0.95rem;
}

.sug-es {
  font-size: 0.82rem;
  color: var(--texto-2);
}

.form-custom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.6rem 0;
}

.form-grupo {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--texto-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--borde);
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 72px;
}

.form-select option {
  background: #0f172a;
  color: #fff;
}

.barra-acciones-custom {
  position: sticky;
  bottom: -1rem;
  background: rgba(10, 14, 26, 0.96);
  backdrop-filter: blur(10px);
  padding: 0.8rem 0 0.4rem;
  border-top: 1px solid var(--borde-fuerte);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
  z-index: 20;
}

#cust-f {
  border-color: rgba(45, 212, 191, 0.4);
  color: var(--teal-2);
  font-weight: 600;
}
#cust-f:focus {
  border-color: var(--teal-2);
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.25);
}

.custom-barra-acciones {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.6rem 0 0.8rem;
  flex-wrap: wrap;
}
.custom-barra-acciones .btn {
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
}

.badge-audio-custom {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--teal-2);
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.3);
  padding: 2px 7px;
  border-radius: var(--r-full);
}
.badge-audio-custom.tts {
  color: var(--ambar);
  background: var(--ambar-suave);
  border-color: rgba(245, 177, 61, 0.3);
}

.frase-pie-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.65rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}
.frase-acciones-gestion {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.frase-acciones-audio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.btn-micro {
  font-size: 0.76rem;
  padding: 0.32rem 0.55rem;
  border-radius: var(--r-sm);
  background: var(--glass);
  border: 1px solid var(--borde);
  color: var(--texto-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-micro:hover {
  background: var(--glass-hover);
  color: #fff;
  border-color: var(--borde-fuerte);
}
.btn-micro.activo {
  color: var(--teal-2);
  border-color: rgba(45, 212, 191, 0.4);
  background: rgba(45, 212, 191, 0.1);
  font-weight: 700;
}
.btn-micro.btn-borrar:hover {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.4);
}

/* Asistente de Calle y Traducción Instantánea */
.asistente-calle-banner {
  background: linear-gradient(135deg, rgba(245, 177, 61, 0.12), rgba(20, 184, 166, 0.1));
  border: 1px solid rgba(245, 177, 61, 0.35);
  border-radius: var(--r-md);
  padding: 1rem;
  margin-bottom: 1.1rem;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.asistente-calle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-weight: 800;
  color: var(--ambar);
  font-size: 0.95rem;
}
.asistente-calle-sub {
  font-size: 0.82rem;
  color: var(--texto-2);
  margin: 0 0 0.75rem 0;
  line-height: 1.35;
}
.asistente-calle-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.asistente-calle-form input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--r-sm);
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid var(--borde);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.asistente-calle-form input:focus {
  border-color: var(--ambar);
  box-shadow: 0 0 10px rgba(245, 177, 61, 0.25);
}
.asistente-traduccion-box {
  background: rgba(245, 177, 61, 0.08);
  border: 1px solid rgba(245, 177, 61, 0.25);
  border-radius: var(--r-sm);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.85rem;
}
.asistente-traduccion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-swap-direccion {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(245, 177, 61, 0.15);
  border: 1px solid rgba(245, 177, 61, 0.45);
  color: #fff;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-swap-direccion:hover {
  background: rgba(245, 177, 61, 0.3);
  border-color: var(--ambar);
  transform: translateY(-1px);
}
.swap-icono-flecha {
  color: var(--ambar);
  font-weight: 900;
  font-size: 0.88rem;
}
.asistente-dir-sub {
  font-size: 0.78rem;
  color: var(--texto-suave);
  margin: 0.25rem 0 0.45rem;
}
.asistente-fila-input {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}
.asistente-fila-input input {
  flex: 1 1 200px;
}
.asistente-estado-msg {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.asistente-estado-msg.cargando { color: var(--ambar); }
.asistente-estado-msg.exito { color: var(--teal-2); }
.asistente-estado-msg.error { color: #fca5a5; }

/* Constructor guiado Janulus */
.constructor-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}
.bloque-grupo {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.bloque-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--texto-3);
}
.bloque-opciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.btn-bloque {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--r-full);
  border: 1px solid var(--borde);
  background: var(--glass);
  color: var(--texto-2);
  cursor: pointer;
  transition: all 0.15s var(--easing);
}
.btn-bloque:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--borde-fuerte);
}
.btn-bloque.activo {
  background: linear-gradient(135deg, var(--teal), #0ea5e9);
  color: #042f2e;
  border-color: transparent;
  font-weight: 800;
  box-shadow: var(--sombra-teal);
}
.constructor-preview-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--teal);
  border-radius: var(--r-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.3rem 0;
  box-shadow: 0 0 15px -3px var(--teal-glow);
}
.preview-es {
  font-size: 0.9rem;
  color: var(--texto-2);
}
.preview-t {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}
.audio-panel-form {
  background: rgba(14, 20, 36, 0.65);
  border: 1px solid var(--borde);
  border-radius: var(--r-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.audio-panel-fila {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- Pantalla gigante de auxilio (SOS Zoom) ---------- */
.pantalla-gigante {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.6rem 0.5rem 1rem;
  text-align: center;
  gap: 1.1rem;
}
.badge-zoom {
  padding: 5px 14px;
  border-radius: var(--r-full);
  background: var(--coral-suave);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fca5a5;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.frase-zoom-t {
  font-family: var(--fuente-display);
  font-size: clamp(1.8rem, 7vw, 3rem);
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  word-break: break-word;
}
.frase-zoom-f {
  font-size: 1.3rem;
  color: var(--teal-2);
  font-style: italic;
  overflow-wrap: break-word;
  word-break: break-word;
}
.frase-zoom-es {
  font-size: 1.25rem;
  color: var(--texto-2);
  overflow-wrap: break-word;
  word-break: break-word;
}
.zoom-acciones {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 360px;
  margin-top: 1rem;
}
.zoom-acciones .btn {
  flex: 1;
}

/* ---------- Hoja inferior modal (dialog) ---------- */
.hoja {
  width: 100%;
  max-width: min(640px, 100%);
  max-height: 85dvh;
  margin: auto auto 0 auto;
  inset: auto 0 0 0;
  padding: 0.75rem 1rem calc(1.4rem + var(--seg-abajo));
  border: 1px solid var(--borde);
  border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--bg-2);
  color: var(--texto);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  box-sizing: border-box;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.75);
}
.hoja[open] { animation: hoja-sube 0.35s var(--easing) both; }
.hoja::backdrop { background: rgba(5, 8, 16, 0.75); backdrop-filter: blur(8px); }
@keyframes hoja-sube { from { transform: translateY(100%); } to { transform: none; } }
.hoja-asa { width: 44px; height: 5px; border-radius: var(--r-full); background: var(--borde-fuerte); margin: 0 auto 0.75rem; }
#hoja-contenido {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 0.65rem;
  text-align: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
#hoja-contenido .emoji-grande {
  font-size: 2.2rem;
  line-height: 1;
  margin: 0.1rem 0 0;
}
#hoja-contenido h2 {
  font-size: clamp(1.15rem, 4.5vw, 1.4rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}
#hoja-contenido .sub {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--texto-2);
  margin: 0 auto;
  max-width: 100%;
  padding: 0 0.25rem;
}

/* Tabs en el modal de Idiomas */
.tabs-selector-idiomas {
  display: flex;
  gap: 0.35rem;
  background: rgba(10, 14, 26, 0.85);
  padding: 0.3rem;
  border-radius: var(--r-full);
  border: 1px solid var(--borde);
  margin-bottom: 0.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.tab-idioma-btn {
  flex: 1;
  padding: 0.45rem 0.5rem;
  border-radius: var(--r-full);
  border: none;
  background: transparent;
  color: var(--texto-2);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: normal;
  line-height: 1.2;
}
.tab-idioma-btn:hover { color: #fff; }
.tab-idioma-btn.activo {
  background: linear-gradient(135deg, var(--ambar), #e89829);
  color: #1a1208;
  box-shadow: var(--sombra-ambar);
}

/* Presets rápidos en el modal */
.sim-modal-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  background: rgba(14, 20, 36, 0.6);
  border: 1px solid var(--borde);
  border-radius: var(--r-md);
  margin: 0.2rem 0 0.4rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.sim-presets-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--texto-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.15rem;
}
.btn-preset {
  padding: 0.28rem 0.6rem;
  border-radius: var(--r-full);
  border: 1px solid var(--borde);
  background: var(--glass);
  color: var(--texto-2);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-preset:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--borde-fuerte);
  color: #fff;
  transform: translateY(-1px);
}
.btn-preset:active { transform: scale(0.96); }
.btn-preset-limpiar {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

/* Rejilla de idiomas compacta y cuadrada (diseño elegante validado) */
.rejilla-idiomas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
  margin: 0.5rem 0 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 540px) {
  .rejilla-idiomas {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
  }
}
.idioma {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: unset;
  padding: 6px 3px;
  border-radius: 14px;
  border: 1px solid var(--borde);
  background: var(--glass);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  user-select: none;
}
.idioma:hover {
  border-color: var(--borde-fuerte);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}
.idioma:active {
  transform: scale(0.94);
}
.idioma.actual {
  border-color: var(--primario, #6366f1);
  background: rgba(99, 102, 241, 0.2);
  box-shadow: 0 0 14px -2px var(--primario-glow);
}
.idioma.seleccionado-sim {
  border-color: rgba(245, 177, 61, 0.85) !important;
  background: rgba(245, 177, 61, 0.16) !important;
  box-shadow: 0 0 14px -3px var(--primario-glow);
}
.idioma-cabecera {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.idioma-cabecera img {
  width: 32px;
  height: 22px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.idioma-cuerpo {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
}
.idioma-cuerpo b {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  max-width: 100%;
  text-align: center;
  line-height: 1.2;
}
.idioma-cuerpo small {
  display: none !important;
}
.candado {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.72rem;
}
.badge-idioma-actual {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--primario, #6366f1);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px var(--primario-glow);
  padding: 0;
}
.sim-check-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.12);
  color: var(--texto-3);
  border: 1px solid var(--borde);
  white-space: nowrap;
  line-height: 1.1;
}
.idioma.seleccionado-sim .sim-check-badge {
  background: var(--ambar);
  color: #1a1208;
  border-color: var(--ambar);
  box-shadow: 0 2px 6px var(--primario-glow);
}
.modal-sim-pie {
  margin: 0.4rem 0 0.75rem;
}

.grabadora { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 0.55rem; margin-top: 0.4rem; }
.grabadora .btn { padding: 0.5rem; font-size: 0.9rem; }
.grabando { animation: latido-rec 1s infinite; }
@keyframes latido-rec { 50% { box-shadow: 0 0 0 8px rgba(248, 113, 113, 0.2); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--alto-tab) + var(--seg-abajo) + 1.1rem); z-index: 50;
  max-width: min(92vw, 460px); padding: 0.85rem 1.2rem; border-radius: var(--r-md);
  background: rgba(18, 25, 44, 0.96); border: 1px solid var(--borde-fuerte); box-shadow: var(--sombra);
  font-size: 0.92rem; font-weight: 600; text-align: center;
  opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity 0.25s, transform 0.25s;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast[data-tipo="ok"] { border-color: rgba(45, 212, 191, 0.5); }
.toast[data-tipo="error"] { border-color: rgba(248, 113, 113, 0.5); }

/* ---------- Modo Simultáneo ---------- */
.tarjeta-simultanea {
  background: var(--card);
  border: 1px solid var(--borde);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
  box-shadow: var(--sombra);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.25s, box-shadow 0.25s;
  margin-bottom: 1.25rem;
}
.tarjeta-simultanea:hover {
  border-color: rgba(245, 177, 61, 0.4);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.8), 0 0 24px -6px var(--primario-glow);
}
.tarjeta-sim-cabecera {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--borde);
}
.badge-sim-idx {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--ambar-suave);
  border: 1px solid rgba(245, 177, 61, 0.4);
  color: var(--ambar-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}
.badge-sim-pro {
  padding: 4px 12px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--ambar), #e89829);
  color: #1a1208;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: var(--sombra-ambar);
}
.sim-espanol-ref {
  font-family: var(--fuente-display);
  font-size: 1.28rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-break: break-word;
}
.btn-cadena {
  min-height: 42px;
  padding: 0.5rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: var(--r-full);
}
.btn-cadena.sonando {
  background: linear-gradient(135deg, var(--teal), #0ea5e9);
  color: #04201d;
  box-shadow: var(--sombra-teal);
}

/* Barra resumen de idiomas activos (reemplaza los botones apiñados) */
.sim-barra-resumen {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  background: rgba(14, 20, 36, 0.75);
  border: 1px solid var(--borde);
  border-radius: var(--r-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.sim-resumen-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.sim-resumen-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--texto-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sim-banderas-lista {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.sim-bandera-mini {
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.btn-ajustar-langs {
  padding: 0.45rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: var(--r-full);
}

.lista-sim-idiomas {
  display: grid;
  gap: 0.65rem;
}
.fila-sim-lang {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.95rem 1.15rem;
  border-radius: var(--r-md);
  background: rgba(14, 20, 36, 0.7);
  border: 1px solid var(--borde);
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.fila-sim-lang:hover {
  background: rgba(24, 32, 54, 0.88);
  border-color: rgba(45, 212, 191, 0.4);
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.fila-sim-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}
.sim-lang-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sim-bandera {
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.sim-lang-nombre {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}
.sim-lang-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--teal-2);
  background: var(--teal-suave);
  padding: 2px 7px;
  border-radius: var(--r-full);
  border: 1px solid rgba(45, 212, 191, 0.3);
  letter-spacing: 0.05em;
}
.sim-frase-cuerpo {
  width: 100%;
  display: grid;
  gap: 0.25rem;
}
.sim-t {
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.42;
  overflow-wrap: break-word;
  word-break: break-word;
  letter-spacing: -0.01em;
}
.sim-f {
  color: var(--teal-2);
  font-size: 0.9rem;
  font-style: italic;
  overflow-wrap: break-word;
  word-break: break-word;
}
.toggle-sim-btn {
  border-color: rgba(45, 212, 191, 0.4);
  color: var(--teal-2);
}
.toggle-sim-activo {
  background: var(--teal-suave) !important;
  color: var(--teal-2) !important;
  border-color: rgba(45, 212, 191, 0.6) !important;
  box-shadow: 0 4px 14px var(--teal-glow);
}

/* ---------- Escritorio y Tablet ---------- */
@media (min-width: 760px) {
  .vista { padding-top: 1.8rem; width: min(760px, 100%); }
  .planes { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .packs { grid-template-columns: 1fr 1fr; }
  .tabbar {
    left: 50%; right: auto; bottom: 1.2rem; transform: translateX(-50%);
    width: 600px; height: var(--alto-tab); padding: 0;
    border: 1px solid var(--borde-fuerte); border-radius: var(--r-lg); box-shadow: var(--sombra);
  }
  .hoja {
    inset: 0;
    width: min(640px, calc(100% - 2rem));
    max-width: 640px;
    margin: auto;
    border-radius: var(--r-lg);
    border-bottom: 1px solid var(--borde);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Dictado por Voz y Transcripción (STT) ---------- */
.input-con-dictado {
  display: flex;
  position: relative;
  width: 100%;
  align-items: center;
}
.input-con-dictado input,
.input-con-dictado textarea {
  width: 100%;
  padding-right: 2.8rem !important;
}
.btn-dictar {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--borde);
  color: var(--texto);
  font-size: 1.15rem;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all 0.2s var(--easing);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  line-height: 1;
}
.input-con-dictado textarea ~ .btn-dictar {
  top: 14px;
  transform: none;
}
.btn-dictar:hover {
  background: var(--glass-hover);
  border-color: var(--teal);
  transform: translateY(-50%) scale(1.08);
}
.input-con-dictado textarea ~ .btn-dictar:hover {
  transform: scale(1.08);
}
.btn-dictar.dictando {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.7) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6) !important;
  animation: pulse-dictar 1s infinite alternate;
}
@keyframes pulse-dictar {
  0% { transform: translateY(-50%) scale(1); filter: drop-shadow(0 0 2px red); }
  100% { transform: translateY(-50%) scale(1.15); filter: drop-shadow(0 0 6px red); }
}
.input-con-dictado textarea ~ .btn-dictar.dictando {
  animation: pulse-dictar-ta 1s infinite alternate;
}
@keyframes pulse-dictar-ta {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px red); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 6px red); }
}

.transcripcion-caja {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--r-md);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--borde);
  text-align: left;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.transcripcion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.tag-stt {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--teal-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.transcripcion-texto {
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 0.2rem 0;
}
.transcripcion-feedback {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  border-radius: var(--r-sm);
  display: inline-block;
}
.transcripcion-feedback.excelente {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.transcripcion-feedback.bueno {
  background: rgba(245, 177, 61, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 177, 61, 0.4);
}
.transcripcion-feedback.regular {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* ==========================================================================
   ESTUDIO DE REVISIÓN Y PRÁCTICA DE PRONUNCIACIÓN (JANULUS PRO)
   ========================================================================== */

.estudio-pron {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.pron-cabecera-card {
  background: linear-gradient(145deg, rgba(20, 27, 46, 0.95), rgba(14, 20, 36, 0.98));
  border: 1px solid var(--borde-fuerte);
  border-radius: var(--r-lg);
  padding: 1.2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}
.pron-cabecera-card::after {
  content: "";
  position: absolute;
  top: 0; right: 0; width: 140px; height: 140px;
  background: radial-gradient(circle, var(--primario-glow) 0%, transparent 70%);
  pointer-events: none;
}
.pron-lang-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ambar);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.pron-frase-t {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  margin: 0.2rem 0 0.45rem;
}
.pron-frase-f {
  font-family: monospace;
  font-size: 0.98rem;
  color: var(--teal-2);
  margin: 0.1rem 0 0.4rem;
  font-weight: 600;
}
.pron-frase-es {
  font-size: 0.95rem;
  color: var(--texto-2);
  margin: 0;
  font-weight: 500;
}

/* Barra de Controles A/B */
.pron-barra-acciones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 480px) {
  .pron-barra-acciones {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.pron-barra-acciones .btn {
  min-width: 0;
  max-width: 100%;
  padding: 0.65rem 0.75rem;
  white-space: normal;
  word-break: break-word;
}
.pron-btn-grabar-principal {
  grid-column: 1 / -1;
  padding: 0.95rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: var(--r-md);
  box-shadow: 0 4px 18px var(--primario-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: transform 0.15s, box-shadow 0.2s;
}
.pron-btn-grabar-principal:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px var(--primario-glow);
}
.pron-btn-grabar-principal.grabando {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  border-color: #fca5a5;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.35);
  animation: latido-grabacion 1.2s infinite;
}
@keyframes latido-grabacion {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.2); }
  100% { transform: scale(1); }
}

/* Panel de Puntuación y Diagnóstico */
.pron-panel-evaluacion {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--borde-fuerte);
  border-radius: var(--r-lg);
  padding: 1.2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: aparecer-suave 0.3s ease-out;
}
@keyframes aparecer-suave {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pron-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--borde);
  margin-bottom: 1rem;
}
.pron-score-circulo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.45rem;
  line-height: 1;
  background: rgba(18, 25, 44, 0.9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  border: 3px solid currentColor;
}
.pron-score-circulo small {
  font-size: 0.62rem;
  text-transform: uppercase;
  font-weight: 800;
  opacity: 0.8;
  margin-top: 2px;
}
.pron-score-info {
  flex: 1;
}
.pron-badge-nivel {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-full);
  margin-bottom: 0.35rem;
  border: 1px solid currentColor;
}
.pron-score-mensaje {
  font-size: 0.9rem;
  color: var(--texto-2);
  margin: 0;
  line-height: 1.35;
}

/* Desglose Palabra por Palabra */
.pron-seccion-titulo {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--texto-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pron-chips-contenedor {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}
.pron-chip-palabra {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--r-md);
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
  background: rgba(255, 255, 255, 0.05);
}
.pron-chip-palabra:hover {
  transform: translateY(-2px);
}
.pron-chip-palabra.excelente {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.45);
}
.pron-chip-palabra.casi {
  background: rgba(245, 177, 61, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 177, 61, 0.5);
}
.pron-chip-palabra.a_mejorar {
  background: rgba(251, 146, 60, 0.15);
  color: #fdba74;
  border-color: rgba(251, 146, 60, 0.5);
}
.pron-chip-palabra.omitida {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.5);
  text-decoration: line-through;
}

/* Asistente interactivo de palabra seleccionada */
.pron-asistente-palabra {
  background: rgba(24, 33, 56, 0.95);
  border: 1px solid var(--borde-fuerte);
  border-radius: var(--r-md);
  padding: 0.85rem 1rem;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.pron-asistente-palabra-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.pron-asistente-palabra-t {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}
.pron-asistente-palabra-f {
  font-family: monospace;
  font-size: 0.88rem;
  color: var(--teal-2);
}
.pron-asistente-palabra-det {
  font-size: 0.82rem;
  color: var(--texto-2);
}

/* Transcripción captada */
.pron-transcripcion-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--r-md);
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--teal);
}
.pron-transcripcion-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--texto-3);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.pron-transcripcion-texto {
  color: var(--texto);
  font-style: italic;
  font-weight: 600;
}

/* Badge de score en tarjeta de frase */
.badge-score-pron {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 2px 7px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(245, 177, 61, 0.15);
  color: var(--ambar-2);
  border: 1px solid rgba(245, 177, 61, 0.4);
}
.badge-score-pron.alto {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.4);
}

/* Navegación y controles de estudio de pronunciación */
.badge-contador-pron {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--borde);
  color: var(--texto-2);
}
.btn-nav-pron {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--borde);
  border-radius: 6px;
  color: var(--texto);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1;
  padding: 0;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn-nav-pron:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--borde-fuerte);
  color: #fff;
}
.btn-nav-pron:active {
  transform: scale(0.92);
}
.pron-btn-terminar {
  min-height: 50px;
  font-size: 1.02rem;
  font-weight: 800;
  border: 1.5px solid var(--borde-fuerte);
  background: rgba(255, 255, 255, 0.07);
  color: var(--texto);
  border-radius: var(--r-md);
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.pron-btn-terminar:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  transform: translateY(-1px);
}


/* Modal de Seguridad y Respaldo de Frases (Nivel 1 y Nivel 2) */
.card-seguridad-nivel {
  background: var(--card);
  border: 1px solid var(--borde);
  border-radius: var(--r-md);
  padding: 1rem;
}
.card-seguridad-cabecera {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.card-seguridad-cabecera h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--texto);
}
.badge-nivel {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--verde, #22c55e);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.badge-nivel.opcional {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.3);
}
.seguridad-metricas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.6rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--borde);
}
.metrica-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.metrica-label {
  font-size: 0.72rem;
  color: var(--texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.metrica-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--texto);
}

/* ==========================================================================
   REPRODUCTOR DE CASSETTE ANALÓGICO-DIGITAL (Mis Frases)
   ========================================================================== */
.cassette-deck-card {
  background: linear-gradient(180deg, #151b2a 0%, #0d121e 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md, 16px);
  padding: 14px 14px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cassette-deck-card.highlight {
  border-color: var(--teal, #06b6d4) !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.4), 0 14px 36px rgba(0, 0, 0, 0.6) !important;
}

.cassette-deck-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.6), rgba(99, 102, 241, 0.6), transparent);
}

.cassette-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.cassette-deck-lang-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  user-select: none;
}

.cassette-deck-lang-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.cassette-deck-lang-btn:active {
  transform: translateY(1px);
  background: rgba(99, 102, 241, 0.2);
}

.deck-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--texto-2, #b0b9d0);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.deck-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4b5563;
  transition: all 0.25s ease;
}

.deck-led.rec {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444, 0 0 4px #ef4444;
  animation: pulse-rec 0.9s infinite alternate;
}

.deck-led.play {
  background: #10b981;
  box-shadow: 0 0 10px #10b981, 0 0 4px #10b981;
}

.deck-led.translating {
  background: #6366f1;
  box-shadow: 0 0 10px #6366f1;
  animation: pulse-rec 0.5s infinite alternate;
}

@keyframes pulse-rec {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

/* El cuerpo del Casette */
.cassette-body {
  background: linear-gradient(180deg, #1b2232 0%, #101522 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px;
  position: relative;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7), 0 6px 16px rgba(0, 0, 0, 0.4);
}

.cassette-body::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 6px;
  background: #090d16;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px 4px 0 0;
}

.cassette-screw {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #9ca3af 20%, #374151 80%);
  box-shadow: inset 0 1px 1px #fff;
  z-index: 4;
}
.cassette-screw.tl { top: 6px; left: 6px; }
.cassette-screw.tr { top: 6px; right: 6px; }
.cassette-screw.bl { bottom: 6px; left: 6px; }
.cassette-screw.br { bottom: 6px; right: 6px; }

/* Etiqueta retro de la cinta: Toda la superficie dedicada a la caja de texto */
.cassette-sticker {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 45%, #f59e0b 100%);
  border-radius: 8px;
  padding: 5px;
  display: flex;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  position: relative;
}

.cassette-text-input {
  width: 100%;
  height: 52px;
  min-height: 50px;
  max-height: 56px;
  background: rgba(10, 14, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  outline: none;
  resize: none;
  overflow-y: auto;
  padding: 6px 10px;
  margin: 0;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.cassette-text-input:focus {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(10, 14, 24, 0.96);
}

.cassette-text-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

/* Ventana transparente central con cinta y carretes giratorios */
.cassette-tape-window {
  background: rgba(4, 7, 13, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  height: 52px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.9);
}

.tape-ribbon {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 50%;
  height: 12px;
  transform: translateY(-50%);
  background: #1c1410;
  border-top: 1px solid #33221a;
  border-bottom: 1px solid #33221a;
  z-index: 1;
}

.tape-counter-scale {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  background: rgba(10, 14, 22, 0.85);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: monospace;
  font-size: 8px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.7);
}

.tape-reel {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 20%, #e2e8f0 55%, #94a3b8 80%, #475569 100%);
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.95);
  transition: transform 0.1s linear;
}

.tape-reel-hub {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #090d16;
  border: 2px solid #1e293b;
  position: relative;
  z-index: 3;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
}

.reel-gear-spoke {
  position: absolute;
  width: 3px;
  height: 100%;
  background: #334155;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}
.reel-gear-spoke:nth-child(1) { transform: translateX(-50%) rotate(0deg); }
.reel-gear-spoke:nth-child(2) { transform: translateX(-50%) rotate(60deg); }
.reel-gear-spoke:nth-child(3) { transform: translateX(-50%) rotate(120deg); }

.cassette-deck-card.playing .tape-reel {
  animation: spin-cassette-reel 1.6s linear infinite;
}
.cassette-deck-card.recording .tape-reel {
  animation: spin-cassette-reel 2.2s linear infinite;
}

@keyframes spin-cassette-reel {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cassette-translation-display {
  background: rgba(10, 15, 26, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
  display: none;
  flex-direction: column;
  gap: 3px;
  animation: fadeIn 0.25s ease;
}

.cassette-translation-display.active {
  display: flex;
}

.cassette-output-target {
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cassette-output-phonetic {
  font-size: 11px;
  color: var(--teal, #2dd4bf);
  font-style: italic;
}

/* Botonera mecánica estilo cassette player (4 botones) */
.cassette-keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #090d16;
  padding: 8px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65);
}

.cassette-key-btn {
  background: linear-gradient(180deg, #2b364b 0%, #1c2536 60%, #121824 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 3.5px solid #060910;
  border-radius: 8px;
  padding: 7px 3px 6px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  transition: all 0.08s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  position: relative;
}

.cassette-key-btn::after {
  content: '';
  width: 12px;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 1px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.cassette-key-btn:hover {
  background: linear-gradient(180deg, #36445c 0%, #242f44 60%, #161e2e 100%);
  border-color: rgba(255, 255, 255, 0.28);
}

.cassette-key-btn:active,
.cassette-key-btn.active-pressed {
  transform: translateY(2.5px);
  border-bottom-width: 1px;
  background: linear-gradient(180deg, #131a26 0%, #1c2536 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.cassette-key-btn .key-icon {
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cassette-key-btn .key-text {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--texto-2, #b0b9d0);
  line-height: 1;
}

.cassette-key-btn.btn-rec .key-icon {
  color: #ef4444;
  filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.7));
}
.cassette-key-btn.btn-rec:hover .key-text {
  color: #f87171;
}

.cassette-key-btn.btn-trans .key-icon {
  color: #818cf8;
  filter: drop-shadow(0 0 5px rgba(129, 140, 248, 0.7));
}
.cassette-key-btn.btn-trans:hover .key-text {
  color: #a5b4fc;
}

.cassette-key-btn.btn-play .key-icon {
  color: #10b981;
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.7));
}
.cassette-key-btn.btn-play:hover .key-text {
  color: #34d399;
}

.cassette-key-btn.btn-save .key-icon {
  color: #f59e0b;
  filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.7));
}
.cassette-key-btn.btn-save:hover .key-text {
  color: #fbbf24;
}

/* ==========================================================================
   Modal de Bloqueo de Seguridad (Clave de Producto Requerida)
   ========================================================================== */
.modal-bloqueo-seguridad {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 1rem;
  border: none;
  background: transparent;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  z-index: 999999;
  box-sizing: border-box;
}

.modal-bloqueo-seguridad:not([open]) {
  display: none !important;
}

.modal-bloqueo-seguridad::backdrop {
  background: rgba(5, 8, 16, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.modal-bloqueo-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  margin: auto;
  background: linear-gradient(170deg, #131929 0%, #0d121f 100%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 20px;
  padding: 2rem 1.6rem 1.6rem 1.6rem;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(37, 99, 235, 0.15);
  text-align: center;
  color: #f1f5f9;
  box-sizing: border-box;
  animation: modal-entrada 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modal-entrada {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-bloqueo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.08) 100%);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #60a5fa;
  margin: 0 auto 1rem auto;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.estado-card {
  position: relative;
}

.estado-badge-spin svg {
  animation: hy-spin 1s linear infinite;
}

@keyframes hy-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.estado-badge-exito {
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #10b981 !important;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.08) 100%) !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.3) !important;
}

.estado-badge-alerta {
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #f59e0b !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.08) 100%) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2) !important;
}

.estado-badge-error {
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #ef4444 !important;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.25) 0%, rgba(185, 28, 28, 0.08) 100%) !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2) !important;
}

.bloqueo-titulo {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.bloqueo-sub {
  font-size: 0.9rem;
  line-height: 1.45;
  color: #94a3b8;
  margin: 0 auto 1.4rem auto;
  max-width: 380px;
}

.bloqueo-sub strong {
  color: #e2e8f0;
}

.form-bloqueo {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.bloqueo-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#input-bloqueo-clave {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  padding: 0.75rem 0.85rem;
  line-height: 1.4;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#input-bloqueo-clave:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.bloqueo-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
}

.btn-bloqueo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-bloqueo-cta:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5);
}

.bloqueo-separador {
  position: relative;
  text-align: center;
  margin: 1.2rem 0 0.85rem 0;
}

.bloqueo-separador::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.2);
}

.bloqueo-separador span {
  position: relative;
  background: #0f1626;
  padding: 0 0.65rem;
  font-size: 0.76rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-bloqueo-comprar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn-bloqueo-comprar:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.bloqueo-nota-seguridad {
  font-size: 0.75rem;
  color: #64748b;
  margin: 1rem 0 0 0;
  line-height: 1.35;
}





/* ---------- Valoración de HablasYa (hoja + botón) ---------- */
.rv-app-form { display: grid; gap: 0.75rem; text-align: left; }
.rv-app-form input[type="text"],
.rv-app-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--borde-fuerte);
  background: var(--bg-3);
  color: var(--texto);
  font: inherit;
}
.rv-app-form input[type="text"]:focus,
.rv-app-form textarea:focus { outline: 0; border-color: var(--primario); }
.rv-app-form textarea { resize: vertical; min-height: 110px; }
.rv-rating-input { position: relative; display: inline-flex; flex-direction: row-reverse; justify-content: center; gap: 0.35rem; }
.rv-rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-rating-input label { cursor: pointer; line-height: 0; padding: 0.15rem; }
.rv-rating-input label svg { width: 38px; height: 38px; fill: var(--borde-fuerte); transition: fill 0.15s, transform 0.15s; }
.rv-rating-input input:checked ~ label svg,
.rv-rating-input label:hover svg,
.rv-rating-input label:hover ~ label svg { fill: var(--ambar); }
.rv-rating-input input:focus-visible + label svg { outline: 2px solid var(--primario); border-radius: 6px; }
.rv-sr { position: absolute; left: -9999px; }
.rv-app-msg { min-height: 1.3em; margin: 0; font-size: 0.88rem; font-weight: 600; text-align: center; }
.rv-app-msg[data-tipo="error"] { color: #f87171; }
.rv-app-msg[data-tipo="info"] { color: var(--texto-2); }
.rv-btn-estrella { display: inline-flex; line-height: 0; }
.rv-btn-estrella svg { width: 15px; height: 15px; fill: var(--ambar); }

/* ---------- Edición Privada VIP · Vestuario & Día a Día del Futbolista ---------- */
.vip-vestuario-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92) 0%, rgba(13, 19, 31, 0.95) 100%);
  border: 1px solid rgba(16, 185, 129, 0.38);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}
.vip-vestuario-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.vip-vestuario-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #34d399;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.vip-vestuario-titulo {
  margin: 0 0 0.3rem 0;
  font-family: 'Outfit', -apple-system, sans-serif;
  font-size: 1.22rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}
.vip-vestuario-desc {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.45;
}
.vip-vestuario-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.vip-vestuario-cta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.vip-btn-avion {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.16);
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.vip-btn-avion:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.28);
  border-color: #3b82f6;
}
.vip-btn-avion:disabled {
  opacity: 0.65;
  cursor: wait;
}
.vip-btn-contacto {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.vip-btn-contacto:hover {
  background: rgba(16, 185, 129, 0.22);
  color: #ffffff;
}
.vip-vestuario-nota {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
}
.vip-langs-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.vip-langs-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  margin-right: 0.25rem;
}
.vip-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.vip-lang-pill.activa {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}
.vip-creador-pie {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding: 0.9rem 0.5rem 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #94a3b8;
}
.vip-link-creador {
  color: #6ee7b7;
  font-weight: 600;
  text-decoration: none;
}
.vip-link-creador:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ---------- Entrenador de Códigos, IDs, Pasaportes y Teléfonos ---------- */
.codigos-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(14px);
}
.codigos-input-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}
.codigos-input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 46px;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: rgba(7, 10, 17, 0.9);
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-sizing: border-box;
}
.codigos-input:focus {
  outline: none;
  border-color: #3b82f6;
}
.codigos-fichas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.codigos-ficha {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  min-height: 68px;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(13, 19, 31, 0.95);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}
.codigos-ficha:hover {
  border-color: rgba(59, 130, 246, 0.65);
  background: rgba(30, 41, 59, 0.9);
}
.codigos-ficha.activa {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.16);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.codigos-ficha-char {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}
.codigos-ficha-txt {
  font-size: 0.76rem;
  color: #cbd5e1;
  margin-top: 0.2rem;
  text-align: center;
}
.codigos-ficha-fon {
  font-size: 0.72rem;
  color: #f59e0b;
  font-weight: 600;
  text-align: center;
}
.codigos-pausa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.2rem;
  color: #64748b;
  font-weight: 800;
  font-size: 1.2rem;
}
.codigos-tabla-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 0.45rem;
  margin-top: 0.65rem;
}
.codigos-mini-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 44px;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 10, 17, 0.7);
  color: #f8fafc;
  cursor: pointer;
  text-align: left;
}
.codigos-mini-btn:hover {
  border-color: rgba(59, 130, 246, 0.55);
}
.codigos-mini-btn strong {
  font-size: 0.9rem;
  color: #ffffff;
}
.codigos-mini-btn span {
  font-size: 0.76rem;
  color: #cbd5e1;
}
.codigos-mini-btn small {
  font-size: 0.7rem;
  color: #f59e0b;
}

/* Guía colapsable y sugerencias regionales Catalán / Valenciano */
.nota-variantes-ca {
  margin-top: 0.75rem;
  border: 1px solid rgba(245, 177, 61, 0.3);
  background: rgba(15, 23, 42, 0.78);
  border-radius: 12px;
  overflow: hidden;
}
.nota-variantes-ca-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.84rem;
  color: var(--texto);
}
.nota-variantes-ca-summary::-webkit-details-marker {
  display: none;
}
.nota-variantes-ca-pill {
  background: var(--ambar-suave);
  border: 1px solid rgba(245, 177, 61, 0.4);
  color: var(--ambar);
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.nota-variantes-ca-title {
  font-weight: 600;
  color: #f8fafc;
  flex: 1 1 auto;
  min-width: 0;
}
.nota-variantes-ca-chevron {
  color: var(--ambar);
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}
.nota-variantes-ca[open] .nota-variantes-ca-chevron {
  transform: rotate(180deg);
}
.nota-variantes-ca-body {
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.variantes-ca-intro {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--texto-2);
  line-height: 1.45;
}
.variantes-ca-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
}
.variantes-ca-item {
  background: rgba(7, 10, 17, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}
.variantes-ca-bloque {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}
.variantes-ca-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.3rem;
}
@media (min-width: 640px) {
  .variantes-ca-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }
}
.variantes-ca-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.79rem;
  color: #e2e8f0;
  overflow-wrap: anywhere;
}
.variantes-ca-tag {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.variantes-ca-tag.cat {
  color: #93c5fd;
}
.variantes-ca-tag.val {
  color: var(--ambar);
}
.variantes-ca-tag.bal {
  color: var(--teal);
}
.variantes-ca-uso {
  margin: 0.35rem 0 0;
  font-size: 0.74rem;
  color: var(--texto-3);
  line-height: 1.35;
}
.variantes-ca-pron {
  margin: 0;
  font-size: 0.78rem;
  color: #cbd5e1;
  background: rgba(45, 212, 191, 0.08);
  border-left: 3px solid var(--teal);
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  line-height: 1.45;
}
.nota-variantes-ca-link {
  align-self: flex-start;
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--teal-2);
  text-decoration: none;
  padding: 0.25rem 0;
}
.nota-variantes-ca-link:hover {
  text-decoration: underline;
}
.frase-variante-ca {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #fde68a;
  background: rgba(245, 177, 61, 0.1);
  border: 1px solid rgba(245, 177, 61, 0.28);
  border-radius: 8px;
  padding: 0.22rem 0.5rem;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.frase-variante-ca-tag {
  font-weight: 700;
  color: var(--ambar);
}
