/* Registrar --pct como propiedad tipada para que CSS pueda interpolarla */
@property --pct {
  syntax: '<percentage>';
  initial-value: 0%;
  inherits: false;
}

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Mata el rubber-band / overscroll del documento entero. El scroll vive SOLO
   en los contenedores internos (.feed-list, .edit-body, .modal-body, etc.). */
html, body { overscroll-behavior: none; }

/* Cada región scrolleable contiene su propio scroll (no encadena al padre). */
.feed-list, .edit-body, .modal-body, .profile-body, .uprof-body, .auth-wrap,
.menu-scr-body, .terms-body, .onb-wrap { overscroll-behavior: contain; }

:root {
  --bg: #000000;
  --bg-card: #000000;
  --bg-tab: #000000;
  --bg-surface: #111111;
  --bg-input: #111111;
  --primary: #1A7FE9;
  --primary-light: #60aaff;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --border: #30363d;
  --danger: #f85149;
  --success: #3fb950;
  --tab-height: 68px;
}

body {
  background: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
}

/* ===== PHONE FRAME (web preview) ===== */
#root {
  width: 390px;
  height: 844px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  border-radius: 44px;
  box-shadow: 0 0 0 10px #1a1a1a, 0 0 0 12px #333, 0 40px 100px rgba(0,0,0,0.9);
}

#root::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 108px; height: 22px;
  background: #000000;
  border-radius: 0 0 16px 16px;
  z-index: 999;
}

/* ===== NATIVE APK — full screen + safe areas ===== */
body.native {
  background: var(--bg);
  display: block;
  /* Cascarón BLOQUEADO al viewport: fijo, sin overflow. Así el documento
     nunca scrollea/rebota — solo lo hacen los contenedores internos. Esta es
     LA causa de que "todas las pantallas scrolleaban": antes el body podía
     moverse libremente. */
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  /* Variables de safe area — usadas por headers y tab-bar */
  --sat: max(env(safe-area-inset-top, 0px), 24px);    /* safe area top */
  --sab: max(env(safe-area-inset-bottom, 0px), 12px); /* safe area bottom */
}
body.native #root {
  width: 100vw;
  height: 100dvh;
  border-radius: 0;
  box-shadow: none;
  /* Sin padding — position:absolute de .screen ignora el padding del padre */
}
body.native #root::before { display: none; }

/* Header principal (feed/perfil) — empuja contenido bajo la barra de estado */
body.native .app-header { padding-top: calc(26px + var(--sat)); }

/* Headers de pantallas secundarias */
body.native .back-header      { padding-top: calc(14px + var(--sat)); }
body.native .back-header-auth { padding-top: calc(14px + var(--sat)); }
body.native .uprof-header     { padding-top: calc(14px + var(--sat)); }
body.native .menu-scr-header  { padding-top: calc(14px + var(--sat)); }

/* Onboarding arranca en el tope */
body.native .onb-wrap { padding-top: calc(var(--sat) + 10px); padding-bottom: calc(var(--sab) + 10px); }

/* Modals de bottom-sheet con altura alta — evitar superposición con status bar */
body.native .modal-sheet { padding-top: calc(var(--sat) + 6px); }
body.native .plan-modal-sheet { padding-top: calc(var(--sat) + 6px); padding-bottom: calc(var(--sab) + 24px); }

/* Tab bar — espacio para la barra de navegación del sistema */
body.native .tab-bar {
  height: calc(var(--tab-height) + var(--sab)) !important;
  padding-bottom: var(--sab) !important;
}

/* ===== SCREENS ===== */
.screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.screen.active { display: flex; }

/* ===== AUTH ===== */
.auth-wrap {
  padding: 28px 28px 30px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.logo-title { font-size: 24px; font-weight: 900; letter-spacing: 2px; }
.logo-sub { font-size: 13px; color: var(--text); letter-spacing: 1.5px; }
.auth-logo { text-align: center; margin: 4px 0 20px; }
.auth-logo .logo-box {
  display: inline-block;
  border: 1px solid var(--text-secondary);
  padding: 5px 14px;
  margin-bottom: 6px;
}
.auth-logo-img {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 12px;
}

.auth-form { display: flex; flex-direction: column; gap: 13px; }
.input-group { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}
.field {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 13px 13px 40px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.field:focus { border-color: var(--primary); }
.field::placeholder { color: var(--text-muted); }
.field.no-icon { padding-left: 14px; }

.btn-main {
  background: var(--primary);
  color: white; border: none;
  border-radius: 12px; padding: 14px;
  font-size: 16px; font-weight: 600;
  cursor: pointer; width: 100%;
  transition: opacity 0.2s;
}
.btn-main:hover { opacity: 0.88; }

.divider {
  display: flex; align-items: center;
  gap: 10px; color: var(--text-muted); font-size: 13px;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-link { text-align: center; color: var(--text-secondary); font-size: 14px; margin-top: 6px; }
.auth-link span { color: var(--primary); cursor: pointer; font-weight: 500; }
.check-row {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
}
.check-row input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }

/* ===== HEADER ===== */
.app-header {
  background: var(--bg-tab);
  padding: 26px 12px 9px;
  flex-shrink: 0;
  border-bottom: 0.5px solid var(--border);
  position: relative;
  z-index: 600;
}
.header-row { display: flex; align-items: center; justify-content: space-between; }
.header-side { flex: 1; display: flex; align-items: center; gap: 10px; }
.header-logo-btn { cursor: pointer; }
.header-side.right { justify-content: flex-end; gap: 6px; }
.header-center { display: flex; flex-direction: column; align-items: center; }
/* Variante con logo a la izquierda del título — usado en feed/profile/explore */
.header-center-row {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.header-center-row .header-center-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.h-logo-title {
  border: 1px solid var(--text-secondary);
  border-radius: 18px;
  padding: 5px 17px 5px 18px;
  font-size: 14px; font-weight: 900; letter-spacing: 2.5px;
  background: rgba(255,255,255,0.05);
  color: var(--text); line-height: 1; text-transform: uppercase;
}
.h-logo-sub { font-size: 8px; font-weight: 400; color: var(--text-secondary); margin-top: 3px; letter-spacing: 1px; text-transform: uppercase; }

.icon-btn {
  background: none; border: none; color: var(--text);
  cursor: pointer; padding: 3px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
[data-action="openHamburger"] { color: var(--primary); }

.search-row { padding-top: 10px; }
.search-input {
  width: 100%; background: transparent;
  border: none; border-bottom: 1px solid var(--text-secondary);
  color: var(--text); font-size: 14px; padding: 5px 0; outline: none;
}
.search-input::placeholder { color: var(--text-muted); }

.filter-row {
  display: flex; justify-content: flex-end; gap: 14px;
  padding: 9px 18px;
  background: var(--bg-tab);
  border-bottom: 0.5px solid var(--border);
}
.filter-btn { background: none; border: none; font-size: 13px; cursor: pointer; }
.filter-btn.active { color: var(--primary); font-weight: 700; }
.filter-btn:not(.active) { color: var(--text-secondary); }
.filter-btn-saved.active { color: var(--primary); }

/* ===== FEED ===== */
.feed-list {
  flex: 1; overflow-y: auto;
  min-height: 0;
  padding: 10px 6px 12px;
}
.feed-list::-webkit-scrollbar { display: none; }

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 30px; text-align: center;
  color: var(--text-secondary);
}
.empty-state h3 { font-size: 17px; color: var(--text); margin: 14px 0 6px; }
.empty-state p { font-size: 13px; opacity: 0.7; }

/* ===== UPLOADING STATE ===== */
.uploading-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 2px 6px;
}
.uploading-label {
  font-size: 12px; color: var(--text-secondary);
}
.uploading-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  animation: uploading-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes uploading-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}
/* Subida pendiente por fallo de red: el audio está a salvo en el dispositivo */
.upload-failed-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  padding: 10px 2px 6px;
}
.upload-failed-label {
  font-size: 12px; color: var(--text-secondary);
}
.retry-upload-btn {
  font-size: 12px; font-weight: 600;
  color: #fff; background: var(--primary);
  border: none; border-radius: 8px;
  padding: 6px 14px; cursor: pointer; flex-shrink: 0;
}
.retry-upload-btn:active { opacity: 0.8; }

/* ===== AUDIO CARD ===== */
.audio-card {
  background: var(--bg-card);
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 11px; padding: 3px 10px 6px;
  margin-bottom: 6px; cursor: default;
  transition: border-color 0.2s;
}
.audio-card:hover { border-color: rgba(255,255,255,0.35); }
.audio-card.card-unheard    { border-color: rgba(255,255,255,0.85); }
.audio-card.card-unheard:hover { border-color: #fff; }
.audio-card.card-favorite   { border-color: #f5c842; }
.audio-card.card-favorite:hover { border-color: #f7d460; }
.audio-card.card-bookmarked { border-color: var(--primary); }
.audio-card.card-bookmarked:hover { border-color: #3d9eff; }
.audio-card.card-fav-saved  { border-color: #b44dff; }
.audio-card.card-fav-saved:hover { border-color: #c96bff; }

.card-head { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 1px; }
.card-main { flex: 1; min-width: 0; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: -1px; margin-top: -3px; }
.card-head-right {
  display: flex; align-items: center; gap: 2px; flex-shrink: 0;
  position: relative; top: 10px; /* baja los iconos sin afectar el layout del título */
}
.fav-btn { padding: 3px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 14px;
  flex-shrink: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 74px; height: 74px; font-size: 27px; border-radius: 50%; }

.card-user { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; }
.card-uname {
  font-size: 12px; font-weight: 600;
  min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-date { font-size: 10px; color: var(--text-secondary); margin-top: 1px; }
.card-date-inline {
  font-size: 10px; color: var(--text);
  background: rgba(255,255,255,0.06);
  padding: 3px 9px; border-radius: 6px;
  white-space: nowrap;
}
.tag-sep { color: var(--text-muted); font-weight: 400; }

.card-menu-btn {
  background: none; border: none;
  color: var(--text-secondary); cursor: pointer; padding: 2px;
  position: relative; right: -4px; /* corre solo los 3 puntos a la derecha sin tocar el personPlus */
}

.card-title { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.card-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 11px; line-height: 1.4; }

.audio-dur { font-size: 11px; color: var(--text-secondary); flex-shrink: 0; }

.card-actions { display: flex; gap: 0; align-items: center; margin-top: 3px; }
.act-btn {
  background: none; border: none;
  color: var(--text-secondary);
  cursor: pointer; display: flex; align-items: center;
  gap: 5px; font-size: 13px; padding: 3px 0;
  transition: color 0.2s;
}
.act-btn:hover { color: var(--text); }
.act-btn.liked { color: var(--danger); }

/* ===== Card actions nueva estructura ===== */
/* icon → narrow gap → number → wider gap → next icon */
.act-icon-btn {
  background: none; border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 3px 0;
  transition: color 0.2s;
}
.act-icon-btn:hover { color: var(--text); }
.act-icon-btn.liked { color: var(--danger); }
.act-icon-btn.bookmarked { color: var(--primary); }
.act-icon-btn.active-act { color: var(--text); }

.act-num-btn {
  background: none; border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  padding: 3px 0;
  margin-left: 5px;   /* narrow gap: icon → number */
  margin-right: 14px; /* wider gap: number → next icon */
  transition: color 0.2s;
}
.act-num-btn:hover { color: var(--text); }
.act-num-btn.active-act { color: var(--text); }

/* Heart centrado horizontalmente debajo del play button.
   Play button = 44px ancho, centro a 22px del inicio del card-actions.
   Icon heart = 15px ancho, así que padding-left = 22 - 7.5 ≈ 14.5px */
.heart-btn {
  padding-left: 14.5px;
}

.card-actions-spacer { flex: 1; }

/* Right side: date · bookmark */
.bookmark-btn-right { margin-left: 0; }
/* Icono de agregar usuario en azul (mismo tono que el resto de la UI) */
.tag-add-btn { color: var(--primary); }
.tag-add-btn:hover { color: var(--primary-light); }

/* Menú contextual de audio — bottom sheet (igual que el de grabación) */
.ctx-sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 300;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  backdrop-filter: blur(2px);
}
.ctx-sheet {
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  padding: 8px 0 calc(var(--tab-height) + 16px);
  display: flex; flex-direction: column;
  position: relative;
  animation: sheetUp 0.25s ease;
}
body.native .ctx-sheet { padding-bottom: calc(var(--tab-height) + var(--sab) + 16px); }
.ctx-sheet-handle {
  width: 38px; height: 4px;
  background: var(--border); border-radius: 3px;
  margin: 6px auto 10px;
  flex-shrink: 0;
}
.ctx-item {
  padding: 16px 24px; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  transition: background 0.15s;
  white-space: nowrap;
}
.ctx-item:hover, .ctx-item:active { background: var(--bg-input); }
.ctx-item.danger { color: var(--danger); }
.ctx-item.ctx-cancel {
  justify-content: center;
  color: var(--text-secondary);
  font-weight: 600;
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 16px;
}

/* ===== TAB BAR ===== */
.tab-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: var(--tab-height);
  background: var(--bg-tab);
  border-top: 0.5px solid var(--border);
  display: flex; align-items: center; z-index: 510;
}
/* Dentro de .screen el tab-bar es flex item (no absolute) — así nunca desaparece */
.screen > .tab-bar {
  position: relative;
  flex-shrink: 0;
  left: auto; right: auto; bottom: auto;
  margin-top: auto;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; gap: 3px; padding: 7px 0;
  background: none; border: none;
  color: var(--text-secondary); font-size: 11px;
  transition: color 0.2s;
}
.tab-item.active { color: var(--primary); }
.tab-record {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; gap: 3px; padding: 7px 0;
  background: none; border: none;
  color: var(--text-secondary); font-size: 11px;
}
.tab-icon { position: relative; display: inline-flex; }
.tab-dot {
  position: absolute; top: -3px; right: -3px;
  width: 8px; height: 8px;
  background: var(--danger); border-radius: 50%;
}

/* ===== PROFILE ===== */
.profile-body { flex: 1; overflow-y: auto; min-height: 0; padding-bottom: 80px; }
.profile-body::-webkit-scrollbar { display: none; }

.avatar-xl { width: 80px; height: 80px; font-size: 30px; border-radius: 50%; }

.profile-info-row {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 18px 16px;
  border-bottom: 0.5px solid var(--border);
}
.profile-meta { flex: 1; min-width: 0; }
.profile-fullname { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.profile-email-txt { font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-uname-txt { font-size: 13px; color: var(--primary); font-weight: 500; }

.profile-bio-row {
  padding: 10px 18px 12px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.4;
  border-bottom: 0.5px solid var(--border);
}

.profile-btns { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.pf-btn {
  background: #1a2744; border: 1px solid #253355;
  border-radius: 12px; padding: 14px 18px;
  color: var(--text); font-size: 15px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; gap: 12px;
  transition: background 0.2s; position: relative; width: 100%;
}
.pf-btn:hover { background: #1e2f52; }
.pf-btn-stack { flex-direction: column; align-items: stretch; gap: 3px; }
.pf-btn-main-row { display: flex; align-items: center; gap: 12px; }
.pf-btn-sub { font-size: 11px; color: var(--text-secondary); font-weight: 400; padding-left: 32px; }
.pf-danger {
  background: #2a1a1a !important; border: 1px solid #4a2020 !important;
  color: var(--danger) !important;
}
.pf-danger:hover { background: #351a1a !important; }
.pf-badge {
  margin-left: auto;
  background: var(--primary); color: white;
  border-radius: 10px; min-width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px; font-size: 11px; font-weight: 700;
}
.pf-badge-red { background: var(--danger) !important; }

/* ===== PROFILE STATS ===== */
.profile-stats-row {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 18px;
  border-bottom: 0.5px solid var(--border);
  gap: 0;
}
.pstat-item {
  flex: 1; text-align: center;
}
.pstat-num {
  font-size: 18px; font-weight: 700; color: var(--text);
}
.pstat-label {
  font-size: 11px; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-top: 2px;
}
.pstat-sep {
  width: 1px; height: 32px; background: var(--border);
}

/* ===== RECORDING ===== */
.viz-wrap {
  display: flex; align-items: center;
  gap: 3px; height: 72px;
  margin-bottom: 28px; width: 100%;
  justify-content: center;
}
.viz-bar {
  width: 4px; background: var(--primary);
  border-radius: 3px;
  height: 6px;
  transition: height 0.12s ease;
}
.viz-idle .viz-bar {
  height: 3px !important;
  opacity: 0.2;
  transition: none;
}

.rec-sm {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.rec-sm:hover { border-color: var(--text); color: var(--text); }
.rec-sm-active { border-color: var(--primary) !important; color: var(--primary) !important; }
.rec-native-note {
  font-size: 11px; color: var(--text-secondary);
  background: rgba(255,200,0,0.08); border: 1px solid rgba(255,200,0,0.2);
  border-radius: 6px; padding: 8px 10px; margin-bottom: 12px; line-height: 1.4;
}

/* ===== AVATAR PHOTO (profile pic placeholder) ===== */
.avatar-photo {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
  background-image: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.1) 100%);
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.2), inset 0 -1px 3px rgba(0,0,0,0.3);
  letter-spacing: 0.5px;
}

/* ===== AVATAR STACK ===== */
/* Ancho fijo: cabe 1 círculo, 2 con overlap, o 2 + medio "+N" cortado en el borde derecho */
.avatar-stack {
  display: flex; align-items: center;
  width: 49px; flex-shrink: 0; overflow: hidden;
  margin-top: 4px; /* ajusta verticalmente los globos respecto al título */
}
.avatar-stacked {
  width: 26px; height: 26px; font-size: 10px;
  border: 2px solid var(--bg-card);
  margin-right: -8px; flex-shrink: 0;
}
.avatar-stacked:last-child { margin-right: 0; }
.avatar-more {
  color: white; font-size: 13px; font-weight: 500; cursor: pointer;
  padding: 0 0 0 2px;            /* + más a la izquierda dentro del globo */
  justify-content: flex-start;   /* alinea el contenido al borde izquierdo */
}

.tag-name { color: var(--primary); font-weight: 600; cursor: pointer; }
.card-owner-link {
  color: var(--text); font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.card-you { color: var(--text); font-weight: 600; }
.tags-expand-btn {
  background: none; border: none; padding: 0 2px;
  color: var(--text-muted); font-size: 13px; font-weight: 700;
  cursor: pointer; line-height: 1; flex-shrink: 0;
}
.tags-expand-btn:hover { color: var(--text-secondary); }
.desc-expand-btn {
  background: none; border: none; padding: 0 0 0 2px;
  color: var(--text-muted); font-size: 12px; font-weight: 700;
  cursor: pointer; line-height: inherit; vertical-align: baseline;
}
.desc-expand-btn:hover { color: var(--text-secondary); }

.card-desc-row {
  margin-top: -5px;  /* solo sube la descripción/título del audio */
  margin-bottom: 2px;
}
.card-desc-text {
  font-size: 11px; color: var(--text-secondary); line-height: 1.35;
  display: block; white-space: nowrap; overflow: hidden;
}
.card-desc-text.desc-exp {
  white-space: normal; overflow: visible; text-overflow: clip;
}
.card-dur-right { font-size: 10px; color: var(--text-muted); white-space: nowrap; margin-left: 6px; align-self: center; }

/* ===== PLAYER ROW ===== */
.player-row {
  display: flex; align-items: center; gap: 5px;
  height: 30px; overflow: hidden;
  margin-bottom: 3px;
}
/* « de atrasar 10s alineado verticalmente con el bloque de texto del header */
.player-row > .play-circle-btn + .skip-btn { margin-left: 6px; }
.play-circle-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.38); color: rgba(255,255,255,0.38);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: border-color 0.2s, color 0.2s;
}
.play-circle-btn:hover,
.audio-card:hover .play-circle-btn   { border-color: rgba(255,255,255,0.55); color: rgba(255,255,255,0.55); }

/* Play — 3 estados independientes del borde de la card */
.card-unheard .play-circle-btn       { border-color: rgba(255,255,255,0.85); color: rgba(255,255,255,0.85); }
.card-unheard:hover .play-circle-btn { border-color: #fff; color: #fff; }
.card-active  .play-circle-btn       { border-color: var(--primary); color: var(--primary); }

.skip-btn {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; padding: 4px 1px;
  display: flex; align-items: center;
  transition: color 0.2s;
}
.skip-btn:hover { color: var(--text); }

/* Wrapper que contiene el fill div + el input range */
.sl-track-wrap {
  position: relative;
  flex: 1; min-width: 0; height: 14px;
  display: flex; align-items: center;
}
/* Track de fondo (gris) */
.sl-track-wrap::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 50%;
  height: 4px; transform: translateY(-50%);
  background: var(--border); border-radius: 3px;
  pointer-events: none;
}
/* Fill azul — su width se setea vía JS (funciona en todos los WebViews) */
.sl-fill {
  position: absolute; left: 0; top: 50%;
  height: 4px; transform: translateY(-50%);
  background: var(--primary); border-radius: 3px;
  pointer-events: none; max-width: 100%;
}
.audio-slider {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  width: 100%; height: 100%;
  -webkit-appearance: none; appearance: none;
  background: transparent; outline: none; cursor: pointer;
  padding: 0; margin: 0; z-index: 1;
}
.audio-slider::-webkit-slider-runnable-track {
  height: 4px; background: transparent; border-radius: 3px;
}
.audio-slider::-moz-range-track {
  height: 4px; background: transparent; border-radius: 3px;
}
.audio-slider::-moz-range-progress {
  height: 4px; background: var(--primary); border-radius: 3px;
}

.audio-slider-idle {
  flex: 1; min-width: 0; height: 3px;
  background: var(--border); border-radius: 2px;
  align-self: center;
}
.audio-slider-idle.has-progress {
  background: linear-gradient(to right, var(--primary) var(--pct, 0%), var(--border) var(--pct, 0%));
}
.audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 0; height: 0;
  background: transparent; cursor: pointer;
  border: none;
  box-shadow: none;
  margin-top: -5px;
}
.audio-slider::-moz-range-thumb {
  width: 0; height: 0;
  background: transparent; cursor: pointer;
  border: none;
  box-shadow: none;
}
.sl-elapsed {
  font-size: 10px; color: var(--primary); font-weight: 500;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.sl-total {
  font-size: 10px; color: var(--text-secondary);
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}

/* ===== COMMENTS SECTION ===== */
.active-act { color: var(--primary) !important; }
.tag-count {
  font-size: 11px; color: var(--text-secondary); margin-left: 3px; font-weight: 600;
}
.comments-section {
  border-top: 0.5px solid var(--border);
  padding-top: 8px; margin-top: 4px;
  display: flex; flex-direction: column; gap: 5px;
}
.comments-empty {
  color: var(--text-muted); font-size: 13px; font-style: italic; padding: 4px 0 2px;
}
.comment-line { font-size: 11px; line-height: 1.4; }
.comment-uname { font-weight: 700; color: var(--text); }
.comment-text { color: var(--text-secondary); }
.comment-dots { color: var(--text-muted); }
.comment-more {
  background: none; border: none; color: var(--text-muted);
  font-size: 11px; cursor: pointer; padding: 0;
}
.comment-more:hover { color: var(--text-secondary); }
.comments-empty-inline {
  color: var(--text-muted); font-size: 12px; font-style: italic; padding: 2px 0;
}
.comment-input-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px; padding-top: 8px;
  border-top: 0.5px solid var(--border);
}
.comment-avatar { width: 26px !important; height: 26px !important; font-size: 10px !important; flex-shrink: 0; }
.comment-field {
  flex: 1; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 18px; padding: 7px 13px;
  font-size: 13px; color: var(--text); outline: none;
}
.comment-field::placeholder { color: var(--text-muted); }
.comment-field:focus { border-color: var(--primary); }
.comment-send {
  background: var(--primary); border: none; border-radius: 50%;
  width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: white; padding: 0;
}
.comment-send:hover { opacity: 0.85; }

.desc-more {
  background: none; border: none; color: var(--text-muted);
  font-size: 11px; cursor: pointer; padding: 0;
}
.desc-more:hover { color: var(--text-secondary); }

.likes-section {
  border-top: 0.5px solid var(--border);
  padding-top: 7px; margin-top: 2px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.like-name { font-size: 11px; color: var(--text-secondary); }
.likes-count-btn { font-size: 12px; padding: 0 2px; min-width: 0; }

/* Tag check */
.tag-subtitle {
  font-size: 12px; color: var(--text-secondary);
  text-align: center; margin: -8px 16px 12px;
  line-height: 1.4;
}
.tag-disabled { opacity: 0.38; pointer-events: none; }

.tag-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.tag-check.tagged { background: var(--primary); border-color: var(--primary); }
.bookmarked { color: var(--primary) !important; }

/* ===== TAG MODAL — top-down sheet ===== */

/* Overlay: alineado arriba (sobre-escribe justify-content del modal-overlay genérico) */
.tag-modal-overlay {
  justify-content: flex-start !important;
  padding-top: env(safe-area-inset-top, 28px) !important;
}

/* Sheet: esquinas redondeadas abajo, cae desde arriba, altura automática */
.tag-modal-sheet {
  height: auto !important;
  max-height: 72vh;
  border-radius: 0 0 24px 24px !important;
  padding: 0 !important;
  animation: slideDown 0.28s ease !important;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* Header */
.tag-modal-header {
  padding: 14px 16px 12px;
  width: 100%; box-sizing: border-box;
}
.tag-hdr-row1 {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.tag-modal-title {
  font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.2;
}
.tag-hdr-row2 {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.tag-modal-subtitle {
  font-size: 13px; color: var(--text-secondary); line-height: 1.4;
}
.tag-invite-header-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 0;
  color: var(--primary); font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: underline;
}
.tag-invite-header-link:active { opacity: 0.7; }
/* Botón X inline en header (no absolute) */
.tag-close-btn {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; padding: 4px; line-height: 0; border-radius: 50%;
  flex-shrink: 0;
}
.tag-close-btn:hover { color: var(--text); }

/* Tabs */
.tag-tabs {
  display: flex; width: 100%;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px; flex-shrink: 0;
}
.tag-tab {
  flex: 1; background: none; border: none;
  color: var(--text-secondary); font-size: 14px;
  padding: 10px 4px; cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tag-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Filas de usuario */
.tag-user-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.tag-row-disabled { opacity: 0.38; }
.tag-user-profile {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0; cursor: pointer;
}
.tag-user-profile:hover .tag-user-name { color: var(--primary); }
.tag-user-info { flex: 1; min-width: 0; }
.tag-user-name {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.15s;
}
.tag-user-handle {
  display: block; font-size: 12px; color: var(--text-secondary);
}
.tag-friend-badge {
  font-size: 11px; font-weight: 600;
  color: #4CAF50; border: 1.5px solid #4CAF50;
  border-radius: 20px; padding: 2px 8px;
  white-space: nowrap; flex-shrink: 0;
}
.tag-pending-badge {
  color: var(--text-secondary); border-color: var(--border);
}
.tag-btn {
  background: var(--primary); color: white;
  border: 1.5px solid var(--primary); border-radius: 20px;
  padding: 2px 10px; font-size: 11px; font-weight: 700;
  cursor: pointer; flex-shrink: 0; white-space: nowrap;
  transition: background 0.15s, opacity 0.15s;
  min-width: 72px; text-align: center;
}
.tag-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.tag-btn-on { background: transparent; color: var(--danger); border-color: var(--danger); }

/* Buscar tab */
.tag-search-wrap { padding: 10px 16px 6px; }
.tag-search-input {
  width: 100%; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 14px;
  padding: 9px 14px; outline: none; box-sizing: border-box;
}
.tag-search-input:focus { border-color: var(--primary); }
.tag-empty-msg {
  text-align: center; color: var(--text-secondary);
  font-size: 13px; padding: 28px 24px; line-height: 1.6;
}

/* Footer */
.tag-modal-footer { flex-shrink: 0; padding: 0 16px 12px; }
.tag-footer-sep { height: 1px; background: var(--border); margin: 4px 0 12px; }
.tag-invite-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: none; border: none;
  color: var(--primary); font-size: 14px; font-weight: 600;
  cursor: pointer; padding: 4px 0 12px; width: 100%;
}
.tag-invite-btn:hover { opacity: 0.8; }
.friends-invite-footer {
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.friends-modal-subtitle {
  margin: 0; padding: 4px 16px 10px;
  font-size: 12px; color: var(--text-secondary); line-height: 1.4;
  border-bottom: 1px solid var(--border);
}
.tag-invite-inline {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: none; border: none;
  color: var(--primary); font-size: 14px; font-weight: 600;
  cursor: pointer; width: 100%; padding: 16px 0 8px;
}
.tag-invite-inline:hover { opacity: 0.8; }

/* ===== INLINE CARD PLAYER CONTROLS ===== */

.inline-speed-picker {
  display: flex; gap: 5px;
  padding: 8px 0 4px;
  flex-wrap: wrap;
}
.inline-speed-picker .speed-opt {
  flex: 1; text-align: center;
  padding: 5px 0;
  font-size: 12px; font-weight: 600;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.inline-speed-picker .speed-opt:hover { color: var(--text); border-color: var(--primary); }
.inline-speed-picker .speed-opt.active {
  background: var(--primary); border-color: var(--primary); color: white;
}

/* Speed button */
.speed-btn {
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 5px; color: var(--text-secondary);
  font-size: 10px; font-weight: 600;
  padding: 2px 5px; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.speed-btn:hover { border-color: var(--primary); color: var(--text); }
.speed-btn.active { background: rgba(87,143,202,0.15); border-color: var(--primary); color: var(--primary); }

/* Speed picker popup */
.speed-picker {
  position: absolute;
  bottom: calc(100% + 8px); right: 10px;
  background: var(--bg-tab);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; gap: 4px;
  padding: 6px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
  z-index: 210;
}
.speed-opt {
  background: none; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-secondary);
  font-size: 12px; font-weight: 600;
  padding: 5px 9px; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.speed-opt:hover { background: var(--bg-input); color: var(--text); }
.speed-opt.active {
  background: var(--primary); border-color: var(--primary);
  color: white;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.72);
  z-index: 700; /* sobre header (600) y tab-bar (510) */
  display: flex; flex-direction: column;
  justify-content: flex-end;
  backdrop-filter: blur(3px);
}
.modal-overlay.hidden { display: none; }
.modal-sheet {
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  padding: 14px;
  height: 92%;
  max-height: 92%;
  display: flex; flex-direction: column;
}
.modal-handle {
  width: 40px; height: 4px; background: var(--border);
  border-radius: 2px; margin: 0 auto 14px;
}
.modal-title {
  font-size: 16px; font-weight: 700;
  margin-bottom: 14px; text-align: center;
}
/* ===== TAG CONFIRM DIALOG ===== */
.confirm-dialog {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 24px 20px 16px;
  width: calc(100% - 48px);
  max-width: 320px;
  margin: auto;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}
.confirm-warning {
  font-size: 12px; color: #fff;
  text-align: center; line-height: 1.5;
  opacity: 0.85;
}
.confirm-title {
  font-size: 16px; font-weight: 700;
  text-align: center; color: var(--text);
}
.confirm-msg {
  font-size: 14px; color: var(--text-secondary);
  text-align: center; line-height: 1.5;
}
.confirm-btns {
  display: flex; gap: 10px; margin-top: 4px;
}
.confirm-btn-cancel {
  flex: 1; padding: 12px; border-radius: 10px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.confirm-btn-ok {
  flex: 1; padding: 12px; border-radius: 10px;
  background: var(--primary); border: none;
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: opacity 0.15s;
}
.confirm-btn-cancel:hover { opacity: 0.8; }
.confirm-btn-ok:hover { opacity: 0.85; }

/* ===== EDIT AUDIO MODAL ===== */
.edit-audio-input {
  width: 100%; box-sizing: border-box;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px;
  padding: 12px 14px; font-size: 15px;
  outline: none;
}
.edit-audio-input:focus { border-color: var(--primary); }
.edit-audio-delete {
  width: 100%; padding: 11px; border-radius: 10px;
  background: transparent; border: 1px solid #c0392b;
  color: #e74c3c; font-size: 14px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 6px;
  transition: background 0.15s;
}
.edit-audio-delete:hover { background: rgba(231,76,60,0.12); }

.modal-body { overflow-y: auto; flex: 1; min-height: 0; }
.modal-body::-webkit-scrollbar { display: none; }

.modal-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.mtab {
  flex: 1; padding: 9px; text-align: center;
  font-size: 14px; font-weight: 500;
  cursor: pointer; background: none; border: none;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.mtab.active { color: var(--primary); border-bottom-color: var(--primary); }

.notif-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 0;
  border-bottom: 0.5px solid var(--border);
}
.notif-item:last-child { border-bottom: none; }
.notif-clickable { cursor: pointer; }
.notif-clickable:active { background: rgba(255,255,255,0.04); border-radius: 8px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 5px; }
.notif-dot.read { background: transparent; }
.notif-text { flex: 1; font-size: 13px; line-height: 1.4; }
.notif-text b { font-weight: 600; }
.notif-time { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.notif-actions { display: flex; gap: 6px; margin-top: 7px; }
.btn-accept { background: var(--success); color: white; border: none; border-radius: 6px; padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-reject { background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); border-radius: 6px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.btn-add-friend { display: flex; align-items: center; gap: 4px; background: var(--primary); color: white; border: none; border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.req-sent-label { font-size: 11px; color: var(--text-muted); padding: 6px 4px; white-space: nowrap; }

.friend-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
}
.friend-item:last-child { border-bottom: none; }
.friend-name { font-size: 14px; font-weight: 500; }
.friend-uname { font-size: 12px; color: var(--text-secondary); }

/* ===== EDIT PROFILE ===== */
.edit-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 30px; }
.edit-body::-webkit-scrollbar { display: none; }
.back-header {
  background: var(--bg-tab);
  padding: 14px 16px 13px;
  display: flex; align-items: center; gap: 11px;
  border-bottom: 0.5px solid var(--border);
}
.back-btn {
  background: none; border: none; color: var(--text);
  cursor: pointer; display: flex; align-items: center;
}
.back-title { font-size: 17px; font-weight: 600; }
.edit-avatar-sec {
  display: flex; justify-content: center;
  padding: 22px; position: relative;
}
.edit-avatar-wrap { position: relative; display: inline-block; cursor: pointer; }
.edit-cam {
  position: absolute; bottom: 2px; right: 2px;
  width: 26px; height: 26px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.edit-form { padding: 0 18px; display: flex; flex-direction: column; gap: 13px; }
.field-label {
  font-size: 11px; color: var(--text-secondary);
  margin-bottom: 4px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.edit-field {
  width: 100%; background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 13px;
  color: var(--text); font-size: 15px; outline: none;
  transition: border-color 0.2s;
}
.edit-field:focus { border-color: var(--primary); }
.edit-field-readonly {
  opacity: 0.5; cursor: not-allowed;
  border-style: dashed;
}
.edit-field-readonly:focus { border-color: var(--border); }
.field-required { color: var(--danger, #e63946); font-size: 12px; }
.field-hint {
  font-size: 11px; color: var(--text-muted);
  margin-top: 4px; padding-left: 2px;
}

/* ===== EMAIL VERIFICATION BANNER ===== */
.email-verify-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: linear-gradient(135deg, #1a2a40, #0f1e30);
  border: 1px solid #2a4a7f;
  border-radius: 12px;
  margin: 8px 14px 4px;
  padding: 12px 12px 12px 14px;
}
.email-verify-icon { font-size: 20px; line-height: 1; margin-top: 1px; flex-shrink: 0; }
.email-verify-body { flex: 1; min-width: 0; }
.email-verify-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.email-verify-sub   { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.email-verify-sub strong { color: var(--text); }
.email-verify-actions { display: flex; gap: 6px; }
.email-verify-btn {
  flex: 1; text-align: center;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: var(--text); border-radius: 7px; padding: 5px 8px;
  font-size: 11px; cursor: pointer; white-space: nowrap;
}
.email-verify-done {
  background: rgba(0,122,255,0.2); border-color: rgba(0,122,255,0.4);
  color: #4a9eff;
}
.email-verify-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 14px; cursor: pointer; padding: 0 2px; flex-shrink: 0;
  line-height: 1; margin-top: 1px;
}

/* ===== TOAST ===== */
.toast {
  position: absolute; top: 96px; left: 18px; right: 18px;
  background: #111111; border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 15px;
  font-size: 14px; z-index: 1000;
  animation: slideDown 0.3s ease, fadeOut 0.3s ease 2.5s forwards;
}
.toast.ok { border-left: 3px solid var(--success); }
.toast.err { border-left: 3px solid var(--danger); }

@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { to { opacity: 0; pointer-events: none; } }

/* Context menu overlay */
/* ===== RECORDER SHEET ===== */
.rec-sheet-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 600;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  backdrop-filter: blur(2px);
}
.rec-sheet {
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 56px 22px calc(var(--tab-height) + 24px);
  display: flex; flex-direction: column;
  position: relative;
  min-height: 52vh;
  align-items: center;
  justify-content: center;
  animation: sheetUp 0.3s ease;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.rec-close-btn {
  position: absolute; right: 16px; top: 14px;
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; padding: 4px; line-height: 0;
  border-radius: 50%;
}
.rec-close-btn:hover { color: var(--text); }
.rec-settings-btn {
  position: absolute; left: 16px; top: 14px;
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; padding: 4px; line-height: 0;
  border-radius: 50%;
}
.rec-settings-btn:hover { color: var(--text); }
.rec-sheet-datetime { text-align: center; margin-bottom: 16px; }
.rec-sheet-date { font-size: 13px; color: var(--text-secondary); }
.rec-sheet-time { font-size: 22px; font-weight: 300; color: var(--text); margin-top: 2px; }

.rec-sheet-timer {
  font-size: 38px; font-weight: 300;
  letter-spacing: 4px; color: var(--danger);
  font-variant-numeric: tabular-nums;
  margin-bottom: 32px;
}
.rec-sheet-timer.rec-timer-warn {
  animation: timer-pulse 1s ease-in-out infinite;
}
@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
/* ===== RECORDER SETTINGS PANEL ===== */
.rec-settings-title {
  font-size: 16px; font-weight: 600;
  color: var(--text); text-align: center;
  margin-bottom: 18px; width: 100%;
}
.rec-settings-body {
  width: 100%; flex: 1; overflow-y: auto;
}
.rec-set-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.rec-set-label { font-size: 14px; color: var(--text); }
.rec-set-value { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.rec-set-seg {
  display: flex; background: var(--bg-surface);
  border-radius: 8px; overflow: hidden;
  gap: 2px; padding: 2px;
}
.seg-btn {
  background: none; border: none;
  color: var(--text-secondary);
  padding: 5px 14px; border-radius: 6px;
  font-size: 13px; cursor: pointer;
  transition: all 0.15s;
}
.seg-btn.active { background: var(--primary); color: white; }
.seg-btn-capped { opacity: 0.35; cursor: not-allowed !important; }
.rec-set-cap { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.rec-set-slider {
  width: 100%; margin: 8px 0 4px;
  accent-color: var(--primary); display: block;
}
.rec-set-toggle-row { /* hereda rec-set-row */ }
.rec-toggle {
  width: 44px; height: 26px;
  border-radius: 13px; background: var(--border);
  border: none; cursor: pointer;
  position: relative; flex-shrink: 0;
  transition: background 0.2s;
}
.rec-toggle.on { background: var(--primary); }
.rec-toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: white; transition: left 0.2s;
  pointer-events: none;
}
.rec-toggle.on .rec-toggle-knob { left: 21px; }

.rec-sheet-controls {
  display: flex; align-items: center;
  justify-content: space-between; width: 100%;
  padding: 0 8px;
  margin-bottom: 14px;
}
.rec-side-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 7px; min-width: 64px;
}
.rec-side-label { font-size: 11px; color: var(--text-secondary); }
.rec-main-btn {
  width: 74px; height: 74px; border-radius: 50%;
  border: none; background: var(--danger); color: white;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 26px rgba(248,81,73,0.5);
  transition: all 0.2s;
}
.rec-main-btn.recording {
  background: #1a1a1a;
  border: 3px solid var(--danger);
}
.rec-main-btn:hover { transform: scale(1.05); }

/* ===== AUTH REDESIGN ===== */
.auth-heading {
  margin-bottom: 16px;
}
.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.auth-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}
.auth-forgot {
  text-align: right;
  margin-top: -4px;
  margin-bottom: -2px;
}
.auth-forgot span, .auth-forgot-btn {
  font-size: 13px;
  color: var(--primary-light);
  cursor: pointer;
  background: none; border: none; padding: 4px 0;
}
.auth-forgot span:hover, .auth-forgot-btn:hover { text-decoration: underline; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 2px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s;
}
.btn-google:hover { background: #2a3140; }
.btn-google svg { flex-shrink: 0; }

.auth-disclaimer {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  margin-top: -4px;
}
.auth-link-inline {
  color: var(--primary-light);
  cursor: pointer;
  text-decoration: underline;
}
.auth-link-inline:hover { color: white; }

/* ===== TERMS SCREEN ===== */
#screen-terms {
  overflow-y: auto;
}
.terms-body {
  padding: 10px 22px 30px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
body.native .terms-body { padding-bottom: calc(var(--sab) + 30px); }
.terms-logo {
  text-align: center;
  margin-bottom: 2px;
}
.terms-intro {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  text-align: center;
}
.terms-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.18s, background 0.18s;
}
.terms-card:hover { border-color: var(--primary); background: #1a2030; }
.terms-card-emoji {
  font-size: 26px;
  flex-shrink: 0;
}
.terms-card-info { flex: 1; min-width: 0; }
.terms-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}
.terms-card-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.terms-card-arrow {
  font-size: 22px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.terms-footer-box {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.terms-footer {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.45;
}
.check-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
}

/* ===== USER PROFILE SCREEN ===== */
.uprof-body {
  flex: 1; overflow-y: auto; min-height: 0;
}
.uprof-body::-webkit-scrollbar { display: none; }

.uprof-header {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 24px 22px;
  gap: 3px;
  border-bottom: 1px solid var(--border);
}
.uprof-name {
  font-size: 20px; font-weight: 700;
  margin-top: 10px; color: var(--text);
}
.uprof-username {
  font-size: 14px; color: var(--primary); font-weight: 500;
}
.uprof-bio {
  font-size: 13px; color: var(--text-secondary);
  text-align: center; line-height: 1.45;
  margin-top: 6px; max-width: 86%;
}
.uprof-action {
  margin-top: 18px; width: 100%;
  display: flex; justify-content: center; gap: 8px;
  flex-wrap: wrap;
}
.uprof-friend-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--success); font-weight: 600;
  padding: 8px 18px;
  border: 1.5px solid var(--success);
  border-radius: 20px;
}
.uprof-req-sent {
  font-size: 13px; color: var(--text-muted);
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: none; cursor: default;
}
.uprof-private {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 56px 30px;
  color: var(--text-muted); text-align: center;
}
.uprof-private-title {
  font-size: 16px; font-weight: 600; color: var(--text-secondary);
  margin-top: 4px;
}
.uprof-private-sub {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
  max-width: 220px;
}
.uprof-audios-section { }
.uprof-section-title {
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 14px 16px 8px;
  border-bottom: 1px solid var(--border);
}
.uprof-audio-list { padding: 6px; }

/* ── Amigos en común ─────────────────────────────── */
.uprof-mutual { padding: 0 16px 24px; }
.uprof-mutual-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.uprof-mutual-count {
  background: var(--bg-tab);
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 11px; color: var(--text-muted);
  font-weight: 600; letter-spacing: 0;
}
.uprof-mutual-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.uprof-mutual-item:last-child { border-bottom: none; }
.uprof-mutual-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  line-height: 1.2;
}
.uprof-mutual-handle {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
}
.uprof-mutual-empty {
  padding: 24px 0;
  font-size: 13px; color: var(--text-muted); text-align: center;
}

/* Friend badge in lists */
.friend-badge {
  font-size: 11px; color: var(--success); font-weight: 600;
  padding: 3px 9px;
  border: 1px solid var(--success);
  border-radius: 12px;
  white-space: nowrap; flex-shrink: 0;
}
/* Friend items that navigate to profile */
.friend-item-link { cursor: pointer; }
.friend-item-link:active { background: rgba(255,255,255,0.04); border-radius: 8px; }

/* Buscar hint */
.buscar-hint {
  text-align: center; color: var(--text-muted);
  font-size: 13px; padding: 32px 20px;
  line-height: 1.5;
}

/* Buscar empty state (cuando no hay otros usuarios registrados) */
.buscar-empty {
  text-align: center;
  padding: 28px 24px 16px;
  color: var(--text-secondary);
}
.buscar-empty-icon { font-size: 44px; margin-bottom: 14px; line-height: 1; }
.buscar-empty-title {
  font-size: 15px; font-weight: 600;
  color: var(--text); margin-bottom: 8px;
}
.buscar-empty-sub {
  font-size: 13px; line-height: 1.5;
  margin-bottom: 12px;
}
.buscar-empty-link {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--primary);
  word-break: break-all;
}

/* ===== INVITE LINK (no-results + footer buscar) ===== */
.no-results-block {
  padding: 28px 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.no-results-msg {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 8px;
  text-align: center;
}
.invite-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.15s;
  width: auto;
}
.invite-link-row:active { background: rgba(26,127,233,0.08); }
.invite-link-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(26,127,233,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tag-invite-link {
  width: 100%; justify-content: center;
  margin-bottom: 6px;
  border-top: 1px solid var(--border);
  border-radius: 0; padding-top: 12px;
}
.invite-divider {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding: 4px 2px 4px;
}

/* ===== POST-REC SUCCESS STATE ===== */
.postrec-sheet {
  height: auto !important;
  max-height: 80vh !important;
}

/* ===== SHARE SHEET ===== */
.share-sheet { padding-bottom: 20px; }
.share-sheet-title {
  font-size: 17px; font-weight: 700; color: var(--text);
  text-align: center; padding: 8px 16px 4px;
}
.share-sheet-sub {
  font-size: 13px; color: var(--text-secondary);
  text-align: center; margin-bottom: 24px;
}
.share-options {
  display: flex; justify-content: center; gap: 32px;
  padding: 0 16px 20px;
}
.share-option {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; text-decoration: none;
  color: var(--text);
}
.share-option-icon {
  width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.15s;
}
.share-option-icon:hover { opacity: 0.85; }
.share-wa { background: #25D366; }
.share-copy { background: var(--bg-surface); border: 1px solid var(--border); color: var(--primary); }
.share-option-label { font-size: 12px; color: var(--text-secondary); }
.share-link-box {
  margin: 0 16px 16px; padding: 10px 14px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 10px; font-size: 12px; color: var(--text-secondary);
  word-break: break-all; text-align: center;
}
.postrec-success {
  text-align: center;
  padding: 26px 20px 20px;
}
.postrec-check-icon {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(63,185,80,0.12);
  border: 2px solid var(--success);
  color: var(--success);
  font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.postrec-audio-title {
  font-size: 17px; font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.3;
}
.postrec-audio-meta {
  font-size: 13px; color: var(--text-secondary);
}

/* ===== ABOUT MODAL ===== */
.about-sheet {
  height: auto !important;
  max-height: 85% !important;
  padding-bottom: 24px !important;
  overflow-y: auto;
}
body.native .about-sheet { padding-bottom: calc(var(--sab) + 24px) !important; }
.about-top-row {
  display: flex; align-items: center;
  justify-content: center; position: relative;
  margin-bottom: 20px;
}
.about-close-btn {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; padding: 4px; line-height: 0;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}
.about-close-btn:hover { color: var(--text); background: rgba(255,255,255,0.07); }

/* ===== HAMBURGER DRAWER ===== */
.hbg-overlay {
  position: absolute; inset: 0; z-index: 700;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
}
.hbg-drawer {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 270px; z-index: 701;
  background: var(--bg-card);
  display: flex; flex-direction: column;
  animation: slideInLeft 0.22s ease;
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}
.hbg-header {
  padding: 24px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.hbg-items { flex: 1; padding: 8px 0; }
.hbg-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 20px;
  background: none; border: none;
  color: var(--text); font-size: 15px;
  cursor: pointer; text-align: left;
  transition: background 0.15s;
}
.hbg-item:hover { background: rgba(255,255,255,0.06); }
.hbg-item svg { flex-shrink: 0; color: var(--text-secondary); }
.hbg-footer {
  border-top: 1px solid var(--border);
  padding: 8px 0 16px;
}
.hbg-logout { color: var(--danger) !important; }
.hbg-logout svg { color: var(--danger) !important; }

/* ===== MENU SCREEN ===== */
#screen-menu {
  display: flex; flex-direction: column;
  overflow-y: auto; background: var(--surface);
}
.menu-scr-header {
  display: flex; justify-content: flex-end;
  padding: 10px 8px 0;
  position: sticky; top: 0; z-index: 1;
  background: var(--surface);
}
.menu-scr-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); padding: 8px; line-height: 0;
  border-radius: 50%; transition: background 0.15s;
}
.menu-scr-close:hover { background: rgba(255,255,255,0.08); }
.menu-scr-body {
  flex: 1; overflow-y: auto; padding-bottom: 32px;
}
/* legacy modal close row — kept for compat */
.menu-close-row {
  display: flex; justify-content: flex-end;
  padding: 0 8px 4px;
}
.menu-section-title {
  font-size: 20px; font-weight: 700; color: var(--text);
  padding: 12px 16px 16px;
}
/* ===== MENU USER HEADER ===== */
.menu-user-header {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 8px;
}
.menu-user-info { display: flex; flex-direction: column; gap: 2px; }
.menu-user-name { font-size: 15px; font-weight: 600; color: var(--text); }
.menu-user-handle { font-size: 12px; color: var(--text-secondary); }
.menu-contact-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 14px; color: var(--text-secondary);
  text-decoration: none; cursor: pointer; transition: background 0.15s;
}
.menu-contact-row:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.menu-logout-row {
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 8px; padding: 8px 0 4px;
}
.menu-logout-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; background: none; border: none; cursor: pointer;
  color: var(--danger); font-size: 14px; padding: 10px 16px;
  border-radius: 8px; transition: background 0.15s;
}
.menu-logout-btn:hover { background: rgba(255,255,255,0.05); }
.menu-logout-btn svg { color: var(--danger); }
.menu-version { text-align: center; color: var(--text-secondary); font-size: 11px; padding: 10px 0 2px; opacity: 0.5; }

/* ===== SETTINGS MODAL ===== */
.settings-section { margin-bottom: 24px; }
.settings-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-secondary);
  padding: 0 16px 8px; margin-top: 4px;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 14px; color: var(--text);
}
.settings-row-btn { cursor: pointer; transition: background 0.15s; }
.settings-row-btn:hover { background: rgba(255,255,255,0.05); }
.settings-select {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 4px 8px;
  font-size: 13px; cursor: pointer;
}

/* ===== MODAL TITLE ROW (title + close btn) ===== */
.modal-title-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 12px 4px;
}
.modal-close-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); padding: 6px; line-height: 0;
  border-radius: 50%; transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.modal-close-btn:hover { color: var(--text); background: rgba(255,255,255,0.07); }

/* ===== HELP MODAL ===== */
.help-section { margin-bottom: 20px; }
.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
}
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; font-size: 14px; color: var(--text);
  gap: 8px;
}
.faq-answer {
  padding: 0 16px 14px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.55;
}
.help-contact-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; font-size: 14px; color: var(--text);
  text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}
.help-contact-row:hover { background: rgba(255,255,255,0.05); }
.help-contact-row svg { color: var(--primary); flex-shrink: 0; }

/* ===== RECYCLE BIN ===== */
.recycle-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 12px;
}
.recycle-info { flex: 1; min-width: 0; }
.recycle-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recycle-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.recycle-btn {
  width: 34px; height: 34px; border-radius: 8px; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: opacity 0.15s;
}
.recycle-btn:hover { opacity: 0.8; }
.recycle-btn.restore { background: rgba(76,175,80,0.18); color: #4CAF50; }
.recycle-btn.delete  { background: rgba(244,67,54,0.15);  color: var(--danger); }

.about-logo-sec {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.about-logo-sec img {
  background: transparent;
  border-radius: 50%;
  box-sizing: border-box;
}
.about-app-name {
  font-size: 17px; font-weight: 900;
  letter-spacing: 2.5px; margin-top: 10px; color: var(--text);
}
.about-tagline {
  font-size: 10px; color: var(--text-muted);
  letter-spacing: 1px; text-transform: uppercase;
}
.about-version {
  font-size: 12px; color: var(--text-secondary);
  margin-top: 4px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 12px;
}

.about-links {
  display: flex; flex-direction: column;
  padding: 8px 0;
}
.about-link-item {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 4px;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: background 0.15s;
  border-radius: 8px;
}
.about-link-item:last-child { border-bottom: none; }
.about-link-item:hover { background: rgba(255,255,255,0.04); }
.about-link-icon {
  width: 36px; height: 36px;
  background: var(--bg-input); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 18px;
  flex-shrink: 0;
}
.about-link-body { flex: 1; min-width: 0; }
.about-link-label {
  font-size: 14px; font-weight: 500; color: var(--text);
}
.about-link-value {
  font-size: 12px; color: var(--text-secondary); margin-top: 1px;
}
.about-link-arrow {
  font-size: 22px; color: var(--text-muted);
  flex-shrink: 0;
}

.about-footer {
  text-align: center;
  font-size: 11px; color: var(--text-muted);
  padding-top: 18px;
}

/* ===== BLOCK SCREENS (kill switch / mantenimiento) ===== */
.screen-block {
  justify-content: center;
  align-items: center;
}
.block-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 28px;
  text-align: center;
  gap: 10px;
  max-width: 320px;
}
.block-logo {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  object-fit: cover;
  margin-bottom: 4px;
}
.block-icon {
  font-size: 52px;
  margin: 8px 0;
  line-height: 1;
}
.block-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.block-msg {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.block-eta {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  margin-top: 4px;
}
.block-btn-disabled {
  margin-top: 12px;
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== ONBOARDING ===== */
#screen-onboarding {
  background: var(--bg);
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.onb-wrap {
  /* Posicionamiento absoluto + inset:0 → garantiza que ocupe EXACTAMENTE el
     alto/ancho de la pantalla (sin depender de % heredados, que en algunos
     WebViews no resuelven bien y dejaban el contenido más largo que la pantalla) */
  position: absolute;
  inset: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px 16px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-sizing: border-box;
  overflow: hidden;
}
.onb-content {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow-y: auto;
  padding: 4px 0;
}
.onb-logo-wrap { margin-bottom: 4px; }
.onb-logo {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 6px;
}
.onb-icon-wrap {
  width: 90px; height: 90px;
  border-radius: 28px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.onb-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-top: 2px;
  margin-bottom: 2px;
}
.onb-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-top: 0;
}
.onb-dots {
  display: flex; gap: 8px;
  margin: 14px 0 12px;
  flex-shrink: 0;
}
.onb-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.25s;
}
.onb-dot.active {
  background: var(--primary);
  width: 22px;
  border-radius: 4px;
}
.onb-actions {
  width: 100%;
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.onb-skip {
  background: none; border: none;
  color: rgba(255,255,255,0.55); font-size: 14px;
  cursor: pointer; padding: 4px;
}
.onb-skip:hover { color: rgba(255,255,255,0.85); }

/* ===== EXPLORE SCREEN ===== */
.explore-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  padding-bottom: calc(var(--tab-height) + 12px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.explore-search-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 12px;
  gap: 8px;
  height: 44px;
  flex-shrink: 0;
}
.explore-search-icon { color: var(--text-muted); display: flex; align-items: center; }
.explore-search-input {
  flex: 1;
  background: none; border: none; outline: none;
  color: var(--text); font-size: 15px;
}
.explore-search-input::placeholder { color: var(--text-muted); }
.explore-search-clear {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center;
  padding: 4px;
}
.explore-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 2px;
}
.explore-list { display: flex; flex-direction: column; gap: 2px; }
.explore-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.explore-user-card:hover { background: rgba(255,255,255,0.04); }
.explore-user-info { flex: 1; min-width: 0; }
.explore-user-name {
  font-size: 14px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explore-user-handle {
  font-size: 12px; color: var(--text-secondary); margin-top: 1px;
}
.explore-user-action { flex-shrink: 0; }
.explore-add-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: white; transition: opacity 0.15s;
}
.explore-add-btn:hover { opacity: 0.85; }
.explore-accept-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--success);
  border: none; cursor: pointer;
  color: white; font-size: 12px; font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.explore-accept-btn:hover { opacity: 0.85; }
.explore-friend-badge {
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
  padding: 5px 10px;
  background: rgba(63,185,80,0.12);
  border-radius: 20px;
}
.explore-req-badge {
  font-size: 12px;
  color: var(--text-muted);
  padding: 5px 10px;
  background: var(--bg-input);
  border-radius: 20px;
}
.explore-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 48px 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== AVATAR PICKER SHEET ===== */
.avatar-sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 700; /* sobre header (600) y tab-bar (510) */
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.15s ease;
}
.avatar-sheet {
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  padding-bottom: 24px;
  animation: slideInUp 0.25s ease;
}
/* En Android nativo, respetar la barra de navegación gestual para que
   "Cancelar" no quede tapado/cortado */
body.native .avatar-sheet { padding-bottom: calc(var(--sab) + 24px); }
@keyframes slideInUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.avatar-sheet-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
}
.avatar-sheet-title {
  font-size: 16px; font-weight: 600;
  text-align: center;
  padding: 14px 20px 8px;
  color: var(--text);
}
.avatar-preview-wrap {
  display: flex; justify-content: center;
  padding: 16px 0 8px;
}
.avatar-preview-wrap .avatar-xl {
  width: 84px; height: 84px;
  font-size: 28px;
}
.avatar-sheet-options {
  display: flex; flex-direction: column;
  margin: 8px 16px 0;
  background: var(--bg-input);
  border-radius: 14px;
  overflow: hidden;
}
.avatar-option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 0.5px solid var(--border);
  color: var(--text);
  font-size: 15px;
  transition: background 0.15s;
  user-select: none;
  /* label elements are inline by default; force block/flex layout */
  box-sizing: border-box;
  width: 100%;
}
.avatar-option:last-child { border-bottom: none; }
.avatar-option:hover { background: rgba(255,255,255,0.04); }
.avatar-option-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.avatar-option-arrow {
  margin-left: auto;
  font-size: 20px;
  color: var(--text-muted);
}
.avatar-sheet-cancel {
  display: block;
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  padding: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.avatar-sheet-cancel:hover { background: var(--bg-tab); }

/* Tab bar 4 items */
.tab-bar { gap: 0; }
.tab-bar .tab-item { flex: 1; }

/* ===== REPORT MODAL ===== */
.report-reasons { display: flex; flex-direction: column; gap: 4px; }
.report-reason-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-input);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: background 0.15s;
}
.report-reason-item:hover { background: var(--bg-tab); }
.report-reason-item input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; }

.report-policy-box {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(248,81,73,0.08);
  border: 1px solid rgba(248,81,73,0.25);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  color: var(--danger);
}
.report-policy-text {
  font-size: 12px; line-height: 1.5;
  color: var(--text-secondary); margin: 0;
}
.report-policy-text strong { color: var(--danger); }
.report-accept-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 12px; cursor: pointer;
}
.report-accept-row input[type="checkbox"] {
  accent-color: var(--danger); width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px;
}
.report-accept-text {
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
}

/* ===== USER PROFILE FRIEND ACTIONS ===== */
.uprof-unfriend-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(var(--text-secondary-rgb, 100,100,100),0.08);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.uprof-unfriend-btn:hover { background: var(--bg-tab); }

.uprof-block-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(248,81,73,0.1);
  border: 1px solid rgba(248,81,73,0.25);
  color: var(--danger);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.uprof-block-btn:hover { background: rgba(248,81,73,0.18); }

/* ===== BTN SECONDARY ===== */
.btn-secondary {
  display: block; width: 100%;
  padding: 14px; border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--bg-tab); }

/* ===== INPUT EYE TOGGLE ===== */
.input-eye {
  position: absolute;
  right: 11px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex; align-items: center;
  padding: 5px; border-radius: 6px;
  transition: color 0.15s;
  line-height: 1;
}
.input-eye:hover { color: var(--text); }
/* Field with eye button: extra padding-right */
.input-group:has(.input-eye) .field { padding-right: 42px; }

/* ===== AUTH LOADING STATE ===== */
.btn-main.loading {
  opacity: 0.72;
  cursor: not-allowed;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

/* ===== SPLASH (verificando sesión) ===== */
.splash-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
}
.splash-logo {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
}
.splash-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-top: 10px;
}

/* ===== BTN PHONE ===== */
.btn-phone {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%;
  padding: 13px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-phone:hover { background: var(--bg-input); border-color: var(--text-secondary); }
.btn-phone:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ===== PHONE AUTH SCREEN ===== */
.back-header-auth {
  display: flex; align-items: center;
  padding: 4px 0 12px;
}
.back-header-auth .back-btn {
  background: none; border: none;
  color: var(--text-secondary);
  cursor: pointer; padding: 6px;
  border-radius: 8px; display: flex;
  transition: color 0.15s;
}
.back-header-auth .back-btn:hover { color: var(--text); }
.phone-code-row {
  display: flex; gap: 8px; justify-content: center;
}
.phone-digit {
  width: 44px; height: 56px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 22px; font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}
.phone-digit:focus { border-color: var(--primary); }
.phone-resend {
  font-size: 13px; color: var(--primary);
  cursor: pointer; text-align: center;
  padding: 8px 0; margin-top: 4px;
}
.phone-resend:hover { text-decoration: underline; }
#recaptcha-container { min-height: 0; }

/* ===== MOBILE RESPONSIVE ===== */
/* On real phones, fill the screen instead of the desktop phone-frame */
@media (max-width: 440px) {
  body {
    align-items: flex-start;
    background: var(--bg);
    padding: 0;
  }
  #root {
    width: 100%;
    height: 100dvh; /* dynamic viewport height — excludes browser chrome */
    border-radius: 0;
    box-shadow: none;
  }
  #root::before {
    display: none; /* hide the notch decoration */
  }
}

/* ===== PLAN PLUS MODAL ===== */
.plan-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 600;
  display: flex; align-items: flex-end;
}
.plan-modal-sheet {
  position: relative;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  width: 100%; max-width: 100%; padding: 0 0 24px;
  max-height: 88vh; overflow-y: auto; overflow-x: hidden;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideInUp 0.28s ease;
}
.plan-header {
  text-align: center; padding: 20px 20px 12px;
}
.plan-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #f5a623, #e8851c);
  color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; padding: 4px 12px;
  border-radius: 20px; margin-bottom: 12px;
  text-transform: uppercase;
}
.plan-title { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.plan-subtitle { font-size: 14px; color: var(--text-secondary); }
.plan-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 16px 16px 4px;
}
.plan-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 12px;
  min-width: 0; overflow: hidden; word-break: break-word;
}
.plan-card.featured {
  border-color: #f5a623;
  background: linear-gradient(160deg, rgba(245,166,35,0.08), rgba(232,133,28,0.05));
}
.plan-card-name { font-size: 13px; font-weight: 700; color: var(--text-secondary); letter-spacing: .5px; margin-bottom: 6px; text-transform: uppercase; }
.plan-card.featured .plan-card-name { color: #f5a623; }
.plan-card-price { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.plan-card-price span { font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.plan-feature {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12px; color: var(--text-secondary);
  margin-bottom: 7px; line-height: 1.4;
}
.plan-feature-check { color: var(--success); flex-shrink: 0; margin-top: 1px; }
.plan-feature.plus { color: var(--text); }
.plan-card-current { outline: 2px solid var(--primary); outline-offset: 1px; }
.plan-current-badge { font-size: 9px; font-weight: 600; letter-spacing: .5px; padding: 1px 6px; background: var(--primary); color: #fff; border-radius: 10px; vertical-align: middle; text-transform: lowercase; }
.plan-cta {
  padding: 8px 16px 0;
}
.plan-cta-plus {
  display: block; width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #f5a623, #e8851c);
  border: none; border-radius: 14px;
  color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; margin-bottom: 10px;
  transition: opacity 0.15s;
}
.plan-cta-plus:hover { opacity: 0.9; }
.plan-cta-free {
  display: block; width: 100%; padding: 10px;
  background: none; border: none;
  color: var(--text-secondary); font-size: 13px;
  cursor: pointer;
}
.plan-cta-free:hover { color: var(--text); }
