/* ========================================
   CamReal — Global Styles
   Dark premium adult videochat theme
   ======================================== */

/* === RESET & TOKENS === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #08080F;
  --surface:      #0F0F1A;
  --card:         #14141F;
  --border:       #23234A;
  --primary:      #6D28D9;
  --primary-h:    #5B21B6;
  --accent:       #EC4899;
  --text:         #F0F0FF;
  --text-muted:   #6B7280;
  --text-faint:   #374151;
  --danger:       #EF4444;
  --danger-h:     #DC2626;
  --success:      #10B981;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 8px 32px rgba(0,0,0,.6);
}

html { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }


/* ========================================
   SHARED COMPONENTS
   ======================================== */

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--text);
}
.logo--sm { font-size: 1rem; }
.logo__text { color: var(--text); }
.logo__wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .1rem;
  line-height: 1.2;
}
.logo__tagline {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--text-muted);
  white-space: nowrap;
}
.age-gate__content .logo__tagline { white-space: normal; }


/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: .9rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s ease-out, transform .12s ease-out, opacity .15s ease-out;
  text-decoration: none;
  white-space: nowrap;
  padding: .65rem 1.25rem;
  line-height: 1;
}
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn--primary:hover { background: var(--primary-h); }

.btn--danger {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
}
.btn--danger:hover { background: rgba(239,68,68,.1); }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover { border-color: var(--text-muted); color: var(--text); }

.btn--lg { padding: .85rem 2rem; font-size: 1rem; border-radius: var(--radius); }
#btn-siguiente svg { transition: transform .15s ease-out; }
#btn-siguiente:not(:disabled):hover svg { transform: translateX(3px); }
.btn--sm { padding: .45rem .85rem; font-size: .8rem; }

/* Icon button */
.icon-btn {
  position: relative;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, transform .12s ease-out;
}
.icon-btn:hover { border-color: var(--text-muted); color: var(--text); }
.icon-btn.muted { background: var(--danger); border-color: var(--danger); color: #fff; }
/* Botón de efectos de sonido: muted = icono apagado con línea diagonal (sin fondo rojo) */
.icon-btn--sounds.muted {
  background: transparent;
  border-color: var(--border);
  color: var(--text-faint);
}
.icon-btn--sounds.muted svg { opacity: .45; }
.icon-btn--sounds.muted::after {
  content: '';
  position: absolute;
  width: 1.6px;
  height: 20px;
  background: var(--danger);
  border-radius: 2px;
  transform: rotate(-45deg);
  opacity: .75;
}
.icon-btn:active { transform: scale(.92); }

/* Badge */
.badge {
  display: inline-block;
  background: rgba(109,40,217,.25);
  color: #A78BFA;
  font-size: .65rem;
  font-weight: 600;
  padding: .2rem .5rem;
  border-radius: 999px;
  letter-spacing: .02em;
  margin-left: .25rem;
  text-transform: uppercase;
}

/* Link */
.link {
  color: #A78BFA;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link:hover { color: var(--text); }

/* Spinner animado de matchmaking */
.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  /* Anillo doble-tono violeta→rosa con arco abierto */
  background: conic-gradient(from 0deg, var(--primary), var(--accent) 55%, transparent 72%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  animation:
    spin .9s linear infinite,
    spinner-glow 1.6s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinner-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(109,40,217,.25); }
  50%      { box-shadow: 0 0 16px 4px rgba(109,40,217,.35); }
}

/* Cuenco del spinner (Double-Bezel): hairline + halo radial sutil detrás del anillo */
.spinner-shell {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner-shell::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.09);
  background: radial-gradient(circle, rgba(109,40,217,.06) 0%, transparent 68%);
}

/* Status badge */
.status-badge {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .3rem .75rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-faint);
}
.status-dot--waiting {
  background: #FBBF24;
  animation: dot-pop .2s ease-out, pulse-yellow 1.5s infinite;
}
.status-dot--connected {
  background: var(--success);
  animation: dot-pop .2s ease-out, pulse-green 2s infinite;
}
.status-dot--searching {
  background: #6D28D9;
  animation: dot-pop .2s ease-out, pulse-purple 1.2s infinite;
}
.status-dot--disconnected {
  background: #EF4444;
}
@keyframes pulse-yellow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,.4); }
  50% { box-shadow: 0 0 0 6px rgba(251,191,36,0); }
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.4); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}
@keyframes pulse-purple {
  0%, 100% { box-shadow: 0 0 0 0 rgba(109,40,217,.4); }
  50% { box-shadow: 0 0 0 6px rgba(109,40,217,0); }
}

/* ========================================
   MATCHMAKING UX — estados de búsqueda
   ======================================== */

/* Botones deshabilitados durante búsqueda (CSS puro, sin JS) */
@keyframes dot-pop {
  from { opacity: 0; transform: scale(.6); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes remote-reveal {
  from { opacity: 0; transform: scale(1.02); }
  to   { opacity: 1; transform: scale(1); }
}

#app-layout:has(.status-dot--searching) #btn-siguiente,
#app-layout:has(.status-dot--searching) #btn-reportar {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(.35);
}

/* Aviso de timeout: sin pareja tras ~30s de búsqueda (lo muestra app.js) */
.search-error {
  margin: 0;
  max-width: 300px;
  font-size: .82rem;
  line-height: 1.4;
  color: #FCA5A5;
  text-align: center;
}
.search-error.hidden { display: none; }
.search-error:not(.hidden) { animation: fade-in .25s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }


/* ========================================
   LANDING PAGE
   ======================================== */

.landing-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.landing-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.landing-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(109,40,217,.18) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(40px);
}

.age-gate {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.age-gate__content {
  max-width: 460px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.age-gate__content .logo {
  font-size: 1.5rem;
  margin-bottom: .25rem;
}

.landing-heading {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.1;
  color: var(--text);
}
.landing-heading em {
  font-style: normal;
  background: linear-gradient(135deg, #6D28D9, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 360px;
}

/* Rules */
.rules-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  width: 100%;
}
.rule-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.rule-item strong { color: var(--text); }
.rule-icon { flex-shrink: 0; font-size: 1rem; margin-top: .05rem; }

/* CTA group */
.cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  width: 100%;
}
.cta-group .btn { width: 100%; justify-content: center; }

.age-confirm {
  margin-bottom: 1.25rem;
}
.age-confirm__label {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.age-confirm__checkbox {
  margin-top: .15rem;
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.disclaimer {
  font-size: .75rem;
  color: var(--text-faint);
  line-height: 1.6;
  max-width: 360px;
}


/* ========================================
   APP PAGE
   ======================================== */

.app-body {
  overflow: hidden;
  height: 100vh;
}

.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* App header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.25rem;
  background: rgba(8,8,15,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
  flex-shrink: 0;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Video area */
.video-area {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}

/* Remote video — fills everything */
.video-box--remote {
  position: absolute;
  inset: 0;
  background: #0a0a12;
}
.video-box--remote video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Transicion de entrada de la pareja (solo transform + opacity) */
#app-layout:has(.status-dot--connected) #remoteVideo {
  animation: remote-reveal .25s ease-out;
}

/* Local video — PiP bottom right */
.video-box--local {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 160px;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.12);
  box-shadow: 0 4px 20px rgba(0,0,0,.6);
  background: #111;
  z-index: 5;
}
.video-box--local video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder inside video boxes */
.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg);
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  z-index: 2;
  transition: opacity .25s ease-out;
}
.video-placeholder--sm {
  font-size: .7rem;
  gap: .4rem;
}
.video-placeholder.hidden { opacity: 0; pointer-events: none; }
.video-placeholder:not(.hidden) { animation: fade-in .2s ease-out; }

/* Disconnect overlay */
.disconnect-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  background: rgba(0,0,0,.75);
  z-index: 10;
  transition: opacity .25s ease-out;
}
.disconnect-overlay.hidden { opacity: 0; pointer-events: none; }
.disconnect-msg {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}
.disconnect-countdown {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
}

/* App controls */
.app-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(8,8,15,.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Upgrade banner */
.upgrade-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .6rem 1.5rem;
  background: linear-gradient(90deg, rgba(109,40,217,.15), rgba(236,72,153,.15));
  border-top: 1px solid rgba(109,40,217,.3);
  font-size: .85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.upgrade-banner__cta {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.upgrade-banner__cta:hover { text-decoration: underline; }

/* ========================================
   BAN OVERLAY
   ======================================== */

.ban-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(8,8,15,.97);
  backdrop-filter: blur(16px);
  align-items: center;
  justify-content: center;
}
.ban-overlay.active { display: flex; }

.ban-card {
  max-width: 400px;
  width: 90%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
.ban-icon { font-size: 3rem; }
.ban-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--danger);
  letter-spacing: -.02em;
}
.ban-message { color: var(--text-muted); font-size: .9rem; line-height: 1.6; }
.ban-timer {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -.03em;
  min-height: 2rem;
}
.ban-sub { font-size: .8rem; color: var(--text-faint); }


/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 480px) {
  .landing-heading { font-size: 1.85rem; }
}

@media (max-width: 767px) {
  /* Full-bleed fixed layout on mobile */
  .app-body { overflow: hidden; height: 100dvh; }

  .app-layout { display: block; height: 100dvh; }

  /* Header: fixed top, compact */
  .app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 30;
    padding: .5rem 1rem;
  }
  /* Hide mic/cam buttons on mobile header — controls are in footer */
  .header-actions { display: none; }

  /* Remote video: full viewport */
  .video-area {
    position: fixed;
    inset: 0;
    z-index: 1;
  }
  .video-box--remote {
    position: absolute;
    inset: 0;
  }
  .video-box--remote video {
    width: 100vw;
    height: 100dvh;
    object-fit: cover;
  }

  /* Local PiP */
  .video-box--local {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 120px;
    height: 160px;
    z-index: 10;
    border-radius: 8px;
    overflow: hidden;
  }

  /* Controls: fixed bottom bar */
  .app-controls {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 20;
    border-top: 1px solid var(--border);
  }
}

/* ========================================
   REPORT MODAL
   ======================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}
.modal-backdrop.hidden { display: none; }
.modal-backdrop:not(.hidden) { animation: fade-in .18s ease-out; }

.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  width: min(420px, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow);
  transform-origin: center;
  animation: pop-in .18s ease-out;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.modal-reasons {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.modal-radio {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: .9rem;
  color: var(--text);
}
.modal-radio:hover { border-color: var(--primary); background: rgba(109,40,217,.08); }
.modal-radio input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; }
.modal-radio:has(input:checked) { border-color: var(--primary); background: rgba(109,40,217,.15); }

.modal-textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: .875rem;
  padding: .75rem 1rem;
  resize: vertical;
  outline: none;
  transition: border-color .15s;
}
.modal-textarea::placeholder { color: var(--text-muted); }
.modal-textarea:focus { border-color: var(--primary); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
}

/* ========================================
   TOAST
   ======================================== */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .875rem;
  padding: .6rem 1.25rem;
  border-radius: 999px;
  z-index: 200;
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease-out, opacity .2s ease-out;
}
.toast:not(.hidden) {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ========================================
   AUTH
   ======================================== */
.auth-wrap { display: flex; align-items: center; position: relative; }

.auth-tabs {
  display: flex;
  gap: .25rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: .25rem;
}
.auth-tab {
  flex: 1;
  padding: .45rem .9rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: .875rem;
  font-family: var(--font);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.auth-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.auth-fields { display: flex; flex-direction: column; gap: .75rem; }

.modal-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: .875rem;
  padding: .75rem 1rem;
  outline: none;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.modal-input::placeholder { color: var(--text-muted); }
.modal-input:focus { border-color: var(--primary); }

.auth-error {
  color: var(--danger);
  font-size: .825rem;
  margin: 0;
}
.auth-error.hidden { display: none; }

/* User avatar circle */
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6D28D9, #EC4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  position: relative;
  user-select: none;
}
.user-avatar.hidden { display: none; }

.avatar-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  min-width: 180px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  z-index: 300;
  transform-origin: top right;
  animation: pop-in .16s ease-out;
}
.avatar-dropdown.hidden { display: none; }

.avatar-email {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0;
  word-break: break-all;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; background: var(--primary); opacity: .6; }
  .status-dot--waiting, .status-dot--connected, .status-dot--searching { animation: none; }
  .search-error:not(.hidden) { animation: none; }
  .video-placeholder:not(.hidden) { animation: none; }
  #app-layout:has(.status-dot--connected) #remoteVideo { animation: none; }
  .avatar-dropdown, .modal-card, .modal-backdrop:not(.hidden) { animation: none; }

  /* Resto de animaciones/transiciones -> instantaneas */
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ========================================
   PREFS PANEL — Preferencias de matchmaking
   ======================================== */

.prefs-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 340px;
}

.prefs-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.prefs-fields {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  width: 100%;
}

.prefs-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .875rem;
  color: var(--text-muted);
}

.prefs-label span {
  flex-shrink: 0;
  min-width: 80px;
}

/* Pref rows with chip groups */
.pref-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}

.pref-row__label {
  flex-shrink: 0;
  min-width: 80px;
  font-size: .8rem;
  color: var(--text-muted);
  padding-top: .45rem;
}

.pref-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: .35rem;
  flex: 1;
}

.pref-chips--wrap {
  flex-wrap: wrap;
}

.pref-chip {
  cursor: pointer;
}

.pref-chip input[type="radio"] {
  display: none;
}

.pref-chip span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: .78rem;
  font-family: var(--font);
  transition: border-color .15s, color .15s, background .15s;
  user-select: none;
  white-space: nowrap;
}

.pref-chip input:checked + span {
  border-color: var(--primary);
  background: rgba(109,40,217,.18);
  color: var(--text);
}

.pref-chip:hover span {
  border-color: var(--primary);
  color: var(--text);
}

.pref-chip--locked span {
  opacity: .45;
  cursor: not-allowed;
}

.pref-chip--locked:hover span {
  border-color: var(--border);
  color: var(--text-muted);
}

.pro-badge {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: linear-gradient(90deg,#6D28D9,#EC4899);
  color: #fff;
  padding: .1em .35em;
  border-radius: 4px;
  line-height: 1;
}

/* Legacy selects kept for fallback */
.prefs-select {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: .875rem;
  padding: .45rem .75rem;
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
}

.prefs-select:focus {
  border-color: var(--primary);
}

.prefs-start-btn {
  width: 100%;
  justify-content: center;
  gap: .5rem;
}

.prefs-searching {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.prefs-searching.hidden { display: none; }

/* Entrada del estado de búsqueda: fade-up + blur en cascada (solo transform/opacity/filter) */
@keyframes search-fade-up {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
.prefs-searching:not(.hidden) > * {
  animation: search-fade-up .7s cubic-bezier(.22, 1, .36, 1) both;
}
.prefs-searching:not(.hidden) > *:nth-child(2) { animation-delay: .08s; }
.prefs-searching:not(.hidden) > *:nth-child(3) { animation-delay: .16s; }
.prefs-searching:not(.hidden) > *:nth-child(4) { animation-delay: .24s; }

.search-relax {
  font-size: .8rem;
  color: var(--accent);
  text-align: center;
}
.search-relax.hidden { display: none; }
.search-relax:not(.hidden) { animation: fade-in .25s ease-out; }

.prefs-change-btn {
  margin-top: .25rem;
  font-size: .75rem;
  opacity: .7;
  transition: opacity .15s ease-out;
}

.searching-title {
  font-size: .95rem;
  font-weight: 300;
  letter-spacing: .28em;
  text-transform: uppercase;
  margin-top: .25rem;
  color: var(--fg);
}

.search-tip {
  font-size: .82rem;
  color: var(--fg-muted);
  text-align: center;
  max-width: 240px;
  line-height: 1.45;
  min-height: 2.5em;
  transition: opacity .4s ease;
}

/* Partner info badge */
.partner-info {
  position: absolute;
  top: .75rem;
  left: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: .3rem .75rem .3rem .5rem;
  font-size: .82rem;
  color: #fff;
  z-index: 10;
  animation: fade-in .3s ease-out;
}
.partner-info.hidden { display: none; }
.partner-info svg, .partner-info img { display: block; }

.prefs-change-btn:hover { opacity: 1; }
