/**
 * Nuvio Metadata Latino - Sistema de Diseño Cinemático LAT-ADD
 * Paleta OLED profunda, Glassmorphism con brillo especular, Film Grain y Tipografía de Autor
 */

/* ============================================================ */
/* 1. TIPOGRAFÍAS DE AUTOR (Instrument Sans & Instrument Serif) */
/* ============================================================ */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/instrument-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/instrument-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/instrument-serif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/instrument-serif-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================================ */
/* 2. VARIABLES DE DISEÑO (TOKENS LAT-ADD)                      */
/* ============================================================ */

:root {
  /* Fondo cinematográfico casi negro (#08090c) */
  --color-bg: #08090c;
  --color-panel: #0b0d12;
  --color-panel-card: #0f1218;

  /* Vidrio y hairlines translúcidos */
  --color-glass: rgba(255, 255, 255, 0.07);
  --color-glass-strong: rgba(255, 255, 255, 0.10);
  --color-glass-soft: rgba(255, 255, 255, 0.055);
  --color-glass-active: rgba(255, 255, 255, 0.16);
  --color-glass-dark: rgba(10, 12, 16, 0.65);

  --color-hairline: rgba(255, 255, 255, 0.08);
  --color-hairline-strong: rgba(255, 255, 255, 0.14);
  --color-hairline-soft: rgba(255, 255, 255, 0.11);

  /* Texto hueso de alto contraste */
  --color-ink: #ffffff;
  --color-ink-muted: rgba(255, 255, 255, 0.58);
  --color-ink-faint: rgba(255, 255, 255, 0.28);

  /* Acentos cálidos cinematográficos */
  --color-estrella: #ffd479;
  --color-4k: #ffdba8;
  --borde-4k: rgba(255, 212, 121, 0.45);
  --fondo-4k: rgba(22, 15, 4, 0.76);

  /* Radios de curvatura */
  --radius-capsule: 999px;
  --radius-card: 26px;
  --radius-poster: 16px;
  --radius-panel: 22px;
  --radius-field: 16px;

  /* Altura unificada de cápsulas flotantes */
  --lat-capsule-height: 50px;
  --lat-capsule-height-mobile: 42px;

  /* Brillo especular del vidrio */
  --brillo-vidrio:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.035);

  /* Sombras de elevación cinemática */
  --shadow-lift:
    var(--brillo-vidrio),
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.20),
    0 12px 26px rgba(0, 0, 0, 0.28);

  --shadow-poster:
    0 1px 2px rgba(0, 0, 0, 0.24),
    0 3px 6px rgba(0, 0, 0, 0.18),
    0 7px 14px rgba(0, 0, 0, 0.22);

  --shadow-poster-hover:
    var(--brillo-vidrio),
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 8px 18px rgba(0, 0, 0, 0.25),
    0 16px 32px rgba(0, 0, 0, 0.35);

  --shadow-pill:
    var(--brillo-vidrio),
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 3px 8px rgba(0, 0, 0, 0.12);

  --blur-glass: 34px;

  /* Tipografías */
  --font-sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  /* Ruido fractal OLED (Film Grain) */
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ============================================================ */
/* 3. CAPAS GLOBALES Y BASE                                     */
/* ============================================================ */

html {
  color-scheme: dark;
  background-color: var(--color-bg);
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  max-width: 100vw;
  overflow-x: clip;
}

body {
  background-color: var(--color-bg) !important;
  color: var(--color-ink);
  font-family: var(--font-sans);
  margin: 0;
  max-width: 100vw;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grano analógico sobre la pantalla */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background-image: var(--grano);
  opacity: 0.032;
}

/* Selección de texto elegante */
::selection {
  background-color: rgba(255, 255, 255, 0.22);
  color: var(--color-ink);
}

/* Opciones de select con fondo acorde */
option, optgroup {
  background-color: var(--color-panel);
  color: var(--color-ink);
}

/* Scrollbars personalizadas estilo glass */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(8, 9, 12, 0.8);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ============================================================ */
/* 4. CLASES DE UTILIDAD LAT-ADD                                */
/* ============================================================ */

.font-serif-title {
  font-family: var(--font-serif);
}

.lat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-ink-muted);
  font-weight: 600;
}

.lat-card {
  background: var(--color-glass);
  border: 1px solid var(--color-hairline);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  box-shadow: var(--shadow-lift);
  border-radius: var(--radius-card);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.lat-card-panel {
  background: var(--color-panel);
  border: 1px solid var(--color-hairline);
  box-shadow: var(--shadow-lift);
  border-radius: var(--radius-card);
}

/* ============================================================ */
/* BARRA DE NAVEGACIÓN FLOTANTE (FLOATING CAPSULE NAVBAR)       */
/* ============================================================ */

.lat-floating-nav {
  position: fixed;
  top: 0.75rem;
  left: 0;
  right: 0;
  z-index: 50;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .lat-floating-nav {
    top: 1.25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    gap: 0.75rem;
  }
}

.lat-floating-pill {
  pointer-events: auto;
  height: var(--lat-capsule-height-mobile, 42px);
  min-height: var(--lat-capsule-height-mobile, 42px);
  background: rgba(14, 17, 24, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 1px 0 rgba(0, 0, 0, 0.4),
    0 8px 32px 0 rgba(0, 0, 0, 0.45);
  border-radius: var(--radius-capsule);
  transition: border-color 0.24s ease, background-color 0.24s ease, box-shadow 0.24s ease;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .lat-floating-pill {
    height: var(--lat-capsule-height, 50px);
    min-height: var(--lat-capsule-height, 50px);
  }
}

.lat-floating-pill:hover {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 1px 0 rgba(0, 0, 0, 0.4),
    0 12px 36px 0 rgba(0, 0, 0, 0.55);
}

/* ============================================================ */
/* PASTILLA DINÁMICA DEL CONTADOR DE COMPLETADOS                */
/* ============================================================ */

.completions-counter-pill {
  will-change: transform, border-color, box-shadow;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: var(--lat-capsule-height-mobile, 42px);
}

@media (min-width: 640px) {
  .completions-counter-pill {
    height: var(--lat-capsule-height, 50px);
  }
}

.completions-counter-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow:
    inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 1px 0 rgba(0, 0, 0, 0.35),
    0 12px 36px 0 rgba(0, 0, 0, 0.58),
    0 0 18px 0 rgba(16, 185, 129, 0.18);
}

/* Modo compacto por defecto (móviles, tablets y dispositivos táctiles) */
.completions-counter-pill .completions-count-compact {
  max-width: 80px;
  opacity: 1;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
  transition: max-width 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease-out;
}

.completions-counter-pill .completions-expanded-wrap {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  line-height: 1;
  transition: max-width 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.26s ease-out;
}

/* Expansión elegante en hover ÚNICAMENTE en monitores de escritorio con puntero fino */
@media (min-width: 1080px) and (hover: hover) and (pointer: fine) {
  .completions-counter-pill:hover .completions-count-compact,
  .completions-counter-pill.is-celebrating .completions-count-compact {
    max-width: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
  }

  .completions-counter-pill:hover .completions-expanded-wrap,
  .completions-counter-pill.is-celebrating .completions-expanded-wrap {
    max-width: 280px;
    opacity: 1;
  }
}

.completions-counter-pill.is-celebrating {
  border-color: rgba(16, 185, 129, 0.6) !important;
  box-shadow:
    inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.42),
    0 0 24px rgba(16, 185, 129, 0.38) !important;
  animation: pill-celebration-pulse 1.8s ease-in-out infinite alternate;
}

@keyframes pill-celebration-pulse {
  0% { box-shadow: inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.4), 0 0 14px rgba(16, 185, 129, 0.25); }
  100% { box-shadow: inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.4), 0 0 26px rgba(16, 185, 129, 0.5); }
}

/* ============================================================ */
/* ODÓMETRO / RULETA DIGITAL ESTILO YOUTUBE (DÍGITOS RODANTES)  */
/* ============================================================ */

.odometer-wrapper {
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  line-height: 1;
  vertical-align: middle;
}

.odometer-digit-slot {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  height: 1.15em;
  line-height: 1.15em;
  text-align: center;
  vertical-align: middle;
  min-width: 0.6em;
}

.odometer-digit-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.odometer-digit-val {
  display: block;
  height: 1.15em;
  line-height: 1.15em;
  text-align: center;
}

.odometer-static-char {
  display: inline-block;
  line-height: 1.15em;
  vertical-align: middle;
}

/* ============================================================ */
/* ADAPTABILIDAD RESPONSIVA Y CONTROL DE OVERFLOW DE CABECERA   */
/* ============================================================ */

/* Estado compacto por defecto (móviles, tablets y pantallas < 1080px o con desborde forzado) */
.lat-floating-nav .lat-brand-text,
.lat-floating-nav .lat-brand-badge {
  display: none !important;
}

.lat-floating-nav .lat-desktop-nav-cluster {
  display: none !important;
}

.lat-floating-nav .lat-mobile-nav-cluster {
  display: block !important;
}

/* Estado de escritorio (pantallas >= 1080px sin desborde) */
@media (min-width: 1080px) {
  .lat-floating-nav:not(.force-compact) .lat-brand-text {
    display: inline !important;
  }
  .lat-floating-nav:not(.force-compact) .lat-brand-badge {
    display: inline !important;
  }
  .lat-floating-nav:not(.force-compact) nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .lat-floating-nav:not(.force-compact) .lat-desktop-nav-cluster {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex !important;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start;
  }
  .lat-desktop-nav-cluster > #completionsCounterPill {
    order: 3;
  }
  .lat-desktop-nav-cluster > a[href*="discord"] {
    order: 2;
  }
  .lat-desktop-nav-cluster > a[href*="github"],
  .lat-desktop-nav-cluster > a:last-of-type {
    order: 1;
  }
  .lat-floating-nav:not(.force-compact) .lat-mobile-nav-cluster {
    display: none !important;
  }
}

.lat-desktop-nav-cluster > a.lat-floating-pill {
  height: var(--lat-capsule-height, 50px);
  min-width: var(--lat-capsule-height, 50px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#btnMobileHeaderMenu {
  width: var(--lat-capsule-height-mobile, 42px);
  height: var(--lat-capsule-height-mobile, 42px);
  min-width: var(--lat-capsule-height-mobile, 42px);
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  #btnMobileHeaderMenu {
    width: var(--lat-capsule-height, 50px);
    height: var(--lat-capsule-height, 50px);
    min-width: var(--lat-capsule-height, 50px);
  }
}

/* ============================================================ */
/* MENÚ DESPLEGABLE VERTICAL FLOTANTE (MÓVIL & TABLET ANGOSTA)  */
/* ============================================================ */

.lat-mobile-nav-cluster {
  position: relative;
  display: flex;
  align-items: center;
}

.lat-mobile-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: rgba(13, 16, 23, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  box-shadow:
    inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.28),
    0 16px 40px rgba(0, 0, 0, 0.7);
  border-radius: 22px;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.95);
  transform-origin: top right;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.lat-mobile-dropdown.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.lat-mobile-dropdown-item {
  height: 38px;
  padding: 0 0.85rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lat-mobile-dropdown-item:hover,
.lat-mobile-dropdown-item:active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

/* ============================================================ */
/* SWITCHES DE ALTO CONTRASTE (ON DORADO / OFF TRASLÚCIDO)     */
/* ============================================================ */

.lat-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.lat-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.lat-switch-track {
  width: 2.75rem;
  height: 1.5rem;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-capsule);
  transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
  box-shadow: var(--brillo-vidrio);
  display: flex;
  align-items: center;
  padding: 0 2px;
  box-sizing: border-box;
}

.lat-switch-thumb {
  width: 1.2rem;
  height: 1.2rem;
  aspect-ratio: 1;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.55);
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1), background-color 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.lat-switch input:checked + .lat-switch-track {
  background-color: #ffd479;
  border-color: rgba(255, 212, 121, 0.8);
  box-shadow: 0 0 16px rgba(255, 212, 121, 0.45);
}

.lat-switch input:checked + .lat-switch-track .lat-switch-thumb {
  transform: translateX(1.22rem);
  background-color: #08090c;
}

/* ============================================================ */
/* CHECKBOX PERSONALIZADO MINI NUVIO (DORADO & VIDRIO)         */
/* ============================================================ */

.lat-folder-checkbox {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 8px;
  background: rgba(8, 9, 12, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: transparent;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.lat-folder-checkbox:hover {
  border-color: rgba(255, 255, 255, 0.7);
  transform: scale(1.05);
}

.lat-folder-checkbox.checked {
  background: #ffd479;
  border-color: #ffd479;
  color: #08090c;
  box-shadow: 0 0 12px rgba(255, 212, 121, 0.55);
}

.lat-capsule-btn,
.lat-capsule-btn-solid,
.lat-capsule-btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-capsule);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.65rem 1.4rem;
  transition: all 0.22s cubic-bezier(0.32, 0.72, 0, 1);
  user-select: none;
  cursor: pointer;
  outline: none;
  text-decoration: none;
}

.lat-capsule-btn:focus-visible,
.lat-capsule-btn-solid:focus-visible,
.lat-capsule-btn-glass:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}

.lat-capsule-btn.solid,
.lat-capsule-btn-solid {
  background: #ffffff !important;
  color: #08090c !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: 1px solid transparent;
  font-weight: 600;
}

.lat-capsule-btn.solid:hover,
.lat-capsule-btn-solid:hover {
  background: rgba(255, 255, 255, 0.92) !important;
  transform: translateY(-1px);
  color: #08090c !important;
}

.lat-capsule-btn.glass,
.lat-capsule-btn-glass {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-ink);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--brillo-vidrio);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.lat-capsule-btn.glass:hover,
.lat-capsule-btn-glass:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px) translateZ(0);
  color: var(--color-ink);
}

/* Aislamiento GPU contra parpadeos (Flicker Prevention) */
.poster-option-card,
.step-content,
.drawer-step-item,
.auth-pill-container {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#posterPreviewDefault,
#posterPreviewBetter,
#posterPreviewPostersPlus {
  will-change: opacity;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.lat-field {
  background: var(--color-glass);
  border: 1px solid var(--color-hairline-strong);
  color: var(--color-ink);
  border-radius: var(--radius-field);
  padding: 0.75rem 1rem;
  box-shadow: var(--brillo-vidrio);
  font-size: 0.9375rem;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

.lat-field::placeholder {
  color: var(--color-ink-faint);
}

.lat-field:hover {
  background: var(--color-glass-strong);
  border-color: rgba(255, 255, 255, 0.22);
}

.lat-field:focus {
  outline: none;
  background: var(--color-glass-strong);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: var(--brillo-vidrio), 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* ============================================================ */
/* 5. CONTROL DE PASOS DEL ASISTENTE                            */
/* ============================================================ */

.step-content {
  display: none !important;
  animation: fadeIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.step-content.active {
  display: block !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efectos Glow Cinemáticos */
.glow-brand {
  box-shadow: 0 0 30px -5px rgba(255, 255, 255, 0.15), var(--brillo-vidrio);
}

.glow-emerald {
  box-shadow: 0 0 30px -5px rgba(16, 185, 129, 0.25), var(--brillo-vidrio);
}

/* ============================================================ */
/* 6. CONSOLA Y TERMINAL LOG                                    */
/* ============================================================ */

.terminal-log {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.6;
}

.terminal-log .log-info {
  color: var(--color-ink-muted);
}

.terminal-log .log-success {
  color: #34d399;
  font-weight: 500;
}

.terminal-log .log-warning {
  color: #ffd479;
}

.terminal-log .log-error {
  color: #f87171;
  font-weight: 600;
}

/* ============================================================ */
/* 7. STEPPER EN CÁPSULAS HORIZONTALES (TOP PILLS)              */
/* ============================================================ */

.capsule-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.25rem 0.125rem;
}

.capsule-stepper::-webkit-scrollbar {
  display: none;
}

.step-capsule {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-capsule);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.32, 0.72, 0, 1);
  user-select: none;
}

.step-capsule.active {
  background: var(--color-glass-active);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: var(--brillo-vidrio), 0 0 18px -2px rgba(255, 255, 255, 0.15);
}

.step-capsule.completed {
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.32);
  cursor: pointer;
}

.step-capsule.completed:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #ffffff;
  border-color: rgba(16, 185, 129, 0.55);
  transform: translateY(-1px);
}

.step-capsule.locked {
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-ink-faint);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: not-allowed;
  opacity: 0.55;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.step-capsule.active .step-badge {
  background: #ffffff;
  color: #08090c;
}

.step-capsule.completed .step-badge {
  background: rgba(16, 185, 129, 0.28);
  color: #34d399;
}

.step-capsule.locked .step-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-ink-faint);
}

/* ============================================================ */
/* 8. DRAWER LATERAL PARA EL ÍNDICE DE PASOS                    */
/* ============================================================ */

#indexDrawer {
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

#indexDrawerOverlay {
  transition: opacity 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

#indexDrawerOverlay.open {
  opacity: 1;
  pointer-events: auto;
}

#indexDrawer.open {
  transform: translateX(0);
}

.drawer-step-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-field);
  background: var(--color-glass);
  border: 1px solid var(--color-hairline);
  color: var(--color-ink-muted);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.32, 0.72, 0, 1);
  user-select: none;
  box-shadow: var(--brillo-vidrio);
}

.drawer-step-item:hover {
  background: var(--color-glass-strong);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-ink);
  transform: translateX(2px);
}

.drawer-step-item .drawer-badge {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-ink-muted);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.drawer-step-item.active {
  background: var(--color-glass-active);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  box-shadow: var(--brillo-vidrio), 0 0 20px -2px rgba(255, 255, 255, 0.15);
}

.drawer-step-item.active .drawer-badge {
  background: #ffffff;
  color: #08090c;
}

.drawer-step-item.completed {
  border-color: rgba(16, 185, 129, 0.35);
  color: #d1fae5;
}

.drawer-step-item.completed:hover {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.1);
}

.drawer-step-item.completed .drawer-badge {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.drawer-step-item.locked {
  opacity: 0.45;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  cursor: not-allowed;
}

/* ============================================================ */
/* 9. TARJETA DE PERFIL SELECCIONADO                            */
/* ============================================================ */

.profile-card-selected {
  border-color: rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--brillo-vidrio), 0 0 25px -3px rgba(255, 255, 255, 0.2) !important;
  background: var(--color-glass-strong) !important;
}

/* ============================================================ */
/* 10. DRAG & DROP, WIGGLE & CONTORNOS CINEMÁTICOS              */
/* ============================================================ */

@keyframes wiggle {
  0% { transform: rotate(0deg) scale(1.02); }
  25% { transform: rotate(-1.2deg) scale(1.02); }
  50% { transform: rotate(0deg) scale(1.02); }
  75% { transform: rotate(1.2deg) scale(1.02); }
  100% { transform: rotate(0deg) scale(1.02); }
}

/* Elementos activos o en arrastre */
.is-dragging {
  animation: wiggle 0.28s ease-in-out infinite !important;
  opacity: 0.9 !important;
  cursor: grabbing !important;
  border-color: var(--color-estrella) !important;
  box-shadow: 0 14px 28px -5px rgba(0, 0, 0, 0.7), 0 0 0 2px var(--color-estrella) !important;
  z-index: 50 !important;
}

/* Cápsula de Colección (Mini Tarjetas) */
.draggable-card {
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
  cursor: grab;
}

.draggable-card:active {
  animation: wiggle 0.28s ease-in-out infinite;
  cursor: grabbing;
}

.draggable-card:hover {
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: var(--shadow-poster-hover) !important;
  transform: translateY(-2px);
}

.draggable-card.drag-over {
  border-color: var(--color-estrella) !important;
  box-shadow: 0 0 25px -2px rgba(255, 212, 121, 0.4), inset 0 0 15px rgba(255, 212, 121, 0.15) !important;
  transform: scale(0.97);
}

/* Overlay de acciones en tarjetas: Exclusivo para PC / Escritorio con ratón */
.card-hover-overlay {
  display: none !important;
}

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .card-hover-overlay {
    display: flex !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .draggable-card:hover .card-hover-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Contenedor de Sección */
.section-container {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.section-container:has(.section-header:hover),
.section-container.header-hovered {
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: var(--shadow-lift);
}

.section-container.drag-over-section {
  border-color: var(--color-estrella) !important;
  box-shadow: 0 0 30px -2px rgba(255, 212, 121, 0.35), inset 0 0 15px rgba(255, 212, 121, 0.08) !important;
}

.section-drag-handle {
  cursor: grab;
  user-select: none;
}

.section-drag-handle:active {
  cursor: grabbing;
}

/* Filas de Catálogo en el Explorador */
.catalog-explorer-row {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: grab;
}

.catalog-explorer-row:active {
  animation: wiggle 0.28s ease-in-out infinite;
  cursor: grabbing;
}

.catalog-explorer-row:hover {
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: var(--brillo-vidrio), 0 0 18px -3px rgba(255, 255, 255, 0.1);
}

.catalog-explorer-row.drag-over-catalog {
  border-color: var(--color-estrella) !important;
  box-shadow: 0 0 22px -2px rgba(255, 212, 121, 0.4) !important;
  transform: scale(0.99);
}

/* Sortable Ghosts */
.is-chosen {
  animation: wiggle 0.28s ease-in-out infinite !important;
  cursor: grabbing !important;
  border-color: var(--color-estrella) !important;
  box-shadow: 0 14px 28px -5px rgba(0, 0, 0, 0.7), 0 0 0 2px var(--color-estrella) !important;
  z-index: 9999 !important;
}

.card-sortable-ghost {
  opacity: 0.28 !important;
  border: 2px dashed rgba(255, 255, 255, 0.4) !important;
  background: var(--color-glass) !important;
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.1) !important;
  transform: scale(0.96);
  border-radius: var(--radius-poster);
}

.section-sortable-ghost {
  opacity: 0.3 !important;
  border: 2px dashed rgba(255, 255, 255, 0.35) !important;
  background: var(--color-glass-soft) !important;
  border-radius: var(--radius-card);
}

.catalog-sortable-ghost {
  opacity: 0.25 !important;
  border: 2px dashed rgba(255, 255, 255, 0.4) !important;
  background: var(--color-glass) !important;
  border-radius: var(--radius-field);
}

/* Desactivar cursores de agarre y animaciones de arrastre en pantallas táctiles y móviles */
@media (max-width: 767px), (pointer: coarse) {
  .draggable-card,
  .catalog-explorer-row,
  .section-drag-handle {
    cursor: default !important;
  }
  .catalog-explorer-row:active,
  .draggable-card:active {
    animation: none !important;
    cursor: default !important;
  }
}

/* ============================================================ */
/* 11. VISTAS PRINCIPALES: LANDING VS ASISTENTE                 */
/* ============================================================ */

#landingView {
  display: block;
  animation: fadeIn 0.35s ease-out forwards;
}

#landingView.hidden {
  display: none !important;
}

#wizardView {
  display: flex;
  animation: fadeIn 0.35s ease-out forwards;
}

#wizardView.hidden {
  display: none !important;
}

/* Efectos visuales de la Landing Page */
.hero-glow {
  position: relative;
}

.hero-glow::before {
  content: '';
  position: absolute;
  top: -120px;
  bottom: -60px;
  left: -20%;
  right: -20%;
  background: radial-gradient(ellipse 65% 55% at 50% 45%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 212, 121, 0.03) 35%, rgba(8, 9, 12, 0) 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(40px);
}

.feature-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  background: var(--color-glass);
  border: 1px solid var(--color-hairline);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  box-shadow: var(--shadow-lift);
  border-radius: var(--radius-card);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.28) !important;
  box-shadow: var(--brillo-vidrio), 0 16px 32px -8px rgba(0, 0, 0, 0.6);
}

.showcase-frame {
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.85), var(--brillo-vidrio);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-card);
}

.faq-details summary {
  cursor: pointer;
  list-style: none;
}

.faq-details summary::-webkit-details-marker {
  display: none;
}

.faq-details[open] summary .faq-icon {
  transform: rotate(180deg);
}

/* ============================================================ */
/* 12. ANIMACIONES DE PASTILLAS SEGMENTADAS Y SOMBRAS HERO      */
/* ============================================================ */

.hero-title-shadow {
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.95), 0 2px 10px rgba(0, 0, 0, 0.9);
}

.hero-desc-shadow {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.95), 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* Slider animado para switch de autenticación */
.auth-pill-container {
  position: relative;
  user-select: none;
}

.auth-pill-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
  z-index: 1;
}

.auth-pill-indicator.signup {
  transform: translateX(100%);
}

/* Slider animado para barra de navegación segmentada */
.nav-pill-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  background: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
  z-index: 1;
}

/* Pestañas de la barra de navegación flotante LAT-ADD */
header.lat-floating-nav nav {
  position: relative;
  overflow: hidden;
  height: var(--lat-capsule-height-mobile, 42px);
  min-height: var(--lat-capsule-height-mobile, 42px);
  box-sizing: border-box;
  transition: padding 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              gap 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease;
}

@media (min-width: 640px) {
  header.lat-floating-nav nav {
    height: var(--lat-capsule-height, 50px);
    min-height: var(--lat-capsule-height, 50px);
  }
}

.lat-nav-tab {
  position: relative;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.45rem;
  padding: 0 0.65rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none;
  transition: color 0.2s cubic-bezier(0.32, 0.72, 0, 1),
              padding 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              gap 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  background: transparent !important;
  white-space: nowrap;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .lat-nav-tab {
    padding: 0 1rem;
    gap: 0.5rem;
  }
}

.lat-nav-tab * {
  pointer-events: none;
  transition: color 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

.lat-nav-tab i {
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  flex-shrink: 0;
}

.lat-nav-tab span {
  display: none;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  max-width: 140px;
  opacity: 1;
  color: rgba(255, 255, 255, 0.7);
  transition: max-width 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.24s ease-out,
              margin 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .lat-nav-tab span {
    display: inline-block !important;
  }
}

/* Estado activo o señalado (cuando la pastilla blanca está debajo) */
.lat-nav-tab.is-active,
.lat-nav-tab.is-hovered {
  color: #08090c !important;
  font-weight: 600;
}

.lat-nav-tab.is-active i,
.lat-nav-tab.is-active span,
.lat-nav-tab.is-hovered i,
.lat-nav-tab.is-hovered span {
  color: #08090c !important;
}

/* ============================================================ */
/* COMPENSACIÓN REACTIVA: EXPANDIR CONTADOR -> SOLO ÍCONOS EN NAV */
/* ============================================================ */

@media (min-width: 1080px) and (hover: hover) and (pointer: fine) {
  /* Cuando el contador se expande por hover o celebración en desktop: comprimir suavemente las pestañas centrales */
  .lat-floating-nav:has(.completions-counter-pill:hover) .lat-nav-tab,
  .lat-floating-nav:has(.completions-counter-pill.is-celebrating) .lat-nav-tab,
  .lat-floating-nav.is-counter-expanded .lat-nav-tab {
    padding-left: 0.8rem !important;
    padding-right: 0.8rem !important;
    gap: 0 !important;
  }

  .lat-floating-nav:has(.completions-counter-pill:hover) .lat-nav-tab span,
  .lat-floating-nav:has(.completions-counter-pill.is-celebrating) .lat-nav-tab span,
  .lat-floating-nav.is-counter-expanded .lat-nav-tab span {
    max-width: 0 !important;
    opacity: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .lat-floating-nav:has(.completions-counter-pill:hover) .lat-nav-tab i,
  .lat-floating-nav:has(.completions-counter-pill.is-celebrating) .lat-nav-tab i,
  .lat-floating-nav.is-counter-expanded .lat-nav-tab i {
    transform: scale(1.12);
  }
}

/* Transición cinemática para el fondo al hacer scroll */
#heroBackdrop {
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter;
}

/* ============================================================ */
/* 13. NOTIFICACIONES FLOTANTES (TOASTS) LAT-ADD                */
/* ============================================================ */

.lat-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.25rem;
  border-radius: 9999px;
  background: rgba(11, 13, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: var(--shadow-lift), var(--brillo-vidrio);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  transform: translateZ(0);
}

.lat-toast.is-entering {
  transform: translateY(12px) scale(0.96);
  opacity: 0;
}

.lat-toast.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.lat-toast.is-leaving {
  transform: translateY(8px) scale(0.96);
  opacity: 0;
}

/* ============================================================ */
/* 14. TARJETAS DE PAQUETES DE BADGES (FUSION BADGES)          */
/* ============================================================ */

.badge-pack-card {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s ease,
              background-color 0.22s ease,
              box-shadow 0.22s ease;
  will-change: transform, box-shadow;
}

.badge-pack-card:hover {
  transform: translateY(-2px);
}

/* Animación Fluida para Contenedor de Badges (Accordion CSS Grid) */
.badges-collapsible {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0 !important;
  transition: grid-template-rows 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: grid-template-rows, opacity, margin-top;
}

.badges-collapsible:not(.is-open) {
  margin-top: 0 !important;
  pointer-events: none;
}

.badges-collapsible.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 1rem !important;
}

.badges-collapsible > .badges-collapsible-inner {
  overflow: hidden;
  min-height: 0;
}

/* Chips / Toggles de Módulos de Badges */
.badge-module-pill:has(input:checked) {
  border-color: rgba(255, 212, 121, 0.45) !important;
  background-color: rgba(255, 212, 121, 0.08) !important;
  color: #ffffff !important;
}

.badge-module-pill:has(input:checked) .check-indicator {
  background-color: #ffd479 !important;
  border-color: #ffd479 !important;
}

.badge-module-pill:has(input:checked) .check-indicator i {
  opacity: 1 !important;
}

/* Chips y Controles de Reordenamiento de Secciones de Badges */
.badge-order-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.badge-order-chip:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 212, 121, 0.35);
}

.badge-order-btn {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.625rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.badge-order-btn:hover:not(:disabled) {
  background: #ffd479;
  color: #08090c;
  transform: scale(1.08);
}

.badge-order-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

/* Cajas de secciones de badges auto-balanceadas */
.badge-section-box {
  flex: 1 1 200px;
  min-width: 190px;
  align-self: stretch;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Estilos y dimensiones garantizadas para chips e imágenes de badges */
.badge-chip {
  min-height: 24px;
  min-width: 26px;
  box-sizing: border-box;
}

.badge-chip img {
  height: 14px;
  max-height: 15px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.badge-chip img.badge-flag-img {
  width: 21px;
  height: 14px;
  aspect-ratio: 3 / 2;
}

.badge-chip img.badge-sub-img {
  min-width: 28px;
  height: 14px;
  aspect-ratio: 2.1 / 1;
}

.badges-flow-container {
  position: relative;
  overflow: hidden;
}

/* ============================================================ */
/* 15. GESTOR DE CUENTA Y PERFIL (/cuenta)                      */
/* ============================================================ */

.account-container {
  padding-top: 6.5rem;
  padding-bottom: 4rem;
  min-height: calc(100dvh - 120px);
}

@media (min-width: 640px) {
  .account-container {
    padding-top: 7.5rem;
  }
}

/* Sub-Barra Horizontal de Gestión de Cuenta (/account) */
.account-subnav-bar {
  width: 100%;
  max-width: 1440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

#btnAccountProfileTrigger {
  height: var(--lat-capsule-height-mobile, 42px);
  min-height: var(--lat-capsule-height-mobile, 42px);
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  #btnAccountProfileTrigger {
    height: var(--lat-capsule-height, 50px);
    min-height: var(--lat-capsule-height, 50px);
  }
}

#btnAccountLogout {
  height: var(--lat-capsule-height-mobile, 42px);
  min-height: var(--lat-capsule-height-mobile, 42px);
  min-width: var(--lat-capsule-height-mobile, 42px);
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  #btnAccountLogout {
    height: var(--lat-capsule-height, 50px);
    min-height: var(--lat-capsule-height, 50px);
    min-width: var(--lat-capsule-height, 50px);
  }
}

/* Envoltura deslizable para las pestañas centrales */
.account-tabs-slider-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
}

.account-tabs-pill {
  max-width: 100%;
  height: var(--lat-capsule-height-mobile, 42px);
  min-height: var(--lat-capsule-height-mobile, 42px);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  scroll-behavior: smooth;
  user-select: none;
  cursor: grab;
  padding: 4px 6px;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .account-tabs-pill {
    height: var(--lat-capsule-height, 50px);
    min-height: var(--lat-capsule-height, 50px);
    padding: 6px 8px;
  }
}

.account-tabs-pill::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.account-tabs-pill:active {
  cursor: grabbing;
}

/* Botones de navegación horizontal en la sub-barra */
.account-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.5rem;
  padding: 0 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.account-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.14);
}

.account-nav-btn.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.22), 0 2px 8px rgba(0, 0, 0, 0.35);
  font-weight: 600;
}

.account-nav-btn.is-active i {
  color: #ffd479 !important;
}

/* Panel de contenido principal de la cuenta */
.account-content-card {
  background: rgba(14, 17, 24, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 40px 0 rgba(0, 0, 0, 0.45);
  border-radius: 28px;
}

/* Secciones intercambiables */
.account-section-pane {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.account-section-pane.is-active {
  display: block;
}

/* Tarjeta de perfil en el grid de perfiles */
.account-profile-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1.25rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}

.account-profile-box:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.account-profile-box.is-selected {
  border-color: #ffd479 !important;
  background: rgba(255, 212, 121, 0.08) !important;
  box-shadow: 0 0 24px -4px rgba(255, 212, 121, 0.3), inset 0 0 12px rgba(255, 212, 121, 0.06);
}

/* Botón inteligente Guardar Cambios */
.btn-save-changes {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-save-changes.has-changes {
  background: #ffd479 !important;
  color: #08090c !important;
  border-color: #ffd479 !important;
  box-shadow: 0 0 20px rgba(255, 212, 121, 0.45), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  animation: save-pulse 2s ease-in-out infinite;
}

@keyframes save-pulse {
  0% { transform: scale(1); box-shadow: 0 0 14px rgba(255, 212, 121, 0.35); }
  50% { transform: scale(1.02); box-shadow: 0 0 24px rgba(255, 212, 121, 0.65); }
  100% { transform: scale(1); box-shadow: 0 0 14px rgba(255, 212, 121, 0.35); }
}

/* ============================================================ */
/* POPOVER DESPLEGABLE DE PERFILES (APPLE GLASS STYLE)          */
/* ============================================================ */

.account-profile-popover {
  transform-origin: top left;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.account-profile-popover.hidden {
  opacity: 0 !important;
  transform: translateY(-8px) scale(0.96) !important;
  pointer-events: none !important;
  display: block !important;
  visibility: hidden;
}

.account-profile-popover:not(.hidden) {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
  visibility: visible;
}

.popover-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}

.popover-profile-row:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.popover-profile-row.is-active {
  background: rgba(255, 212, 121, 0.08);
  border-color: rgba(255, 212, 121, 0.3);
}

.popover-profile-row.is-active .profile-row-name {
  color: #ffd479 !important;
  font-weight: 600;
}

.btn-popover-edit {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.btn-popover-edit:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================================ */
/* FILAS CINEMATOGRÁFICAS DE RESUMEN ESTILO NUVIO              */
/* ============================================================ */

.nuvio-cinema-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.nuvio-cinema-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 18px rgba(255, 212, 121, 0.15);
}

.nuvio-cinema-card .poster-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.nuvio-cinema-card:hover .poster-img {
  transform: scale(1.05);
}

.nuvio-cinema-card .card-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 80%);
  pointer-events: none;
}

.nuvio-cinema-card .card-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #ffd479;
  border-radius: 9999px;
  box-shadow: 0 0 8px #ffd479;
  z-index: 10;
}

/* ============================================================ */
/* SECCIÓN DE AVATARES ESTILO NETFLIX (/account)                */
/* ============================================================ */

.avatar-filter-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.avatar-filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.avatar-filter-pill.is-active {
  background: #ffd479 !important;
  color: #08090c !important;
  border-color: #ffd479 !important;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(255, 212, 121, 0.35);
}

.avatar-filter-pill .pill-badge {
  font-size: 0.65rem;
  font-family: monospace;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
}

.avatar-filter-pill.is-active .pill-badge {
  background: rgba(0, 0, 0, 0.3);
  color: #08090c;
}

/* Tarjeta individual de avatar CIRCULAR estilo Nuvio */
.netflix-avatar-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 0;
  width: 100%;
}

.netflix-avatar-card:hover {
  transform: translateY(-3px);
}

.netflix-avatar-card .avatar-circle-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  background: rgba(14, 17, 24, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.netflix-avatar-card:hover .avatar-circle-wrap {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 18px rgba(255, 212, 121, 0.25);
}

.netflix-avatar-card .avatar-card-img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.netflix-avatar-card:hover .avatar-card-img {
  transform: scale(1.08);
}

.netflix-avatar-card.is-selected .avatar-circle-wrap {
  border-color: #ffd479 !important;
  box-shadow: 0 0 0 2px #ffd479, 0 0 24px rgba(255, 212, 121, 0.55), inset 0 0 12px rgba(255, 212, 121, 0.25) !important;
  transform: scale(1.04);
}

.netflix-avatar-card .avatar-card-name-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  max-width: 100%;
  transition: color 0.2s ease;
  line-height: 1.2;
}

.netflix-avatar-card:hover .avatar-card-name-label,
.netflix-avatar-card.is-selected .avatar-card-name-label {
  color: #ffd479;
}

/* Etiqueta numérica de usuarios en avatares Más Usados (inferior derecha) */
.avatar-user-count-badge {
  position: absolute;
  bottom: 0px;
  right: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  user-select: none;
  transition: transform 0.2s ease;
}

@media (min-width: 640px) {
  .avatar-user-count-badge {
    min-width: 1.35rem;
    height: 1.35rem;
    font-size: 0.6875rem;
    bottom: 1px;
    right: 1px;
  }
}

.netflix-avatar-card:hover .avatar-user-count-badge {
  transform: scale(1.08);
}

/* Colores de la etiqueta: 1.º Dorado, 2.º Plata, 3.º Bronce, 4.º+ Negro normal */
.avatar-user-count-badge.rank-gold {
  background: #ffd479;
  color: #08090c;
  border: 1px solid #ffe39f;
  box-shadow: 0 0 10px rgba(255, 212, 121, 0.45);
}

.avatar-user-count-badge.rank-silver {
  background: #e2e8f0;
  color: #08090c;
  border: 1px solid #ffffff;
  box-shadow: 0 0 10px rgba(226, 232, 240, 0.35);
}

.avatar-user-count-badge.rank-bronze {
  background: #cd7f32;
  color: #ffffff;
  border: 1px solid #e59850;
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.35);
}

.avatar-user-count-badge.rank-normal {
  background: #08090c;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Selector / Disparador del Modal de Obras */
.avatar-dropdown-trigger {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.avatar-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 212, 121, 0.4);
  box-shadow: 0 0 14px rgba(255, 212, 121, 0.15);
}

.avatar-dropdown-trigger .pill-badge {
  font-size: 0.65rem;
  font-family: monospace;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.35);
  color: #ffd479;
}

/* Tarjetas de obras dentro del modal de selección */
.modal-franchise-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  width: 100%;
  text-align: left;
  outline: none;
  background-clip: padding-box;
}

.modal-franchise-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 212, 121, 0.4);
  color: #ffffff;
}

.modal-franchise-card.is-selected {
  background: rgba(255, 212, 121, 0.12);
  border-color: #ffd479;
  color: #ffd479;
  box-shadow: 0 0 0 1px rgba(255, 212, 121, 0.35), 0 0 16px rgba(255, 212, 121, 0.2);
}

.modal-franchise-card .pill-badge {
  font-size: 0.6875rem;
  font-family: monospace;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

.modal-franchise-card.is-selected .pill-badge {
  background: #ffd479;
  color: #08090c;
  font-weight: 700;
}

/* Bloques de colección tipo escaparate con padding garantizado */
.avatar-collection-block {
  padding: 1.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.24s ease;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .avatar-collection-block {
    padding: 1.15rem;
    border-radius: 20px;
  }
}

.avatar-collection-block:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Botón interactivo "Abrir colección de avatares" */
.btn-open-avatar-collection {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 212, 121, 0.08);
  border: 1px solid rgba(255, 212, 121, 0.25);
  color: #ffd479;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-open-avatar-collection:hover {
  background: #ffd479;
  color: #08090c;
  border-color: #ffd479;
  box-shadow: 0 0 16px rgba(255, 212, 121, 0.35);
  transform: translateY(-1px);
}

.btn-open-avatar-collection i {
  transition: transform 0.2s ease;
}

.btn-open-avatar-collection:hover i {
  transform: translateX(2px);
}

/* Botón "Volver a todas las obras" */
.btn-back-all-collections {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-back-all-collections:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 212, 121, 0.35);
  color: #ffd479;
}

/* ============================================================
   ESTILOS Y ANIMACIONES FLUIDAS DE ARRASTRE DE ADDONS (APPLE-STYLE)
   ============================================================ */
.account-addon-row {
  transition: box-shadow 0.24s cubic-bezier(0.25, 1, 0.5, 1),
              background-color 0.2s ease,
              border-color 0.2s ease,
              opacity 0.2s ease;
}

.account-addon-row .lat-capsule-btn:active {
  transform: scale(0.95);
}

/* Fila seleccionada / en arrastre activo */
.addon-sortable-chosen {
  cursor: grabbing !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 212, 121, 0.4) !important;
  transform: scale(1.018);
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 212, 121, 0.25);
  z-index: 50 !important;
}

/* Fila fantasma (hueco destino translúcido donde aterrizará) */
.addon-sortable-ghost {
  opacity: 0.25 !important;
  background: rgba(255, 212, 121, 0.04) !important;
  border: 1px dashed rgba(255, 212, 121, 0.45) !important;
  transform: scale(0.99);
}

/* Elemento arrastrado bajo el cursor */
.addon-sortable-drag {
  opacity: 0.98 !important;
  cursor: grabbing !important;
  transform: scale(1.025);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 212, 121, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ============================================================
   RESPONSIVE AVATAR COMPARISON (MOBILE VERTICAL STACKING)
   ============================================================ */
@media (max-width: 639px) {
  #avatarHeaderMainWrap.has-comparison {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 1.25rem;
    width: 100%;
  }

  #avatarHeaderMainWrap.has-comparison #avatarComparisonContainer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.75rem;
  }

  #avatarHeaderMainWrap.has-comparison #avatarComparisonContainer .group,
  #avatarHeaderMainWrap.has-comparison #avatarComparisonContainer #avatarNewWrap {
    position: relative;
    flex: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    max-width: 135px;
  }

  #avatarHeaderMainWrap.has-comparison #avatarOriginalPreview,
  #avatarHeaderMainWrap.has-comparison #avatarCurrentPreview {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    max-width: 130px;
    max-height: 130px;
    min-width: 90px;
    min-height: 90px;
  }

  #avatarHeaderMainWrap.has-comparison #avatarTransitionArrow {
    font-size: 1.4rem;
    flex-shrink: 0;
    padding: 0 0.25rem;
  }

  #avatarHeaderMainWrap.has-comparison #avatarHeaderTextWrap {
    width: 100%;
    text-align: left;
  }
}




