/* ==========================================================================
   litfine.com — Sistema de Estilos de Producción (Chrome MWG Compliant)
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Sincronización con el meta tag según directrices de Chrome MWG */
  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
  }
  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
  }

  /* Superficies y Neutros con light-dark() nativo */
  --bg-primary: light-dark(#f6f7fb, #080b12);
  --bg-secondary: light-dark(#ffffff, #0e131f);
  --bg-tertiary: light-dark(#eef1f7, #151b2b);
  --bg-elevated: light-dark(#ffffff, #121827);
  --bg-glass: light-dark(rgba(255, 255, 255, 0.82), rgba(10, 14, 24, 0.82));

  --border-subtle: light-dark(#e2e8f0, rgba(148, 163, 184, 0.14));
  --border-strong: light-dark(#cbd5e1, rgba(148, 163, 184, 0.26));
  --border-specular: light-dark(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.06));

  --text-primary: light-dark(#0b1120, #f8fafc);
  --text-secondary: light-dark(#475569, #94a3b8);
  --text-tertiary: light-dark(#64748b, #64748b);

  /* Acentos de Marca litfine */
  --accent: light-dark(#4f46e5, #6366f1);
  --accent-bright: light-dark(#6366f1, #818cf8);
  --accent-hover: light-dark(#4338ca, #4f46e5);
  --accent-light: light-dark(rgba(79, 70, 229, 0.09), rgba(99, 102, 241, 0.16));
  --accent-border: light-dark(rgba(79, 70, 229, 0.28), rgba(129, 140, 248, 0.34));
  --accent-gradient: linear-gradient(135deg, #5b5cf6 0%, #8b5cf6 52%, #d946ef 100%);
  --ambient-glow-color: light-dark(rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.16));
  --ambient-glow: radial-gradient(660px circle at 18% 0%, var(--ambient-glow-color), transparent 65%);

  --success: light-dark(#059669, #10b981);
  --success-bg: light-dark(rgba(5, 150, 105, 0.1), rgba(16, 185, 129, 0.14));
  --success-border: light-dark(rgba(5, 150, 105, 0.24), rgba(16, 185, 129, 0.3));
  --danger: light-dark(#dc2626, #f87171);
  --danger-bg: light-dark(rgba(220, 38, 38, 0.08), rgba(248, 113, 113, 0.12));

  /* Dimensiones y Sombras */
  --nav-height: 64px;
  --sidebar-width: 300px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-color-md: light-dark(rgba(15, 23, 42, 0.08), rgba(0, 0, 0, 0.42));
  --shadow-color-lg: light-dark(rgba(15, 23, 42, 0.16), rgba(0, 0, 0, 0.62));
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 26px var(--shadow-color-md);
  --shadow-lg: 0 22px 54px var(--shadow-color-lg);
  --shadow-glow: 0 6px 22px rgba(99, 102, 241, 0.32);

  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --transition-fast: 150ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-normal: 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset y Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Asegurar que el atributo HTML hidden siempre venza a display: flex/grid */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  background-image: var(--ambient-glow);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, .brand-title, .price-val {
  font-family: var(--font-display);
}

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

/* Anillo de foco accesible en toda la app */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

/* ==========================================================================
   Barra Superior (Top Nav)
   ========================================================================== */
.top-nav {
  height: var(--nav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.4rem;
  gap: 1rem;
}

.nav-left, .nav-center, .nav-right {
  display: flex;
  align-items: center;
}

.nav-left {
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand-tld {
  color: var(--accent-bright);
  font-weight: 800;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.24rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--success-border);
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 2.2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.mobile-menu-toggle {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem;
}

/* Barra de Búsqueda */
.nav-center {
  flex: 1;
  max-width: 420px;
  justify-content: center;
}

.search-box {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 0.85rem;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 2.75rem 0 2.35rem;
  border-radius: 11px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.search-box input:hover {
  border-color: var(--border-strong);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-kbd {
  position: absolute;
  right: 0.65rem;
  font-size: 0.68rem;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  padding: 0.14rem 0.4rem;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  font-family: inherit;
  font-weight: 600;
  pointer-events: none;
}

.nav-right {
  gap: 0.6rem;
}

.lang-toggle,
.icon-button {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-toggle {
  padding: 0 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: inherit;
}

.icon-button {
  width: 36px;
  display: grid;
  place-items: center;
}

.lang-toggle:hover,
.icon-button:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* ==========================================================================
   Iconos de tema sin clases JS (Chrome MWG dark-mode-toggle)
   ========================================================================== */
#theme-toggle {
  .sun-icon { display: none; }
  .moon-icon { display: block; }
}

@media (prefers-color-scheme: dark) {
  #theme-toggle {
    .sun-icon { display: block; }
    .moon-icon { display: none; }
  }
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) #theme-toggle {
  .sun-icon { display: block; }
  .moon-icon { display: none; }
}

:root:has(> head > meta[name="color-scheme"][content="light"]) #theme-toggle {
  .sun-icon { display: none; }
  .moon-icon { display: block; }
}

/* Botones Comunes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.52rem 1.05rem;
  font-size: 0.855rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 11px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  box-shadow: inset 0 1px 0 var(--border-specular);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 9px;
}

.btn-lg {
  padding: 0.68rem 1.35rem;
  font-size: 0.92rem;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Cuenta Autenticada + Popover Nativo (MWG viewport-aware-dropdowns)
   ========================================================================== */
.btn-account {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.7rem 0.3rem 0.35rem;
  height: 36px;
  gap: 0.45rem;
  border-radius: var(--radius-full);
}

.btn-account:hover {
  border-color: var(--border-strong);
  background: var(--bg-tertiary);
}

.btn-account.is-pro {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.account-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.account-trigger-label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.82rem;
}

.account-chevron {
  color: var(--text-tertiary);
}

/* Ocultar popover antes de que cargue el polyfill en navegadores antiguos (MWG) */
@supports not selector(:popover-open) {
  [popover]:not(.\:popover-open) {
    display: none;
  }
}

.account-popover {
  width: 264px;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--border-specular);
  overflow: hidden;
}

[popover].account-popover:is(:popover-open, .\:popover-open) {
  display: flex;
  flex-direction: column;
}

/* Progressive enhancement con CSS Anchor Positioning gated en @supports (MWG) */
@supports (position-area: block-end) {
  [popover].account-popover {
    inset: auto;
    margin: 0;
    margin-block-start: 8px;
    position-area: block-end span-inline-start;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
  }
}

.account-popover-header {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.account-popover-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.account-popover-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-popover-email {
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-pill {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.plan-pill.is-pro {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.account-popover-actions {
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.popover-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.popover-action-btn:hover {
  background: var(--bg-tertiary);
}

.popover-action-btn.danger {
  color: var(--danger);
}

.popover-action-btn.danger:hover {
  background: var(--danger-bg);
}

.popover-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 0.25rem 0.35rem;
}

/* ==========================================================================
   Layout Principal (Sidebar + Stage + Ad Rail)
   ========================================================================== */
.app-layout {
  display: flex;
  flex: 1;
  min-height: calc(100dvh - var(--nav-height));
}

.sidebar-backdrop {
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 35;
}

/* Barra Lateral (Sidebar) */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: var(--nav-height);
  height: calc(100dvh - var(--nav-height));
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.25rem 1.2rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.sidebar-heading {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.apps-count {
  font-size: 0.7rem;
  color: var(--accent-bright);
  background: var(--accent-light);
  padding: 0.16rem 0.52rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  white-space: nowrap;
}

.sidebar-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.sidebar-nav {
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.empty-search {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

/* Elementos de App en la barra lateral */
.app-nav-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.72rem 0.85rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  width: 100%;
  font-family: inherit;
}

.app-nav-item:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-subtle);
}

.app-nav-item[aria-current="page"] {
  background: var(--accent-light);
  border-color: var(--accent-border);
  box-shadow: inset 0 1px 0 var(--border-specular);
}

.app-nav-item[aria-current="page"]::before {
  content: "";
  position: absolute;
  inset-block: 12px;
  inset-inline-start: 0;
  width: 3px;
  background: var(--accent-gradient);
  border-radius: 0 3px 3px 0;
}

.app-tab-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  color: var(--accent-bright);
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-fast);
}

.app-nav-item[aria-current="page"] .app-tab-icon {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.34);
}

.app-tab-info {
  flex: 1;
  min-width: 0;
}

.app-tab-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.app-tab-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-nav-item[aria-current="page"] .app-tab-name {
  color: var(--accent-bright);
}

.app-badge {
  font-size: 0.63rem;
  padding: 0.14rem 0.42rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  flex-shrink: 0;
}

.badge-live {
  background: var(--success-bg);
  color: var(--success);
}

.badge-upcoming {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
}

.app-tab-desc {
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.12rem;
}

/* Footer de la Sidebar */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.account-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  box-shadow: inset 0 1px 0 var(--border-specular);
}

.account-card.is-pro {
  background: linear-gradient(155deg, var(--success-bg), var(--bg-tertiary));
  border-color: var(--success-border);
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.plan-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
}

.account-card.is-pro .plan-badge {
  color: var(--success);
}

.sso-badge {
  font-size: 0.64rem;
  background: var(--accent-light);
  color: var(--accent-bright);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.account-card-text {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.account-card.is-pro .account-card-text {
  margin-bottom: 0;
}

/* ==========================================================================
   Panel Central (Stage — con Container Queries MWG size-aware-styling)
   ========================================================================== */
.stage {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.25rem 1.5rem;
  max-width: 1020px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}

/* Banner de Confirmación Post-Pago (?billing=success) */
.billing-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.15rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  box-shadow: var(--shadow-sm);
}

.billing-banner[hidden] {
  display: none;
}

.billing-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--success);
  color: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.billing-banner-body {
  flex: 1;
  min-width: 0;
}

.billing-banner-body strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.billing-banner-body p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Panel Derecho: Columna Vertical Promocional / Publicitaria
   ========================================================================== */
.ad-rail {
  width: 284px;
  flex-shrink: 0;
  padding: 1.5rem 1.35rem 1.5rem 0;
}

.ad-rail[hidden] {
  display: none;
}

.ad-rail-sticky {
  position: sticky;
  top: calc(var(--nav-height) + 1.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ad-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-tertiary);
  text-align: center;
}

.ad-slot {
  width: 100%;
  min-height: 480px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-md), inset 0 1px 0 var(--border-specular);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.house-promo {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.65rem 1.25rem;
  gap: 0.7rem;
  isolation: isolate;
}

.house-promo-glow {
  position: absolute;
  inset: -40px -20px auto -20px;
  height: 190px;
  background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.22), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.house-promo-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-gradient);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-glow);
}

.house-promo-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent-bright);
  border: 1px solid var(--accent-border);
}

.house-promo-title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.22;
  color: var(--text-primary);
}

.house-promo-desc {
  font-size: 0.79rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.house-promo-list {
  list-style: none;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.35rem 0;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
}

.house-promo-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-primary);
}

.house-promo-list svg {
  color: var(--success);
  flex-shrink: 0;
}

.house-promo-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.house-price-amount {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.house-price-period {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.ad-remove-link {
  background: transparent;
  border: none;
  color: var(--accent-bright);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 0.25rem;
  text-align: center;
  transition: opacity var(--transition-fast);
}

.ad-remove-link:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.stage-content {
  flex: 1;
}

/* View Transitions entre apps (MWG same-document-transitions) */
.app-hero-title {
  width: fit-content;
  view-transition-name: app-title;
}

.app-hero-icon {
  view-transition-name: app-icon;
}

::view-transition-old(app-title),
::view-transition-new(app-title) {
  height: 100%;
}

/* ==========================================================================
   Hero de la App
   ========================================================================== */
.app-hero {
  display: flex;
  gap: 1.65rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.app-hero-icon {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  background: var(--accent-gradient);
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(99, 102, 241, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  flex-shrink: 0;
}

.app-hero-icon svg {
  width: 36px;
  height: 36px;
}

.app-hero-details {
  flex: 1;
  min-width: 0;
}

.app-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.hero-tag {
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.2rem 0.62rem;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.hero-tag--live {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.app-hero-title {
  font-size: clamp(1.8rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 0.5rem;
  line-height: 1.12;
}

.app-hero-tagline {
  font-size: 0.96rem;
  color: var(--text-secondary);
  max-width: 660px;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.app-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.btn-dl-primary {
  padding: 0.65rem 1.25rem;
  gap: 0.6rem;
}

.dl-meta-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.12rem 0.48rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.btn-outline .dl-meta-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.download-hint {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   Interactive Preview Box (MusicLyrics Player)
   ========================================================================== */
.preview-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem 1.25rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-md), inset 0 1px 0 var(--border-specular);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
}

.preview-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.window-dots {
  display: inline-flex;
  gap: 0.35rem;
}

.window-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.window-dots span:nth-child(1) { background: rgba(239, 68, 68, 0.7); }
.window-dots span:nth-child(2) { background: rgba(245, 158, 11, 0.7); }
.window-dots span:nth-child(3) { background: rgba(16, 185, 129, 0.7); }

.preview-title {
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-translate {
  font-size: 0.74rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.btn-translate:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-translate[aria-pressed="true"] {
  background: var(--accent-light);
  color: var(--accent-bright);
  border-color: var(--accent-border);
}

.demo-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.24rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent-bright);
}

/* Default stacked layout + @container enhancement (MWG size-aware-styling) */
.interactive-mockup {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  border: 1px solid var(--border-subtle);
  align-items: center;
}

@container (min-width: 600px) {
  .interactive-mockup {
    grid-template-columns: 235px 1fr;
  }
}

.player-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.album-art {
  width: 142px;
  height: 142px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0.9rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
  transition: background var(--transition-normal);
}

.album-art-wave {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  padding-bottom: 10px;
  transition: opacity var(--transition-fast);
}

.wave-bar {
  width: 3.5px;
  height: 14px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 99px;
  animation: wave 1.15s infinite ease-in-out;
}
.wave-bar:nth-child(2) { animation-delay: 0.18s; height: 22px; }
.wave-bar:nth-child(3) { animation-delay: 0.36s; height: 28px; }
.wave-bar:nth-child(4) { animation-delay: 0.1s; height: 18px; }
.wave-bar:nth-child(5) { animation-delay: 0.28s; height: 12px; }

.album-art-wave.paused .wave-bar {
  animation-play-state: paused;
}

@keyframes wave {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

.track-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
}

.track-artist {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.7rem;
}

.track-progress {
  width: 100%;
  max-width: 196px;
  margin-bottom: 0.85rem;
}

.progress-bar-bg {
  width: 100%;
  height: 5px;
  background: var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.35rem;
  cursor: pointer;
}

.progress-bar-fill {
  height: 100%;
  width: 40%;
  background: var(--accent-gradient);
  border-radius: 999px;
  transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn-ctrl {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ctrl:hover {
  border-color: var(--accent-bright);
  transform: scale(1.06);
}

.btn-play {
  width: 42px;
  height: 42px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.38);
}

/* Letras sincronizadas (Karaoke View) */
.player-lyrics {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--border-subtle);
}

@container (min-width: 600px) {
  .player-lyrics {
    padding: 0.5rem 0.5rem 0.5rem 1.35rem;
    border-top: none;
    border-left: 1px solid var(--border-subtle);
  }
}

.lyric-line {
  background: transparent;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: all var(--transition-normal);
  cursor: pointer;
  padding: 0.25rem 0.45rem;
  border-radius: 8px;
  line-height: 1.38;
}

.lyric-line.active {
  color: var(--accent-bright);
  background: var(--accent-light);
  font-size: 1.2rem;
  font-weight: 800;
  transform: translateX(6px);
}

.lyric-line:hover:not(.active) {
  color: var(--text-primary);
}

.lyric-translation {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* Preview card para próximas apps */
.roadmap-card {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  margin-bottom: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.roadmap-info h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.roadmap-info p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 520px;
}

/* ==========================================================================
   Grid de Características (Iconos SVG vectoriales)
   ========================================================================== */
.section-heading {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1.1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  box-shadow: inset 0 1px 0 var(--border-specular);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md), inset 0 1px 0 var(--border-specular);
}

.feature-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-light);
  color: var(--accent-bright);
  border: 1px solid var(--accent-border);
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
}

.feature-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.015em;
}

.feature-card-desc {
  font-size: 0.845rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Banner de Precios litfine Pro (Suite Global vs Tiendas Individuales)
   ========================================================================== */
.pricing-banner {
  background: linear-gradient(
    135deg,
    light-dark(rgba(79, 70, 229, 0.06), rgba(99, 102, 241, 0.14)) 0%,
    light-dark(rgba(168, 85, 247, 0.06), rgba(168, 85, 247, 0.12)) 100%
  );
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 1.65rem 1.85rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md), inset 0 1px 0 var(--border-specular);
}

@container (min-width: 640px) {
  .pricing-banner {
    flex-direction: row;
    align-items: center;
  }
}

.pricing-banner--pro {
  background: linear-gradient(135deg, var(--success-bg), var(--bg-secondary));
  border-color: var(--success-border);
}

.pricing-info {
  flex: 1;
  min-width: 0;
}

.pricing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-bright);
  margin-bottom: 0.4rem;
}

.pricing-banner--pro .pricing-eyebrow {
  color: var(--success);
}

.pricing-info h3 {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.4rem;
}

.pricing-info p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}

.pricing-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.pricing-perk-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.pricing-perk-chip svg {
  color: var(--success);
}

.pricing-store-note {
  margin-top: 0.7rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.pricing-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  flex-shrink: 0;
}

@container (min-width: 640px) {
  .pricing-cta {
    align-items: flex-end;
  }
}

.billing-switch {
  display: inline-flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.22rem;
  gap: 0.2rem;
}

.billing-option {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.77rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0.32rem 0.78rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.billing-option[aria-pressed="true"] {
  background: var(--accent);
  color: #ffffff;
}

.billing-save {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.08rem 0.4rem;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  color: var(--success);
}

.billing-option[aria-pressed="true"] .billing-save {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.pricing-price-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.price-val {
  font-size: 2.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.price-period {
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 500;
}

.price-sub-note {
  font-size: 0.73rem;
  color: var(--success);
  font-weight: 600;
}

.pro-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  font-weight: 700;
  font-size: 0.88rem;
}

/* ==========================================================================
   Footer del Stage
   ========================================================================== */
.stage-footer {
  margin-top: auto;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.79rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-bright);
}

/* ==========================================================================
   Diálogos Nativos (<dialog>) — Reglas Chrome MWG + @starting-style
   ========================================================================== */
dialog:modal {
  overscroll-behavior: contain;
  border: 1px solid var(--border-strong);
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  padding: 0;
  inset: 0;
  margin: auto;
  max-width: 460px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--border-specular);
  border-radius: var(--radius-lg);
}

dialog.modern-dialog[open] {
  opacity: 1;

  @starting-style {
    opacity: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    transform: scale(1);

    @starting-style {
      transform: scale(0.96);
    }
  }
}

dialog.modern-dialog {
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.24s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;

  @media (prefers-reduced-motion: no-preference) {
    transform: scale(0.96);
  }
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(4, 7, 15, 0);
  transition-property: background-color, display, overlay;
  transition-duration: 0.24s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

dialog[open]::backdrop {
  background-color: rgba(4, 7, 15, 0.76);

  @starting-style {
    background-color: rgba(4, 7, 15, 0);
  }
}

.dialog-card {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.45rem;
  border-bottom: 1px solid var(--border-subtle);
}

.dialog-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-icon.small {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
}

.btn-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.dialog-body {
  padding: 1.5rem 1.45rem;
}

.dialog-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.dialog-description {
  font-size: 0.87rem;
  color: var(--text-secondary);
  margin-bottom: 1.35rem;
  line-height: 1.5;
}

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.btn-oauth {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.btn-google {
  background: light-dark(#ffffff, #161d2e);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-google:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.btn-apple {
  background: light-dark(#0f172a, #f8fafc);
  color: light-dark(#ffffff, #0f172a);
}

.btn-apple:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.dialog-footer {
  padding: 0.9rem 1.45rem;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-subtle);
}

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Modal Legal (corregidas todas las variables CSS a tokens reales) */
dialog.modern-dialog.legal-dialog {
  max-width: 600px;
}

.legal-title {
  margin: 0;
  font-size: 1.12rem;
  color: var(--text-primary);
}

.legal-body {
  max-height: 66vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 0.9rem;
  line-height: 1.68;
  color: var(--text-secondary);
}

.legal-body h4 {
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 700;
  margin: 1.15rem 0 0.4rem;
}

.legal-body h4:first-child {
  margin-top: 0;
}

.legal-body p,
.legal-body ul {
  margin: 0 0 0.75rem;
}

.legal-body ul {
  padding-left: 1.25rem;
}

.legal-body li {
  margin-bottom: 0.35rem;
}

.legal-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-body a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ==========================================================================
   Toast Accesible
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 0.72rem 1.1rem;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ==========================================================================
   Preferencias de movimiento reducido (MWG)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  dialog.modern-dialog,
  dialog.modern-dialog::backdrop {
    transition-duration: 0.1s !important;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */
@media (max-width: 1220px) {
  .ad-rail {
    display: none;
  }
}

@media (max-width: 960px) {
  .stage {
    padding: 1.5rem 1.35rem;
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }

  .nav-left {
    gap: 0.55rem;
    min-width: 0;
  }

  .nav-right {
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .lang-toggle {
    padding: 0 0.5rem;
    height: 34px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .top-nav .btn {
    padding: 0.42rem 0.72rem;
    font-size: 0.78rem;
    gap: 0.35rem;
  }

  .mobile-menu-toggle {
    display: grid;
    place-items: center;
  }

  .status-badge,
  .nav-center {
    display: none;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: var(--nav-height);
    bottom: 0;
    z-index: 40;
    width: min(82vw, 300px);
    height: calc(100dvh - var(--nav-height));
    transition: left var(--transition-normal);
  }

  .sidebar.open {
    left: 0;
    box-shadow: var(--shadow-lg);
  }

  .app-hero {
    flex-direction: column;
    gap: 1.15rem;
  }

  .account-trigger-label {
    display: none;
  }
}

@media (max-width: 440px) {
  .brand-tld {
    display: none;
  }
}
