/* ═══════════════════════════════════════════════════════
   KingsHelp — STYLE PREMIUM DARK (v3)
   Tema: Oscuro sofisticado · Gold champagne · Glass suave
═══════════════════════════════════════════════════════ */

/* ── Variables ────────────────────────────────────────── */
:root {
  /* ═══ DESIGN TOKENS ═══════════════════════════════════ */
  /* Brand (primary CTA, links, active states) */
  /* From KingsHelp logo palette */
  --brand-500: #5B21B6;
  --brand-600: #4C1D95;
  --brand-700: #3B136D;
  /* Accent (gradients, subtle glows — always with low opacity) */
  --accent-500: #7C3AED;
  /* Premium (exclusive to Premium section, badges, details) */
  --premium-500: #DEAD5A;
  --silver-500: #C5CBD6;
  --silver-light: #E4E8F0;
  --silver-glow: rgba(197, 203, 214, 0.35);
  --silver-border: rgba(197, 203, 214, 0.30);

  /* Semantic neutrals */
  --bg: #070A10;
  --surface: #0B0F1A;
  /* cards, panels */
  --text: #EDF0F8;
  --muted: rgba(237, 240, 248, 0.58);
  --border: rgba(255, 255, 255, 0.10);

  /* ═══ LEGACY ALIASES (kept for backward compat) ════════ */
  --bg-2: var(--surface);
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-h: rgba(255, 255, 255, 0.085);
  --border-h: rgba(255, 255, 255, 0.16);
  --text-muted: var(--muted);
  --text-soft: rgba(237, 240, 248, 0.80);

  /* ═══ KH TOKENS (used across components) ═══════════════ */
  --kh-brand-500: var(--brand-500);
  --kh-brand-600: var(--brand-600);
  --kh-brand-700: var(--brand-700);
  --kh-accent-500: var(--accent-500);
  --kh-premium-500: var(--premium-500);

  --kh-brand-gradient: linear-gradient(120deg, #7C3AED 0%, #6D28D9 48%, #4C1D95 100%);
  --kh-title-gradient: linear-gradient(120deg, #7C3AED 0%, #6D28D9 45%, #F97316 100%);
  --kh-title-weight: 800;
  --kh-title-spacing: -0.6px;
  --kh-title-line: 1.12;

  --kh-bg: var(--bg);
  --kh-surface: var(--surface);
  --kh-text: var(--text);
  --kh-muted: var(--muted);
  --kh-border: var(--border);

  --kh-brand-tint-08: rgba(91, 33, 182, 0.08);
  --kh-brand-tint-12: rgba(91, 33, 182, 0.12);
  --kh-brand-tint-18: rgba(91, 33, 182, 0.18);
  --kh-accent-tint-07: rgba(124, 58, 237, 0.07);
  --kh-accent-tint-10: rgba(124, 58, 237, 0.10);

  /* Gold — Premium only */
  --gold: var(--premium-500);
  --gold-light: #E7B552;
  --gold-glow: rgba(217, 164, 65, 0.28);
  --gold-border: rgba(217, 164, 65, 0.30);

  /* Brand Indigo — aliases to tokens */
  --accent: var(--accent-500);
  --accent-hover: #5B21B6;
  --accent-light: #8B5CF6;
  --accent-glow: rgba(124, 58, 237, 0.28);
  --accent2: #5B21B6;

  /* Violet accent glow (low-opacity backgrounds/halos) */
  --accent-500-tint-10: rgba(124, 58, 237, 0.10);
  --accent-500-tint-06: rgba(124, 58, 237, 0.06);

  /* Human Amber */
  --amber: #DEAD5A;
  --amber-tint: rgba(217, 164, 65, 0.16);

  /* Estado */
  --success: #22C55E;
  --danger: #EF4444;
  --warn: #F59E0B;

  --radius: 18px;
  --radius-sm: 11px;
  --radius-xs: 7px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Warm neighborhood accents (used subtly) */
  --kh-warm-1: #E2B86B;
  --kh-warm-2: #E07A5F;
  --kh-warm-3: #F4A261;
  --kh-warm-soft: rgba(226, 184, 107, 0.12);
  --kh-corner-size: clamp(84px, 13vw, 195px);
  --kh-corner-opacity: 0.55;
  --section-offset: 200px;
}

/* ── Media defaults ───────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
}

/* ── Icon animations ───────────────────────────────────── */
@keyframes kh-icon-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes kh-icon-spin {
  to {
    transform: rotate(360deg);
  }
}

.kh-icon-anim,
.nav-search-ico,
.chip-icon,
.feed-tab-ico,
.btn-plus,
.kh-theme-icon,
.menu-gold-icon,
.premium-modal-crown,
.ranking-crown,
.feed-activity-ico,
.btn-refresh-ico svg,
.faq-chevron svg,
.feed-filter-ico,
.demo-bullet-icon,
.demo-metric-ico,
.rep-act-ico,
.kpi-icon,
.feature-icon,
.trust-icon,
.usecase-icon,
.howto-step-icon,
.hrp-icon,
.notif-bell-ico,
.card-ico span,
.balance-icon,
.btn-icon,
.hb2p-bicon,
.hb2p-app-icon,
.hb2p-sys-icon,
.demo-status-icons img,
.demo-status-icons span,
.demo-status-icons .ds-check-icon,
.demo-status-icons .ds-reward-icon,
.demo-status-icons .ds-req-icon,
.ds-req-icon,
.ds-check-icon,
.ds-reward-icon,
.hb3-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: kh-icon-float 3.6s ease-in-out infinite;
  transform-origin: center;
}

.kh-ico-spin,
.kh-ico-spin svg {
  animation: kh-icon-spin 7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {

  .kh-icon-anim,
  .nav-search-ico,
  .chip-icon,
  .feed-tab-ico,
  .btn-plus,
  .kh-theme-icon,
  .menu-gold-icon,
  .premium-modal-crown,
  .ranking-crown,
  .feed-activity-ico,
  .btn-refresh-ico svg,
  .faq-chevron svg,
  .feed-filter-ico,
  .demo-bullet-icon,
  .demo-metric-ico,
  .rep-act-ico,
  .kpi-icon,
  .feature-icon,
  .trust-icon,
  .usecase-icon,
  .howto-step-icon,
  .hrp-icon,
  .notif-bell-ico,
  .card-ico span,
  .balance-icon,
  .btn-icon,
  .hb2p-bicon,
  .hb2p-app-icon,
  .hb2p-sys-icon,
  .demo-status-icons img,
  .demo-status-icons span,
  .demo-status-icons .ds-check-icon,
  .demo-status-icons .ds-reward-icon,
  .demo-status-icons .ds-req-icon,
  .ds-req-icon,
  .ds-check-icon,
  .ds-reward-icon,
  .hb3-ico,
  .kh-ico-spin,
  .kh-ico-spin svg {
    animation: none;
  }
}

/* ════════════════════════════════════════════════════════
   DESIGN TOKENS — LIGHT override
════════════════════════════════════════════════════════ */
html[data-theme="light"] {
  /* Brand — slightly darker for WCAG contrast on light bg */
  --kh-brand-500: #5B21B6;
  --kh-brand-600: #4C1D95;
  --kh-brand-700: #3B136D;
  --kh-accent-500: #7C3AED;
  --kh-premium-500: #A07828;

  --kh-brand-gradient: linear-gradient(120deg, #7C3AED 0%, #6D28D9 48%, #4C1D95 100%);

  /* Neutrals */
  --kh-bg: #F7F7FB;
  --kh-surface: #FFFFFF;
  --kh-text: #0F172A;
  --kh-muted: #475569;
  --kh-border: rgba(15, 23, 42, 0.10);

  /* Tints */
  --kh-brand-tint-08: rgba(91, 33, 182, 0.08);
  --kh-brand-tint-12: rgba(91, 33, 182, 0.12);
  --kh-brand-tint-18: rgba(91, 33, 182, 0.18);
  --kh-accent-tint-07: rgba(124, 58, 237, 0.06);
  --kh-accent-tint-10: rgba(124, 58, 237, 0.09);
  --kh-corner-opacity: 0.35;
}

@media (max-width: 640px) {
  :root {
    --kh-corner-size: clamp(62px, 23vw, 143px);
  }
}

/* ── TEMA CLARO ── overrides de componentes existentes ─────────────── */
html[data-theme="light"] {
  /* Design tokens — light values */
  --brand-500: #5B21B6;
  /* slightly darker for contrast on light bg */
  --brand-600: #4C1D95;
  --brand-700: #3B136D;
  --accent-500: #7C3AED;
  --premium-500: #A07828;
  --silver-500: #8C96A8;
  --silver-light: #D5DBE6;
  --silver-glow: rgba(140, 150, 168, 0.25);
  --silver-border: rgba(140, 150, 168, 0.22);

  /* Neutrals */
  --bg: #F5F6FA;
  --surface: #FFFFFF;
  --text: #0B0F19;
  --muted: rgba(11, 15, 25, 0.50);
  --border: rgba(0, 0, 0, 0.09);

  /* Legacy aliases */
  --bg-2: var(--surface);
  --bg-card: rgba(255, 255, 255, 0.80);
  --bg-card-h: rgba(255, 255, 255, 0.95);
  --border-h: rgba(0, 0, 0, 0.18);
  --text-muted: var(--muted);
  --text-soft: rgba(11, 15, 25, 0.72);

  --gold: var(--premium-500);
  --gold-light: #C49A3C;
  --gold-glow: rgba(160, 120, 40, 0.20);
  --gold-border: rgba(160, 120, 40, 0.25);

  --accent: var(--accent-500);
  --accent-hover: #5B21B6;
  --accent-light: #8B5CF6;
  --accent-glow: rgba(124, 58, 237, 0.18);
  --accent2: #5B21B6;

  --accent-500-tint-10: rgba(124, 58, 237, 0.08);
  --accent-500-tint-06: rgba(124, 58, 237, 0.05);

  --amber: #C48A28;
  --amber-tint: rgba(196, 138, 40, 0.14);

  --success: #16A34A;
  --danger: #DC2626;

  --shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.13);
}

html[data-theme="light"] body {
  background: var(--surface);
}

/* Aurora: usa accent-500 a baja opacidad + brand-500 */
html[data-theme="light"] .fx-aurora {
  background:
    radial-gradient(ellipse 80% 50% at 30% -10%, var(--accent-500-tint-06) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(33, 82, 173, 0.04) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 10% 80%, rgba(196, 138, 40, 0.03) 0%, transparent 65%);
}

/* Nav: fondo claro */
html[data-theme="light"] .nav {
  background: rgba(245, 246, 250, 0.92);
  border-bottom-color: rgba(0, 0, 0, 0.09);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

/* Dashboard header */
html[data-theme="light"] .dash-header {
  background: rgba(245, 246, 250, 0.92);
  border-bottom-color: rgba(0, 0, 0, 0.09);
}

html[data-theme="light"] .dash-tabs-wrap {
  background: rgba(245, 246, 250, 0.92);
  border-bottom-color: rgba(0, 0, 0, 0.09);
}

html[data-theme="light"] .dash-tab {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.10);
  color: rgba(15, 23, 42, 0.78);
}

html[data-theme="light"] .dash-tab:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] .dash-tab--active {
  background: linear-gradient(120deg, rgba(82, 49, 148, 0.14), rgba(33, 82, 173, 0.10));
  border-color: rgba(33, 82, 173, 0.22);
  color: #0F172A;
  box-shadow: 0 10px 26px rgba(33, 82, 173, 0.12);
}

/* Modal: fondo claro */
html[data-theme="light"] .modal-box {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .field input,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .field select {
  background: #F5F6FA;
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text);
}

html[data-theme="light"] .field input::placeholder,
html[data-theme="light"] .field textarea::placeholder {
  color: rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] .demo-hint code {
  background: #EDEEF4;
  color: var(--text);
}

/* Toasts: fondo claro */
html[data-theme="light"] .toast {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.10);
  color: var(--text);
}

/* Dashboard */
html[data-theme="light"] .dashboard {
  background: #F0F1F7;
}

/* Preview card */
html[data-theme="light"] .preview-card {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .preview-header {
  background: rgba(0, 0, 0, 0.03);
}

/* Premium card */
html[data-theme="light"] .premium-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--gold-border);
}

html[data-theme="light"] .points-track {
  background: rgba(0, 0, 0, 0.03);
}

/* Status response */
html[data-theme="light"] .status-response {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.18);
  color: #15803d;
}

/* Final CTA box */
html[data-theme="light"] .final-cta-box {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.10);
}

/* ── Pill Buttons (theme / ranking) ─────────────────────────────────── */
.kh-theme-toggle,
.kh-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px 12px 5px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
    color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.kh-theme-toggle:hover,
.kh-pill:hover {
  background: var(--bg-card-h);
  border-color: var(--border-h);
  color: var(--text);
  transform: translateY(-1px);
}

.kh-theme-toggle:active,
.kh-pill:active {
  transform: translateY(0);
}

.kh-theme-toggle:focus-visible,
.kh-pill:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
}

.kh-theme-icon {
  font-size: 15px;
  line-height: 1;
}

.kh-theme-label {
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 540px) {
  .kh-theme-label {
    display: none;
  }
}

/* ── Reduced motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Reset ────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

.page {
  position: relative;
}

.page::before {
  content: none;
}

.page>* {
  position: relative;
  z-index: 4;
}


body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input {
  font-family: inherit;
}

code {
  font-family: 'Courier New', monospace;
}

/* ── Scroll snapping (section-to-section) ─────────────── */
/* Most browsers scroll the body */
body {
  scroll-snap-type: y proximity;
  /* Fixed nav height */
  scroll-padding-top: 64px;
  scroll-padding-bottom: 20px;
}

/* Each landing section snaps to top */
#page-landing section {
  scroll-snap-align: start;
  scroll-margin-top: 0;
}

@media (max-width: 900px),
(max-height: 720px) {
  body {
    scroll-snap-type: none;
  }

  #page-landing section {
    scroll-snap-align: none;
  }
}

/* ── Accessibilidad ───────────────────────────────────── */
:focus-visible {
  outline: 2.5px solid var(--kh-brand-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Overlays decorativos ─────────────────────────────── */
.fx-photo {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("/img/fondo3.png") center/cover no-repeat;
  opacity: 0.5;
}

@supports (background-image: image-set(url("/img/fondo3.webp") type("image/webp"))) {
  .fx-photo {
    background: image-set(url("/img/fondo3.webp") type("image/webp"),
        url("/img/fondo3.png") type("image/png")) center/cover no-repeat;
  }
}

@supports (background-image: -webkit-image-set(url("/img/fondo3.webp") type("image/webp"))) {
  .fx-photo {
    background: -webkit-image-set(url("/img/fondo3.webp") type("image/webp"),
        url("/img/fondo3.png") type("image/png")) center/cover no-repeat;
  }
}

.fx-aurora {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 30% -10%, var(--accent-500-tint-10) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(33, 82, 173, 0.07) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 10% 80%, rgba(217, 164, 65, 0.04) 0%, transparent 65%);
  animation: auroraShift 12s ease-in-out infinite alternate;
}

/* Reduce background motion during intro */
.intro-active .fx-aurora {
  animation-play-state: paused;
  opacity: 0.55;
}

.intro-active .fx-grain {
  opacity: 0.02;
}

@keyframes auroraShift {
  0% {
    opacity: 0.7;
    transform: scale(1) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.04) rotate(1deg);
  }

  100% {
    opacity: 0.8;
    transform: scale(1.01) rotate(-0.5deg);
  }
}

.fx-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.030;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Layout ───────────────────────────────────────────── */
.container {
  max-width: 2100px;
  margin: 0 auto;
  padding: 0 8px;
  position: relative;
  z-index: 2;
}

@media (min-width: 1800px) {
  .container {
    max-width: 2200px;
    padding: 0 10px;
  }
}

.page {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.scroll-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.95) 0%, rgba(249, 115, 22, 0.95) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(109, 40, 217, 0.35), 0 10px 24px rgba(249, 115, 22, 0.25);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  z-index: 80;
}

.scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  animation: scrollTopPulse 2.6s ease-in-out infinite;
}

.scroll-top:hover {
  background: linear-gradient(135deg, rgba(109, 40, 217, 1) 0%, rgba(249, 115, 22, 1) 100%);
}

html[data-theme="light"] .scroll-top {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.9) 0%, rgba(249, 115, 22, 0.9) 100%);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(109, 40, 217, 0.25), 0 8px 20px rgba(249, 115, 22, 0.2);
}

@keyframes scrollTopPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.04); }
}

@media (max-width: 720px) {
  .scroll-top {
    right: 20px;
    bottom: 20px;
  }
}

@media (max-width: 480px) {
  .scroll-top {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  .hero-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .chip {
    justify-content: center;
    font-size: 12px;
    padding: 6px 8px;
  }

  .hero-cta {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-sub {
    font-size: 15px;
    line-height: 1.6;
  }

  .premium-section {
    padding: 64px 0;
  }

  .premium-card {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .premium-layout {
    gap: 16px;
  }

  .premium-title {
    font-size: clamp(22px, 6.4vw, 30px);
  }

  .premium-sub {
    font-size: 15px;
  }

  .premium-bullets {
    gap: 10px;
  }

  .premium-bullets li {
    font-size: 14px;
  }

  .premium-points-note {
    font-size: 13px;
    padding: 10px 12px;
  }

  .points-track {
    padding: 14px;
    margin-bottom: 22px;
  }

  .track-bar {
    height: 8px;
  }

  .track-label,
  .milestone,
  .track-legend {
    font-size: 10.5px;
  }

  .premium-cta {
    width: 100%;
  }

  .premium-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .premium-aside-card {
    padding: 14px;
  }

  .premium-aside-card p {
    font-size: 12.5px;
  }
}

@media (max-width: 390px) {
  .chip {
    font-size: 11.5px;
  }

  .premium-card {
    padding: 20px 16px;
  }

  .premium-bullets li {
    font-size: 13.5px;
  }
}

.mt-auto {
  margin-top: auto;
}

/* ── Tipografía ───────────────────────────────────────── */
.gradient-text {
  /* brand-500 → accent-500: headline accent gradient */
  background: var(--kh-title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Title style (match hero headings) ────────────────── */
.kh-title,
h1,
h2,
h3,
h4,
h5,
h6,
.section-header h2,
.section-header h3,
.section-header h4,
.section-title,
.demo-title,
.premium-title,
.kpi-title,
.rep-title,
.card-title,
.card-title h3,
.modal-title,
.howto-step-title,
.feed-section-title,
.automatch-premium-title,
.automatch-settings-title,
.am-col-title,
.am-rule-title,
.profile-panel-title,
.profile-photos-title,
.cookie-banner-title,
.cookie-panel-title,
.cookie-option-title,
.auth-title,
.notif-panel-title,
.usercard-section-title,
.preview-title,
.mvp-created-title {
  font-weight: var(--kh-title-weight);
  letter-spacing: var(--kh-title-spacing);
  line-height: var(--kh-title-line);
}


/* ── Nav ──────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 18px;
  padding: 0 16px;
  height: 64px;
  background: rgba(7, 10, 16, 0.86);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 380ms ease, filter 420ms ease;
  will-change: transform, opacity, filter;
  filter: blur(0);
}

.nav.nav--hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  filter: blur(6px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
}


.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(33, 82, 173, 0.08);
  border: 1px solid rgba(33, 82, 173, 0.26);
  box-shadow: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition), transform var(--transition), background var(--transition);
}

.nav-link-ico {
  font-size: 13px;
  line-height: 1;
}

.nav-link:hover {
  color: #fff;
  background: rgba(79, 70, 229, 0.6);
  transform: translateY(-1px);
}

.nav-link--howto {
  color: #f59e0b;
  text-shadow: 0 0 10px rgba(249, 115, 22, 0.25);
}

.nav-link--howto:hover {
  color: #fff;
  background: rgba(249, 115, 22, 0.2);
}

html[data-theme="light"] .nav-link {
  color: #475569;
}

html[data-theme="light"] .nav-link:hover {
  color: #4F46E5;
  background: rgba(79, 70, 229, 0.26);
}

html[data-theme="light"] .nav-link--howto {
  color: #ea580c;
  text-shadow: none;
}

html[data-theme="light"] .nav-link--howto:hover {
  color: #9a3412;
  background: rgba(234, 88, 12, 0.12);
}

html[data-theme="light"] .nav-links {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(31, 78, 158, 0.22);
  box-shadow: none;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

/* PNG Brand Lockup — crown + wordmark horizontal */
.nav-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  animation: brandIntro 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.nav-brand-crown {
  height: 30px;
  width: auto;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--gold-glow));
}

.nav-brand-word {
  height: 20px;
  width: auto;
  display: block;
  flex-shrink: 0;
  /* slight opacity lift for readability against dark nav */
  opacity: 0.92;
}

.nav-brand-logo {
  height: 36px;
  width: auto;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--gold-glow));
}

.nav-brand-fallback {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
}

/* Mobile: hide wordmark below 380px */
@media (max-width: 380px) {
  .nav-brand-word {
    display: none;
  }

  .nav-brand-logo {
    height: 29px;
  }
}

.brand-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 9px;
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-light);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 20px;
  letter-spacing: 0.4px;
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 2;
  justify-self: end;
}

.nav-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-burger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.nav-account {
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 30px rgba(5, 10, 22, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.nav-account-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  background: var(--kh-brand-gradient);
  box-shadow: 0 8px 16px rgba(33, 82, 173, 0.35);
  flex-shrink: 0;
}

.nav-account-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.nav-account-name {
  font-size: 13px;
  font-weight: 700;
}

.nav-account-tier {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-account-tier--silver {
  color: #f8fafc;
  background: linear-gradient(120deg, rgba(148, 163, 184, 0.48), rgba(226, 232, 240, 0.22));
  border: 1px solid rgba(226, 232, 240, 0.45);
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(148, 163, 184, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 6px rgba(226, 232, 240, 0.35);
}

html[data-theme="light"] .nav-account-tier--silver {
  color: #1f2937;
  background: linear-gradient(120deg, rgba(226, 232, 240, 0.9), rgba(148, 163, 184, 0.55));
  border-color: rgba(148, 163, 184, 0.45);
}

.nav-account-caret {
  opacity: 0.7;
  font-size: 12px;
}

.nav-burger-ico {
  display: none;
  font-size: 16px;
}

.nav-burger-label {
  display: inline-flex;
  align-items: center;
}

.nav-burger-caret {
  opacity: 0.7;
  font-size: 12px;
}

.nav-burger:hover {
  border-color: var(--border-h);
  transform: translateY(-1px);
}

html[data-theme="light"] .nav-account {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 14px 30px rgba(20, 30, 60, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nav-menu-pop {
  top: calc(100% + 10px);
  right: 0;
  width: min(260px, 80vw);
}

/* Center search (Wallapop-like) */
.nav-search {
  max-width: 720px;
  width: min(720px, 100%);
  margin: 0;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(90deg, rgba(109, 40, 217, 0.16) 0%, rgba(249, 115, 22, 0.12) 100%),
    rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  justify-self: center;
}

#page-landing .nav-search {
  display: none !important;
}

#usecases {
  scroll-margin-top: 170px;
}

.usecases-ticker {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px 0;
}

.usecases-ticker-inner {
  display: flex;
  width: max-content;
  gap: 18px;
  animation: none;
  will-change: transform;
}

.usecases-track {
  display: flex;
  gap: 18px;
  padding: 0 18px;
}

.usecase-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
  white-space: nowrap;
  font-size: 16px;
  font-weight: 900;
  width: 240px;
  letter-spacing: 0.4px;
  overflow: hidden;
  min-height: 96px;
  transition: transform 0.25s ease;
}

.usecase-chip img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.65;
}

.usecase-chip span {
  position: relative;
  z-index: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  text-align: center;
  background: linear-gradient(90deg, #0b1220 0%, #6d28d9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.usecase-chip span::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.0) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.usecase-chip:hover img {
  opacity: 0.4;
}

.usecase-chip:hover span,
.usecase-chip:hover span::before {
  opacity: 1;
}

.usecase-chip:hover {
  transform: scale(1.22);
}

@keyframes usecasesTicker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .usecases-ticker-inner {
    animation: none;
  }
}

.nav-search:focus-within {
  border-color: var(--border);
  box-shadow: none;
}

html[data-theme="light"] .nav-search {
  background:
    linear-gradient(90deg, rgba(109, 40, 217, 0.10) 0%, rgba(249, 115, 22, 0.08) 100%),
    rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] .nav-search:focus-within {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: none;
}

.nav-search-ico {
  opacity: 0.75;
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-search-input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.nav-search-input::placeholder {
  color: var(--text-muted);
}

.btn-plus {
  font-size: 16px;
  line-height: 1;
  margin-right: 2px;
}

.btn-auth {
  border-color: rgba(33, 82, 173, 0.26);
  background: rgba(33, 82, 173, 0.08);
}

html[data-theme="light"] .btn-auth {
  border-color: rgba(31, 78, 158, 0.22);
  background: rgba(255, 255, 255, 0.70);
}

@media (max-width: 980px) {
  .nav {
    padding: 0 20px;
    column-gap: 12px;
  }

  .nav-links {
    display: none;
  }


  .nav-search {
    max-width: 520px;
  }
}

@media (max-width: 720px) {
  .nav {
    grid-template-columns: 1fr auto;
  }

  .nav-search {
    display: none;
  }

  .btn-auth {
    padding: 9px 14px;
  }


  .nav-actions>button {
    display: none;
  }

  .nav-menu.hidden {
    display: inline-flex !important;
  }

  .nav-burger {
    display: inline-flex;
  }

  .nav-burger-ico {
    display: inline-flex;
  }

  .nav-account-meta,
  .nav-account-caret,
  .nav-burger-label,
  .nav-burger-caret {
    display: none;
  }

  .nav-account-avatar {
    display: none;
  }

  .nav-account {
    padding: 6px;
  }
}

@media (min-width: 721px) {
  .nav-menu-pop .nav-only-mobile {
    display: none;
  }
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
  letter-spacing: -0.1px;
  z-index: 2;
}

.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

/* ── Floating create button ───────────────────────────── */
.floating-create {
  position: fixed;
  right: 28px;
  top: 0;
  bottom: auto;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(41, 90, 173, 0.45);
  background: linear-gradient(135deg, rgba(41, 90, 173, 0.96), rgba(124, 58, 237, 0.92));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45), 0 0 24px rgba(41, 90, 173, 0.32);
  transform: translate3d(0, 0, 0);
  transform-origin: 50% 50%;
  will-change: transform;
}

.floating-create::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 1px solid rgba(124, 58, 237, 0.35);
  opacity: 0.6;
  animation: createPulse 2.8s ease-in-out infinite;
}

.floating-virtud {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(34, 197, 94, 0.88));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), 0 0 24px rgba(34, 197, 94, 0.26);
}

.floating-virtud::before {
  border-color: rgba(34, 197, 94, 0.4);
}

.floating-create-plus {
  font-size: 18px;
  line-height: 1;
}

.floating-create-label {
  font-size: 14px;
  letter-spacing: -0.2px;
}

@keyframes createPulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  60% {
    transform: scale(1.06);
    opacity: 0.15;
  }

  100% {
    transform: scale(1);
    opacity: 0.6;
  }
}

@media (max-width: 720px) {
  .floating-create {
    right: 18px;
    top: 0;
    padding: 12px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .floating-create,
  .floating-create::before {
    animation: none;
    transform: none;
  }
}

.btn:disabled:hover {
  transform: none;
}

.btn-primary {
  background: var(--kh-brand-gradient);
  color: #fff;
  border: 1px solid rgba(124, 58, 237, 0.35);
  box-shadow: 0 8px 22px var(--kh-brand-tint-18);
}

.btn-primary:hover {
  background: linear-gradient(120deg, #8B5CF6 0%, #6D28D9 50%, #4C1D95 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px var(--kh-brand-tint-18);
}

.btn-primary:active {
  transform: translateY(0);
  background: linear-gradient(120deg, #7C3AED 0%, #5B21B6 50%, #3B136D 100%);
}

.btn-ghost {
  background: transparent;
  color: var(--kh-text);
  border: 1px solid var(--kh-border);
}

.btn-ghost:hover {
  color: var(--kh-text);
  border-color: var(--kh-brand-tint-18);
  background: var(--kh-brand-tint-08);
  transform: translateY(-1px);
}

.btn-gold {
  background:
    radial-gradient(120% 120% at 30% 0%, rgba(255, 255, 255, 0.20) 0%, transparent 55%),
    linear-gradient(120deg, rgba(201, 168, 76, 0.92) 0%, rgba(244, 221, 152, 0.92) 100%);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(201, 168, 76, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  transition: all var(--transition);
  position: relative;
  justify-content: center;
}

/* Shimmer highlight */
.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.70) 18%, transparent 36%);
  transform: translateX(-140%);
  opacity: 0.0;
  pointer-events: none;
}

.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

.btn-gold:hover::before {
  opacity: 0.9;
  animation: khGoldShine 1.1s ease both;
}

@keyframes khGoldShine {
  0% {
    transform: translateX(-140%);
  }

  100% {
    transform: translateX(140%);
  }
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(201, 168, 76, 0.30);
  border-color: rgba(255, 255, 255, 0.20);
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-silver {
  background:
    radial-gradient(120% 120% at 30% 0%, rgba(255, 255, 255, 0.35) 0%, transparent 55%),
    linear-gradient(120deg, rgba(186, 193, 206, 0.92) 0%, rgba(240, 244, 250, 0.92) 100%);
  color: #111827;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(160, 168, 182, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  transition: all var(--transition);
  position: relative;
  justify-content: center;
}

.btn-silver::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.85) 18%, transparent 36%);
  transform: translateX(-140%);
  opacity: 0.0;
  pointer-events: none;
}

.btn-silver::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.btn-silver:hover::before {
  opacity: 0.9;
  animation: khGoldShine 1.1s ease both;
}

.btn-silver:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(160, 168, 182, 0.34);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-silver:active {
  transform: translateY(0);
}

.btn-lg {
  padding: 13px 30px;
  font-size: 16px;
  border-radius: 50px;
}

.btn-sm {
  padding: 7px 16px;
  font-size: 13px;
}

.btn-xs {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-block {
  width: fit-content;
  justify-content: center;
  padding: 13px 18px;
}

.btn-arrow {
  transition: transform var(--transition);
  display: inline-block;
}

/* ── Auth modal (Wallapop-like) ───────────────────────── */
.modal-auth {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f6f7fb 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.18);
  color: #1f2937;
  text-align: center;
  width: min(420px, 94vw);
  max-height: calc(100vh - 36px);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 24px;
  isolation: isolate;
}

.modal-auth::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background:
    url("../img/esquina1.png?v=4") left top / calc(var(--kh-corner-size) * 1.3) calc(var(--kh-corner-size) * 1.3) no-repeat,
    url("../img/esquina2.png?v=4") right bottom / var(--kh-corner-size) var(--kh-corner-size) no-repeat,
    radial-gradient(120% 120% at 12% -10%, rgba(31, 79, 158, 0.10), transparent 55%),
    radial-gradient(140% 140% at 90% 0%, rgba(27, 138, 118, 0.08), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.modal-auth>* {
  position: relative;
  z-index: 1;
}

.modal-auth .modal-close {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.65);
}

.modal-auth .modal-close:hover {
  background: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.9);
}

html[data-theme="dark"] .modal-auth {
  background: linear-gradient(180deg, rgba(13, 17, 27, 0.98) 0%, rgba(10, 14, 22, 0.98) 100%);
  border-color: rgba(197, 203, 214, 0.16);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
  color: var(--text);
}

html[data-theme="dark"] .modal-auth::before {
  background:
    url("../img/esquina1.png?v=4") left top / calc(var(--kh-corner-size) * 1.3) calc(var(--kh-corner-size) * 1.3) no-repeat,
    url("../img/esquina2.png?v=4") right bottom / var(--kh-corner-size) var(--kh-corner-size) no-repeat,
    radial-gradient(120% 120% at 12% -10%, rgba(197, 203, 214, 0.18), transparent 55%),
    radial-gradient(140% 140% at 90% 0%, rgba(33, 82, 173, 0.18), transparent 60%);
  opacity: 0.75;
}

html[data-theme="dark"] .modal-auth .modal-close {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-soft);
}

html[data-theme="dark"] .modal-auth .modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.auth-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(243, 246, 252, 0.95));
  position: relative;
  overflow: hidden;
}

.auth-hero::after {
  content: '';
  position: absolute;
  top: -24px;
  right: -28px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at 30% 30%, rgba(31, 79, 158, 0.18), transparent 68%);
  opacity: 0.7;
  pointer-events: none;
}

html[data-theme="dark"] .modal-auth .auth-hero {
  border-color: rgba(197, 203, 214, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

html[data-theme="dark"] .modal-auth .auth-hero::after {
  background: radial-gradient(circle at 30% 30%, rgba(197, 203, 214, 0.25), transparent 68%);
  opacity: 0.55;
}

.auth-hero>* {
  position: relative;
  z-index: 1;
}

.auth-hero--email {
  margin-bottom: 18px;
}

.auth-logo {
  width: 120px;
  max-width: 70%;
  height: auto;
  display: block;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: #202633;
}

.auth-subtitle {
  font-size: 15px;
  font-weight: 700;
  color: #1b8a76;
}

.auth-subtitle--muted {
  font-size: 14px;
  font-weight: 600;
  color: rgba(31, 41, 55, 0.55);
}

html[data-theme="dark"] .modal-auth .auth-title {
  color: var(--text);
}

html[data-theme="dark"] .modal-auth .auth-subtitle {
  color: #8FE3D2;
}

html[data-theme="dark"] .modal-auth .auth-subtitle--muted {
  color: var(--text-muted);
}

.auth-provider-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.auth-provider {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.modal-auth .auth-provider-list {
  gap: 12px;
  margin-top: 20px;
}

.modal-auth .auth-provider {
  background: linear-gradient(180deg, #ffffff, #f7f9ff);
  border-color: rgba(15, 23, 42, 0.14);
  color: #2a3244;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10);
}

.modal-auth .auth-provider:hover {
  border-color: rgba(31, 143, 122, 0.4);
  background: #fbfffe;
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
}

html[data-theme="dark"] .modal-auth .auth-provider {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .modal-auth .auth-provider:hover {
  border-color: rgba(143, 227, 210, 0.45);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4);
}

.modal-auth .auth-provider span {
  letter-spacing: -0.1px;
}

html[data-theme="light"] .auth-provider {
  background: rgba(255, 255, 255, 0.70);
}

.auth-provider:hover {
  transform: translateY(-1px);
  border-color: var(--kh-brand-tint-18);
  background: var(--kh-brand-tint-08);
}

.auth-provider[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .modal-auth .auth-provider[disabled] {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--text-muted);
}

html[data-theme="light"] .auth-provider[disabled] {
  background: rgba(255, 255, 255, 0.55);
}

.auth-provider[disabled]:hover {
  transform: none;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.auth-ico {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.modal-auth .auth-ico {
  background: #f5f7fb;
  border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="dark"] .modal-auth .auth-ico {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.auth-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-help {
  font-size: 12px;
  color: rgba(31, 41, 55, 0.55);
  white-space: nowrap;
}

html[data-theme="dark"] .modal-auth .auth-help {
  color: var(--text-muted);
}

.auth-help-link {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(31, 41, 55, 0.6);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  white-space: nowrap;
}

html[data-theme="dark"] .modal-auth .auth-help-link {
  color: #8FE3D2;
}

.auth-help-link:hover {
  color: #1b8a76;
}

html[data-theme="dark"] .modal-auth .auth-help-link:hover {
  color: #6FD5C2;
}

.auth-reset-note {
  margin: -4px 0 14px;
  font-size: 12.5px;
  color: rgba(31, 41, 55, 0.6);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(31, 143, 122, 0.08);
  border: 1px dashed rgba(31, 143, 122, 0.25);
}

html[data-theme="dark"] .modal-auth .auth-reset-note {
  color: var(--text-soft);
  background: rgba(143, 227, 210, 0.08);
  border-color: rgba(143, 227, 210, 0.28);
}

.modal-auth #login-form .btn-block,
.modal-auth #register-form .btn-block,
.modal-auth #reset-form .btn-block {
  border-radius: 999px;
}

.auth-ico--g {
  color: #0B0F1A;
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
}

.auth-ico--f {
  color: #fff;
  background: #1877F2;
  border-color: rgba(24, 119, 242, 0.35);
}

.auth-ico--m {
  color: var(--kh-brand-700);
  background: var(--kh-brand-tint-12);
  border-color: var(--kh-brand-tint-18);
}

.modal-auth .auth-ico--m {
  background: #eef3ff;
  border-color: rgba(38, 84, 168, 0.2);
}

html[data-theme="dark"] .modal-auth .auth-ico--m {
  background: rgba(33, 82, 173, 0.28);
  border-color: rgba(33, 82, 173, 0.38);
  color: #D7E6FF;
}

.auth-email-top {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.modal-auth .field label {
  color: rgba(31, 41, 55, 0.6);
}

html[data-theme="dark"] .modal-auth .field label {
  color: var(--text-muted);
}

.modal-auth .field input,
.modal-auth .field textarea,
.modal-auth .field select {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #111827;
}

html[data-theme="dark"] .modal-auth .field input,
html[data-theme="dark"] .modal-auth .field textarea,
html[data-theme="dark"] .modal-auth .field select {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.modal-auth .field input::placeholder,
.modal-auth .field textarea::placeholder {
  color: rgba(15, 23, 42, 0.35);
}

html[data-theme="dark"] .modal-auth .field input::placeholder,
html[data-theme="dark"] .modal-auth .field textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.modal-auth .field input:focus,
.modal-auth .field textarea:focus,
.modal-auth .field select:focus {
  border-color: rgba(31, 143, 122, 0.65);
  box-shadow: 0 0 0 3px rgba(31, 143, 122, 0.18);
}

html[data-theme="dark"] .modal-auth .field input:focus,
html[data-theme="dark"] .modal-auth .field textarea:focus,
html[data-theme="dark"] .modal-auth .field select:focus {
  border-color: rgba(143, 227, 210, 0.60);
  box-shadow: 0 0 0 3px rgba(143, 227, 210, 0.18);
}

.auth-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12.5px;
  color: rgba(31, 41, 55, 0.7);
}

html[data-theme="dark"] .modal-auth .auth-switch {
  color: var(--text-muted);
}

.auth-link {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #1f8f7a;
  cursor: pointer;
  text-decoration: underline;
}

html[data-theme="dark"] .modal-auth .auth-link {
  color: #8FE3D2;
}

.auth-link:hover {
  color: #147262;
}

html[data-theme="dark"] .modal-auth .auth-link:hover {
  color: #6FD5C2;
}

.auth-legal {
  margin-top: 12px;
  font-size: 11px;
  color: rgba(31, 41, 55, 0.55);
  line-height: 1.6;
}

html[data-theme="dark"] .modal-auth .auth-legal {
  color: var(--text-muted);
}

.modal-auth .auth-legal {
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .modal-auth .auth-legal {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.auth-legal a {
  color: #1f8f7a;
  text-decoration: underline;
}

/* ── App download modal ──────────────────────────────── */
.modal-app-download .auth-hero {
  margin-bottom: 14px;
}

.modal-app-download .app-download-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 6px 2px;
}

.modal-app-download .app-download-chip {
  align-self: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #6D28D9;
  background: rgba(109, 40, 217, 0.12);
  border: 1px solid rgba(109, 40, 217, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
}

.modal-app-download .app-download-copy {
  margin: 0;
  font-size: 14px;
  color: rgba(31, 41, 55, 0.72);
  line-height: 1.6;
}

html[data-theme="dark"] .modal-app-download .app-download-copy {
  color: var(--text-soft);
}

.modal-app-download .app-download-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

html[data-theme="dark"] .modal-auth .auth-legal a {
  color: #8FE3D2;
}

.modal-auth #auth-email {
  text-align: left;
}

.modal-auth .auth-tabs {
  justify-content: center;
}

@media (max-width: 560px) {
  .modal-auth {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .modal-auth .modal-close {
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
  }

  .auth-logo {
    width: 96px;
  }

  .auth-title {
    font-size: 18px;
  }

  .auth-subtitle {
    font-size: 14px;
  }

  .auth-subtitle--muted {
    font-size: 13px;
  }

  .modal-auth .auth-provider-list {
    gap: 10px;
    margin-top: 16px;
  }

  .modal-auth .auth-provider {
    padding: 11px 12px;
    font-size: 14px;
  }

  .modal-auth .auth-ico {
    width: 26px;
    height: 26px;
    border-radius: 9px;
  }

  .auth-switch {
    flex-wrap: wrap;
    line-height: 1.6;
  }
}

@media (max-width: 380px) {
  .modal-auth {
    padding: 24px 16px;
  }

  .auth-logo {
    width: 88px;
  }

  .auth-title {
    font-size: 17px;
  }

  .auth-subtitle {
    font-size: 13px;
  }
}

.auth-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 14px;
}

.auth-tab {
  border: none;
  background: transparent;
  color: var(--text-soft);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  transition: background var(--transition), color var(--transition);
}

.auth-tab--active {
  background: var(--kh-brand-tint-12);
  color: var(--text);
}

/* ── Chat modal ───────────────────────────────────────── */
.modal-chat-box {
  max-width: 520px;
}

.chat-agreement {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.chat-agreement-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.chat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chat-coins-custom {
  width: 92px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 10px;
  color: var(--text);
  outline: none;
}

.chat-actions {
  margin-top: 10px;
}

.chat-thread {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.chat-messages {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  max-width: 88%;
}

.chat-msg.me {
  align-self: flex-end;
}

.chat-msg.system {
  align-self: center;
  max-width: 100%;
}

.chat-bubble {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  line-height: 1.35;
}

.chat-msg.system .chat-bubble {
  border-style: dashed;
  background: rgba(201, 168, 76, 0.08);
  border-color: rgba(201, 168, 76, 0.22);
  color: var(--text);
  text-align: center;
}

.chat-msg.me .chat-bubble {
  border-color: var(--kh-brand-tint-18);
  background: var(--kh-brand-tint-08);
}

.chat-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-input {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.chat-input input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.btn:hover .btn-arrow {
  transform: translateX(5px);
}

.btn-gold:hover .btn-arrow {
  transform: translateX(5px);
}

/* ── Spinner ──────────────────────────────────────────── */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ═══════════════════════════
   HERO
═══════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  /* 20px gap below fixed nav + 20px bottom safe area */
  padding: 84px 0 20px;
  /* extra bottom pad — no more clipping */
  /* overflow: hidden removed — moved to .hero-bg */
  display: flex;
  align-items: center;
}


/* Isolated background layer — decorative overflow safely contained here */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 30px;
  width: fit-content;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: pulseRing 2.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  flex-shrink: 0;
}

@keyframes pulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }

  60% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.hero-title {
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  color: var(--text);
}

.hero-sub {
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.75;
  max-width: 480px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-soft);
  border-radius: 30px;
  transition: all var(--transition);
}

.chip:hover {
  border-color: var(--border-h);
  color: var(--text);
  background: var(--bg-card-h);
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Match Preview ────────────────────────────────────── */
.hero-preview {
  position: relative;
}

.preview-card {
  background: rgba(11, 15, 26, 0.75);
  border: 1px solid var(--border-h);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.preview-dot.ok {
  background: #22C55E;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.preview-dot.warn {
  background: #F59E0B;
}

.preview-title {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.preview-steps {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.preview-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  transition: all var(--transition);
  opacity: 0.62;
  position: relative;
}

.preview-step::before {
  content: '';
  position: absolute;
  left: 22px;
  bottom: -4px;
  width: 1px;
  height: 8px;
  background: var(--border);
}

.preview-step:last-child::before {
  display: none;
}

.preview-step.active {
  opacity: 1;
  background: rgba(33, 82, 173, 0.07);
  border: 1px solid rgba(33, 82, 173, 0.16);
}

.pstep-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-muted);
}

.preview-step.active .pstep-num {
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  color: #fff;
}

.pstep-body {
  flex: 1;
}

.pstep-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.pstep-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.pstep-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.pstep-badge.pending {
  background: rgba(239, 68, 68, 0.12);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.pstep-badge.matching {
  background: rgba(251, 191, 36, 0.10);
  color: #FCD34D;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.pstep-badge.proposals {
  background: rgba(61, 139, 255, 0.10);
  color: #93C5FD;
  border: 1px solid rgba(61, 139, 255, 0.22);
}

.pstep-badge.confirmed {
  background: rgba(34, 197, 94, 0.12);
  color: #4ADE80;
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.preview-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.flow-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.flow-badge.f-pending {
  background: rgba(239, 68, 68, 0.12);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.flow-badge.f-accepted {
  background: rgba(61, 139, 255, 0.10);
  color: #93C5FD;
  border: 1px solid rgba(61, 139, 255, 0.2);
}

.flow-badge.f-done {
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
}

.flow-arrow {
  font-size: 13px;
  color: var(--text-muted);
}

/* ═══════════════════════════
   KPIs
═══════════════════════════ */
.kpis {
  padding: 64px 0;
  background: rgba(255, 255, 255, 0.02);
  border-top: none;
  border-bottom: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  background: transparent;
}

.kpi-card {
  background: var(--bg-card);
  padding: 28px 22px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.22);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

.kpi-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.kpi-value {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1.2px;
  color: var(--kh-brand-500);
}

.kpi-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ═══════════════════════════
   FEATURES (CÓMO FUNCIONA)
═══════════════════════════ */
.features {
  padding: 92px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: clamp(28px, 3.9vw, 42px);
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 12px;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.section-header p {
  color: var(--text-soft);
  font-size: 16.5px;
  max-width: 680px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 34px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.feature-card:hover {
  border-color: rgba(79, 70, 229, 0.25);
  transform: translateY(-6px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
  background: var(--bg-card-h);
}

.feature-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(79, 70, 229, 0.2);
  margin: 0 auto 22px;
  transition: all var(--transition);
}

.match-glow {
  border-color: rgba(82, 49, 148, 0.26);
  box-shadow: 0 0 20px rgba(33, 82, 173, 0.12);
}

.feature-card:hover .feature-icon-wrap {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.7), rgba(124, 58, 237, 0.6));
  border-color: rgba(79, 70, 229, 0.35);
  color: #fff;
}

.feature-icon {
  font-size: 28px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.feature-step-num {
  position: absolute;
  bottom: 16px;
  right: 18px;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.06);
  letter-spacing: -1px;
  user-select: none;
}

/* ═══════════════════════════
   PREMIUM SECTION
═══════════════════════════ */
.premium-section {
  padding: 96px 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.18), rgba(124, 58, 237, 0.12));
}

.premium-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
  transform: rotate(12deg);
  opacity: 0.6;
  pointer-events: none;
}

.premium-card {
  position: relative;
  overflow: hidden;
  background: rgba(11, 15, 26, 0.7);
  border: 1px solid var(--gold-border);
  border-radius: 24px;
  padding: 36px;
  max-width: 1100px;
  margin: 0 auto;
  /* NOT text-align:center globally — each zone controls its own alignment */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.08), var(--shadow-lg);
}

.premium-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
}

.premium-main {
  display: grid;
  gap: 16px;
}

.premium-aside {
  display: grid;
  gap: 16px;
}

.premium-aside-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
}

.premium-aside-card--offset {
  transform: translateY(18px);
}

.premium-aside-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 12px;
}

.premium-aside-card h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
}

.premium-aside-card p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

@media (max-width: 980px) {
  .premium-layout {
    grid-template-columns: 1fr;
  }

  .premium-aside-card--offset {
    transform: none;
  }
}

html[data-theme="light"] .premium-section {
  background: rgba(79, 70, 229, 0.06);
}

html[data-theme="light"] .premium-aside-card {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .premium-aside-card p {
  color: #4B5563;
}

.premium-card--lite {
  border-color: var(--silver-border);
  box-shadow: 0 0 0 1px rgba(197, 203, 214, 0.12), var(--shadow-lg);
}

.premium-card--lite::after {
  content: '';
  position: absolute;
  inset: -40% 0 auto 0;
  height: 140px;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.45) 20%, transparent 40%);
  opacity: 0.35;
  animation: premiumLiteSheen 6s ease-in-out infinite;
  pointer-events: none;
}

.premium-card--lite .premium-halo {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(197, 203, 214, 0.14) 0%, transparent 70%);
}

.premium-card--lite .premium-crown {
  color: var(--silver-light);
  filter: drop-shadow(0 0 12px var(--silver-glow));
}

.premium-card--lite .premium-label {
  color: var(--silver-500);
  background: rgba(197, 203, 214, 0.12);
  border: 1px solid rgba(197, 203, 214, 0.30);
  box-shadow: 0 0 10px rgba(197, 203, 214, 0.18);
}

.premium-card--lite .premium-bullets .bullet-svg {
  color: var(--silver-500);
}

.premium-card--lite .track-fill {
  background: linear-gradient(90deg, var(--silver-500) 0%, var(--silver-light) 100%);
  box-shadow: 0 0 8px var(--silver-glow);
}

.premium-card--lite .milestone.done {
  color: var(--silver-500);
}

.premium-halo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201, 168, 76, 0.12) 0%, transparent 70%);
}

/* Crown + labels row — always centred */
.premium-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  text-align: center;
}

.premium-crown {
  font-size: 28px;
  color: var(--gold-light);
  filter: drop-shadow(0 0 12px var(--gold-glow));
}

.premium-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.10);
  border: 1px solid rgba(201, 168, 76, 0.25);
  padding: 3px 12px;
  border-radius: 20px;
}

.premium-free-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--silver-500);
  background: rgba(197, 203, 214, 0.14);
  border: 1px solid var(--silver-border);
  padding: 3px 10px;
  border-radius: 20px;
}

/* Title + subtitle — centred */
.premium-title {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
  text-align: center;
}

.premium-sub {
  color: var(--text-soft);
  font-size: 17px;
  margin-bottom: 28px;
  text-align: center;
}

/* ── CONTENT COLUMN — left-aligned, consistent width ───── */
/* Wrapper that gives all sub-blocks the same left-aligned column */
.premium-bullets,
.premium-pricing-row,
.premium-points-note,
.points-track {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Pricing row */
.premium-pricing-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 18px 24px;
  background: rgba(201, 168, 76, 0.05);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 14px;
}

/* Bullets list */
.premium-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  text-align: left;
  margin-bottom: 20px;
}

.premium-bullets li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-soft);
}

.bullet-icon {
  color: var(--gold);
  font-size: 12px;
  flex-shrink: 0;
}

/* Points note */
.premium-points-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.55;
  background: rgba(33, 82, 173, 0.06);
  border: 1px solid rgba(33, 82, 173, 0.14);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: left;
  margin-bottom: 24px;
}

.premium-points-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Progress bar */
.points-track {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 32px;
  text-align: left;
}

.track-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 10px;
  text-align: center;
}

.track-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.track-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 3px;
  box-shadow: 0 0 8px var(--gold-glow);
}

.track-milestones {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.milestone {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.milestone.done {
  color: var(--gold);
}

.track-legend {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  opacity: 0.65;
  margin-top: 2px;
}

/* Button + sub-text — centred */
.premium-btn-sub {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
}

.premium-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
  font-style: italic;
  text-align: center;
}

/* ── Dual Pricing Plans ─────────────────────────────── */
.premium-plans {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto 28px;
  max-width: 520px;
}

.premium-plan {
  appearance: none;
  cursor: pointer;
  flex: 1 1 240px;
  min-width: 220px;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 18px;
  padding: 24px 22px;
  text-align: center;
  position: relative;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.premium-plan:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--kh-brand-tint-18), 0 10px 28px rgba(201, 168, 76, 0.10);
}

.premium-plan:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(201, 168, 76, 0.10);
}

.premium-plan--featured {
  background: rgba(201, 168, 76, 0.07);
  border-color: rgba(201, 168, 76, 0.40);
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.15), 0 8px 24px rgba(201, 168, 76, 0.08);
}

.premium-plan--active {
  border-color: rgba(41, 90, 173, 0.40);
  background: linear-gradient(135deg, rgba(82, 49, 148, 0.10), rgba(33, 82, 173, 0.10));
  box-shadow: 0 0 0 1px rgba(33, 82, 173, 0.16), 0 10px 28px rgba(33, 82, 173, 0.10);
}

.premium-plan--featured.premium-plan--active {
  border-color: rgba(201, 168, 76, 0.45);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.10), rgba(33, 82, 173, 0.08));
}

.plan-best-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #1a1006;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.plan-period {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.75;
  margin-bottom: 8px;
}

.plan-price {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--gold-light);
  line-height: 1.05;
}

.plan-price span {
  font-size: 20px;
  font-weight: 600;
  opacity: 0.85;
}

.plan-freq {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.plan-note {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Bullet SVG icons ──────────────────────────────── */
.bullet-svg {
  flex-shrink: 0;
  color: var(--premium-500);
  opacity: 0.9;
}

.premium-bullets li {
  display: flex;
  align-items: center;
  gap: 12px;
}


/* ═══════════════════════════
   TRUST
═══════════════════════════ */
.trust-section {
  padding: 86px 0;
}

.premium-cta {
  display: flex;
  justify-content: center;
}

.trust-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 32px;
  align-items: center;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.trust-media-card {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  aspect-ratio: 1 / 1;
  width: 80%;
  max-width: 420px;
  margin: 0 auto;
}

.trust-media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trust-body h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  margin: 10px 0 10px;
}

.trust-body p {
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.7;
}

.trust-list {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.trust-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
}

.trust-bullet {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(79, 70, 229, 0.16);
  color: var(--accent-light);
  font-weight: 800;
  flex-shrink: 0;
}

.trust-item h4 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.trust-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

html[data-theme="light"] .trust-shell {
  background: #F8FAFF;
  border-color: rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .trust-item {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .trust-bullet {
  background: rgba(79, 70, 229, 0.12);
  color: #4F46E5;
}

@media (max-width: 980px) {
  .trust-shell {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .trust-media-card {
    aspect-ratio: 16 / 9;
  }
}

/* ═══════════════════════════
   CASOS DE USO
═══════════════════════════ */
.usecases-section {
  padding: 72px 0;
}

.usecases-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.usecases-copy {
  margin-left: var(--section-offset);
}

.usecases-copy h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  margin: 6px 0 8px;
}

.usecases-copy p {
  color: var(--text-soft);
  font-size: 16px;
}

.usecases-link {
  border: none;
  background: none;
  color: var(--accent-light);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.usecases-link:hover {
  text-decoration: underline;
}

html[data-theme="light"] .usecases-link {
  color: #4F46E5;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.usecase-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: center;
  transition: all var(--transition);
  cursor: default;
}

.usecase-card:hover {
  border-color: rgba(79, 70, 229, 0.25);
  background: var(--bg-card-h);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.usecase-icon {
  font-size: 28px;
}

.usecase-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
}

@media (max-width: 720px) {
  .usecases-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .usecases-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════
   CTA FINAL
═══════════════════════════ */
.final-cta {
  padding: 86px 0;
}

.final-cta-box {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 72px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: 24px;
}

.final-glow {
  position: absolute;
  top: -40%;
  left: 20%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(33, 82, 173, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

.final-cta-box h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.final-cta-box p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.final-cta-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.final-cta-download {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.final-cta-download .app-download-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.final-cta-download .app-download-link:hover {
  color: var(--text-strong);
}

.final-cta-download .app-download-sep {
  opacity: 0.6;
}

.final-cta-download .app-download-note {
  opacity: 0.7;
}

.app-download-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: inline-block;
}

.app-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 720px) {
  .final-cta-box {
    text-align: left;
  }

  .final-cta-btns,
  .final-cta-download {
    justify-content: flex-start;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    justify-self: start;
    text-align: left;
  }

  .kpi-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    text-align: left;
    padding: 18px;
  }

  .kpi-icon {
    margin: 0;
    grid-row: 1 / span 2;
  }

  .kpi-value {
    font-size: 26px;
  }

  .kpi-label {
    margin-top: 2px;
  }

  .feature-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 6px;
    text-align: left;
    padding: 20px 18px;
  }

  .feature-icon-wrap {
    margin: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    grid-row: 1 / span 2;
  }

  .feature-card h3 {
    margin: 0;
    font-size: 16px;
  }

  .feature-card p {
    margin: 0;
    font-size: 13.5px;
  }

  .feature-step-num {
    font-size: 26px;
    right: 12px;
    bottom: 12px;
  }

  .usecase-card {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 14px 16px;
  }

  .usecase-icon {
    font-size: 22px;
  }

  .usecase-title {
    font-size: 14px;
  }

  .premium-aside-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    row-gap: 4px;
    align-items: center;
  }

  .premium-aside-ico {
    margin-bottom: 0;
  }

  .premium-aside-card h4 {
    margin-bottom: 0;
  }

  .premium-aside-card p {
    margin: 0;
  }
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(7, 10, 16, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 28px 0;
}

html[data-theme="light"] .site-footer {
  background: rgba(245, 246, 250, 0.92);
  border-top-color: rgba(0, 0, 0, 0.09);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.9fr;
  gap: 22px;
  align-items: start;
}

.footer-note {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 520px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-self: end;
  text-align: right;
}

.footer-small {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links button {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 13px;
}

.footer-links button:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Cookie banner & settings ───────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 28px));
  z-index: 250;
  background: linear-gradient(180deg, rgba(12, 17, 28, 0.92), rgba(8, 12, 20, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme="light"] .cookie-banner {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 252, 0.96));
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.cookie-banner-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.cookie-banner-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--text);
}

.cookie-banner-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-soft);
}

.cookie-banner-desc a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner-actions .btn {
    flex: 1;
  }
}

.cookie-panel {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 10, 16, 0.70);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cookie-panel-card {
  width: min(640px, 94vw);
  background: linear-gradient(180deg, rgba(12, 17, 28, 0.98), rgba(8, 12, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 24px;
  position: relative;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.60);
  overflow: hidden;
}

html[data-theme="light"] .cookie-panel-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 252, 0.98));
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
}

.cookie-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.cookie-panel-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

html[data-theme="light"] .cookie-panel-close {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  color: #1f2937;
}

.cookie-panel-desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-soft);
}

.cookie-options {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.cookie-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="light"] .cookie-option {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.10);
}

.cookie-option-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.cookie-option-desc {
  grid-column: 1 / -1;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.cookie-toggle {
  appearance: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cookie-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.cookie-toggle:checked {
  background: linear-gradient(120deg, var(--kh-brand-500), var(--kh-brand-700));
  border-color: rgba(41, 90, 173, 0.45);
}

.cookie-toggle:checked::after {
  transform: translateX(18px);
}

.cookie-toggle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.cookie-panel-actions .btn {
  min-width: 150px;
}

.cookie-panel-links {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.cookie-panel-links a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-small a {
  color: inherit;
}

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    justify-self: start;
    text-align: left;
  }
}

/* ═══════════════════════════
   DASHBOARD
═══════════════════════════ */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  background: rgba(7, 10, 16, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.dash-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 820px) {

  /* Keep mobile tabs from squashing their shape */
  .dash-tabs {
    justify-content: flex-start;
  }
}

/* Mobile header: logo centrado, solo burger visible ≤560px */
@media (max-width: 560px) {
  .dash-header {
    padding: 0 12px;
    /* sticky ya definido en base; position no se sobreescribe */
  }

  /* Hide avatar and name info — accessible via burger menu */
  .dash-header .user-avatar,
  .dash-header .user-info,
  .dash-header .verified-badge {
    display: none;
  }
}

/* Dashboard tabs (views) */
.dash-tabs-wrap {
  position: sticky;
  top: 60px;
  z-index: 49;
  background: rgba(7, 10, 16, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.dash-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  max-width: 1100px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

/* Keep primary nav compact (3 items) */
.dash-tabs {
  max-width: 680px;
}

@media (max-width: 520px) {
  .dash-tabs {
    max-width: none;
    padding: 8px 12px;
  }
}

/* Account menu */
.dash-menu {
  position: relative;
}

.btn-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-account:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-account .dash-menu-caret {
  font-size: 12px;
  opacity: 0.7;
}

html[data-theme="light"] .btn-account {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text);
}

html[data-theme="light"] .btn-account:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.16);
}

.dash-burger {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: -0.5px;
}

@media (max-width: 820px) {

  /* Mobile header: keep it calm; move account into burger */
  .dash-header .nav-brand {
    display: none;
  }

  .dash-left {
    flex: 1;
  }

  .dash-user .user-avatar,
  .dash-user .user-info,
  .dash-user .verified-badge {
    display: none;
  }

  .dash-user .kh-pill {
    display: none;
  }

  .dash-user .btn-create {
    display: none;
  }

  .dash-user .dash-menu {
    display: block;
  }

  .dash-menu #dash-menu-btn {
    display: none;
  }

  .dash-burger {
    display: inline-flex;
  }

  /* Turn the account popover into a bottom sheet on mobile */
  .dash-menu-pop {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: 520px;
    margin: 0 auto;
    border-radius: 22px;
    padding: 10px;
    box-shadow: 0 26px 90px rgba(0, 0, 0, 0.70);
    border-color: rgba(226, 184, 107, 0.18);
  }

  .dash-menu-item {
    padding: 13px 12px;
    font-size: 14px;
    border-radius: 16px;
  }

  .dash-menu-pop::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: rgba(226, 184, 107, 0.35);
    opacity: 0.85;
  }

  .dash-menu-pop {
    padding-top: 18px;
  }
}

.dash-menu-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(7, 10, 16, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  padding: 8px;
  z-index: 80;
}

html[data-theme="light"] .dash-menu-pop {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.12);
}

.dash-menu-item {
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 14px;
  padding: 10px 10px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.dash-menu-item:hover {
  background: var(--kh-brand-tint-08);
  border-color: var(--kh-brand-tint-18);
  transform: translateY(-1px);
}

.dash-menu-item:active {
  transform: translateY(0);
}

.dash-menu-item.danger {
  color: rgba(248, 113, 113, 0.95);
}

.dash-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.18);
}

.dash-menu-item--gold {
  background: linear-gradient(135deg, rgba(197, 203, 214, 0.18), rgba(197, 203, 214, 0.06));
  border: 1px solid var(--silver-border);
  color: var(--silver-500);
  font-weight: 600;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(197, 203, 214, 0.18), 0 0 16px rgba(197, 203, 214, 0.2);
  text-shadow: 0 0 10px rgba(197, 203, 214, 0.25);
  animation: goldPulse 2.8s ease-in-out infinite;
}

.dash-menu-item--cta {
  background:
    radial-gradient(120% 120% at 30% 0%, rgba(255, 255, 255, 0.35) 0%, transparent 55%),
    linear-gradient(120deg, rgba(186, 193, 206, 0.92) 0%, rgba(240, 244, 250, 0.92) 100%);
  color: #111827;
  border-color: rgba(255, 255, 255, 0.35);
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(160, 168, 182, 0.28), 0 0 18px rgba(197, 203, 214, 0.25);
  text-shadow: none;
}

.dash-menu-item--cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.85) 18%, transparent 36%);
  transform: translateX(-140%);
  opacity: 0.0;
  pointer-events: none;
}

.dash-menu-item--cta::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.dash-menu-item--cta:hover {
  background:
    radial-gradient(120% 120% at 30% 0%, rgba(255, 255, 255, 0.4) 0%, transparent 55%),
    linear-gradient(120deg, rgba(192, 199, 212, 0.96) 0%, rgba(246, 249, 253, 0.96) 100%);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 14px 34px rgba(160, 168, 182, 0.34), 0 0 22px rgba(197, 203, 214, 0.3);
}

.dash-menu-item--cta:hover::before {
  opacity: 0.9;
  animation: khGoldShine 1.1s ease both;
}

.dash-menu-item--gold::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

.dash-menu-item--gold:hover {
  background: linear-gradient(135deg, rgba(197, 203, 214, 0.22), rgba(197, 203, 214, 0.10));
  border-color: var(--silver-500);
  transform: translateX(4px);
}

.menu-gold-icon {
  margin-right: 8px;
  filter: drop-shadow(0 0 4px var(--silver-glow));
}

@keyframes shimmer {
  0% {
    left: -100%;
  }

  50%,
  100% {
    left: 100%;
  }
}

@keyframes goldPulse {

  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(217, 164, 65, 0.12), 0 0 12px rgba(217, 164, 65, 0.12);
  }

  50% {
    box-shadow: 0 0 0 1px rgba(217, 164, 65, 0.35), 0 0 22px rgba(217, 164, 65, 0.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-menu-item--gold {
    animation: none;
  }

  .dash-menu-item--gold::before {
    animation: none;
  }
}

.dash-menu-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 6px;
}

html[data-theme="light"] .dash-menu-sep {
  background: rgba(0, 0, 0, 0.08);
}

.dash-tabs::-webkit-scrollbar {
  display: none;
}

.dash-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.dash-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-h);
  transform: translateY(-1px);
}

.dash-tab:active {
  transform: translateY(0px);
}

.dash-tab--active {
  background: linear-gradient(120deg, rgba(82, 49, 148, 0.22), rgba(33, 82, 173, 0.18));
  border-color: rgba(33, 82, 173, 0.26);
  color: var(--text);
  box-shadow: 0 10px 26px rgba(33, 82, 173, 0.14);
}

/* AutoMatch primary tab: premium spotlight */
.dash-tab--automatch {
  border-color: rgba(201, 168, 76, 0.26);
  background: radial-gradient(circle at 30% 20%, rgba(201, 168, 76, 0.16), transparent 60%), rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.dash-tab--automatch:hover {
  border-color: rgba(201, 168, 76, 0.36);
  box-shadow: 0 14px 34px rgba(201, 168, 76, 0.10);
}

.dash-tab--automatch.dash-tab--active {
  background: radial-gradient(circle at 30% 20%, rgba(201, 168, 76, 0.22), transparent 62%),
    linear-gradient(120deg, rgba(82, 49, 148, 0.18), rgba(33, 82, 173, 0.14));
  border-color: rgba(201, 168, 76, 0.40);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), 0 10px 30px rgba(201, 168, 76, 0.12);
}

.dash-tab-badge {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.28);
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 900;
}

/* View filter: show only cards tagged for the current view */
.dashboard[data-view="automatch"] .dash-grid>[data-view]:not([data-view~="automatch"]) {
  display: none;
}

.dashboard[data-view="explorar"] .dash-grid>[data-view]:not([data-view~="explorar"]) {
  display: none;
}

.dashboard[data-view="crear"] .dash-grid>[data-view]:not([data-view~="crear"]) {
  display: none;
}

.dashboard[data-view="creaciones"] .dash-grid>[data-view]:not([data-view~="creaciones"]) {
  display: none;
}

.dashboard[data-view="matches"] .dash-grid>[data-view]:not([data-view~="matches"]) {
  display: none;
}

.dashboard[data-view="perfil"] .dash-grid>[data-view]:not([data-view~="perfil"]) {
  display: none;
}

.dashboard[data-view="premium"] .dash-grid>[data-view]:not([data-view~="premium"]) {
  display: none;
}

.dashboard[data-view="ranking"] .dash-grid>[data-view]:not([data-view~="ranking"]) {
  display: none;
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-user .nav-account .verified-badge {
  display: none;
}

.dash-user .notif-bell-wrap {
  display: none;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
}

.user-tier {
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.dashboard {
  padding: 28px;
  min-height: calc(100vh - 60px);
  background: var(--bg);
}

.dashboard[data-view="automatch"] {
  padding-left: 0;
  padding-right: 0;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .dash-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

.dashboard[data-view="automatch"] .dash-grid {
  max-width: none;
  width: 100%;
  margin: 0;
}

@media (max-width: 980px) {
  .dashboard[data-view="automatch"] {
    padding: 16px;
  }

  .dashboard[data-view="perfil"] {
    padding: 16px;
  }

  .profile-hero-about {
    margin-left: -60px;
  }
}

@media (max-width: 820px) {
  .profile-hero-head {
    grid-template-columns: 1fr;
  }

  .profile-hero-about {
    margin-left: 0;
    margin-top: 8px;
  }

  .automatch-hero-actions {
    width: 100%;
  }

  .automatch-hero-actions .btn {
    flex: 1 1 220px;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .automatch-stage {
    gap: 16px;
  }

  .automatch-hero {
    padding: 18px;
  }

  .automatch-hero-actions {
    width: 100%;
  }

  .automatch-hero-actions .btn-am-save {
    width: 100%;
    justify-content: center;
  }

  .automatch-premium-actions,
  .automatch-settings-actions {
    justify-content: flex-start;
  }

  .automatch-premium-actions .btn,
  .automatch-settings-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.dashboard[data-view="perfil"] .dash-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

.dashboard[data-view="perfil"] {
  padding-left: 0;
  padding-right: 0;
}

.dashboard[data-view="crear"] .dash-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 980px;
}

.dashboard[data-view="perfil"] .glass-card,
.dashboard[data-view="crear"] .glass-card {
  margin-inline: auto;
}

.card-mvp-request,
.card-timeline {
  max-width: 980px;
}

.card-mvp-request form {
  display: grid;
  gap: 14px;
}

.card-mvp-request .field {
  margin: 0;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: -8px;
  margin-top: 20px;
  border-radius: 999px;
  background: transparent;
  color: rgba(74, 222, 128, 0.80);
  font-weight: 900;
  font-size: 11px;
  /* Sin borde ni sombra — check sutil tipo watermark */
  opacity: 0.80;
  letter-spacing: 0;
}

/* Dashboard layouts by view (reduce "amontonado") */
.dashboard[data-view="crear"] .card-timeline,
.dashboard[data-view="crear"] #card-mvp-request,
.dashboard[data-view="explorar"] #card-feed,
.dashboard[data-view="ranking"] #card-ranking,
.dashboard[data-view="automatch"] #card-automatch,
.dashboard[data-view="creaciones"] #card-mvp-creations,
.dashboard[data-view="matches"] #card-mvp-matches,
.dashboard[data-view="premium"] #card-premium-progress,
.dashboard[data-view="premium"] #card-leaderboard,
.dashboard[data-view="premium"] #card-collections,
.dashboard[data-view="perfil"] #card-collections,
.dashboard[data-view="perfil"] #card-profile-hero,
.dashboard[data-view="perfil"] #card-profile {
  grid-column: 1 / -1;
  margin: 0;
  width: 100%;
}

@media (max-width: 1024px) {
  #card-mvp-matches,
  #card-mvp-creations {
    max-width: 980px;
    margin-inline: auto;
  }
}

.card-profile-hero {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  margin: 0;
}

.card-profile-hero::before,
.card-profile-hero::after {
  content: none;
}

.profile-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.profile-hero-card {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 28px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.profile-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(201, 168, 76, 0.14), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(41, 90, 173, 0.14), transparent 50%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 10px);
  opacity: 0.55;
  pointer-events: none;
}

.profile-hero-card>* {
  position: relative;
  z-index: 1;
}

html[data-theme="light"] .profile-hero-card {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.profile-hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  width: 100%;
  align-items: start;
}

.profile-hero-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.profile-hero-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.profile-hero-upload {
  border: 1px dashed rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  position: absolute;
  bottom: -8px;
  left: -8px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.profile-hero-upload-ico {
  display: block;
}

.profile-hero-upload:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.7);
  background: rgba(99, 102, 241, 0.2);
}

html[data-theme="light"] .profile-hero-upload {
  color: #4338ca;
  background: rgba(99, 102, 241, 0.12);
}

.profile-hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 28px;
  color: var(--text);
  overflow: hidden;
  flex-shrink: 0;
  animation: profileHalo 3.2s ease-in-out infinite;
  cursor: pointer;
}

.profile-hero-avatar:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.55);
  outline-offset: 3px;
}

.profile-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  padding: 18px;
}

.profile-hero-meta {
  min-width: 0;
  text-align: left;
  flex: 1;
}

.profile-hero-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.profile-hero-name {
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.6px;
  color: var(--text);
}

.profile-hero-sub {
  margin-top: 0;
  font-size: 14px;
  color: var(--text-soft);
}

.profile-hero-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.profile-hero-tier {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  justify-content: flex-start;
  flex-wrap: wrap;
}

.profile-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(41, 90, 173, 0.35);
  background: rgba(41, 90, 173, 0.18);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: #fff;
}

html[data-theme="light"] .profile-hero-pill {
  color: rgba(15, 23, 42, 0.82);
  background: rgba(41, 90, 173, 0.10);
  border-color: rgba(41, 90, 173, 0.20);
}

.profile-hero-seal {
  margin-top: 10px;
  text-align: left;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(201, 168, 76, 0.28);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.14), rgba(224, 122, 95, 0.08));
  box-shadow: 0 12px 24px rgba(201, 168, 76, 0.15);
  align-self: flex-start;
}

.profile-hero-seal-k {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(237, 240, 248, 0.72);
}

.profile-hero-seal-v {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 900;
  color: var(--text);
}

html[data-theme="light"] .profile-hero-seal-k {
  color: rgba(15, 23, 42, 0.6);
}

.profile-hero-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.profile-hero-stat {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

html[data-theme="light"] .profile-hero-stat {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.10);
}

.profile-hero-stat-k {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-hero-stat-v {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: var(--text);
}

.profile-hero-stat-s {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  margin-left: 4px;
}

.profile-hero-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.profile-hero-about {
  margin-top: 4px;
  margin-left: -120px;
}

.profile-hero-about-k {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-hero-about-v {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 720px;
}

.rep-card--profile {
  width: 100%;
  max-width: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .rep-card--profile {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.rep-card--profile .rep-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.rep-pill.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  color: rgba(255, 255, 255, 0.86);
}

html[data-theme="light"] .rep-pill.warn {
  color: rgba(15, 23, 42, 0.82);
}

.rep-act-pts.neg {
  color: rgba(248, 113, 113, 0.92);
}

html[data-theme="light"] .rep-act-pts.neg {
  color: rgba(185, 28, 28, 0.82);
}

@media (max-width: 960px) {
  .profile-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .profile-hero-head {
    grid-template-columns: 1fr;
  }

  .profile-hero-about {
    margin-left: 0;
    margin-top: 8px;
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .profile-hero-head {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .profile-hero-seal {
    width: auto;
    text-align: left;
    align-self: flex-start;
  }

  .profile-hero-left {
    width: 100%;
  }

  .profile-hero-upload {
    width: 34px;
  }

  .profile-hero-about {
    margin-left: 0;
  }
}

.card-profile .profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.6fr);
  gap: 22px;
  margin-top: 8px;
  align-items: start;
  width: 100%;
}

.profile-side,
.profile-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .profile-panel {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.profile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-panel-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: var(--text);
}

.profile-panel-sub {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
}

.profile-about-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

.profile-availability {
  display: grid;
  gap: 10px;
}

.profile-availability-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.profile-availability-tag {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(79, 70, 229, 0.25);
  background: rgba(79, 70, 229, 0.12);
  color: var(--accent-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.profile-availability-time {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

.profile-availability-note {
  font-size: 12px;
  color: var(--text-soft);
}

.card-profile .profile-photos {
  margin-top: 0;
}

.profile-panel--form .profile-photos {
  margin-top: 8px;
}

.card-profile form#profile-form .field+.field {
  margin-top: 14px;
}

.profile-panel--impact .profile-stats {
  margin: 0;
  display: grid;
  gap: 12px;
}

.profile-impact-list {
  display: grid;
  gap: 12px;
}

.profile-impact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.profile-impact-val {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.3px;
}

.profile-impact-s {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  margin-left: 4px;
}

.profile-impact-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-impact-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--accent-light);
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.profile-panel--impact .profile-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.profile-panel--impact .profile-stat-k {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-panel--impact .profile-stat-v {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* Next step banner (Wallapop-like) */
.card-next {
  grid-column: 1 / -1;
  border-color: rgba(201, 168, 76, 0.18);
  background:
    radial-gradient(120% 140% at 10% 0%, rgba(201, 168, 76, 0.10) 0%, transparent 58%),
    rgba(255, 255, 255, 0.03);
}

.card-next .card-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.card-next .card-head h3::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold) 0%, var(--gold-light) 100%);
  box-shadow: 0 0 14px rgba(201, 168, 76, 0.35);
}

.next-desc {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

/* ── Glass Card ───────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

/* Corner decor for large windows */
.glass-card::before,
.modal-box::before,
.premium-card::before,
.rep-card::before,
.notif-panel::before,
.cookie-panel-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--kh-corner-opacity);
  background-image: url("../img/esquina1.png?v=4"), url("../img/esquina2.png?v=4");
  background-repeat: no-repeat;
  background-position: left top, right bottom;
  background-size: calc(var(--kh-corner-size) * 1.3), var(--kh-corner-size);
}

.glass-card:hover {
  border-color: var(--border-h);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-head h3 {
  font-size: 14px;
  font-weight: 600;
}

/* Warm, neighborhood-like headers */
.card-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.card-ico {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(226, 184, 107, 0.18), rgba(224, 122, 95, 0.12));
  border: 1px solid rgba(226, 184, 107, 0.22);
  box-shadow: 0 10px 30px rgba(226, 184, 107, 0.08);
  position: relative;
  overflow: visible;
  isolation: isolate;
}

.card-automatch .card-ico {
  background: linear-gradient(135deg, rgba(197, 203, 214, 0.22), rgba(79, 70, 229, 0.10));
  border-color: rgba(197, 203, 214, 0.35);
  box-shadow: 0 10px 30px rgba(197, 203, 214, 0.18);
}

.card-automatch .card-ico--sweep::before {
  background: conic-gradient(from 0deg, rgba(197, 203, 214, 0.65), rgba(197, 203, 214, 0) 45%, transparent 100%);
  opacity: 0.8;
}

.card-automatch .card-ico--sweep::after {
  border-color: rgba(197, 203, 214, 0.45);
}

.card-ico span {
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25));
  position: relative;
  z-index: 2;
}

.card-ico--sweep::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  background: conic-gradient(from 0deg, rgba(217, 164, 65, 0.65), rgba(217, 164, 65, 0) 45%, transparent 100%);
  animation: emblemSweep 2.6s linear infinite;
  opacity: 0.7;
  pointer-events: none;
}

.card-ico--sweep::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  border: 1px solid rgba(217, 164, 65, 0.35);
  animation: emblemPulse 2.8s ease-in-out infinite;
  pointer-events: none;
}

.card-ico--orbit::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 14px;
  border: 1px solid rgba(41, 90, 173, 0.35);
  pointer-events: none;
}

.card-ico--orbit::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(41, 90, 173, 0.9);
  box-shadow: 0 0 10px rgba(41, 90, 173, 0.7);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg) translateX(16px);
  animation: emblemOrbit 3.6s linear infinite;
  pointer-events: none;
}

.card-ico--halo::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 14px;
  border: 1px solid rgba(120, 220, 255, 0.45);
  animation: emblemHalo 2.8s ease-in-out infinite;
  pointer-events: none;
}

.card-ico--halo::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 16px;
  border: 1px solid rgba(120, 220, 255, 0.2);
  pointer-events: none;
}

.card-ico--twinkle::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 60%);
  animation: emblemTwinkle 2.2s ease-in-out infinite;
  pointer-events: none;
}

.card-ico--twinkle::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 214, 102, 0.9);
  top: -4px;
  right: -4px;
  animation: emblemTwinkleDot 3s ease-in-out infinite;
  pointer-events: none;
}

.card-ico--heartbeat::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.6);
  animation: emblemBeat 1.6s ease-out infinite;
  pointer-events: none;
}

.card-ico--heartbeat::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 16px;
  border: 1px dashed rgba(34, 197, 94, 0.25);
  animation: emblemSpin 5.4s linear infinite;
  pointer-events: none;
}

.card-ico--charge::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  background: radial-gradient(circle at center, rgba(217, 164, 65, 0.45), rgba(217, 164, 65, 0) 70%);
  animation: emblemCharge 2.4s ease-in-out infinite;
  pointer-events: none;
}

.card-ico--charge::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 16px;
  border: 1px solid rgba(217, 164, 65, 0.25);
  animation: emblemSpin 6.8s linear infinite;
  pointer-events: none;
}

.card-ico--glow::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 14px;
  background: radial-gradient(circle at center, rgba(217, 164, 65, 0.55), rgba(217, 164, 65, 0) 70%);
  animation: emblemGlow 3s ease-in-out infinite;
  pointer-events: none;
}

.card-ico--stack::before {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -6px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(217, 164, 65, 0.6), rgba(33, 82, 173, 0.55));
  box-shadow: 0 -6px 0 rgba(217, 164, 65, 0.35), 0 -12px 0 rgba(33, 82, 173, 0.3);
  animation: emblemStack 2.6s ease-in-out infinite;
  pointer-events: none;
}

.card-ico--spin::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(217, 164, 65, 0.35);
  animation: emblemSpin 6s linear infinite;
  pointer-events: none;
}

.card-ico--path::before {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(41, 90, 173, 0.1), rgba(41, 90, 173, 0.5), rgba(41, 90, 173, 0.1));
  pointer-events: none;
}

.card-ico--path::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(41, 90, 173, 0.9);
  top: 50%;
  left: -4px;
  transform: translateY(-50%);
  animation: emblemPath 2.6s ease-in-out infinite;
  pointer-events: none;
}

.card-ico--shimmer::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 14px;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.7) 45%, transparent 70%);
  animation: emblemShimmer 2.6s linear infinite;
  opacity: 0.6;
  pointer-events: none;
}

.card-ico--grid::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  background-image:
    linear-gradient(rgba(217, 164, 65, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 164, 65, 0.2) 1px, transparent 1px);
  background-size: 6px 6px;
  animation: emblemGrid 4s linear infinite;
  opacity: 0.6;
  pointer-events: none;
}

.card-ico--bubble::before,
.card-ico--bubble::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(120, 220, 255, 0.7);
  pointer-events: none;
}

.card-ico--bubble::before {
  width: 8px;
  height: 8px;
  top: -4px;
  left: 2px;
  animation: emblemBubble 2.2s ease-in-out infinite;
}

.card-ico--bubble::after {
  width: 6px;
  height: 6px;
  bottom: -4px;
  right: 4px;
  animation: emblemBubble 2.8s ease-in-out infinite;
}

@keyframes emblemSweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes emblemPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }

  60% {
    transform: scale(1.15);
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

@keyframes emblemOrbit {
  to {
    transform: translate(-50%, -50%) rotate(360deg) translateX(16px);
  }
}

@keyframes emblemHalo {

  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.9;
  }
}

@keyframes emblemTwinkle {

  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.85);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.15);
  }
}

@keyframes emblemTwinkleDot {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes emblemBeat {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }

  40% {
    transform: scale(1.1);
    opacity: 0.85;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes emblemCharge {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.95);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.12);
  }
}

@keyframes emblemGlow {

  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.95);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.1);
  }
}

@keyframes emblemSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes emblemStack {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }

  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes emblemPath {
  0% {
    transform: translate(-4px, -50%);
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  100% {
    transform: translate(28px, -50%);
    opacity: 0;
  }
}

@keyframes emblemShimmer {
  0% {
    transform: translateX(-140%);
    opacity: 0;
  }

  30% {
    opacity: 0.6;
  }

  100% {
    transform: translateX(140%);
    opacity: 0;
  }
}

@keyframes emblemGrid {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 12px 12px;
  }
}

@keyframes emblemBubble {

  0%,
  100% {
    transform: translateY(0) scale(0.9);
    opacity: 0.5;
  }

  50% {
    transform: translateY(-6px) scale(1.1);
    opacity: 0.95;
  }
}

@keyframes profileHalo {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(120, 220, 255, 0), 0 0 0 0 rgba(120, 220, 255, 0);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(120, 220, 255, 0.18), 0 0 18px rgba(120, 220, 255, 0.25);
  }
}

@media (prefers-reduced-motion: reduce) {

  .explore-radar-sweep,
  .explore-radar-dot,
  .card-ico::before,
  .card-ico::after,
  .profile-hero-avatar {
    animation: none !important;
  }
}

.card-ico-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25)) saturate(1.2);
  display: block;
}

#card-feed {
  position: relative;
  overflow: hidden;
}

#card-feed>* {
  position: relative;
  z-index: 1;
}

.explore-title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  --kh-type-dur1: 1050ms;
  --kh-type-steps1: 12;
  position: relative;
  padding: 8px 120px 8px 0;
  flex-wrap: wrap;
  row-gap: 4px;
}

.explore-crown {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
  margin-right: 6px;
  flex-shrink: 0;
}

.explore-radar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 35%, transparent 60%),
    radial-gradient(circle at center, rgba(90, 210, 255, 0.55) 0%, rgba(90, 210, 255, 0.22) 35%, rgba(10, 18, 28, 0.4) 70%);
  border: 3px solid rgba(64, 128, 214, 0.6);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

#card-feed .explore-radar {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  pointer-events: none;
  opacity: 0.9;
}

@media (max-width: 980px) {
  #card-feed .explore-radar {
    right: 14px;
    width: 72px;
    height: 72px;
  }

  .explore-title-row {
    padding-right: 104px;
  }
}

@media (max-width: 720px) {
  #card-feed .explore-radar {
    right: 12px;
    width: 60px;
    height: 60px;
  }

  .explore-title-row {
    padding-right: 72px;
  }
}

@media (max-width: 430px) {
  #card-feed .explore-radar {
    right: 8px;
    width: 48px;
    height: 48px;
  }

  .explore-title-row {
    padding-right: 56px;
  }
}

.explore-radar::before,
.explore-radar::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.explore-radar::after {
  inset: 22px;
  border-color: rgba(255, 255, 255, 0.18);
}

.explore-radar-sweep {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(120, 220, 255, 0.65), rgba(120, 220, 255, 0.0) 40%, transparent 100%);
  animation: radarSweep 2.6s linear infinite;
  mix-blend-mode: screen;
}

.explore-radar-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 140, 110, 0.95);
  box-shadow: 0 0 8px rgba(255, 140, 110, 0.9);
  animation: radarPulse 2.4s ease-in-out infinite;
}

.explore-radar-dot--a {
  top: 14px;
  left: 18px;
  animation-delay: 0.2s;
}

.explore-radar-dot--b {
  bottom: 16px;
  right: 18px;
  animation-delay: 0.9s;
}

.explore-radar-dot--c {
  top: 22px;
  right: 12px;
  animation-delay: 1.4s;
}

@keyframes radarSweep {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes radarPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.35);
    opacity: 0.6;
  }
}

.explore-title-row .kh-type {
  clip-path: none;
  animation: none;
  white-space: normal;
  overflow: visible;
}

.explore-title-row .kh-type::after {
  opacity: 0;
  animation: none;
}

.explore-anim-ico {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(16, 185, 129, 0.16));
  border: 1px solid rgba(124, 58, 237, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  animation: explorePulse 2.6s ease-in-out infinite;
}

@keyframes explorePulse {
  0% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.04);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .explore-anim-ico {
    animation: none;
  }

  .explore-radar-sweep,
  .explore-radar-dot {
    animation: none;
  }

  .explore-title-row .kh-type {
    animation: none;
    clip-path: none;
  }

  .explore-title-row .kh-type::after {
    animation: none;
    opacity: 0;
  }
}

#card-feed .card-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

#card-feed .card-title {
  grid-column: 2;
  justify-self: center;
  text-align: center;
  align-items: center;
}

#card-feed .card-title>div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

#card-feed .card-head .btn {
  grid-column: 3;
  justify-self: end;
}

#card-feed .card-title h3 {
  font-size: clamp(30px, 3.3vw, 42px);
  font-weight: 900;
  letter-spacing: -0.4px;
  white-space: normal;
  overflow: visible;
}

#card-feed .card-sub {
  font-size: 13.5px;
  color: var(--text-soft);
}

.card-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.2px;
}

.card-sub {
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.glass-card {
  position: relative;
}

.glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  background: radial-gradient(ellipse 70% 60% at 20% 0%, rgba(226, 184, 107, 0.11) 0%, transparent 70%);
}

.glass-card:hover::after {
  opacity: 1;
}

/* Status */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.4s;
}

.status-dot.ok {
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: pulseRing 2.6s infinite;
}

.status-dot.err {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.status-url {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

.status-response {
  font-size: 11.5px;
  font-family: 'Courier New', monospace;
  color: var(--success);
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Ledger */
.balance-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
  position: relative;
}

.balance-icon {
  font-size: 20px;
}

.balance-value {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(110deg, var(--gold-light), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.balance-unit {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

.coin-stage {
  position: relative;
  height: 0;
  overflow: visible;
}

.ledger-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 180px;
  overflow-y: auto;
}

.ledger-empty {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}

.ledger-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  animation: fadeInUp 0.3s ease both;
}

.ledger-item .reason {
  color: var(--text-muted);
  flex: 1;
}

.ledger-delta {
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 12px;
}

.ledger-delta.pos {
  color: var(--success);
  background: rgba(34, 197, 94, 0.10);
}

.ledger-delta.neg {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.10);
}

.card-next--enter {
  animation: nextDrop 0.45s ease both;
}

@keyframes nextDrop {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Badges */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 24px;
  transition: all var(--transition);
  cursor: default;
}

.badge-item span {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.badge-item.earned {
  background: linear-gradient(135deg, rgba(82, 49, 148, 0.10), rgba(33, 82, 173, 0.08));
  border-color: rgba(82, 49, 148, 0.26);
}

/* Collections */
.collections-body {
  display: grid;
  gap: 12px;
}

.collection-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.collection-card.is-complete {
  border-color: rgba(201, 168, 76, 0.45);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.14), rgba(33, 82, 173, 0.10));
  box-shadow: 0 10px 30px rgba(201, 168, 76, 0.15);
}

.collection-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.collection-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}

.collection-desc {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}

.collection-progress {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

.collection-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.collection-reward {
  font-size: 13px;
  font-weight: 900;
  color: var(--gold-light);
}

.collection-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
}

.collection-pill.done {
  border-color: rgba(201, 168, 76, 0.45);
  color: var(--gold-light);
  background: rgba(201, 168, 76, 0.10);
}

.collections-foot {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-soft);
}

/* ── AutoMatch (premium experience) ───────────────────── */
.card-automatch {
  position: relative;
  overflow: hidden;
  border-color: rgba(197, 203, 214, 0.36);
  color: rgba(237, 240, 248, 0.95);
  background:
    radial-gradient(120% 160% at 12% -10%, rgba(197, 203, 214, 0.22) 0%, transparent 55%),
    radial-gradient(130% 150% at 90% 0%, rgba(79, 70, 229, 0.20) 0%, transparent 60%),
    radial-gradient(120% 140% at 45% 120%, rgba(30, 58, 138, 0.14) 0%, transparent 70%),
    linear-gradient(180deg, rgba(18, 24, 40, 0.78), rgba(10, 14, 28, 0.72));
  box-shadow: 0 32px 80px rgba(5, 10, 20, 0.45);
}

.card-automatch .card-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.card-automatch::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(237, 240, 248, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.12;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.card-automatch::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at 28% 30%, rgba(197, 203, 214, 0.18), transparent 55%);
  filter: blur(22px);
  opacity: 0.65;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: no-preference) {
  .card-automatch::before {
    animation: amFloat 7s ease-in-out infinite;
    will-change: transform, opacity;
  }
}

@keyframes amFloat {

  0%,
  100% {
    transform: translate3d(-10px, -6px, 0);
    opacity: 0.72;
  }

  50% {
    transform: translate3d(12px, 10px, 0);
    opacity: 0.88;
  }
}

.automatch-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 10px;
}

.automatch-stage > * + * {
  margin-top: 0;
}

.automatch-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 10px 12px;
  align-items: start;
  margin-top: 2px;
  min-width: 0;
}

.automatch-col-left,
.automatch-col-right {
  display: grid;
  gap: 12px;
  min-width: 0;
  align-content: start;
  align-items: start;
}

.automatch-col-right {
  min-height: 520px;
}

.automatch-col-left > *,
.automatch-col-right > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
}

.automatch-settings {
  padding: 16px;
  border-color: rgba(197, 203, 214, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.automatch-premium {
  padding: 16px;
}

.automatch-invites {
  padding: 16px;
  border-color: rgba(197, 203, 214, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: 0 18px 30px rgba(9, 14, 24, 0.24);
}

.automatch-invites .automatch-settings-title {
  font-weight: 900;
}

.am-rule {
  opacity: 0.82;
  border-color: rgba(201, 168, 76, 0.26);
  background: rgba(201, 168, 76, 0.08);
}

.automatch-cta {
  margin-top: 18px;
}

@media (max-width: 1120px) {
  .automatch-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .automatch-premium-grid {
    grid-template-columns: 1fr;
  }

  .automatch-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .automatch-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .automatch-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 0;
  }
}

@media (max-width: 1200px) {
  :root {
    --section-offset: 120px;
  }
  .automatch-premium-grid {
    grid-template-columns: 1fr;
  }
}

.automatch-hero {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(24, 32, 56, 0.92), rgba(14, 20, 36, 0.88));
  box-shadow: 0 14px 30px rgba(5, 10, 20, 0.32);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.automatch-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(197, 203, 214, 0.12), transparent 55%);
  opacity: 0.8;
  pointer-events: none;
}

.automatch-hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at 30% 30%, rgba(197, 203, 214, 0.35), rgba(79, 70, 229, 0.06) 60%, transparent 70%);
  opacity: 0.8;
  pointer-events: none;
}

.automatch-hero>* {
  position: relative;
  z-index: 1;
}

.automatch-hero-main {
  max-width: 820px;
}

.automatch-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.automatch-status-strip {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(237, 240, 248, 0.85);
  font-size: 11.8px;
  letter-spacing: 0.2px;
}

.automatch-status-strip.is-inactive {
  opacity: 0.62;
}

.am-status-pill {
  font-weight: 800;
  color: #e8eefc;
}

.am-status-items {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.am-status-item strong {
  font-weight: 800;
  color: #f8fafc;
}

.am-status-sep {
  opacity: 0.5;
}

.automatch-live-feed {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  padding-left: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  color: rgba(237, 240, 248, 0.8);
  font-size: 12.5px;
  position: relative;
}

.automatch-live-feed::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.8), rgba(34, 197, 94, 0));
  opacity: 0.6;
}

.automatch-live-title {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  color: rgba(237, 240, 248, 0.9);
}

.automatch-live-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 6px;
  animation: am-live-pulse 2s infinite;
}

@keyframes am-live-pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.automatch-live-lines {
  display: grid;
  gap: 4px;
}

.am-empty-line {
  color: rgba(237, 240, 248, 0.82);
  font-size: 12px;
}

.am-empty-hint {
  color: rgba(237, 240, 248, 0.62);
  font-size: 12px;
}

.automatch-smart-match {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(197, 203, 214, 0.42);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(99, 102, 241, 0.08));
  color: rgba(237, 240, 248, 0.9);
  font-size: 12.5px;
  box-shadow: 0 18px 34px rgba(9, 14, 24, 0.26);
}

.automatch-smart-title {
  font-weight: 900;
  color: rgba(237, 240, 248, 0.98);
}

.automatch-smart-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.automatch-smart-actions {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.automatch-smart-actions .am-smart-help-now {
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.28);
  border-color: rgba(99, 102, 241, 0.55);
}

.automatch-smart-actions .automatch-smart-action,
.automatch-smart-actions .am-smart-next {
  opacity: 0.85;
  border-color: rgba(255, 255, 255, 0.18);
}

.automatch-smart-actions .am-smart-dismiss {
  opacity: 0.65;
  border-color: rgba(255, 255, 255, 0.14);
}

.automatch-smart-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.automatch-smart-text {
  font-weight: 700;
  color: rgba(237, 240, 248, 0.96);
}

.am-smart-reason {
  color: rgba(237, 240, 248, 0.65);
  font-size: 12px;
}

.am-smart-empty {
  color: rgba(237, 240, 248, 0.78);
  font-size: 12.5px;
}

.am-smart-empty-hint {
  color: rgba(237, 240, 248, 0.62);
  font-size: 12px;
}

.am-smart-trust {
  color: rgba(237, 240, 248, 0.68);
  font-size: 12px;
}

.am-smart-more {
  color: rgba(237, 240, 248, 0.65);
  font-size: 12px;
  margin-top: 2px;
}

.am-local-helper {
  color: rgba(237, 240, 248, 0.62);
  font-size: 12px;
}

.am-invites-empty {
  display: grid;
  gap: 4px;
  margin: 6px 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.am-invites-empty-title {
  color: rgba(237, 240, 248, 0.86);
  font-size: 12.5px;
  font-weight: 700;
}

.am-invites-empty-sub {
  color: rgba(237, 240, 248, 0.62);
  font-size: 12px;
}

.automatch-smart-meta {
  color: rgba(237, 240, 248, 0.7);
  font-size: 12px;
}

.automatch-local-activity {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  padding-left: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  color: rgba(237, 240, 248, 0.76);
  font-size: 12.5px;
  position: relative;
}

.automatch-local-activity::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.7), rgba(99, 102, 241, 0));
  opacity: 0.45;
}

.automatch-local-title {
  font-weight: 800;
  color: rgba(237, 240, 248, 0.84);
}

.automatch-local-lines {
  display: grid;
  gap: 4px;
}

html[data-theme="light"] .automatch-local-activity {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.08);
  color: #4B5563;
}

html[data-theme="light"] .automatch-live-feed {
  background: #FCFDFF;
  border-color: rgba(15, 23, 42, 0.1);
  color: #4B5563;
}

html[data-theme="light"] .am-empty-line {
  color: #4B5563;
}

html[data-theme="light"] .am-empty-hint {
  color: #6B7280;
}

html[data-theme="light"] .automatch-smart-match {
  background: #EEF2FF;
  border-color: rgba(15, 23, 42, 0.2);
  color: #374151;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .automatch-local-title {
  color: #111827;
}

html[data-theme="light"] .automatch-live-title {
  color: #111827;
}

html[data-theme="light"] .automatch-smart-title {
  color: #111827;
}

html[data-theme="light"] .automatch-smart-text {
  color: #111827;
}

html[data-theme="light"] .automatch-smart-actions .am-smart-help-now {
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
}

html[data-theme="light"] .automatch-smart-actions .automatch-smart-action,
html[data-theme="light"] .automatch-smart-actions .am-smart-next {
  opacity: 0.82;
  border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .automatch-smart-actions .am-smart-dismiss {
  opacity: 0.6;
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .automatch-smart-meta {
  color: #6B7280;
}

html[data-theme="light"] .am-smart-reason {
  color: #6B7280;
}

html[data-theme="light"] .am-smart-empty {
  color: #4B5563;
}

html[data-theme="light"] .am-smart-empty-hint {
  color: #6B7280;
}

html[data-theme="light"] .am-smart-trust {
  color: #6B7280;
}

html[data-theme="light"] .am-smart-more {
  color: #6B7280;
}

html[data-theme="light"] .am-local-helper {
  color: #6B7280;
}

html[data-theme="light"] .am-invites-empty-title {
  color: #111827;
}

html[data-theme="light"] .am-invites-empty-sub {
  color: #6B7280;
}

html[data-theme="light"] .am-invites-empty {
  border-color: rgba(15, 23, 42, 0.12);
  background: #FFFFFF;
}

.automatch-premium {
  grid-column: 1 / -1;
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(201, 168, 76, 0.28);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.12), rgba(79, 70, 229, 0.08));
  padding: 18px;
  box-shadow: 0 18px 40px rgba(6, 12, 24, 0.32);
  overflow: hidden;
}

.automatch-premium-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  color: rgba(201, 168, 76, 0.95);
  background: rgba(201, 168, 76, 0.16);
  border: 1px solid rgba(201, 168, 76, 0.35);
}

.automatch-premium-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.automatch-premium-card {
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 20, 36, 0.75);
  display: grid;
  gap: 12px;
}

.automatch-premium-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.automatch-premium-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(197, 203, 214, 0.16);
  border: 1px solid rgba(197, 203, 214, 0.3);
  font-size: 18px;
}

.automatch-premium-title {
  font-size: 14px;
  font-weight: 900;
  color: rgba(237, 240, 248, 0.95);
}

.automatch-premium-sub {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(237, 240, 248, 0.78);
  line-height: 1.5;
}

.automatch-premium-list {
  display: grid;
  gap: 10px;
}

.automatch-premium-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.automatch-premium-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: rgba(237, 240, 248, 0.9);
}

.am-schedule-row {
  flex-wrap: wrap;
  gap: 10px;
}

.am-time-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.am-time-input {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 13px;
}

html[data-theme="light"] .am-time-input {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.12);
  color: #111827;
}

.automatch-premium-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.automatch-premium-chip {
  border-radius: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
  color: rgba(237, 240, 248, 0.78);
  cursor: pointer;
}

.automatch-premium-chip--active {
  border-color: rgba(197, 203, 214, 0.5);
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.6), rgba(79, 70, 229, 0.7));
}

.automatch-premium-sliders {
  display: grid;
  gap: 12px;
}

.am-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: rgba(237, 240, 248, 0.85);
}

.am-slider-value {
  color: var(--silver-light);
}

.am-range {
  width: 100%;
  height: 6px;
  accent-color: var(--silver-500);
  background: linear-gradient(90deg, #7c3aed 0%, #6d28d9 45%, #f97316 100%);
  border-radius: 999px;
  appearance: none;
}

.am-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed 0%, #6d28d9 45%, #f97316 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.am-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-top: -6px;
  background: #f8fafc;
  border: 1px solid rgba(124, 58, 237, 0.4);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.35);
}

.am-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed 0%, #6d28d9 45%, #f97316 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.am-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid rgba(124, 58, 237, 0.4);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.35);
}

.automatch-board {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.automatch-settings {
  display: grid;
  gap: 14px;
}

.automatch-preferences {
  display: grid;
  gap: 16px;
}

.automatch-preferences .am-mode + .am-mode {
  margin-top: 0;
}

.am-hint {
  font-size: 12px;
  color: rgba(237, 240, 248, 0.72);
}

.am-mode {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.am-mode::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(82, 49, 148, 0.7), rgba(33, 82, 173, 0.25));
  opacity: 0.8;
}

.am-mode+.am-mode {
  margin-top: 12px;
}

.am-mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.am-mode-k {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(237, 240, 248, 0.78);
}

.am-mode-v {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.3px;
  color: rgba(245, 248, 255, 0.98);
  text-shadow: 0 10px 26px rgba(8, 12, 24, 0.35);
}

.am-mode-sub {
  margin-top: 6px;
  font-size: 12.8px;
  color: rgba(237, 240, 248, 0.86);
  line-height: 1.5;
}

.am-mode[data-kind="provider"] {
  background: radial-gradient(circle at 25% 0%, rgba(82, 49, 148, 0.24), transparent 55%), rgba(255, 255, 255, 0.06);
}

.am-mode[data-kind="provider"]::before {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.8), rgba(82, 49, 148, 0.25));
}

.am-mode[data-kind="provider"] .am-mode-v {
  color: #f3e9ff;
  text-shadow: 0 10px 26px rgba(124, 58, 237, 0.35);
}

.am-mode[data-kind="seeker"] {
  background: radial-gradient(circle at 25% 0%, rgba(33, 82, 173, 0.24), transparent 55%), rgba(255, 255, 255, 0.06);
}

.am-mode[data-kind="seeker"]::before {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.8), rgba(33, 82, 173, 0.25));
}

.am-mode[data-kind="seeker"] .am-mode-v {
  color: #e6f1ff;
  text-shadow: 0 10px 26px rgba(59, 130, 246, 0.35);
}

html[data-theme="light"] .am-mode-v {
  color: #111827;
  text-shadow: none;
}

html[data-theme="light"] .am-mode[data-kind="provider"] .am-mode-v,
html[data-theme="light"] .am-mode[data-kind="seeker"] .am-mode-v {
  color: #111827;
  text-shadow: none;
}

.am-rule {
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px dashed rgba(201, 168, 76, 0.16);
  border-radius: 20px;
  padding: 10px 12px;
  background: rgba(201, 168, 76, 0.06);
  opacity: 0.82;
}

.am-rule--urgent {
  border-style: solid;
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(124, 58, 237, 0.1));
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.25);
}

.am-rule--urgent .am-rule-ico {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
}

.am-rule-ico {
  width: 32px;
  height: 32px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(197, 203, 214, 0.14);
  border: 1px solid rgba(197, 203, 214, 0.30);
}

.am-rule-title {
  font-size: 13.5px;
  font-weight: 950;
  color: rgba(237, 240, 248, 0.82);
}

.am-rule-sub {
  margin-top: 2px;
  font-size: 12.6px;
  color: rgba(237, 240, 248, 0.66);
  line-height: 1.5;
}

.automatch-hero-k {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(237, 240, 248, 0.78);
}

.automatch-hero-v {
  margin-top: 5px;
  font-size: clamp(26px, 3.1vw, 40px);
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.1;
  color: var(--text);
  text-shadow: none;
}

.automatch-hero-sub {
  margin-top: 6px;
  font-size: 15.5px;
  color: var(--text-soft);
  line-height: 1.5;
  max-width: 760px;
}

/* ── AutoMatch typography (uniform body) ─────────────── */
.dashboard[data-view="automatch"] .automatch-stage {
  --am-body-size: 15.5px;
  --am-label-size: 14px;
  --am-title-size: 18px;
  --am-line: 1.55;
}

.dashboard[data-view="automatch"] .automatch-stage > :not(.automatch-hero) :where(
  .automatch-premium-sub,
  .automatch-premium-row,
  .am-mode-sub,
  .am-rule-sub,
  .am-hint,
  .am-toggle,
  .am-toggle-text,
  .am-cat,
  .am-filter-chip,
  .automatch-premium-chip,
  .am-slider-head,
  .am-time-input,
  .automatch-cta-sub,
  .am-col-count,
  .am-col-title
) {
  font-size: var(--am-body-size);
  line-height: var(--am-line);
}

.dashboard[data-view="automatch"] .automatch-stage > :not(.automatch-hero) :where(
  .automatch-premium-title,
  .am-rule-title,
  .am-mode-v,
  .automatch-cta-title
) {
  font-size: var(--am-title-size);
  line-height: 1.25;
}

.dashboard[data-view="automatch"] .automatch-stage > :not(.automatch-hero) :where(
  .automatch-premium-tag,
  .automatch-settings-title,
  .am-mode-k
) {
  font-size: var(--am-label-size);
  letter-spacing: 0.8px;
}

@media (prefers-reduced-motion: no-preference) {
  .dashboard[data-view="automatch"] :where(
    .automatch-premium-ico,
    .am-rule-ico,
    .am-drag-hint,
    .btn-icon
  ) {
    animation: kh-icon-float 3.6s ease-in-out infinite;
  }
}

.automatch-settings,
.automatch-invites {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.automatch-cta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.85), rgba(124, 58, 237, 0.9));
  color: #fff;
  box-shadow: 0 18px 36px rgba(79, 70, 229, 0.4);
}

.automatch-cta-title {
  font-size: 17px;
  font-weight: 900;
}

.automatch-cta-sub {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.automatch-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.automatch-settings-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.automatch-settings-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: rgba(237, 240, 248, 0.82);
}

.am-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(237, 240, 248, 0.9);
  cursor: pointer;
  transition: transform var(--transition), color var(--transition);
}

.am-toggle:hover {
  transform: translateY(-1px);
}

.am-toggle-input {
  appearance: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.35);
  border: 1px solid rgba(220, 38, 38, 0.55);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.am-toggle-input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.am-toggle-input:checked {
  background: linear-gradient(120deg, #16a34a, #22c55e);
  border-color: rgba(34, 197, 94, 0.55);
}

.am-toggle-input:checked::after {
  transform: translateX(18px);
}

.am-toggle-text {
  font-weight: 700;
  letter-spacing: 0.3px;
  color: rgba(237, 240, 248, 0.85);
}

.am-toggle-input:checked + .am-toggle-text {
  color: var(--silver-500);
}

.automatch-cats {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.am-cat {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 10px 34px 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(237, 240, 248, 0.92);
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.am-cat:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 10px 22px rgba(6, 12, 24, 0.35);
}

.am-cat input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.am-cat::after {
  content: '+';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: rgba(237, 240, 248, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.am-cat--active {
  border-color: rgba(124, 58, 237, 0.45);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(249, 115, 22, 0.12));
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.22);
}

.am-cat--active::after {
  content: '✓';
  color: #fff;
  background: linear-gradient(120deg, #7c3aed 0%, #f97316 100%);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.4), 0 0 10px rgba(249, 115, 22, 0.35);
}

.am-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.am-split {
  display: block;
}

.am-split-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* AutoMatch filter chips */
.am-filter {
  display: flex;
  gap: 8px;
  padding: 8px 2px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 6px;
}

.am-filter::-webkit-scrollbar {
  display: none;
}

.am-filter-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(237, 240, 248, 0.9);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.am-filter-chip:focus-visible {
  outline: 2px solid rgba(197, 203, 214, 0.65);
  outline-offset: 2px;
}

.am-filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(33, 82, 173, 0.22);
  background: rgba(33, 82, 173, 0.08);
}

.am-filter-chip--active {
  border-color: rgba(197, 203, 214, 0.45);
  background: rgba(197, 203, 214, 0.22);
  color: var(--silver-light);
  box-shadow: 0 10px 22px rgba(197, 203, 214, 0.2);
}

/* Invite entrance animation (Canva-like) */
@media (prefers-reduced-motion: no-preference) {
  .am-invite {
    animation: amCardIn 420ms ease both;
  }
}

@keyframes amCardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* AutoMatch board (Canva-like, simple) */
.am-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.am-col {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  overflow: hidden;
}

.am-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(24, 32, 52, 0.95), rgba(16, 22, 38, 0.85));
}

.am-col-title {
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(237, 240, 248, 0.82);
}

.am-col-count {
  font-size: 13px;
  font-weight: 950;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(237, 240, 248, 0.95);
}

.am-cards {
  padding: 10px;
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow: auto;
}

.am-invite {
  cursor: grab;
  position: relative;
  overflow: hidden;
}

.am-invite:active {
  cursor: grabbing;
}

.am-drag-hint {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(237, 240, 248, 0.9);
  font-size: 14px;
}

.am-status-chip {
  border-color: rgba(255, 255, 255, 0.10);
}

.am-status-chip.ok {
  border-color: rgba(34, 197, 94, 0.22);
  color: rgba(52, 211, 153, 0.95);
}

.am-status-chip.bad {
  border-color: rgba(239, 68, 68, 0.22);
  color: rgba(248, 113, 113, 0.95);
}

.am-card-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.am-card-main {
  flex: 1;
  min-width: 0;
}

.am-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 120px;
  max-width: 45%;
  flex: 0 1 auto;
  margin-left: auto;
  padding-top: 2px;
}

.am-card-meta-item {
  font-size: 12px;
  color: rgba(237, 240, 248, 0.72);
  line-height: 1.2;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.am-card-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.am-card-trust {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(237, 240, 248, 0.72);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.am-card-distance {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(237, 240, 248, 0.68);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.am-card-urgency {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(237, 240, 248, 0.72);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.am-card-time-estimate {
  color: inherit;
}

.am-card-map-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.am-card-map-link:hover {
  color: #c7d2fe;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.am-card-verified {
  margin-left: 8px;
  font-size: 12px;
  color: rgba(52, 211, 153, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.am-card-contact {
  margin-right: 4px;
}

.am-card-share {
  margin-right: 4px;
}

.am-card-copy-link {
  margin-right: 4px;
  display: none;
}

@media (min-width: 900px) {
  .am-card-copy-link {
    display: inline-flex;
  }
}

.am-card-user-link {
  cursor: pointer;
  transition: color var(--transition), text-decoration-color var(--transition);
  text-decoration: none;
}

.am-card-user-link:hover {
  color: #c7d2fe;
  text-decoration: underline;
  text-underline-offset: 3px;
}

html[data-theme="light"] .am-card-user-link:hover {
  color: #4F46E5;
}

html[data-theme="light"] .am-card-trust {
  color: #6B7280;
}

html[data-theme="light"] .am-card-distance {
  color: #6B7280;
}

html[data-theme="light"] .am-card-urgency {
  color: #6B7280;
}

html[data-theme="light"] .am-card-meta-item {
  color: #6B7280;
}

html[data-theme="light"] .am-card-map-link:hover {
  color: #4F46E5;
}

html[data-theme="light"] .am-card-verified {
  color: #16a34a;
}

@media (max-width: 700px) {
  .am-card-body {
    flex-direction: column;
    gap: 10px;
  }

  .am-card-meta {
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    text-align: left;
  }

  .am-card-meta-item {
    white-space: normal;
    text-align: left;
  }
}

/* ── AutoMatch light theme ────────────────────────────── */
html[data-theme="light"] .card-automatch {
  background:
    radial-gradient(120% 160% at 12% -10%, rgba(67, 56, 202, 0.12) 0%, transparent 55%),
    radial-gradient(130% 150% at 90% 0%, rgba(30, 58, 138, 0.12) 0%, transparent 60%),
    linear-gradient(180deg, #FFFFFF, #F4F6FB);
  border-color: rgba(67, 56, 202, 0.22);
  color: #111827;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .card-automatch::after {
  opacity: 0.08;
  mix-blend-mode: normal;
}

html[data-theme="light"] .card-automatch::before {
  background: radial-gradient(circle at 28% 30%, rgba(67, 56, 202, 0.16), transparent 55%);
  opacity: 0.55;
}

html[data-theme="light"] .card-automatch .card-head {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .automatch-hero {
  background: linear-gradient(135deg, #F8F9FF, #EEF2FF);
  border-color: rgba(67, 56, 202, 0.18);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .automatch-hero::before {
  background: linear-gradient(120deg, rgba(67, 56, 202, 0.10), transparent 55%);
}

html[data-theme="light"] .automatch-hero::after {
  background: radial-gradient(circle at 30% 30%, rgba(67, 56, 202, 0.22), rgba(79, 70, 229, 0.06) 60%, transparent 70%);
}

html[data-theme="light"] .automatch-hero-k {
  color: #6B7280;
}

html[data-theme="light"] .automatch-hero-v {
  color: #1F2937;
  text-shadow: none;
}

html[data-theme="light"] .automatch-hero-sub {
  color: #4B5563;
}

html[data-theme="light"] .am-hint {
  color: #6B7280;
}

html[data-theme="light"] .automatch-premium {
  background: #FFFFFF;
  border-color: rgba(79, 70, 229, 0.14);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .automatch-status-strip {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.12);
  color: #4B5563;
}

html[data-theme="light"] .am-status-pill,
html[data-theme="light"] .am-status-item strong {
  color: #111827;
}

html[data-theme="light"] .automatch-premium-card {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .automatch-premium-title {
  color: #111827;
}

html[data-theme="light"] .automatch-premium-sub {
  color: #4B5563;
}

html[data-theme="light"] .automatch-premium-row {
  background: #F8FAFF;
  border-color: rgba(15, 23, 42, 0.08);
  color: #1F2937;
}

html[data-theme="light"] .automatch-premium-chip {
  background: #F3F4F6;
  border-color: rgba(15, 23, 42, 0.08);
  color: #6B7280;
}

html[data-theme="light"] .automatch-premium-chip--active {
  color: #FFFFFF;
}

html[data-theme="light"] .am-slider-head {
  color: #374151;
}

html[data-theme="light"] .am-slider-value {
  color: #4F46E5;
}

html[data-theme="light"] .automatch-board,
html[data-theme="light"] .automatch-settings,
html[data-theme="light"] .automatch-invites,
html[data-theme="light"] .am-mode,
html[data-theme="light"] .am-col {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .automatch-invites {
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .am-mode::before {
  background: linear-gradient(180deg, rgba(67, 56, 202, 0.65), rgba(30, 58, 138, 0.2));
}

html[data-theme="light"] .am-mode[data-kind="provider"] {
  background: radial-gradient(circle at 25% 0%, rgba(67, 56, 202, 0.12), transparent 55%), #FFFFFF;
}

html[data-theme="light"] .am-mode[data-kind="seeker"] {
  background: radial-gradient(circle at 25% 0%, rgba(15, 118, 110, 0.12), transparent 55%), #FFFFFF;
}

/* ── AutoMatch config UX polish (chips) ───────────────── */
.dashboard[data-view="automatch"] .automatch-settings .am-hint {
  display: none;
}

.dashboard[data-view="automatch"] .automatch-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 12px;
}

.dashboard[data-view="automatch"] .am-cat {
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 36px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
  font-size: 13px;
  gap: 6px;
}

.dashboard[data-view="automatch"] .am-cat:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 8px 18px rgba(7, 10, 18, 0.18);
}

.dashboard[data-view="automatch"] .am-cat input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.dashboard[data-view="automatch"] .am-cat::after,
.dashboard[data-view="automatch"] .am-cat--active::after {
  display: none;
}

.dashboard[data-view="automatch"] .am-cat--active {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.75);
  color: #f8fafc;
  box-shadow:
    inset 0 0 0 1px rgba(124, 58, 237, 0.22),
    0 0 0 1px rgba(124, 58, 237, 0.35),
    0 0 10px rgba(124, 58, 237, 0.18),
    0 0 10px rgba(249, 115, 22, 0.12);
}

html[data-theme="light"] .dashboard[data-view="automatch"] .am-cat {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.12);
  color: #374151;
}

html[data-theme="light"] .dashboard[data-view="automatch"] .am-cat:hover {
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .dashboard[data-view="automatch"] .am-cat--active {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.7);
  color: #111827;
  box-shadow:
    inset 0 0 0 1px rgba(124, 58, 237, 0.18),
    0 0 0 1px rgba(124, 58, 237, 0.25),
    0 0 10px rgba(124, 58, 237, 0.12),
    0 0 10px rgba(249, 115, 22, 0.1);
}

.dashboard[data-view="automatch"] #am-radius-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.14);
  border: 1px solid rgba(124, 58, 237, 0.35);
  font-weight: 700;
  font-size: 12.5px;
  color: #c7d2fe;
}

html[data-theme="light"] .dashboard[data-view="automatch"] #am-radius-value {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
  color: #4338ca;
}

.dashboard[data-view="automatch"] .automatch-premium {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(79, 70, 229, 0.06));
  border-color: rgba(201, 168, 76, 0.22);
  box-shadow: 0 14px 28px rgba(6, 12, 24, 0.22);
}

html[data-theme="light"] .dashboard[data-view="automatch"] .automatch-premium {
  background: #FFFFFF;
  border-color: rgba(79, 70, 229, 0.14);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.06);
}

@media (max-width: 520px) {
  .dashboard[data-view="automatch"] .automatch-cats {
    gap: 8px;
  }

  .dashboard[data-view="automatch"] .am-cat {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 12.5px;
  }
}

html[data-theme="light"] .am-mode-k {
  color: #6B7280;
}

html[data-theme="light"] .am-mode-v {
  color: #111827;
  text-shadow: none;
}

html[data-theme="light"] .am-mode-sub {
  color: #4B5563;
}

html[data-theme="light"] .automatch-settings-title,
html[data-theme="light"] .am-col-title {
  color: #4B5563;
}

html[data-theme="light"] .am-toggle {
  color: #334155;
}

html[data-theme="light"] .am-toggle-input {
  background: rgba(220, 38, 38, 0.20);
  border-color: rgba(220, 38, 38, 0.35);
}

html[data-theme="light"] .am-toggle-input:checked {
  background: linear-gradient(120deg, #16a34a, #22c55e);
  border-color: rgba(34, 197, 94, 0.55);
}

html[data-theme="light"] .am-toggle-text {
  color: #475569;
}

html[data-theme="light"] .am-cat,
html[data-theme="light"] .am-filter-chip {
  background: #F7F8FB;
  border-color: rgba(15, 23, 42, 0.10);
  color: #374151;
}

html[data-theme="light"] .am-filter-chip--active,
html[data-theme="light"] .am-cat--active {
  color: #1F2937;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(249, 115, 22, 0.08));
  border-color: rgba(124, 58, 237, 0.28);
}

html[data-theme="light"] .am-cat::after {
  color: rgba(15, 23, 42, 0.5);
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .am-col-head {
  border-bottom-color: rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #F9FAFB, #EEF2F7);
}

html[data-theme="light"] .am-col-count {
  border-color: rgba(15, 23, 42, 0.15);
  color: #374151;
  background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .am-drag-hint {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  color: #6B7280;
}

html[data-theme="light"] .am-rule-ico {
  background: rgba(197, 203, 214, 0.22);
  border-color: rgba(197, 203, 214, 0.35);
  color: #4B5563;
}

html[data-theme="light"] .am-rule-title {
  color: #374151;
}

html[data-theme="light"] .am-rule-sub {
  color: #6B7280;
}

html[data-theme="light"] .am-rule {
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(15, 23, 42, 0.03);
  opacity: 0.75;
}

html[data-theme="light"] .am-rule--urgent {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .am-rule--urgent .am-rule-ico {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

@media (max-width: 980px) {
  .am-board {
    grid-template-columns: 1fr;
  }

  .am-cards {
    max-height: none;
  }
}

.am-invite {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(20, 28, 46, 0.98), rgba(12, 18, 34, 0.9));
  box-shadow: 0 16px 30px rgba(4, 8, 18, 0.34);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.am-invite::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(197, 203, 214, 0.22), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.am-invite:hover {
  transform: translateY(-2px);
  border-color: rgba(197, 203, 214, 0.35);
  box-shadow: 0 20px 36px rgba(4, 8, 18, 0.45);
}

.am-invite:hover::after {
  opacity: 0.6;
}

.am-invite:hover .am-invite-title {
  color: #f5f7fb;
}

.am-invite--accepted {
  border-color: rgba(34, 197, 94, 0.3);
}

.am-invite--pending {
  border-color: rgba(201, 168, 76, 0.32);
  box-shadow: 0 20px 38px rgba(6, 12, 24, 0.4);
}

.am-invite--declined,
.am-invite--expired {
  border-color: rgba(148, 163, 184, 0.2);
  opacity: 0.75;
}

.am-invite-img {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: radial-gradient(circle at 30% 30%, rgba(82, 49, 148, 0.25), rgba(33, 82, 173, 0.16));
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.am-invite-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.am-invite-title {
  font-weight: 900;
  letter-spacing: -0.2px;
}

.am-invite-meta {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(237, 240, 248, 0.82);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.am-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  font-size: 10.5px;
  color: rgba(237, 240, 248, 0.86);
  font-variant-numeric: tabular-nums;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.am-chip-user {
  cursor: pointer;
}

.am-chip-user:hover {
  border-color: rgba(197, 203, 214, 0.35);
}

.am-chip.req {
  border-color: rgba(82, 49, 148, 0.20);
}

.am-chip.offer {
  border-color: rgba(33, 82, 173, 0.20);
}

.am-chip.ttl {
  border-color: rgba(197, 203, 214, 0.35);
  color: var(--silver-500);
  background: linear-gradient(135deg, rgba(197, 203, 214, 0.18), rgba(33, 82, 173, 0.08));
  box-shadow: inset 0 0 0 1px rgba(197, 203, 214, 0.14);
  font-weight: 700;
}

.am-chip--urgent {
  border-color: rgba(239, 68, 68, 0.35);
  color: rgba(254, 202, 202, 0.95);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(124, 58, 237, 0.12));
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.18);
}

@media (prefers-reduced-motion: no-preference) {
  .am-chip--urgent {
    animation: amUrgentPulse 1.1s ease-in-out infinite;
  }
}

@keyframes amUrgentPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }
}

.am-invite-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

@media (max-width: 900px) {
  :root {
    --section-offset: 0px;
  }
  .automatch-stage {
    grid-template-columns: 1fr;
  }

  .automatch-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .automatch-hero {
    padding: 10px 12px;
  }

  .automatch-settings,
  .automatch-invites {
    padding: 10px;
  }

  .am-mode {
    padding: 10px;
  }

  .am-board {
    padding: 8px;
  }

  .am-invite {
    grid-template-columns: 1fr;
  }

  .card-profile .profile-layout {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .am-invite {
    grid-template-columns: 1fr;
  }

  .am-invite-img {
    aspect-ratio: 16 / 9;
  }

  .am-invite-title {
    font-size: 13px;
  }

  .am-invite-actions {
    flex-wrap: wrap;
  }
}

/* ── Feed (Wallapop-like grid) ────────────────────────── */
.feed-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 12px;
  flex-wrap: wrap;
}

.feed-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  margin: 2px 0 10px;
  width: 100%;
  overflow: visible;
  position: relative;
  z-index: 50;
}

html[data-theme="light"] .feed-filter-bar {
  border-color: rgba(15, 23, 42, 0.10);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.06));
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.feed-filter-seg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  min-height: 34px;
}

.feed-filter-search {
  flex: 1 1 260px;
  min-width: 200px;
}

.feed-filter-ico {
  opacity: 0.75;
}

.feed-filter-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.feed-filter-input::placeholder {
  color: var(--text-soft);
}

.feed-filter-label {
  font-size: 12px;
  color: var(--text-soft);
  white-space: nowrap;
}

.feed-filter-select {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  appearance: none;
  padding-right: 18px;
  line-height: 1;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 6px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color-scheme: light;
}

.feed-filter-select option,
.rank-select--chip option,
select:not(.rank-select--chip):not(.feed-filter-select) option {
  background-color: #FFFFFF;
  color: #111827;
}

html[data-theme="dark"] .feed-filter-select,
html[data-theme="dark"] .rank-select--chip,
html[data-theme="dark"] select:not(.rank-select--chip):not(.feed-filter-select) {
  color-scheme: dark;
}

html[data-theme="dark"] .feed-filter-select option,
html[data-theme="dark"] .rank-select--chip option,
html[data-theme="dark"] select:not(.rank-select--chip):not(.feed-filter-select) option {
  background-color: #0F1420;
  color: #E5E7EB;
}

.feed-filter-sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] .feed-filter-sep {
  background: rgba(15, 23, 42, 0.12);
}

@media (max-width: 920px) {
  .feed-filter-bar {
    flex-wrap: wrap;
    border-radius: 18px;
    gap: 6px;
  }

  .feed-filter-sep {
    display: none;
  }

  .feed-filter-seg {
    flex: 1 1 220px;
    justify-content: flex-start;
  }
}

.feed-activity {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  position: relative;
  z-index: 1;
}

.feed-activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.feed-activity-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.feed-activity-btn,
.feed-activity-refresh {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.feed-activity-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.25);
  color: #E6E9F5;
}

.feed-activity-refresh .btn-refresh-ico {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.feed-activity-refresh .spinner {
  width: 16px;
  height: 16px;
}

.feed-activity-refresh .btn-refresh-ico svg {
  width: 14px;
  height: 14px;
}

.feed-activity-btn:hover,
.feed-activity-refresh:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, 0.3);
  background: rgba(79, 70, 229, 0.12);
  color: #e4e7ff;
}

.feed-activity-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.feed-activity-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-soft);
}

.feed-activity-ico {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
}

.feed-activity-val {
  color: #C7D2FE;
  font-weight: 800;
}

html[data-theme="light"] .feed-activity {
  background: #F5F6FA;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .feed-activity-title {
  color: #111827;
}

html[data-theme="light"] .feed-activity-btn,
html[data-theme="light"] .feed-activity-refresh {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.12);
  color: #374151;
}

html[data-theme="light"] .feed-activity-refresh {
  background: linear-gradient(180deg, #FFFFFF, #F4F6FB);
  border-color: rgba(15, 23, 42, 0.14);
  color: #111827;
}

html[data-theme="light"] .feed-activity-refresh .btn-refresh-ico {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .feed-activity-btn:hover,
html[data-theme="light"] .feed-activity-refresh:hover {
  border-color: rgba(79, 70, 229, 0.4);
  background: rgba(79, 70, 229, 0.1);
  color: #1F2937;
}

html[data-theme="light"] .feed-activity-item {
  color: #374151;
}

html[data-theme="light"] .feed-activity-ico {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.12);
}

html[data-theme="light"] .feed-activity-val {
  color: #4F46E5;
}

.feed-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  justify-content: center;
  flex: 1 1 auto;
}

.btn-refresh {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  position: relative;
  flex: 0 0 auto;
}

.btn-refresh .btn-refresh-ico {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: khRefreshSpin 6s linear infinite;
}

.btn-refresh .btn-refresh-ico svg {
  width: 18px;
  height: 18px;
}

.btn-refresh:hover .btn-refresh-ico {
  animation-duration: 1.4s;
}

.btn-refresh .spinner {
  margin: 0;
  position: absolute;
  inset: 0;
  width: 16px;
  height: 16px;
  border-width: 2px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.btn-refresh.is-loading .btn-refresh-ico {
  opacity: 0;
}

@keyframes khRefreshSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes premiumLiteSheen {

  0%,
  100% {
    transform: translateX(-20%);
    opacity: 0.18;
  }

  50% {
    transform: translateX(20%);
    opacity: 0.38;
  }
}

@keyframes boltPulse {

  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.9;
  }

  50% {
    transform: translateY(-1px) scale(1.08);
    opacity: 1;
  }
}

.btn-premium-lite {
  position: relative;
  gap: 8px;
  background:
    radial-gradient(120% 120% at 30% 0%, rgba(255, 255, 255, 0.6) 0%, transparent 55%),
    linear-gradient(120deg, rgba(197, 203, 214, 0.92) 0%, rgba(248, 250, 252, 0.9) 100%);
  border-color: rgba(197, 203, 214, 0.75);
  color: #111827;
  box-shadow: 0 16px 32px rgba(197, 203, 214, 0.35);
}

.btn-premium-lite::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

.btn-premium-lite .btn-icon {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: boltPulse 1.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(197, 203, 214, 0.65));
}

.feed-tab-ico {
  margin-right: 6px;
  animation: boltPulse 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {

  .btn-premium-lite .btn-icon,
  .feed-tab-ico,
  .premium-card--lite::after {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-refresh .btn-refresh-ico {
    animation: none;
  }
}

html[data-theme="light"] .btn-refresh {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .btn-refresh .spinner {
  border-color: rgba(15, 23, 42, 0.2);
  border-top-color: #111827;
}

.feed-tab {
  --tab-accent: rgba(255, 255, 255, 0.12);
  --tab-bg: rgba(255, 255, 255, 0.04);
  --tab-text: var(--text);
  --tab-active-bg: rgba(82, 49, 148, 0.18);
  --tab-active-border: rgba(82, 49, 148, 0.45);
  --tab-active-text: var(--text);
  appearance: none;
  border: 1px solid var(--tab-accent);
  background: var(--tab-bg);
  color: var(--tab-text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.feed-tab[data-feed-tab="need"] {
  --tab-accent: rgba(67, 56, 202, 0.28);
  --tab-bg: rgba(67, 56, 202, 0.10);
  --tab-text: rgba(226, 232, 255, 0.95);
  --tab-active-bg: rgba(30, 58, 138, 0.28);
  --tab-active-border: rgba(67, 56, 202, 0.55);
  --tab-active-text: #e0e7ff;
}

.feed-tab[data-feed-tab="offer"] {
  --tab-accent: rgba(15, 118, 110, 0.30);
  --tab-bg: rgba(15, 118, 110, 0.12);
  --tab-text: rgba(204, 251, 241, 0.95);
  --tab-active-bg: rgba(14, 116, 144, 0.26);
  --tab-active-border: rgba(15, 118, 110, 0.6);
  --tab-active-text: #ccfbf1;
}

.feed-tab[data-feed-tab="premium"] {
  --tab-accent: rgba(197, 203, 214, 0.38);
  --tab-bg: rgba(197, 203, 214, 0.18);
  --tab-text: rgba(241, 244, 250, 0.95);
  --tab-active-bg: rgba(197, 203, 214, 0.30);
  --tab-active-border: rgba(197, 203, 214, 0.75);
  --tab-active-text: #f3f6fb;
  box-shadow: 0 12px 26px rgba(197, 203, 214, 0.25);
}

.feed-tab[data-feed-tab="premium"] .feed-tab-ico {
  color: var(--silver-500);
  filter: drop-shadow(0 2px 6px rgba(197, 203, 214, 0.5));
}

html[data-theme="light"] .feed-tab[data-feed-tab="need"] {
  --tab-text: #312e81;
  --tab-active-text: #1e3a8a;
}

html[data-theme="light"] .feed-tab[data-feed-tab="offer"] {
  --tab-text: #0f4c5c;
  --tab-active-text: #0f766e;
}

html[data-theme="light"] .feed-tab[data-feed-tab="premium"] {
  --tab-text: #4b5563;
  --tab-active-text: #374151;
}

.feed-tab:hover {
  transform: translateY(-1px);
  border-color: var(--tab-active-border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.feed-tab--active {
  background: var(--tab-active-bg);
  border-color: var(--tab-active-border);
  color: var(--tab-active-text);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.feed-sections {
  display: grid;
  gap: 18px;
}

.feed-section {
  border-radius: 22px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.02);
}

.feed-section[hidden] {
  display: none !important;
}

.feed-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.feed-section-title {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.feed-section-sub {
  opacity: 0.8;
  font-size: 13.5px;
  margin-top: 2px;
}

.feed-section-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.feed-section-pill.premium {
  border-color: rgba(197, 203, 214, 0.40);
  color: var(--silver-500);
  background: rgba(197, 203, 214, 0.18);
}

.feed-section--need {
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(67, 56, 202, 0.28) 0%, rgba(12, 16, 24, 0.55) 58%),
    radial-gradient(120% 140% at 90% 0%, rgba(30, 58, 138, 0.22) 0%, transparent 60%),
    rgba(12, 16, 24, 0.65);
  border-color: rgba(67, 56, 202, 0.32);
}

.feed-section--need .feed-section-pill {
  border-color: rgba(67, 56, 202, 0.45);
  background: rgba(67, 56, 202, 0.18);
  color: #e0e7ff;
}

.feed-section--need .feed-section-title {
  color: #e0e7ff;
}

.feed-section--offer {
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(15, 118, 110, 0.28) 0%, rgba(12, 16, 24, 0.55) 60%),
    radial-gradient(120% 140% at 90% 0%, rgba(14, 116, 144, 0.22) 0%, transparent 60%),
    rgba(12, 16, 24, 0.65);
  border-color: rgba(15, 118, 110, 0.32);
}

.feed-section--offer .feed-section-pill {
  border-color: rgba(15, 118, 110, 0.45);
  background: rgba(15, 118, 110, 0.18);
  color: #ccfbf1;
}

.feed-section--offer .feed-section-title {
  color: #ccfbf1;
}

.feed-section--premium {
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(197, 203, 214, 0.28) 0%, rgba(12, 16, 24, 0.55) 60%),
    rgba(12, 16, 24, 0.65);
  border-color: rgba(197, 203, 214, 0.45);
  box-shadow: 0 18px 34px rgba(197, 203, 214, 0.12);
}

.feed-section--premium .feed-section-title {
  color: #f3f6fb;
}

html[data-theme="light"] .feed-section--need .feed-section-pill {
  color: #312e81;
  border-color: rgba(67, 56, 202, 0.35);
  background: rgba(67, 56, 202, 0.12);
}

html[data-theme="light"] .feed-section--need {
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(67, 56, 202, 0.18) 0%, rgba(255, 255, 255, 0.78) 60%),
    radial-gradient(120% 140% at 90% 0%, rgba(30, 58, 138, 0.12) 0%, transparent 60%),
    rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .feed-section--need .feed-section-title {
  color: #312e81;
}

html[data-theme="light"] .feed-section--offer .feed-section-pill {
  color: #0f4c5c;
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.12);
}

html[data-theme="light"] .feed-section--offer {
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(15, 118, 110, 0.16) 0%, rgba(255, 255, 255, 0.78) 60%),
    radial-gradient(120% 140% at 90% 0%, rgba(14, 116, 144, 0.12) 0%, transparent 60%),
    rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .feed-section--offer .feed-section-title {
  color: #0f4c5c;
}

html[data-theme="light"] .feed-section--premium .feed-section-title {
  color: #4b5563;
}

html[data-theme="light"] .feed-section--premium {
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(197, 203, 214, 0.20) 0%, rgba(255, 255, 255, 0.8) 60%),
    rgba(255, 255, 255, 0.8);
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 300px));
  gap: 12px;
  justify-content: center;
}

.feed-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  outline: 1px solid rgba(15, 23, 42, 0.25);
  outline-offset: 0;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 360px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.feed-card.is-premium {
  border-color: rgba(197, 203, 214, 0.45);
  box-shadow: 0 0 0 1px rgba(197, 203, 214, 0.18), 0 16px 38px rgba(0, 0, 0, 0.35);
}

.feed-card:hover {
  transform: translateY(-2px);
  border-color: rgba(33, 82, 173, 0.22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.feed-media {
  width: 100%;
  height: 180px;
  aspect-ratio: 16 / 9;
  background-image: radial-gradient(circle at 30% 30%, rgba(82, 49, 148, 0.22), rgba(33, 82, 173, 0.16));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

.feed-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--feed-cover);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  z-index: 0;
}

@supports (background-image: image-set(url("/img/ai/repairs.webp") type("image/webp"))) {
  .feed-media::before {
    background-image: var(--feed-cover-webp, var(--feed-cover));
  }
}

@supports (background-image: -webkit-image-set(url("/img/ai/repairs.webp") type("image/webp"))) {
  .feed-media::before {
    background-image: var(--feed-cover-webp, var(--feed-cover));
  }
}

.feed-media--category::before {
  opacity: 0.9;
}

.feed-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.28));
  pointer-events: none;
  z-index: 2;
}

.feed-hero {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 25% 20%, rgba(226, 184, 107, 0.14), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(224, 122, 95, 0.12), transparent 58%),
    radial-gradient(circle at 70% 90%, rgba(33, 82, 173, 0.10), transparent 62%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.22));
}

.feed-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 10px);
  opacity: 0.20;
  pointer-events: none;
}

.feed-hero span {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.feed-time {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.feed-time-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.feed-time-fill {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: linear-gradient(90deg,
      rgba(34, 197, 94, 0.95) 0%,
      rgba(34, 197, 94, 0.95) var(--danger-start, 88%),
      rgba(245, 158, 11, 0.9) var(--warn-start, 96%),
      rgba(239, 68, 68, 0.95) 100%);
  border-radius: 999px;
}

.feed-time-label {
  font-size: 11.5px;
  opacity: 0.7;
  white-space: nowrap;
}

.feed-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-body {
  padding: 12px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  color: var(--text);
}

.feed-body-panel {
  background: rgba(12, 16, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .feed-body-panel {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.feed-title {
  font-weight: 900;
  letter-spacing: -0.2px;
  line-height: 1.25;
  color: var(--text);
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.feed-meta-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.favorite-btn,
.report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition), color var(--transition);
}

.favorite-btn {
  color: var(--gold-light);
  border-color: rgba(201, 168, 76, 0.3);
  background: rgba(201, 168, 76, 0.12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.favorite-btn:hover,
.favorite-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(201, 168, 76, 0.5);
  background: rgba(201, 168, 76, 0.18);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
}

.favorite-btn.is-active {
  background: rgba(201, 168, 76, 0.22);
  border-color: rgba(201, 168, 76, 0.5);
  animation: favPop 0.45s ease;
  box-shadow: 0 0 18px rgba(201, 168, 76, 0.35);
}

.favorite-icon {
  font-size: 14px;
}

.report-btn {
  color: rgba(239, 68, 68, 0.95);
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

.report-btn:hover,
.report-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
}

.report-icon {
  font-size: 12px;
}

@keyframes favPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

.feed-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
}

.feed-badge.request {
  color: rgba(237, 240, 248, 0.92);
  border-color: rgba(82, 49, 148, 0.28);
}

.feed-badge.offer {
  color: rgba(237, 240, 248, 0.92);
  border-color: rgba(33, 82, 173, 0.28);
}

.feed-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  color: var(--text);
}

.feed-pill--silver {
  border-color: rgba(197, 203, 214, 0.45);
  color: var(--silver-500);
  background: rgba(197, 203, 214, 0.16);
  box-shadow: 0 0 10px rgba(197, 203, 214, 0.18);
}

.feed-user {
  cursor: pointer;
  color: var(--text);
}

.feed-user:hover {
  border-color: rgba(226, 184, 107, 0.22);
}

@media (max-width: 980px) {
  .feed-grid {
    grid-template-columns: repeat(2, minmax(240px, 300px));
  }

  .feed-details-grid {
    grid-template-columns: 1fr;
  }

  .feed-details-hero {
    min-height: 220px;
  }
}

@media (max-width: 520px) {
  .feed-grid {
    grid-template-columns: minmax(220px, 320px);
  }

  .feed-media {
    height: 170px;
  }

  .modal-feed-details-box {
    padding: 20px 18px;
  }

  .feed-details-hero {
    min-height: 200px;
  }
}

.badge-item.earned:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 82, 173, 0.18);
}

.badge-item.locked {
  opacity: 0.30;
  filter: grayscale(1);
}

/* ── Premium progress card ────────────────────────────── */
.premium-progress-body {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.premium-progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.premium-progress-k {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.premium-progress-v {
  font-size: 14px;
  color: var(--text-soft);
}

.premium-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 10px;
}

.premium-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--silver-500) 0%, var(--silver-light) 100%);
  box-shadow: 0 0 10px var(--silver-glow);
  transition: width 0.35s ease;
}

.premium-progress-foot {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

/* ── Leaderboard ─────────────────────────────────────── */
.leaderboard-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leaderboard-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.leaderboard-item:focus-visible {
  outline: 2.5px solid var(--kh-brand-500);
  outline-offset: 3px;
}

.leaderboard-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.leaderboard-rank {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  color: var(--text);
  flex-shrink: 0;
}

.leaderboard-name {
  font-weight: 900;
  letter-spacing: -0.2px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-meta {
  font-size: 12px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-right {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  align-content: center;
  max-width: 320px;
  flex-shrink: 0;
  padding-top: 1px;
}

.lb-chip {
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  white-space: nowrap;
}

.lb-chip.premium {
  border-color: rgba(197, 203, 214, 0.30);
  background: rgba(197, 203, 214, 0.14);
  color: var(--silver-500);
}

.leaderboard-item.me {
  border-color: var(--kh-brand-tint-18);
  background: var(--kh-brand-tint-08);
}

/* ── Ranking modal controls ───────────────────────────── */
.modal-ranking-box {
  width: min(760px, 94vw);
  max-width: 760px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 620px;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #F2F4F8 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #111827;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  border-radius: 24px;
}

.ranking-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 34px;
}

.ranking-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ranking-crown {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
}

.ranking-title-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.ranking-meta {
  font-size: 11.5px;
  color: #6B7280;
  text-align: right;
  margin-left: auto;
  align-self: flex-end;
}

.ranking-close {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(15, 23, 42, 0.6);
  width: 32px;
  height: 32px;
  border-radius: 999px;
}

.ranking-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(15, 23, 42, 0.8);
}

.ranking-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-ranking-box .rank-chip {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #F3F4F6;
  color: #374151;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.modal-ranking-box .rank-chip--active {
  background: rgba(79, 70, 229, 0.12);
  border-color: rgba(79, 70, 229, 0.38);
  color: #1F2937;
}

.modal-ranking-box .rank-select--chip {
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #F3F4F6;
  color: #374151;
  padding: 0 28px 0 12px;
  font-weight: 700;
  font-size: 12px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #6B7280 50%), linear-gradient(135deg, #6B7280 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 8px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.ranking-list--compact {
  max-height: 420px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.modal-ranking-box .leaderboard-item {
  background: #F7F8FB;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.modal-ranking-box .leaderboard-left {
  flex: 1 1 auto;
  min-width: 0;
  gap: 12px;
}

.modal-ranking-box .leaderboard-right {
  flex: 0 0 auto;
  margin-left: auto;
}

.modal-ranking-box .leaderboard-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
  border-color: rgba(79, 70, 229, 0.18);
}

.modal-ranking-box .leaderboard-item.is-top {
  border-color: rgba(217, 164, 65, 0.45);
  background: #FFF7E8;
}

.modal-ranking-box .leaderboard-rank {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.12);
  font-weight: 700;
  font-size: 12px;
  color: #111827;
}

.modal-ranking-box .lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.12);
  font-size: 12px;
}

.lb-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lb-name-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  row-gap: 4px;
}

.lb-level {
  font-size: 10px;
  font-weight: 700;
  color: #4338CA;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(67, 56, 202, 0.18);
  background: rgba(67, 56, 202, 0.08);
}

.modal-ranking-box .leaderboard-name {
  font-weight: 700;
  color: #111827;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-ranking-box .lb-mini {
  color: #6B7280;
}

.modal-ranking-box .leaderboard-right {
  justify-content: flex-end;
  gap: 6px;
  max-width: 200px;
  flex-wrap: wrap;
}

.lb-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  background: #EEF0F5;
  color: #374151;
  border: 1px solid rgba(15, 23, 42, 0.10);
  white-space: nowrap;
}

.lb-pill--premium {
  background: rgba(197, 203, 214, 0.35);
  color: #4B5563;
  border-color: rgba(197, 203, 214, 0.55);
}

.ranking-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-outline-gold {
  border: 1px solid rgba(217, 164, 65, 0.55);
  background: transparent;
  color: #8C5F14;
  font-weight: 700;
}

.btn-outline-gold:hover {
  background: rgba(217, 164, 65, 0.12);
  border-color: rgba(217, 164, 65, 0.85);
}

.ranking-head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ranking-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ranking-head-meta {
  font-size: 12.5px;
  color: var(--text-soft);
  padding-top: 4px;
  text-align: right;
  min-width: 160px;
}

.ranking-list {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px;
  margin-top: 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.ranking-list--page {
  max-height: min(560px, 62vh);
}

.rank-meta {
  font-size: 12.5px;
  color: var(--text-soft);
}

.ranking-list::-webkit-scrollbar {
  width: 10px;
}

.ranking-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(0, 0, 0, 0);
  background-clip: padding-box;
  border-radius: 999px;
}

@media (max-width: 520px) {
  .modal-ranking-box {
    padding: 18px 16px;
    border-radius: 18px;
    max-height: calc(100svh - 28px);
  }

  .ranking-head-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .ranking-head-meta {
    text-align: left;
    min-width: 0;
  }

  .rank-controls-row--primary,
  .rank-controls-row--secondary {
    align-items: stretch;
  }

  .rank-search,
  .rank-chip-group,
  .rank-select-group,
  .rank-loc-btn {
    width: 100%;
  }

  .rank-loc-btn {
    margin-left: 0;
  }
}

.rank-controls {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 20px;
  padding: 14px;
}

.rank-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  row-gap: 12px;
}

.rank-controls-row--primary {
  justify-content: space-between;
}

.rank-controls-row--secondary {
  justify-content: space-between;
}

.rank-search {
  flex: 1;
  min-width: 240px;
}

.rank-chip-group {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rank-select-group {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rank-loc-btn {
  margin-left: auto;
}

.rank-chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-weight: 800;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.rank-chip:hover {
  background: var(--bg-card-h);
  border-color: var(--border-h);
  transform: translateY(-1px);
}

.rank-chip--active {
  color: var(--text);
  border-color: rgba(33, 82, 173, 0.26);
  background: rgba(33, 82, 173, 0.10);
}

.rank-select {
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0 14px;
  font-weight: 700;
  font-size: 12.5px;
}

.rank-select:focus-visible {
  outline: 2.5px solid var(--kh-brand-500);
  outline-offset: 3px;
}

.rank-search {
  flex: 1 1 260px;
  min-width: 0;
}

.rank-search-input {
  width: 100%;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0 14px;
  font-weight: 650;
  font-size: 12.5px;
}

html[data-theme="light"] .rank-controls,
html[data-theme="light"] .ranking-list {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .rank-chip {
  color: rgba(11, 15, 25, 0.78);
}

.rank-search-input::placeholder {
  color: var(--text-muted);
}

.rank-search-input:focus-visible {
  outline: 2.5px solid var(--kh-brand-500);
  outline-offset: 3px;
}

.leaderboard-meta {
  white-space: normal;
}

.lb-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.lb-mini {
  font-size: 12px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--text);
  flex-shrink: 0;
  overflow: hidden;
}

.lb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lb-stat {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  white-space: nowrap;
}

.lb-stat strong {
  color: var(--text);
}

/* ── User card modal ───────────────────────────────────── */
.modal-usercard-box {
  max-width: 520px;
  padding: 22px 22px;
  max-height: calc(100svh - 64px);
  max-height: calc(100vh - 64px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* KingsHelp ID style */
.modal-usercard-box {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 40%, rgba(226, 184, 107, 0.06) 100%);
}

.modal-usercard-box::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    url("../img/esquina1.png?v=4") left top / calc(var(--kh-corner-size) * 1.3) calc(var(--kh-corner-size) * 1.3) no-repeat,
    url("../img/esquina2.png?v=4") right bottom / var(--kh-corner-size) var(--kh-corner-size) no-repeat,
    radial-gradient(circle at 15% 10%, rgba(226, 184, 107, 0.18), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(224, 122, 95, 0.14), transparent 48%),
    radial-gradient(circle at 70% 90%, rgba(33, 82, 173, 0.12), transparent 52%);
  opacity: 0.85;
}

.modal-usercard-box::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(226, 184, 107, 0.10), transparent 35%, rgba(224, 122, 95, 0.08)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 10px);
  mix-blend-mode: screen;
  opacity: 0.20;
}

.modal-usercard-box {
  position: relative;
  overflow: hidden;
}

.modal-usercard-box>* {
  position: relative;
  z-index: 1;
}

.usercard-head {
  position: relative;
  padding-bottom: 10px;
}

.usercard-stamp {
  margin-left: auto;
  text-align: right;
  padding: 7px 10px;
  border-radius: 14px;
  border: 1px solid rgba(226, 184, 107, 0.28);
  background: linear-gradient(135deg, rgba(226, 184, 107, 0.10), rgba(224, 122, 95, 0.06));
  box-shadow: 0 12px 28px rgba(226, 184, 107, 0.10);
}

.usercard-stamp-k {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: rgba(237, 240, 248, 0.75);
}

.usercard-stamp-v {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 950;
  color: var(--text);
}

.usercard-head::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 184, 107, 0.35), transparent);
}

.usercard-stats {
  margin-top: 12px;
}

@media (max-width: 520px) {
  .modal-usercard-box {
    max-width: calc(100vw - 24px);
    padding: 18px 16px;
    max-height: calc(100svh - 24px);
  }

  .usercard-name {
    font-size: 16px;
  }

  .usercard-stamp {
    display: none;
  }
}

.usercard-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.usercard-head .verified-badge {
  margin-left: -10px;
  margin-top: 26px;
}

.usercard-avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--text);
  overflow: hidden;
  flex-shrink: 0;
}

.usercard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.usercard-name {
  font-weight: 950;
  font-size: 18px;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usercard-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.35;
}

.usercard-stats {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.usercard-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.10);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.usercard-chip .i {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text);
  font-weight: 950;
  font-size: 12px;
}

.usercard-chip strong {
  color: var(--text);
  font-weight: 950;
}

.usercard-chip .s {
  margin-left: 6px;
  color: var(--text-muted);
  font-weight: 850;
}

.usercard-chip.ok {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.10);
}

.usercard-chip.ok .i {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.28);
  color: #06240f;
}

.usercard-chip.warm {
  border-color: rgba(226, 184, 107, 0.26);
  background: rgba(226, 184, 107, 0.10);
}

.usercard-chip.warm .i {
  background: rgba(226, 184, 107, 0.18);
  border-color: rgba(226, 184, 107, 0.26);
}

.usercard-section-title {
  margin-top: 16px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.usercard-badges-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.usercard-badges-head .usercard-section-title {
  margin-top: 0;
}

.usercard-more {
  border-radius: 999px;
}

.usercard-badges-grid {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  overflow: auto;
  max-height: 320px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.usercard-badge {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.usercard-badge-name {
  font-weight: 900;
  letter-spacing: -0.1px;
  font-size: 13px;
}

.usercard-badge-desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-soft);
}

@media (max-width: 520px) {
  .rank-search {
    min-width: 100%;
    flex-basis: 100%;
  }

  .usercard-badges-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .leaderboard-right {
    justify-content: flex-start;
    max-width: none;
  }
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: all var(--transition);
}

.timeline-step.done .step-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.40);
}

.timeline-step.active .step-dot {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: pulseRing 2.4s infinite;
}

.step-body {
  flex: 1;
}

.step-label {
  font-size: 13px;
  font-weight: 600;
}

.step-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.timeline-line {
  width: 2px;
  height: 22px;
  background: var(--border);
  margin-left: 13px;
  transition: background var(--transition);
}

.timeline-line.done {
  background: var(--success);
}

.permission-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.perm-action {
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

.perm-who {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.perm-who.provider {
  background: rgba(82, 49, 148, 0.12);
  color: rgba(225, 214, 255, 0.90);
  border: 1px solid rgba(82, 49, 148, 0.22);
}

.perm-who.seeker {
  background: rgba(61, 139, 255, 0.12);
  color: #93C5FD;
  border: 1px solid rgba(61, 139, 255, 0.25);
}

/* ── Badge pill ───────────────────────────────────────── */
.badge-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
}

.badge-pill--silver {
  border-color: rgba(197, 203, 214, 0.45);
  color: var(--silver-500);
  background: rgba(197, 203, 214, 0.16);
  box-shadow: 0 0 10px rgba(197, 203, 214, 0.18);
}

.badge-pill.success {
  background: rgba(34, 197, 94, 0.10);
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.25);
}

/* ── Modal (login) ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: #0F1420;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
  animation: slideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  transform: translateY(-14px) scale(0.985);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.modal-overlay:not(.hidden) .modal-box {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── Feed details modal ─────────────────────────────────── */
.modal-feed-details-box {
  width: min(980px, 92vw);
  max-width: 980px;
  padding: 26px 26px 22px;
  background: linear-gradient(180deg, rgba(15, 20, 32, 0.98), rgba(10, 14, 22, 0.98));
  border-color: rgba(255, 255, 255, 0.14);
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-details-body {
  display: grid;
  gap: 16px;
  margin-top: 10px;
  overflow: auto;
  min-height: 0;
  flex: 1;
  padding-right: 2px;
}

.feed-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
  animation: fdRise 0.38s ease both;
}

.feed-details-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 280px;
  aspect-ratio: 16 / 9;
  background-image:
    var(--feed-cover, none),
    radial-gradient(circle at 30% 30%, rgba(82, 49, 148, 0.28), rgba(33, 82, 173, 0.18));
  background-size: cover, auto;
  background-position: center, center;
  background-repeat: no-repeat;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.feed-details-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 22, 0.08) 20%, rgba(10, 14, 22, 0.72) 100%);
  pointer-events: none;
}

.feed-details-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.feed-details-badge.request {
  color: rgba(237, 240, 248, 0.92);
  border-color: rgba(82, 49, 148, 0.45);
}

.feed-details-badge.offer {
  color: rgba(237, 240, 248, 0.92);
  border-color: rgba(33, 82, 173, 0.45);
}

.feed-details-hero-info {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 2;
}

.feed-details-hero-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 46px;
  opacity: 0.8;
  z-index: 1;
}

.feed-details-hero-title {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.2px;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.feed-details-hero-sub {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.8;
  text-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.feed-details-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-details-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.feed-details-desc {
  opacity: 0.92;
  line-height: 1.55;
  white-space: pre-line;
}

.feed-details-desc.is-empty {
  opacity: 0.55;
  font-style: italic;
}

.feed-details-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-details-meta {
  display: grid;
  gap: 8px;
}

.feed-details-meta-item {
  font-size: 13px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-details-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.feed-details-user-rating {
  font-size: 12px;
  opacity: 0.8;
}

@keyframes fdRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .feed-details-grid {
    animation: none;
  }

  .modal-feed-details-box {
    animation: none;
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.modal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.modal-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.field input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field textarea,
.field select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23aab2c6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.field input::placeholder {
  color: rgba(237, 240, 248, 0.42);
}

.field textarea::placeholder {
  color: rgba(237, 240, 248, 0.42);
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.demo-hint {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 18px;
  line-height: 1.9;
}

.demo-hint code {
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
}

/* ── Modal Premium ────────────────────────────────────── */
.modal-premium-box {
  border-color: var(--gold-border);
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.08), 0 32px 80px rgba(0, 0, 0, 0.7);
  text-align: center;
  max-width: 360px;
  padding: 28px 26px 24px;
  max-height: 78vh;
  overflow-y: auto;
}

.modal-premium-box--lite {
  border-color: var(--silver-border);
  box-shadow: 0 0 0 1px rgba(197, 203, 214, 0.12), 0 32px 80px rgba(0, 0, 0, 0.7);
}

@media (max-width: 420px) {
  .modal-premium-box {
    max-width: 340px;
    padding: 24px 20px 20px;
  }
}

.premium-modal-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 10px;
}

.premium-modal-picks--single {
  grid-template-columns: 1fr;
  justify-items: center;
}

.premium-modal-picks--single .premium-pick {
  width: min(320px, 100%);
}

.premium-modal-howto {
  margin: 12px 0 4px;
  text-align: left;
  border: 1px dashed rgba(197, 203, 214, 0.30);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(197, 203, 214, 0.08);
}

.premium-modal-howto-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--silver-500);
  margin-bottom: 6px;
}

.premium-modal-howto-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.premium-modal-howto-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--text-soft);
}

.premium-modal-howto-list li::before {
  content: '•';
  color: var(--silver-500);
  font-weight: 700;
  margin-top: -1px;
}

.premium-pick {
  position: relative;
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 18px;
  padding: 12px 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-align: left;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.premium-pick--paid {
  border-color: rgba(201, 168, 76, 0.35);
  background: rgba(201, 168, 76, 0.06);
}

.premium-pick:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 168, 76, 0.34);
  background: rgba(201, 168, 76, 0.06);
}

.premium-pick--active {
  border-color: rgba(201, 168, 76, 0.55);
  background: rgba(201, 168, 76, 0.10);
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.12);
}

.premium-pick--active:hover {
  transform: none;
}

.premium-pick-k {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.premium-pick-v {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text);
}

.premium-pick-v span {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-soft);
  margin-left: 4px;
}

.premium-pick-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.premium-pick-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #0B0F1A;
  background: linear-gradient(120deg, var(--gold) 0%, var(--gold-light) 100%);
  border: 1px solid rgba(0, 0, 0, 0.10);
  padding: 4px 8px;
  border-radius: 999px;
}

@media (max-width: 460px) {
  .premium-modal-picks {
    grid-template-columns: 1fr;
  }
}

.premium-modal-crown {
  text-align: center;
  font-size: 32px;
  color: var(--gold-light);
  filter: drop-shadow(0 0 14px var(--gold-glow));
  margin-bottom: 10px;
}

.modal-premium-box--lite .premium-modal-crown {
  color: var(--silver-light);
  filter: drop-shadow(0 0 14px var(--silver-glow));
}

.premium-modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 16px;
  text-align: left;
}

.premium-modal-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

/* Premium modal compact blocks */
.premium-modal-mini {
  margin-top: 12px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.modal-premium-box--lite .premium-modal-mini {
  border-color: rgba(197, 203, 214, 0.20);
  background: rgba(197, 203, 214, 0.06);
}

.pmini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 12px;
}

.pmini-row+.pmini-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pmini-ico {
  width: 22px;
  height: 22px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(33, 82, 173, 0.14);
  border: 1px solid rgba(33, 82, 173, 0.20);
  flex-shrink: 0;
}

.modal-premium-box--lite .pmini-ico {
  background: rgba(197, 203, 214, 0.18);
  border-color: rgba(197, 203, 214, 0.35);
}

.pmini-row span:last-child {
  font-size: 13px;
  color: var(--text-soft);
}

.premium-modal-actions {
  margin-top: 14px;
}

/* Upgrade nudge modal */
.modal-upgrade-box {
  max-width: 380px;
  padding: 26px 22px 22px;
  border-radius: 22px;
  border-color: rgba(197, 203, 214, 0.28);
  background:
    radial-gradient(120% 140% at 18% 0%, rgba(197, 203, 214, 0.16) 0%, transparent 60%),
    radial-gradient(120% 140% at 88% 10%, rgba(33, 82, 173, 0.12) 0%, transparent 56%),
    rgba(15, 20, 32, 0.96);
}

html[data-theme="light"] .modal-upgrade-box {
  background:
    radial-gradient(120% 140% at 18% 0%, rgba(197, 203, 214, 0.20) 0%, transparent 60%),
    radial-gradient(120% 140% at 88% 10%, rgba(33, 82, 173, 0.08) 0%, transparent 56%),
    #FFFFFF;
  border-color: rgba(140, 150, 168, 0.28);
}

/* Badge nudge modal */
.modal-badge-box {
  max-width: 420px;
  padding: 26px 22px 22px;
  border-radius: 22px;
  border-color: rgba(197, 203, 214, 0.28);
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(197, 203, 214, 0.18) 0%, transparent 60%),
    radial-gradient(120% 140% at 88% 10%, rgba(33, 82, 173, 0.10) 0%, transparent 56%),
    rgba(15, 20, 32, 0.96);
}

html[data-theme="light"] .modal-badge-box {
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(197, 203, 214, 0.22) 0%, transparent 60%),
    radial-gradient(120% 140% at 88% 10%, rgba(33, 82, 173, 0.08) 0%, transparent 56%),
    #FFFFFF;
  border-color: rgba(140, 150, 168, 0.28);
}

.badge-nudge-mini .pmini-row span:last-child {
  font-weight: 600;
}

.upgrade-top {
  text-align: left;
}

.upgrade-k {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--silver-500);
}

.upgrade-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--silver-500);
  background: rgba(197, 203, 214, 0.14);
  border: 1px solid var(--silver-border);
  box-shadow: 0 0 12px rgba(197, 203, 214, 0.22);
}

.upgrade-v {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.4px;
}

.upgrade-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
}

.upgrade-progress {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.upgrade-foot {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

@media (max-width: 420px) {
  .modal-upgrade-box {
    max-width: 340px;
    padding: 24px 18px 18px;
  }

  .modal-badge-box {
    max-width: 340px;
    padding: 24px 18px 18px;
  }
}

/* Dashboard header brand sizing (match landing lockup) */
.dash-header .nav-brand-crown {
  height: 24px;
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

.dash-header .nav-brand-word {
  height: 16px;
  opacity: 0.92;
}

.dash-header .nav-brand-logo {
  height: 36px;
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

.premium-modal-badge {
  display: inline-block;
  margin: 0 auto;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 18px;
  background: rgba(201, 168, 76, 0.10);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
}

.modal-premium-box--lite .premium-modal-badge {
  background: rgba(197, 203, 214, 0.14);
  color: var(--silver-500);
  border-color: var(--silver-border);
}

/* ── Toasts ───────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 500;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  background: #141824;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 320px;
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

.toast.info {
  border-left: 3px solid var(--accent);
}

.toast-icon {
  font-size: 17px;
}

.toast-text {
  flex: 1;
  line-height: 1.45;
}

.toast.removing {
  animation: slideOutRight 0.25s ease forwards;
}

/* ── Coin ─────────────────────────────────────────────── */
.coin-particle {
  position: absolute;
  font-size: 18px;
  pointer-events: none;
  animation: coinFloat 1.2s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

@keyframes coinFloat {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 1;
  }

  60% {
    opacity: 1;
  }

  100% {
    transform: translateY(-90px) translateX(var(--tx, 0px)) scale(0.4);
    opacity: 0;
  }
}

/* ── Scroll Reveal ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(6px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.reveal:nth-child(3) {
  transition-delay: 0.16s;
}

.reveal:nth-child(4) {
  transition-delay: 0.24s;
}

/* ── Keyframes ────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes brandIntro {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(36px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: none
  }

  to {
    opacity: 0;
    transform: translateX(36px)
  }
}

/* ── Scrollbar ────────────────────────────────────────── */
.ledger-list::-webkit-scrollbar {
  width: 4px;
}

.ledger-list::-webkit-scrollbar-track {
  background: transparent;
}

.ledger-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .usecases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 0 20px;
  }

  .hero {
    padding: 110px 0 60px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-preview {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .dashboard {
    padding: 16px;
  }

  .modal-box {
    margin: 16px;
    padding: 32px 24px;
  }

  .dash-header {
    padding: 0 16px;
  }

  .dash-tabs {
    justify-content: flex-start;
    padding: 8px 10px;
  }

  .premium-card {
    padding: 40px 24px;
  }

  .usecases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .final-cta-box {
    padding: 48px 24px;
  }

}

/* Extra-small phones (≤400px): fine-tune hero typography */
@media (max-width: 400px) {
  .hero-title {
    letter-spacing: -0.5px;
  }

  .hero-sub {
    font-size: 15px;
  }

  /* Reduce modal padding for very small screens */
  .modal-box {
    margin: 8px;
    padding: 24px 16px;
  }

  /* Dashboard: full-bleed padding */
  .dashboard {
    padding: 12px;
  }
}


/* ═══════════════════════════
   RETOQUE UX — nuevos elementos
═══════════════════════════ */

/* 1) Ejemplos rotativos ─────────────────────────────────── */
.hero-examples {
  font-size: 14px;
  color: var(--text-muted);
  height: 1.5em;
  overflow: hidden;
  position: relative;
}

.examples-rotator {
  position: relative;
  height: 100%;
}

.ex-item {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  animation: exRotate 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  opacity: 0;
}

.ex-item:nth-child(1) {
  animation-delay: 0s;
}

.ex-item:nth-child(2) {
  animation-delay: -6s;
}

.ex-item:nth-child(3) {
  animation-delay: -3s;
}

@keyframes exRotate {

  0%,
  5% {
    opacity: 1;
    transform: translateY(0);
  }

  28%,
  33% {
    opacity: 1;
    transform: translateY(0);
  }

  38%,
  99% {
    opacity: 0;
    transform: translateY(-5px);
  }

  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ex-item {
    position: static;
    display: none;
    animation: none;
    opacity: 1;
  }

  .ex-item:first-child {
    display: block;
  }
}

/* 2) Trust micro-badges ─────────────────────────────────── */
.hero-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  white-space: nowrap;
}

/* 3) Preview proposal cards ─────────────────────────────── */
.preview-proposals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 12px 2px;
}

.pprop-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background var(--transition);
}

html[data-theme="light"] .pprop-card {
  background: rgba(0, 0, 0, 0.02);
}

.pprop-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.pprop-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pprop-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.pprop-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.pprop-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.pprop-tag.recommended {
  background: rgba(33, 82, 173, 0.10);
  color: rgba(187, 222, 255, 0.92);
  border: 1px solid rgba(33, 82, 173, 0.20);
}

.pprop-tag.top {
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
}

/* 4) KPI note ───────────────────────────────────────────── */
.kpi-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 14px;
  font-style: italic;
  opacity: 0.7;
}

.premium-microcopy {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.premium-microcopy strong {
  color: var(--gold-light);
  font-weight: 600;
}

html[data-theme="light"] .premium-microcopy strong {
  color: var(--gold);
}

/* ── PREMIUM SECTION — new pricing & points elements ──── */

/* "PRÓXIMAMENTE" badge next to Premium label */
.premium-soon-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(201, 168, 76, 0.14);
  color: var(--gold-light);
  border: 1px solid rgba(201, 168, 76, 0.28);
  vertical-align: middle;
  margin-left: 4px;
}




/* Track legend microtext */
.track-legend {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
  opacity: 0.7;
}

/* Subtitle under gold button */
.premium-btn-sub {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  margin-bottom: 0;
}

/* ── PREMIUM MODAL — pricing block ──────────────────────── */
.premium-modal-pricing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 14px 0 16px;
  padding: 14px 20px;
  background: rgba(201, 168, 76, 0.07);
  border: 1px solid rgba(201, 168, 76, 0.20);
  border-radius: 14px;
}

.modal-premium-box--lite .premium-modal-pricing {
  background: rgba(197, 203, 214, 0.10);
  border-color: rgba(197, 203, 214, 0.30);
}

.premium-modal-price {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--gold-light);
  line-height: 1;
}

.modal-premium-box--lite .premium-modal-price {
  color: var(--silver-light);
}

.modal-premium-box--lite .premium-modal-price {
  color: var(--silver-light);
}

.premium-modal-price span {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.modal-premium-box--lite .premium-modal-price span {
  color: var(--silver-500);
  font-weight: 700;
}

.premium-modal-price-note {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-premium-box--lite .premium-modal-price-note {
  color: var(--text-soft);
}

/* Points note inside modal */
.premium-modal-points-note {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
  background: rgba(33, 82, 173, 0.06);
  border: 1px solid rgba(33, 82, 173, 0.14);
  border-radius: 10px;
  padding: 10px 13px;
  margin-top: 14px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* ── HERO PREMIUM TEASER ────────────────────────────────── */
.hero-premium-teaser {
  margin-top: -4px;
}

.hero-premium-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  text-decoration: none;
  transition: color var(--transition);
  border-bottom: 1px solid transparent;
}

.hero-premium-link:hover {
  color: var(--gold-light);
  border-bottom-color: rgba(201, 168, 76, 0.40);
}

.hero-premium-link strong {
  color: var(--gold-light);
  font-weight: 600;
}

html[data-theme="light"] .hero-premium-link strong {
  color: var(--gold);
}

.hero-premium-crown {
  font-size: 14px;
  color: var(--gold);
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px var(--gold-glow));
}

/* ════════════════════════════════════════════════════════
   VISUAL REFINEMENTS vR1
════════════════════════════════════════════════════════ */

/* ── 1) Hero trust mini bar ───────────────────────────── */
.hero-trust-mini {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.trust-mini-item {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  opacity: 0.80;
}

.trust-mini-sep {
  color: var(--border-h);
  font-size: 13px;
  opacity: 0.50;
  user-select: none;
}

html[data-theme="light"] .trust-mini-item {
  opacity: 0.70;
}

/* ── 2) Section dividers ──────────────────────────────── */
/* Soft 1-px gradient rule that sits between sections */
.hero,
.demo-section,
.kpis,
.features,
.premium-section {
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg,
      transparent 0%,
      var(--border) 20%,
      var(--border) 80%,
      transparent 100%) 1;
}

/* Subtle alternating background tint (every other section gets a wash) */
.kpis {
  background: rgba(255, 255, 255, 0.02);
}

.features {
  background: rgba(255, 255, 255, 0.01);
}

html[data-theme="light"] .kpis {
  background: rgba(15, 23, 42, 0.02);
}

html[data-theme="light"] .features {
  background: rgba(79, 70, 229, 0.04);
}

/* ── 3) KPI section header ────────────────────────────── */
.kpi-header {
  text-align: center;
  margin-bottom: 40px;
}

.kpi-header .section-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
}

.kpi-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}

.kpi-title-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.10);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.22);
  vertical-align: middle;
  margin-left: 8px;
  position: relative;
  top: -3px;
}

.kpi-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 22px;
  opacity: 0.65;
  font-style: italic;
  letter-spacing: 0.2px;
}

/* ── 4) Unified badge height system ───────────────────── */
/* All tag/badge chips across the page get unified height & radius */
.pstep-badge,
.flow-badge,
.ds-match-rec,
.ds-pill,
.pprop-tag,
.badge-pill {
  height: 22px;
  line-height: 22px;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

/* pprop (preview proposals) */
.pprop-tag {
  font-size: 10.5px;
  padding: 0 9px;
}

.pprop-tag.recommended {
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-light);
  border: 1px solid rgba(201, 168, 76, 0.25);
}

.pprop-tag.top {
  background: rgba(33, 82, 173, 0.10);
  color: rgba(187, 222, 255, 0.92);
  border: 1px solid rgba(33, 82, 173, 0.22);
}

/* ── 6) Premium disclaimer legibility ─────────────────── */
.premium-disclaimer {
  font-size: 12.5px;
  /* was 12px */
  color: var(--text-muted);
  opacity: 0.85;
  /* was full muted — a touch more visible */
}

html[data-theme="light"] .premium-disclaimer {
  opacity: 1;
}

/* ════════════════════════════════════════════════════════
   BRAND PRESENCE BOOST — KingsHelp identity reinforcement
   Applies --kh-brand-* tokens to key UI elements.
   No layout changes. No !important.
════════════════════════════════════════════════════════ */

/* ── 1. CTA Primary — added glow ─────────────────────── */
.btn-primary {
  box-shadow:
    0 0 0 0 var(--kh-brand-tint-12),
    0 4px 14px var(--kh-brand-tint-18);
}

.btn-primary:hover {
  box-shadow:
    0 0 0 3px var(--kh-brand-tint-12),
    0 8px 22px var(--kh-brand-tint-18);
  transform: translateY(-2px);
}

/* ── 2. Chips/Pills — brand tint bg, border, icon ────── */
.chip {
  background: var(--kh-brand-tint-12);
  border-color: var(--kh-brand-tint-18);
  color: var(--kh-text);
}

.chip:hover {
  background: var(--kh-brand-tint-18);
  border-color: rgba(33, 82, 173, 0.28);
  color: var(--kh-text);
}

/* Chip SVG icon inherit brand color */
.chip-icon {
  color: var(--kh-brand-500);
}

/* Light mode chips: slightly more opaque for readability */
html[data-theme="light"] .chip {
  background: var(--kh-brand-tint-08);
  border-color: var(--kh-brand-tint-12);
}

html[data-theme="light"] .chip:hover {
  background: var(--kh-brand-tint-12);
  border-color: var(--kh-brand-tint-18);
}

/* ── 3. Nav CTA — consistent with global primary ─────── */
.nav .btn-primary {
  background: var(--kh-brand-gradient);
}

.nav .btn-primary:hover {
  background: linear-gradient(120deg, #8B5CF6 0%, #6D28D9 50%, #4C1D95 100%);
}

/* ── 5. Hero eyebrow — brand-colored live indicator ──── */
.hero-eyebrow {
  color: var(--kh-brand-500);
  opacity: 0.9;
}

/* Pulse dot: brand color */
.hero-eyebrow .pulse-dot,
.pulse-dot {
  background: var(--kh-brand-500);
  box-shadow: 0 0 0 3px var(--kh-brand-tint-12);
}

/* ── 6. Hero title accent — brand underline on gradient word ─ */
.hero-title .gradient-text {
  position: relative;
  display: inline-block;
  /* needed for ::after positioning */
}

.hero-title .gradient-text::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--kh-brand-gradient);
  border-radius: 2px;
  opacity: 0.60;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field textarea {
  width: 100%;
  resize: vertical;
  min-height: 74px;
}

.mvp-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.mvp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ── Preview antes de publicar ───────────────────────── */
.preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.preview-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, .03);
}

html[data-theme="light"] .preview-card {
  background: rgba(0, 0, 0, .03);
}

.preview-kind-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.preview-kind-label.off {
  color: var(--gold, #d4af37);
}

.preview-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text);
}

.preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.preview-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.preview-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.preview-photo-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ── Create switch (dashboard) ────────────────────────── */
.create-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 4px;
}

.create-choice {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.2px;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

html[data-theme="light"] .create-choice {
  background: rgba(0, 0, 0, 0.03);
}

.create-choice:hover {
  transform: translateY(-1px);
  border-color: var(--kh-brand-tint-18);
  background: var(--kh-brand-tint-08);
}

.create-choice--active {
  border-color: rgba(33, 82, 173, 0.26);
  background: rgba(33, 82, 173, 0.08);
}

.create-choice[data-kind="request"].create-choice--active {
  border-color: rgba(82, 49, 148, 0.30);
  background: rgba(82, 49, 148, 0.10);
}

.create-choice[data-kind="offer"].create-choice--active {
  border-color: rgba(33, 82, 173, 0.30);
  background: rgba(33, 82, 173, 0.10);
}

.create-choice--active:hover {
  transform: none;
}

/* ── Compensation selector (3 options) ─────────────────── */
.comp-switch {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.comp-choice {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.2px;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.comp-choice:hover {
  transform: translateY(-1px);
  border-color: var(--kh-brand-tint-18);
  background: var(--kh-brand-tint-08);
}

.comp-choice--active {
  border-color: rgba(33, 82, 173, 0.30);
  background: rgba(33, 82, 173, 0.10);
}

.comp-choice[data-comp="cash"].comp-choice--active {
  border-color: rgba(33, 82, 173, 0.34);
  background: rgba(33, 82, 173, 0.12);
}

.comp-choice[data-comp="barter"].comp-choice--active {
  border-color: rgba(82, 49, 148, 0.34);
  background: rgba(82, 49, 148, 0.12);
}

.comp-choice[data-comp="altruistic"].comp-choice--active {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.10);
}

.comp-choice--active:hover {
  transform: none;
}

.comp-hint {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.45;
}

@media (max-width: 560px) {
  .comp-switch {
    grid-template-columns: 1fr;
  }
}

.mvp-kind {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.mvp-kind.req {
  border-color: rgba(33, 82, 173, 0.22);
  background: rgba(33, 82, 173, 0.08);
}

.mvp-kind.off {
  border-color: rgba(16, 185, 129, 0.22);
  background: rgba(16, 185, 129, 0.08);
}

/* ── Creations filters ───────────────────────────────── */
.creations-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 10px 0 4px;
}

.creations-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="light"] .creations-tabs {
  background: rgba(0, 0, 0, 0.03);
}

.creations-tab {
  border: none;
  background: transparent;
  color: var(--text-soft);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.2px;
  transition: background var(--transition), color var(--transition);
}

.creations-tab:hover {
  background: var(--kh-brand-tint-08);
  color: var(--text);
}

.creations-tab--active {
  background: var(--kh-brand-tint-12);
  color: var(--text);
}

.creations-search {
  flex: 1;
  min-width: 220px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

html[data-theme="light"] .creations-search {
  background: rgba(0, 0, 0, 0.03);
}

.creations-q {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
}

.creations-q::placeholder {
  color: var(--text-soft);
}

/* ── Select base (unstyled dropdowns) ─────────────────── */
select:not(.rank-select--chip):not(.feed-filter-select) {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 34px 8px 12px;
  font-size: 13px;
  font-weight: 600;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 10px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

html[data-theme="light"] select:not(.rank-select--chip):not(.feed-filter-select) {
  background: rgba(15, 23, 42, 0.03);
}

select:not(.rank-select--chip):not(.feed-filter-select):focus-visible {
  outline: 2px solid var(--kh-brand-500);
  outline-offset: 2px;
}

/* ── Custom select (fully styled dropdown) ─────────────── */
.kh-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 140px;
  z-index: 60;
}

.kh-select select {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.kh-select-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 34px 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.kh-select-btn::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-60%) rotate(45deg);
  opacity: 0.7;
}

.kh-select.open .kh-select-btn::after {
  transform: translateY(-20%) rotate(-135deg);
}

.kh-select--pill .kh-select-btn {
  border: none;
  background: transparent;
  padding: 0 18px 0 0;
  font-size: 12.5px;
  font-weight: 700;
}

.kh-select--chip .kh-select-btn {
  border-radius: 999px;
  background: #F5F6FA;
  border: 1px solid rgba(15, 23, 42, 0.10);
  padding: 6px 30px 6px 12px;
  font-size: 13px;
  font-weight: 600;
}

.kh-select.is-disabled .kh-select-btn {
  opacity: 0.6;
  cursor: not-allowed;
}

.kh-select-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  max-height: 280px;
  overflow: auto;
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  padding: 6px;
  z-index: 3000;
  display: none;
}

.kh-select.open .kh-select-list {
  display: block;
}

.kh-select.open {
  z-index: 2500;
}

.kh-select-option {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #111827;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.kh-select-option:hover,
.kh-select-option.is-selected {
  background: rgba(217, 164, 65, 0.14);
  color: #5C3A00;
}

html[data-theme="dark"] .kh-select-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
  color: #E5E7EB;
}

html[data-theme="dark"] .kh-select--chip .kh-select-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .kh-select-list {
  background: #0F1420;
  border-color: rgba(255, 255, 255, 0.12);
  color: #E5E7EB;
}

html[data-theme="dark"] .kh-select-option {
  color: #E5E7EB;
}

html[data-theme="dark"] .kh-select-option:hover,
html[data-theme="dark"] .kh-select-option.is-selected {
  background: rgba(217, 164, 65, 0.2);
  color: #F7E7C5;
}

/* ── Editor mode (admin only) ─────────────────────────── */
body:not(.editor-admin) .editor-toolbar,
body:not(.editor-admin) .editor-panel {
  display: none !important;
}

body.editor-admin .editor-toolbar {
  display: flex;
}

body.editor-admin .editor-panel {
  display: block;
}

body.editor-mode [data-editor-id] {
  outline: 1px dashed rgba(79, 70, 229, 0.45);
  outline-offset: 2px;
  cursor: move;
}

body.editor-mode [data-editor-id]:hover {
  outline-color: rgba(176, 122, 27, 0.7);
}

.editor-selected {
  outline: 2px solid rgba(176, 122, 27, 0.9) !important;
}

.editor-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: #FFFFFF;
  border: 2px solid rgba(176, 122, 27, 0.9);
  right: -8px;
  bottom: -8px;
  cursor: nwse-resize;
  z-index: 10;
}

.editor-toolbar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5000;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.editor-toolbar button {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #E5E7EB;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.editor-toolbar #editor-undo {
  width: 34px;
  height: 30px;
  padding: 0;
  font-size: 16px;
}

.editor-toolbar #editor-snap {
  background: rgba(59, 130, 246, 0.18);
  color: #BFDBFE;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.editor-toolbar #editor-del {
  background: rgba(220, 38, 38, 0.16);
  color: #FECACA;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.editor-toolbar button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.editor-toolbar .is-primary {
  background: rgba(217, 164, 65, 0.22);
  color: #F7E7C5;
  border: 1px solid rgba(217, 164, 65, 0.38);
}

.editor-toolbar #editor-apply.is-primary {
  background: rgba(79, 70, 229, 0.25);
  border-color: rgba(79, 70, 229, 0.45);
  color: #E8E7FF;
}

.editor-panel {
  position: fixed;
  top: 84px;
  right: 18px;
  z-index: 5000;
  background: rgba(15, 23, 42, 0.94);
  color: #E5E7EB;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  min-width: 240px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.editor-panel h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.editor-field {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13.5px;
}

.editor-field--wide {
  grid-template-columns: 1fr;
}

.editor-field input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #E5E7EB;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
}

.editor-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #E5E7EB;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  resize: vertical;
}

.editor-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.editor-swatch {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.editor-swatch.is-light {
  border-color: rgba(15, 23, 42, 0.16);
}

.editor-text-toggle {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #E5E7EB;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.editor-text-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.editor-texting {
  outline: 2px dashed rgba(79, 70, 229, 0.7) !important;
  outline-offset: 3px;
}

.editor-locked {
  outline: 2px solid rgba(148, 163, 184, 0.7) !important;
  outline-offset: 3px;
}

.editor-locked::after {
  content: '🔒';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #F8FAFC;
  z-index: 12;
}

.editor-guide {
  position: fixed;
  background: rgba(59, 130, 246, 0.55);
  z-index: 4999;
  display: none;
  pointer-events: none;
}

.editor-guide--x {
  top: 0;
  bottom: 0;
  width: 1px;
}

.editor-guide--y {
  left: 0;
  right: 0;
  height: 1px;
}

@media (max-width: 720px) {
  .editor-panel {
    right: 12px;
    left: 12px;
  }
}

/* ── Profile card ─────────────────────────────────────── */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0 14px;
}

/* Profile photos */
/* Indicador verificación email en perfil */
#profile-verify-status {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  margin: 0 0 12px;
  display: block;
}

#profile-verify-status:empty {
  display: none;
}

.profile-verify-ok {
  color: var(--success);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.profile-verify-warn {
  color: var(--warn);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.profile-photos {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 12px;
}

.listing-photos {
  margin-top: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 12px;
}

html[data-theme="light"] .listing-photos {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.10);
}

.profile-photos-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-photos-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-photos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.profile-photo {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  aspect-ratio: 1 / 1;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-photo .photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.90);
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}

.profile-photo .photo-remove:hover {
  background: rgba(0, 0, 0, 0.50);
  transform: translateY(-1px);
}

html[data-theme="light"] .profile-photos {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.10);
}

.profile-stat {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.profile-stat-k {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-stat-v {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: var(--text);
}

.profile-stat-s {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  margin-left: 4px;
}

@media (max-width: 520px) {
  .profile-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .create-switch {
    grid-template-columns: 1fr;
  }
}

.mvp-created {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.mvp-created-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: pulseRing 2.4s infinite;
}

.mvp-subhead {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.mvp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mvp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="light"] .mvp-item {
  background: rgba(0, 0, 0, 0.03);
}

.mvp-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mvp-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.mvp-av-btn,
.mvp-title-btn {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}

.mvp-title-btn {
  font-weight: 900;
}

.mvp-av-btn:focus-visible,
.mvp-title-btn:focus-visible {
  outline: 2px solid rgba(226, 184, 107, 0.55);
  outline-offset: 3px;
  border-radius: 10px;
}

.mvp-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mvp-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mvp-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mvp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mvp-status {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.mvp-status.ok {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.08);
}

.mvp-status.warn {
  color: var(--warn);
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.08);
}

.mvp-status.err {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.08);
}

/* ── Quick match (landing MVP demo) ───────────────────── */
.quick-match {
  margin-top: 34px;
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

html[data-theme="light"] .quick-match {
  background: rgba(0, 0, 0, 0.03);
}

.quick-match-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.quick-match-eyebrow {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.quick-match-title {
  margin-top: 6px;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.quick-match-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.quick-match-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.quick-match-form .field-row,
.quick-match-form .field--wide,
.quick-match-form button {
  grid-column: 1 / -1;
}

.quick-match-out {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.mvp-stars {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.mvp-star {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.mvp-star:hover {
  transform: translateY(-1px);
  border-color: var(--kh-brand-tint-18);
  background: var(--kh-brand-tint-08);
}

@media (max-width: 720px) {
  .quick-match-head {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-match-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════════
   HOWTO — Manual de usuario estilo Apple-scroll storytelling
   ════════════════════════════════════════════════════════════════ */
.howto-section {
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.howto-steps {
  margin-left: var(--section-offset);
}

.howto-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(123, 92, 250, 0.06), transparent 70%);
  pointer-events: none;
}

.howto-headline {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.8px;
  margin: 0 0 12px;
}

.howto-sub {
  font-size: 17px;
  color: var(--text-soft);
  max-width: 520px;
  margin: 0 auto;
}

/* Steps container */
.howto-steps {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Vertical connector line */
.howto-steps::before {
  content: '';
  position: absolute;
  left: 39px;
  top: 60px;
  bottom: 60px;
  width: 2px;
  background: linear-gradient(to bottom,
      rgba(123, 92, 250, 0) 0%,
      rgba(123, 92, 250, 0.3) 10%,
      rgba(123, 92, 250, 0.3) 90%,
      rgba(123, 92, 250, 0) 100%);
}

/* Individual step */
.howto-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  align-items: flex-start;
  padding: 32px 0;
  position: relative;
}

.howto-step+.howto-step {
  border-top: 1px solid var(--border);
}

/* Alternating layout for visual interest */
.howto-step--alt {
  background: rgba(255, 255, 255, 0.012);
  border-radius: 20px;
  padding: 32px 24px;
  margin: 0 -24px;
  border-top: none !important;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] .howto-step--alt {
  background: rgba(0, 0, 0, 0.018);
  border-color: rgba(0, 0, 0, 0.06);
}

/* Premium step */
.howto-step--premium {
  background: linear-gradient(135deg, rgba(197, 203, 214, 0.08), rgba(197, 203, 214, 0.02));
  border: 1px solid rgba(197, 203, 214, 0.30) !important;
  border-radius: 20px;
  padding: 32px 24px;
  margin: 16px -24px 0;
}

/* Visual column (step number + icon) */
.howto-step-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.howto-step-num-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(123, 92, 250, 0.12);
  border: 1.5px solid rgba(123, 92, 250, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.howto-step-num-wrap--gold {
  background: rgba(201, 168, 76, 0.15);
  border-color: rgba(201, 168, 76, 0.38);
}

.howto-step-num-wrap--silver {
  background: rgba(197, 203, 214, 0.18);
  border-color: rgba(197, 203, 214, 0.38);
}

.howto-step-num {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--kh-brand-tint-18, rgba(123, 92, 250, 0.9));
  opacity: 0.85;
}

.howto-step-num-wrap--gold .howto-step-num {
  color: var(--gold-light, #E7B552);
}

.howto-step-num-wrap--silver .howto-step-num {
  color: var(--silver-500);
}

.howto-step-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.howto-step:hover .howto-step-icon {
  background: rgba(123, 92, 250, 0.08);
  border-color: rgba(123, 92, 250, 0.22);
  transform: translateY(-2px);
}

.howto-step-icon--gold {
  color: var(--gold-light, #E7B552);
  background: rgba(201, 168, 76, 0.08);
  border-color: rgba(201, 168, 76, 0.22);
}

.howto-step:hover .howto-step-icon--gold {
  background: rgba(201, 168, 76, 0.14);
  border-color: rgba(201, 168, 76, 0.35);
}

.howto-step-icon--silver {
  color: var(--silver-light);
  background: rgba(197, 203, 214, 0.10);
  border-color: rgba(197, 203, 214, 0.30);
}

.howto-step:hover .howto-step-icon--silver {
  background: rgba(197, 203, 214, 0.16);
  border-color: rgba(197, 203, 214, 0.45);
}

/* Body column */
.howto-step-body {
  padding-top: 8px;
}

.howto-step-title {
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.howto-step-desc {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.65;
  margin: 0 0 16px;
  max-width: 540px;
}

/* Checklist */
.howto-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.howto-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-soft);
}

.howto-check {
  color: rgba(74, 222, 128, 0.85);
  font-weight: 900;
  font-size: 13px;
  flex-shrink: 0;
}

/* Tags */
.howto-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.howto-tag {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(123, 92, 250, 0.10);
  border: 1px solid rgba(123, 92, 250, 0.20);
  color: var(--text-soft);
}

.howto-tag--gold {
  background: rgba(201, 168, 76, 0.12);
  border-color: rgba(201, 168, 76, 0.28);
  color: var(--gold-light, #E7B552);
}

/* Flow diagram */
.howto-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.howto-flow-chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.howto-flow-chip--hl {
  background: rgba(123, 92, 250, 0.15);
  border-color: rgba(123, 92, 250, 0.3);
  color: var(--text);
}

.howto-flow-arrow {
  color: var(--text-muted, rgba(237, 240, 248, 0.38));
  font-size: 16px;
  font-weight: 300;
}

/* Rep preview */
.howto-rep-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.hrp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-soft);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .hrp-row {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.06);
}

.hrp-row--gold {
  background: rgba(201, 168, 76, 0.07);
  border-color: rgba(201, 168, 76, 0.18);
}

.hrp-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* Gold badge inline */
.howto-badge-gold {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(201, 168, 76, 0.13);
  border: 1px solid rgba(201, 168, 76, 0.30);
  color: var(--gold-light, #E7B552);
  vertical-align: middle;
}

.howto-badge-silver {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(197, 203, 214, 0.16);
  border: 1px solid rgba(197, 203, 214, 0.35);
  color: var(--silver-500);
  vertical-align: middle;
}

/* ── Responsive howto ──────────────────────────────────── */
@media (max-width: 700px) {
  .howto-steps::before {
    display: none;
  }

  .howto-step {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .howto-step-visual {
    flex-direction: row;
  }

  .howto-step--alt,
  .howto-step--premium {
    margin: 8px 0;
  }
}

/* ════════════════════════════════════════════════════════════════
   FAQ — acordeón animado accesible
   ════════════════════════════════════════════════════════════════ */
.faq-section {
  padding: 80px 0 100px;
  border-top: 1px solid var(--border);
  position: relative;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

/* FAQ question button */
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  text-align: left;
  transition: color 0.2s;
  line-height: 1.4;
}

.faq-q:hover {
  color: rgba(123, 92, 250, 0.9);
}

.faq-q[aria-expanded="true"] {
  color: var(--text);
}

/* Chevron animation */
.faq-chevron {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--text-soft);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
}

.faq-q[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: rgba(123, 92, 250, 0.8);
}

/* FAQ answer panel — animated via max-height trick */
.faq-a {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease, padding 0.28s ease;
  padding: 0;
}

/* When shown (JS removes [hidden] and adds .faq-open) */
.faq-a.faq-open {
  max-height: 800px;
  opacity: 1;
  padding: 0 0 20px;
}

.faq-a p {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0 0 10px;
}

.faq-a p:last-child {
  margin-bottom: 0;
}

.faq-a ul {
  margin: 8px 0 10px 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.faq-a li {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
}

.faq-a a {
  color: rgba(123, 92, 250, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-a a:hover {
  color: rgba(123, 92, 250, 1);
}

/* FAQ call to action */
.faq-cta {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.faq-cta p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
}

/* ════════════════════════════════════════════════════════════════
   MEJORAS GLOBALES DE RENDIMIENTO Y DISEÑO
   ════════════════════════════════════════════════════════════════ */

/* Scrollbar premium (solo webkit) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(123, 92, 250, 0.22);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(123, 92, 250, 0.38);
}

/* Selección de texto con color de marca */
::selection {
  background: rgba(123, 92, 250, 0.28);
  color: var(--text);
}

/* Smooth scroll nativo */
html {
  scroll-behavior: smooth;
}

/* Stagger reveal animations — accesibilidad respetada */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal.revealed {
    opacity: 1;
    transform: none;
  }

  .reveal[data-delay="1"] {
    transition-delay: 0.08s;
  }

  .reveal[data-delay="2"] {
    transition-delay: 0.16s;
  }

  .reveal[data-delay="3"] {
    transition-delay: 0.24s;
  }

  .reveal[data-delay="4"] {
    transition-delay: 0.32s;
  }
}

/* Mejora de focus visible global */
:focus-visible {
  outline: 2px solid rgba(123, 92, 250, 0.7);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Lazy images — evitar layout shifts */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Nav link "Manual" / "FAQ" — añadir al nav sin romper nada */
.nav-link-manual {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-link-manual:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Hover card lift mejorado (glass-card) ────────────────── */
.glass-card {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

/* Feature card — hover lift más suave */
.feature-card {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

/* Trust card hover */
.trust-card {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}

.trust-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

/* Use case card — subtle scale */
.usecase-card {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.22s ease,
    background 0.22s ease;
}

.usecase-card:hover {
  transform: scale(1.04);
}

/* KPI card counters — bigger impact */
.kpi-card:hover .kpi-value {
  background: linear-gradient(135deg, rgba(123, 92, 250, .95), rgba(74, 222, 128, .85));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Footer mejoras */
.site-footer {
  border-top: 1px solid var(--border);
}

/* ── Botón primario — micro-efecto shimmer ────────────────── */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover::after {
  transform: translateX(100%);
}

/* Botón gold shimmer */
.btn-gold {
  position: relative;
  overflow: hidden;
}

.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.12) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-gold:hover::after {
  transform: translateX(100%);
}

/* ══════════════════════════════════════════════
   NOTIFICACIONES — campana + panel
══════════════════════════════════════════════ */

/* Wrapper relativo para posicionar el panel */
.notif-bell-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* Botón campana */
.notif-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.15s;
}

.notif-bell-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}

.notif-bell-ico {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* Badge rojo unread count */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger, #e55);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg, #0B0F1A);
  animation: notifBadgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

@keyframes notifBadgePop {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

/* Panel desplegable */
.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(18, 26, 45, 0.98) 0%, rgba(11, 17, 32, 0.98) 70%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(5, 10, 22, 0.65), 0 10px 26px rgba(5, 10, 22, 0.35);
  z-index: 300;
  overflow: hidden;
  animation: notifPanelIn 0.2s cubic-bezier(0.34, 1.22, 0.64, 1);
  backdrop-filter: blur(20px);
}

@keyframes notifPanelIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 400px) {
  .notif-panel {
    width: calc(100vw - 28px);
    right: -50px;
  }
}

/* Cabecera del panel */
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(22, 32, 54, 0.95) 0%, rgba(13, 20, 36, 0.6) 100%);
  flex-shrink: 0;
}

.notif-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: #dbe3ff;
  letter-spacing: 0.3px;
}

.notif-mark-all-btn {
  font-size: 11px;
  font-weight: 700;
  color: #7fb0ff;
  background: rgba(127, 176, 255, 0.12);
  border: 1px solid rgba(127, 176, 255, 0.22);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 999px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.notif-mark-all-btn:hover {
  background: rgba(127, 176, 255, 0.2);
  border-color: rgba(127, 176, 255, 0.35);
}

.notif-mark-all-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Lista de notificaciones */
.notif-list {
  overflow-y: auto;
  flex: 1;
}

.notif-list::-webkit-scrollbar {
  width: 3px;
}

.notif-list::-webkit-scrollbar-track {
  background: transparent;
}

.notif-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* Vacío */
.notif-empty {
  padding: 30px 16px;
  text-align: center;
  font-size: 13px;
  color: rgba(219, 227, 255, 0.7);
}

/* Ítem */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition), transform var(--transition);
  position: relative;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

/* Ítem no leído: destello suave en el fondo */
.notif-item--unread {
  background: rgba(43, 86, 180, 0.12);
}

.notif-item--unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(96, 155, 255, 0.9), rgba(52, 92, 180, 0.5));
  border-radius: 0 3px 3px 0;
}

.notif-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: #a7c1ff;
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #e6ecff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-body-text {
  font-size: 12px;
  color: rgba(219, 227, 255, 0.72);
  margin-top: 2px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-when {
  font-size: 11px;
  color: rgba(219, 227, 255, 0.6);
  margin-top: 3px;
  opacity: 0.7;
}

/* Botón ✓ marcar leída */
.notif-item-read {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(219, 227, 255, 0.7);
  font-size: 11px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  margin-top: 2px;
}

.notif-item-read:hover {
  background: rgba(127, 176, 255, 0.2);
  border-color: rgba(127, 176, 255, 0.4);
  color: #e6ecff;
}

/* ══ Ranking modal premium (redesign v2) ══════════════════ */
.modal-ranking-box {
  width: min(560px, 94vw);
  max-width: 560px;
  max-height: 700px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F6F7FB 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #111827;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --kh-corner-size: clamp(52px, 12vw, 110px);
  --kh-corner-opacity: 0.26;
}

.modal-ranking-box .ranking-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding-top: 6px;
  position: relative;
}

.modal-ranking-box .ranking-crown {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(217, 164, 65, 0.35));
}

.modal-ranking-box .ranking-title-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #B07A1B;
}

.modal-ranking-box .ranking-meta {
  font-size: 11.5px;
  color: #6B7280;
  text-align: center;
  padding-right: 0;
  margin-top: -2px;
}

.modal-ranking-box .ranking-close {
  position: absolute;
  right: 14px;
  top: 12px;
  background: #F5F6FA;
  border-color: rgba(15, 23, 42, 0.12);
}

.modal-ranking-box .ranking-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.modal-ranking-box .ranking-list--compact {
  max-height: 440px;
  padding: 12px;
  scroll-padding-bottom: 12px;
  gap: 8px;
  border-radius: 18px;
  background: #F7F8FB;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.modal-ranking-box .rank-chip {
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #F5F6FA;
  color: #374151;
  font-weight: 600;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
}

.modal-ranking-box .rank-chip--active {
  background: rgba(217, 164, 65, 0.22);
  border-color: rgba(217, 164, 65, 0.45);
  color: #5C3A00;
}

.modal-ranking-box .rank-select--chip {
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #F5F6FA;
  font-weight: 600;
}

.modal-ranking-box .leaderboard-item {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 10px 12px;
  min-height: 56px;
}

.modal-ranking-box .leaderboard-item.is-top {
  border-color: rgba(217, 164, 65, 0.45);
  background: rgba(217, 164, 65, 0.08);
  box-shadow: 0 8px 22px rgba(217, 164, 65, 0.10);
}

.modal-ranking-box .leaderboard-right {
  max-width: 180px;
  padding-right: 2px;
}

.modal-ranking-box .ranking-row {
  display: grid;
  grid-template-columns: 30px 44px minmax(140px, 1fr) max-content;
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  width: 100%;
}

.modal-ranking-box .ranking-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F1F3F8;
  border: 1px solid rgba(15, 23, 42, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #111827;
}

.modal-ranking-box .ranking-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: #111827;
  position: relative;
  overflow: hidden;
}

.modal-ranking-box .ranking-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-ranking-box .ranking-avatar.is-top::after {
  content: '👑';
  position: absolute;
  top: -9px;
  right: -6px;
  font-size: 14px;
  color: #D9A441;
  filter: drop-shadow(0 4px 8px rgba(217, 164, 65, 0.35));
}

.modal-ranking-box .ranking-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.modal-ranking-box .ranking-level {
  font-size: 10.5px;
  font-weight: 700;
  color: #8C5F14;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(217, 164, 65, 0.16);
  border: 1px solid rgba(217, 164, 65, 0.35);
  white-space: nowrap;
}

.modal-ranking-box .ranking-user {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-ranking-box .ranking-stats {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  grid-column: 4;
  justify-self: end;
  flex-wrap: nowrap;
}

.modal-ranking-box .ranking-chip {
  background: #F5F6FA;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10.5px;
  color: #374151;
  white-space: nowrap;
}

.modal-ranking-box .ranking-chip--premium {
  background: rgba(217, 164, 65, 0.20);
  color: #7B4F06;
  border-color: rgba(217, 164, 65, 0.35);
  font-weight: 600;
}

@media (max-width: 520px) {
  .modal-ranking-box .ranking-row {
    grid-template-columns: 30px 40px 1fr;
    row-gap: 8px;
  }

  .modal-ranking-box .ranking-stats {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* ══ Ranking redesign v2 — overrides ══════════════════════ */

/* Filtros: activo = negro */
.modal-ranking-box .rank-chip {
  border: 1.5px solid rgba(15, 23, 42, 0.10);
  background: #F5F6FA;
  color: #374151;
  font-weight: 600;
  font-size: 12.5px;
  padding: 7px 16px;
  border-radius: 999px;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.modal-ranking-box .rank-chip--active {
  background: rgba(217, 164, 65, 0.22);
  border-color: rgba(217, 164, 65, 0.48);
  color: #5C3A00;
}

/* Ocultar "Tu posición" */
.modal-ranking-box .ranking-meta {
  display: none;
}

/* Fila: más padding, hover, border-radius 20px */
.modal-ranking-box .leaderboard-item {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 20px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.15s;
}

.modal-ranking-box .leaderboard-item:hover {
  background: #F8F9FF;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.modal-ranking-box .leaderboard-item.is-top {
  border-color: rgba(217, 164, 65, 0.42);
  background: rgba(253, 247, 230, 0.9);
  box-shadow: 0 8px 24px rgba(217, 164, 65, 0.13);
}

.modal-ranking-box .leaderboard-item.is-top:hover {
  background: rgba(253, 247, 220, 1);
}

/* ── Grid: 3 columnas (rank | avatar | contenido) ──────── */
.modal-ranking-box .ranking-row {
  display: grid;
  grid-template-columns: 30px 48px 1fr;
  align-items: center;
  column-gap: 12px;
  width: 100%;
}

/* Número de posición */
.modal-ranking-box .ranking-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #374151;
  flex-shrink: 0;
}

/* Avatar coloreado */
.modal-ranking-box .ranking-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #E5E7EB;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.13);
}

.modal-ranking-box .ranking-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-ranking-box .ranking-avatar-initials {
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
  user-select: none;
}

.modal-ranking-box .ranking-avatar.is-top::after {
  content: '👑';
  position: absolute;
  top: -11px;
  right: -4px;
  font-size: 14px;
  filter: drop-shadow(0 3px 6px rgba(217, 164, 65, 0.4));
}

/* ── Bloque derecho: toda la info en columna ─────────── */
.modal-ranking-box .ranking-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

/* Línea superior: badge nivel + stats + Premium */
.modal-ranking-box .ranking-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

/* Badge de nivel */
.modal-ranking-box .ranking-level-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #6B4F12;
  background: rgba(217, 164, 65, 0.18);
  border: 1px solid rgba(217, 164, 65, 0.28);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.modal-ranking-box .ranking-level-badge--base {
  color: #6B7280;
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.09);
}

/* Stats inline */
.modal-ranking-box .ranking-stat-inline {
  font-size: 11.5px;
  font-weight: 500;
  color: #4B5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Chip Premium */
.modal-ranking-box .ranking-chip--premium {
  display: inline-flex;
  align-items: center;
  background: rgba(217, 164, 65, 0.20);
  color: #7B4F06;
  border: 1px solid rgba(217, 164, 65, 0.35);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Nombre */
.modal-ranking-box .ranking-user {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Compatibilidad legacy */
.modal-ranking-box .ranking-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.modal-ranking-box .ranking-chip {
  background: #F5F6FA;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  color: #374151;
  white-space: nowrap;
}

/* Container lista */
.modal-ranking-box .ranking-list--compact {
  max-height: 480px;
  padding: 8px;
  gap: 5px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.025);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

@media (max-width: 480px) {
  .modal-ranking-box .ranking-row {
    column-gap: 10px;
  }

  .modal-ranking-box .ranking-avatar {
    width: 42px;
    height: 42px;
    font-size: 13px;
  }

  .modal-ranking-box .ranking-stat-inline {
    font-size: 11px;
  }
}

/* Filtros: activo = negro */
.modal-ranking-box .rank-chip {
  border: 1.5px solid rgba(15, 23, 42, 0.10);
  background: #F5F6FA;
  color: #374151;
  font-weight: 600;
  font-size: 12.5px;
  padding: 7px 16px;
  border-radius: 999px;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.modal-ranking-box .rank-chip--active {
  background: #111827;
  border-color: #111827;
  color: #FFFFFF;
}

/* Ocultar "Tu posición" */
.modal-ranking-box .ranking-meta {
  display: none;
}

/* Fila: más padding, hover, border-radius 20px */
.modal-ranking-box .leaderboard-item {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 20px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.15s;
}

.modal-ranking-box .leaderboard-item:hover {
  background: #F8F9FF;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.modal-ranking-box .leaderboard-item.is-top {
  border-color: rgba(217, 164, 65, 0.42);
  background: rgba(253, 247, 230, 0.9);
  box-shadow: 0 8px 24px rgba(217, 164, 65, 0.13);
}

.modal-ranking-box .leaderboard-item.is-top:hover {
  background: rgba(253, 247, 220, 1);
}

/* Grid actualizado */
.modal-ranking-box .ranking-row {
  display: grid;
  grid-template-columns: 34px 54px 1fr auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 0;
  width: 100%;
}

/* Número: sin borde */
.modal-ranking-box .ranking-rank {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #111827;
  flex-shrink: 0;
}

/* Avatar 52px con gradiente dinámico */
.modal-ranking-box .ranking-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #E5E7EB;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

.modal-ranking-box .ranking-avatar-initials {
  font-size: 15px;
  font-weight: 800;
  pointer-events: none;
  user-select: none;
}

.modal-ranking-box .ranking-avatar.is-top::after {
  content: '👑';
  position: absolute;
  top: -12px;
  right: -5px;
  font-size: 15px;
  filter: drop-shadow(0 4px 8px rgba(217, 164, 65, 0.4));
}

/* Nombre: gap aumentado */
.modal-ranking-box .ranking-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

/* Fila de nivel */
.modal-ranking-box .ranking-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* Badge nivel (pill dorado) */
.modal-ranking-box .ranking-level-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #6B4F12;
  background: rgba(217, 164, 65, 0.18);
  border: 1px solid rgba(217, 164, 65, 0.30);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
  letter-spacing: 0.15px;
  flex-shrink: 0;
}

.modal-ranking-box .ranking-level-badge--base {
  color: #6B7280;
  background: rgba(15, 23, 42, 0.055);
  border-color: rgba(15, 23, 42, 0.10);
}

/* Stats: texto plano con separador · */
.modal-ranking-box .ranking-stats {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
  flex-wrap: nowrap;
  white-space: nowrap;
  grid-column: auto;
  max-width: none;
}

.modal-ranking-box .ranking-stat-val {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.modal-ranking-box .ranking-stat-sep {
  font-size: 12px;
  color: #9CA3AF;
  flex-shrink: 0;
}

/* Premium chip */
.modal-ranking-box .ranking-chip--premium {
  background: rgba(217, 164, 65, 0.20);
  color: #7B4F06;
  border: 1px solid rgba(217, 164, 65, 0.38);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 2px;
}

/* Container de lista */
.modal-ranking-box .ranking-list--compact {
  max-height: 460px;
  padding: 10px;
  gap: 6px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

@media (max-width: 520px) {
  .modal-ranking-box .ranking-row {
    grid-template-columns: 28px 46px 1fr;
    row-gap: 8px;
  }

  .modal-ranking-box .ranking-stats {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .modal-ranking-box .ranking-avatar {
    width: 44px;
    height: 44px;
    font-size: 14px;
  }
}

/* ── Type System (global, no HTML changes) ─────────────── */
:root {
  --type-hero-size: clamp(36px, 4.5vw, 60px);
  --type-hero-weight: 800;
  --type-hero-line: 1.08;
  --type-hero-track: -1.4px;

  --type-section-size: clamp(28px, 3.4vw, 42px);
  --type-section-weight: 800;
  --type-section-line: 1.12;
  --type-section-track: -0.8px;

  --type-card-size: clamp(18px, 2.2vw, 24px);
  --type-card-weight: 800;
  --type-card-line: 1.2;
  --type-card-track: -0.4px;

  --type-eyebrow-size: 12px;
  --type-eyebrow-weight: 800;
  --type-eyebrow-track: 1.1px;

  --type-sub-size: clamp(15px, 1.5vw, 17px);
  --type-sub-weight: 500;
  --type-sub-line: 1.6;
}

:where(.hero-title, .hb0-title, .hb2p-title, .hb3-title) {
  font-size: var(--type-hero-size);
  font-weight: var(--type-hero-weight);
  line-height: var(--type-hero-line);
  letter-spacing: var(--type-hero-track);
}

:where(
  .section-header h2,
  .section-header h3,
  .section-title,
  .demo-title,
  .premium-title,
  .kpi-title,
  .rep-title,
  .automatch-hero-v,
  .feed-details-hero-title,
  .profile-hero-name
) {
  font-size: var(--type-section-size);
  font-weight: var(--type-section-weight);
  line-height: var(--type-section-line);
  letter-spacing: var(--type-section-track);
}

:where(
  .card-title h3,
  .modal-title,
  .profile-panel-title,
  .profile-photos-title,
  .feed-section-title,
  .am-rule-title,
  .automatch-premium-title,
  .am-mode-v,
  .am-col-title,
  .automatch-cta-title,
  .preview-title,
  .mvp-created-title,
  .usercard-section-title,
  .notif-panel-title,
  .cookie-panel-title,
  .cookie-option-title,
  .auth-title,
  .premium-modal-howto-title,
  .feed-activity-title
) {
  font-size: var(--type-card-size);
  font-weight: var(--type-card-weight);
  line-height: var(--type-card-line);
  letter-spacing: var(--type-card-track);
}

:where(
  .section-eyebrow,
  .automatch-hero-k,
  .am-mode-k,
  .automatch-settings-title,
  .automatch-premium-tag
) {
  font-size: var(--type-eyebrow-size);
  font-weight: var(--type-eyebrow-weight);
  letter-spacing: var(--type-eyebrow-track);
  text-transform: uppercase;
}

:where(
  .hero-sub,
  .hb2p-sub,
  .hb2p-sub-line,
  .automatch-hero-sub,
  .card-sub,
  .modal-sub,
  .profile-hero-sub,
  .profile-panel-sub,
  .am-mode-sub,
  .am-rule-sub,
  .feed-section-sub,
  .feed-details-hero-sub,
  .auth-subtitle,
  .auth-subtitle--muted,
  .automatch-cta-sub
) {
  font-size: var(--type-sub-size);
  font-weight: var(--type-sub-weight);
  line-height: var(--type-sub-line);
}

/* ═══════════════════════════
   Guided Tutorial (Web)
═══════════════════════════ */
.kh-tutorial {
  position: fixed;
  inset: 0;
  z-index: 12000;
  pointer-events: none;
}

.kh-tutorial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, 0.58);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

.kh-tutorial-highlight {
  position: absolute;
  border-radius: 16px;
  box-shadow:
    0 0 0 9999px rgba(8, 12, 22, 0.65),
    0 0 0 2px rgba(255, 255, 255, 0.12),
    0 18px 45px rgba(0, 0, 0, 0.35);
  transition: all 0.28s ease;
  pointer-events: none;
}

.kh-tutorial-card {
  position: fixed;
  width: min(340px, calc(100vw - 32px));
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.98), rgba(12, 16, 30, 0.97));
  color: #E5E7EB;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  z-index: 12010;
}

.kh-tutorial-step {
  font-size: 11px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
  margin-bottom: 6px;
  font-weight: 700;
}

.kh-tutorial-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #F8FAFC;
}

.kh-tutorial-text {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0 0 12px;
  color: rgba(226, 232, 240, 0.85);
}

.kh-tutorial-optout {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.7);
  margin-bottom: 10px;
}

.kh-tutorial-optout input {
  accent-color: #FBBF24;
}

.kh-tutorial-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 720px) {
  .kh-tutorial-card {
    width: calc(100vw - 24px);
  }
}

/* ── Responsive overrides (staging hotfix) ─────────────────── */
@media (max-width: 820px) {
  .profile-hero-head {
    grid-template-columns: 1fr;
  }

  .profile-hero-about {
    margin-left: 0;
    margin-top: 8px;
  }
}
