:root {
  --accent: #875bec;
  --accent-dark: #6f42d6;
  --accent-gold: #ffdd82;
  --text: #1b1b18;
  --text-light: #706f6c;
  --border: #e3e3e0;
  --bg: #f7f7f8;
  --card-bg: #ffffff;
  --surface-alt: #f0edfc;
  --input-bg: #ffffff;
  --media-bg: #efefef;
  --avatar-bg: #ddd;
  --danger: #e0245e;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  color-scheme: light;
}

[data-theme="dark"] {
  --accent: #875bec;
  --accent-dark: #9b74f5;
  --accent-gold: #ffdd82;
  --text: #ededed;
  --text-light: #9a9a9a;
  --border: #2a2b31;
  --bg: #16171b;
  --card-bg: #1e1f24;
  --surface-alt: #2a2440;
  --input-bg: #24252b;
  --media-bg: #2a2b31;
  --avatar-bg: #33343a;
  --danger: #ff6b8f;
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background-color .15s ease, color .15s ease;
}

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

img, video, audio { max-width: 100%; display: block; }

.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--avatar-bg);
}
.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 96px; height: 96px; }

.avatar-ring {
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent));
  display: inline-block;
  line-height: 0;
}
.avatar-ring .avatar { border: 2px solid var(--card-bg); }
.avatar-ring-lg { padding: 4px; }
.certified-badge {
  position: absolute; top: -4px; right: -4px; width: 24px; height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.certified-badge-inline {
  position: static; width: 17px; height: 17px;
  display: inline-block; vertical-align: -4px; margin-left: 4px;
  filter: none; flex-shrink: 0;
}
.profile-intro-audio-btn {
  position: absolute; bottom: 0; right: 0; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--card-bg); cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
}
.profile-intro-audio-btn .icon-svg { margin-left: 1px; }
.profile-intro-audio-btn:hover { filter: brightness(1.1); }

/* Layout shells */
.guest-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.guest-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.guest-card-wide {
  max-width: 720px;
  text-align: left;
}
.legal-content {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.legal-content h2 { font-size: 17px; margin: 20px 0 8px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin: 0 0 12px; }
.legal-content .legal-updated { color: var(--text-light); font-size: 13px; margin-bottom: 16px; }
.guest-card h1 {
  font-size: 22px;
  margin: 0 0 4px;
  text-align: center;
}
.guest-logo {
  display: block;
  height: 90px;
  width: auto;
  margin: 0 auto 8px;
}
.guest-card .subtitle {
  color: var(--text-light);
  text-align: center;
  margin-bottom: 24px;
  font-size: 14px;
}
.guest-card .switch-link {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-light);
}
.guest-card .switch-link a { color: var(--accent); font-weight: 600; }

.terms-check {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--text-light); line-height: 1.4;
  margin: 4px 0 16px; cursor: pointer;
}
.terms-check input { margin-top: 3px; flex-shrink: 0; }
.terms-check a { color: var(--accent); font-weight: 600; }

/* App shell */
.app-nav {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-logo { display: flex; align-items: center; flex-shrink: 0; }
.app-logo-img { height: 38px; width: auto; display: block; flex-shrink: 0; }
.app-nav-avatar-link { flex-shrink: 0; }

.logo-dark-img { display: none; }
[data-theme="dark"] .logo-light-img { display: none; }
[data-theme="dark"] .logo-dark-img { display: block; }
.theme-toggle-btn {
  background: none; border: 1px solid var(--border); border-radius: 50%;
  width: 36px; height: 36px; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); flex-shrink: 0;
}
.theme-toggle-btn:hover { background: var(--surface-alt); color: var(--accent); }
.theme-toggle-btn .theme-toggle-icon-dark { display: none; }
[data-theme="dark"] .theme-toggle-btn .theme-toggle-icon-light { display: none; }
[data-theme="dark"] .theme-toggle-btn .theme-toggle-icon-dark { display: inline; }
.theme-toggle-btn-guest { position: fixed; top: 16px; right: 16px; z-index: 10; background: var(--card-bg); box-shadow: var(--shadow); }
.lang-switcher {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}
.app-nav-search {
  flex: 0 1 200px;
  min-width: 70px;
  margin-left: auto;
}
.app-nav-search input {
  width: 100%;
}
.app-main {
  max-width: 640px;
  margin: 24px auto;
  padding: 0 20px 110px;
}
.app-main.wide { max-width: 960px; }

.comment-composer-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.comment-composer-close-btn {
  display: none;
  margin-left: auto;
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--text-light);
  padding: 4px 8px;
}
.comment-form-widget[data-uid="main"].composer-overlay-active {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 151;
  background: var(--card-bg);
  border-top-left-radius: 16px; border-top-right-radius: 16px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  padding: 16px; max-height: 80vh; overflow-y: auto;
}
.comment-form-widget[data-uid="main"].composer-overlay-active .comment-composer-close-btn {
  display: block;
}
body.composer-open { overflow: hidden; }

.floating-nav {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 50; display: flex; align-items: center; gap: 6px;
  background: var(--card-bg); border-radius: 999px; padding: 8px 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  border: 1px solid var(--border);
}
.floating-nav-item {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: var(--text-light);
}
.floating-nav-item.active { background: var(--surface-alt); color: var(--accent); }
.floating-nav-item.floating-nav-avatar { padding: 0; }
.floating-nav-item.floating-nav-avatar img { width: 34px; height: 34px; }
.floating-nav-item.floating-nav-avatar.active { box-shadow: 0 0 0 2px var(--accent); }
.floating-nav-fab {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent));
  color: #fff; font-size: 26px; font-weight: 700; line-height: 1;
  box-shadow: 0 8px 20px rgba(135, 91, 236, 0.45);
  margin: 0 2px;
}

/* Stories */
.story-strip { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 20px; margin-bottom: 4px; }
.story-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 66px; flex-shrink: 0; background: none; border: none; cursor: pointer; }
.story-avatar-ring {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; border-radius: 50%; padding: 3px;
}
.story-avatar-ring .avatar { width: 100%; height: 100%; border: 2px solid var(--card-bg); }
.story-avatar-ring-unseen { background: linear-gradient(135deg, var(--accent-gold), var(--accent)); }
.story-avatar-ring-seen { background: var(--border); }
.story-avatar-ring-add { background: var(--border); }
.story-add-badge {
  position: absolute; bottom: -2px; right: -2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--card-bg);
}
.story-item-label { font-size: 11px; color: var(--text-light); max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.story-viewer {
  position: fixed; inset: 0; z-index: 200; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.story-viewer[hidden] { display: none; }
.story-viewer-progress { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.story-viewer-progress .segment { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.3); overflow: hidden; }
.story-viewer-progress .segment .fill { height: 100%; width: 0%; background: #fff; }
.story-viewer-progress .segment.done .fill { width: 100%; }
.story-viewer-header {
  position: absolute; top: 24px; left: 16px; right: 16px; z-index: 2;
  display: flex; align-items: center; gap: 8px; color: #fff;
}
.story-viewer-header span { font-weight: 600; font-size: 14px; }
.story-viewer-time { font-weight: 400 !important; font-size: 12px !important; color: rgba(255,255,255,0.7); }
.story-viewer-close { margin-left: auto; background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.story-viewer-media { max-width: 100%; max-height: 100%; display: flex; align-items: center; justify-content: center; }
.story-viewer-media img, .story-viewer-media video { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.story-viewer-tap { position: absolute; top: 0; bottom: 0; width: 35%; background: none; border: none; cursor: pointer; z-index: 1; }
.story-viewer-tap-prev { left: 0; }
.story-viewer-tap-next { right: 0; }
.story-viewer-caption {
  position: absolute; bottom: 76px; left: 16px; right: 16px; z-index: 2;
  color: #fff; font-size: 14px; text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.story-viewer-queue {
  position: absolute; bottom: 14px; left: 0; right: 0; z-index: 3;
  display: flex; gap: 10px; overflow-x: auto; padding: 0 16px;
}
.story-viewer-queue[hidden] { display: none; }
.story-viewer-queue-item {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; width: 52px;
}
.story-viewer-queue-item img {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.8); object-fit: cover;
}
.story-viewer-queue-item span {
  font-size: 10px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Flash messages */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
}
.flash-success { background: #e6f8ee; color: #1a7f4b; }
.flash-error { background: #fde8ec; color: var(--danger); }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-light); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=date], input[type=number], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  background: var(--input-bg);
  color: var(--text);
}
textarea { resize: vertical; min-height: 70px; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.field-error { color: var(--danger); font-size: 12px; margin-top: -12px; margin-bottom: 12px; }

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 6px 16px rgba(135, 91, 236, 0.35);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(135, 91, 236, 0.42); }
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; }
.btn-secondary { background: var(--card-bg); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); }
.btn-secondary:hover { background: var(--surface-alt); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-danger { background: var(--danger); box-shadow: 0 6px 16px rgba(224, 36, 94, 0.35); }
.btn-pill { border-radius: 999px; }
.danger-zone { border: 1px solid var(--danger); }
.danger-zone h3 { color: var(--danger); }

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.post-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}
.post-card-header .names { display: flex; flex-direction: column; }
.post-card-header .name { font-weight: 700; font-size: 14px; }
.post-card-header .username { font-size: 12px; color: var(--text-light); }
.post-card-media { background: var(--media-bg); display: flex; align-items: center; justify-content: center; min-height: 120px; overflow: hidden; }
.post-card-media img { width: 100%; }

.audio-waveform-player {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 20px;
}
.audio-waveform-play-btn {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent));
  color: #1b1b18; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(135, 91, 236, 0.35);
}
.audio-waveform-play-btn .icon-svg { margin-left: 1px; }
.audio-waveform-wave { flex: 1; min-width: 0; }
.audio-waveform-time { flex-shrink: 0; font-size: 12px; color: var(--text-light); font-variant-numeric: tabular-nums; }
.audio-waveform-speed-btn {
  flex-shrink: 0; border: 1px solid var(--border); background: var(--card-bg); color: var(--text-light);
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 9px; cursor: pointer;
}
.audio-waveform-speed-btn:hover { color: var(--accent); border-color: var(--accent); }

.gender-pill-group { display: flex; gap: 10px; margin: 8px 0 16px; flex-wrap: wrap; }
.gender-pill { cursor: pointer; }
.gender-pill input { position: absolute; opacity: 0; pointer-events: none; }
.gender-pill span {
  display: inline-block; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-light); background: var(--card-bg);
}
.gender-pill input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.post-card-body { padding: 12px 16px; }
.post-card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.post-card-caption { font-size: 14px; margin-bottom: 8px; }
.post-card-actions { display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--text-light); }
.post-card-actions a { display: flex; align-items: center; gap: 4px; color: var(--text-light); }
.post-card-actions a:hover { color: var(--accent); }
.like-btn { cursor: pointer; border: none; background: none; font-size: 14px; display: flex; align-items: center; gap: 4px; color: var(--text-light); }
.like-btn:hover { color: var(--accent); }
.like-btn.liked { color: var(--danger); font-weight: 700; }
.share-btn { position: relative; cursor: pointer; border: none; background: none; display: flex; align-items: center; color: var(--text-light); margin-left: auto; }
.share-btn:hover { color: var(--accent); }
.repost-btn { cursor: pointer; border: none; background: none; display: flex; align-items: center; gap: 4px; color: var(--text-light); font-size: 14px; }
.repost-btn:hover { color: var(--accent); }
.repost-btn.reposted { color: var(--accent); font-weight: 700; }
.repost-attribution {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-light);
  margin: 0 0 6px 4px;
}
.repost-attribution a { color: var(--text-light); font-weight: 700; }
.repost-attribution a:hover { color: var(--accent); }
.share-btn-copied { color: var(--accent); }
.share-btn-copied::after {
  content: '¡Enlace copiado!'; position: absolute; bottom: 100%; right: 0; margin-bottom: 6px;
  background: var(--text); color: var(--card-bg); font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 6px; white-space: nowrap;
}

.icon-svg { width: 18px; height: 18px; display: block; flex-shrink: 0; }
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 18px; height: 18px; }
.icon-md { width: 21px; height: 21px; }
.icon-heart-filled { display: none; color: var(--danger); }
.liked .icon-heart-outline { display: none; }
.liked .icon-heart-filled { display: block; }
.media-unavailable {
  display: flex; align-items: center; justify-content: center;
  background: var(--media-bg); color: var(--text-light); font-size: 13px;
  padding: 24px; text-align: center; border-radius: 8px;
}

/* Post card options menu */
.post-card-menu { position: relative; margin-left: auto; }
.post-card-menu-btn {
  background: none; border: none; cursor: pointer; font-size: 20px;
  line-height: 1; padding: 4px 8px; color: var(--text-light); border-radius: 6px;
}
.post-card-menu-btn:hover { background: var(--surface-alt); color: var(--text); }
.post-card-menu-dropdown {
  display: none;
  position: absolute; top: 100%; right: 0; z-index: 20;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 190px; overflow: hidden;
}
.post-card-menu-dropdown.open { display: block; }
.post-card-menu-dropdown form { margin: 0; }
.post-card-menu-dropdown button {
  width: 100%; text-align: left; padding: 10px 14px; background: none; border: none;
  cursor: pointer; font-size: 13px; color: var(--text);
}
.post-card-menu-dropdown button:hover { background: var(--bg); }
.post-card-menu-dropdown button.danger { color: var(--danger); }
.post-card-menu-select-form { padding: 8px 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.post-card-menu-select-form label { display: block; font-size: 11px; color: var(--text-light); margin-bottom: 4px; }
.post-card-menu-select-form select { width: 100%; margin: 0; font-size: 13px; }

/* User row */
.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.user-row:last-child { border-bottom: none; }
.user-row .names { flex: 1; }
.user-row .name { font-weight: 700; font-size: 14px; }
.user-row .username { font-size: 12px; color: var(--text-light); }

/* Profile header */
.profile-header { display: flex; gap: 24px; align-items: center; margin-bottom: 24px; }
.profile-header .info { flex: 1; }
.profile-header .name { font-size: 20px; font-weight: 800; }
.profile-header .username { color: var(--text-light); margin-bottom: 8px; }
.profile-stats { display: flex; gap: 20px; margin: 14px 0; max-width: 320px; }
.profile-stats span, .profile-stats a { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--text-light); }
.profile-stats strong { font-size: 18px; font-weight: 800; color: var(--text); line-height: 1.3; }
.profile-stats .stat-label { font-size: 12px; }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.profile-grid a { display: block; aspect-ratio: 1; background: var(--media-bg); overflow: hidden; }
.profile-grid a.grid-featured { grid-column: span 2; aspect-ratio: 2 / 1; }
.profile-grid img { width: 100%; height: 100%; object-fit: cover; }
.grid-type-badge {
  position: absolute; top: 6px; right: 6px; font-size: 15px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}
.grid-featured-badge {
  position: absolute; top: 6px; left: 6px; font-size: 15px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}

/* Profile tabs */
.profile-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.profile-tabs a {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.profile-tabs a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.profile-tabs a:hover { color: var(--text); }

/* Comments */
.comment { padding: 10px 0; border-bottom: 1px solid var(--border); }
.comment-children { margin-left: 40px; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-header .name { font-weight: 700; font-size: 13px; }
.comment-content { font-size: 14px; margin-left: 44px; }
.comment-actions { margin-left: 44px; margin-top: 4px; font-size: 12px; color: var(--text-light); display: flex; gap: 12px; }
.comment-actions button { background: none; border: none; cursor: pointer; color: inherit; font-size: 12px; padding: 0; }
.comment-reply-toggle { font-weight: 600; }
.comment-reply-toggle:hover { color: var(--accent); }
.comment-reply-form { margin: 8px 0 0 44px; }
.comment-reply-form[hidden] { display: none; }
.comment-reply-form .comment-form-panel-text textarea { min-height: 36px; font-size: 13px; resize: vertical; }

/* Conversations */
.conversation-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.conversation-row .preview { color: var(--text-light); font-size: 13px; }

.notification-row {
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius);
  color: var(--text); border-bottom: 1px solid var(--border);
}
.notification-row-unread { background: var(--surface-alt); }
.notification-row-body { flex: 1; min-width: 0; }
.notification-row-time { color: var(--text-light); font-size: 12px; margin-top: 2px; }
.notification-row-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.nav-bell-link { position: relative; flex-shrink: 0; color: var(--text-light); display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; font-size: 19px; }
.nav-bell-link:hover { color: var(--accent); }
.nav-bell-badge {
  position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 999px; background: #e0245e; color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.nav-bell-badge:empty, .nav-bell-badge[hidden] { display: none; }
.chat-window { display: flex; flex-direction: column; height: 60vh; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-bubble { max-width: 70%; padding: 8px 12px; border-radius: 14px; background: var(--surface-alt); font-size: 14px; }
.chat-bubble.mine { align-self: flex-end; background: var(--accent); color: #fff; }
.chat-bubble-meta { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-form input[type=text] { margin-bottom: 0; flex: 1; }

/* Podcasts */
.category-chip-list { display: flex; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.category-chip-circle {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 68px; text-align: center;
}
.category-chip-circle .icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--card-bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; box-shadow: var(--shadow);
}
.category-chip-circle.active .icon { background: var(--accent); border-color: var(--accent); }
.category-chip-circle span:last-child { font-size: 12px; font-weight: 600; color: var(--text-light); }
.category-chip-circle.active span:last-child { color: var(--accent); }
.category-chip { padding: 8px 16px; border-radius: 20px; background: var(--card-bg); border: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.category-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Empty states */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state .icon { font-size: 40px; margin-bottom: 12px; }

/* Pagination (Bootstrap 5 markup) */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; list-style: none; padding: 0; }
.pagination .page-item .page-link {
  display: block; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border);
  font-size: 13px; background: var(--card-bg); color: var(--text);
}
.pagination .page-item.active .page-link { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .page-item.disabled .page-link { color: var(--text-light); opacity: .5; }

/* Admin panel */
.admin-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.admin-nav a {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.admin-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-nav a:hover { color: var(--text); }

.admin-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.admin-stat { padding: 20px; text-align: center; }
.admin-stat strong { display: block; font-size: 28px; color: var(--accent); }
.admin-stat span { font-size: 13px; color: var(--text-light); }

.admin-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.admin-panel { padding: 20px; }
.admin-panel h3 { margin-top: 0; font-size: 15px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table td, .admin-table th { padding: 8px 6px; text-align: left; }
.admin-table-bordered td, .admin-table-bordered th { border-bottom: 1px solid var(--border); }
.admin-table .bar { height: 10px; background: var(--accent); border-radius: 4px; }

/* Ad card */
.ad-card { border: 1px dashed var(--accent); position: relative; }
.ad-card .ad-label {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 11px;
  padding: 2px 8px; border-radius: 10px;
}
.ad-card-html {
  padding: 24px 16px 8px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Comment form tabs + audio recorder */
.comment-form-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.comment-form-tab {
  padding: 6px 14px; border: 1px solid var(--border); background: var(--card-bg);
  border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--text-light);
  cursor: pointer;
}
.comment-form-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.audio-recorder {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--bg);
}
.audio-recorder-status {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-light); margin-bottom: 10px;
}
.audio-recorder-timer { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.audio-recorder-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.audio-filter-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.audio-filter-btn {
  border: 1px solid var(--border); background: var(--card-bg); color: var(--text-light);
  font-size: 12px; font-weight: 600; border-radius: 999px; padding: 5px 12px; cursor: pointer;
}
.audio-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.audio-filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.audio-filter-loading { font-size: 12px; color: var(--text-light); }

.profanity-toast {
  background: var(--surface-alt); color: var(--text); font-size: 12px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px; margin: 6px 0; border: 1px solid var(--border);
  transition: opacity 0.4s;
}
.profanity-toast.fade-out { opacity: 0; }

.calendar-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 16px; }
.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px;
  text-align: center; font-size: 12px; font-weight: 700; color: var(--text-light);
}
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-cell {
  min-height: 78px; border: 1px solid var(--border); border-radius: 8px; padding: 6px;
  background: var(--card-bg); display: flex; flex-direction: column; gap: 2px; overflow: hidden;
}
.calendar-cell-blank { background: none; border: none; }
.calendar-cell-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.calendar-cell-day { font-size: 12px; font-weight: 700; color: var(--text-light); }
.calendar-cell-post {
  font-size: 10px; color: var(--text); background: var(--surface-alt); border-radius: 4px;
  padding: 2px 4px; display: flex; align-items: center; gap: 4px; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
}
.calendar-cell-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.calendar-cell-dot-scheduled { background: var(--accent-gold); }
.calendar-cell-more { font-size: 10px; color: var(--text-light); }
.calendar-legend { display: flex; gap: 20px; margin-top: 16px; font-size: 12px; color: var(--text-light); align-items: center; }
.calendar-legend span { display: flex; align-items: center; gap: 6px; }

.comment-audio-caption { font-size: 13px; color: var(--text-light); font-style: italic; margin: 6px 0 0 44px; }
.audio-caption { margin-top: 10px; font-size: 13px; min-height: 44px; }

.scheduled-banner {
  background: var(--surface-alt); border: 1px solid var(--accent-gold); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px; font-size: 13px; color: var(--text);
}

.camera-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--bg);
  margin-bottom: 16px;
}
.camera-panel video, .camera-panel canvas {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
  display: block;
}
.camera-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.filter-thumb-list {
  display: flex; gap: 10px; overflow-x: auto; padding: 12px 2px 4px;
}
.filter-thumb {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; flex-shrink: 0; width: 64px;
}
.filter-thumb img {
  width: 60px; height: 60px; object-fit: cover; border-radius: 8px;
  border: 2px solid var(--border);
}
.filter-thumb.active img { border-color: var(--accent); }
.filter-thumb span { font-size: 11px; color: var(--text-light); text-align: center; }
.filter-thumb.active span { color: var(--accent); font-weight: 600; }

.sticker-editor-wrap { position: relative; margin: 0 auto; touch-action: none; }
.sticker-editor-canvas { display: block; background: #000; border-radius: 8px; }
.sticker-editor-layer { position: absolute; inset: 0; overflow: hidden; border-radius: 8px; }
.sticker-editor-item-placed {
  position: absolute; transform: translate(-50%, -50%); cursor: grab; user-select: none;
  line-height: 1; touch-action: none;
}
.sticker-editor-emoji {
  display: block; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.45)) drop-shadow(0 0 1px rgba(255,255,255,0.6));
}
.sticker-editor-remove {
  position: absolute; top: -10px; right: -10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger, #e0245e); color: #fff; border: 2px solid #fff; font-size: 13px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.sticker-editor-resize {
  position: absolute; bottom: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff; cursor: nwse-resize;
}
.sticker-editor-palette {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; margin-bottom: 4px;
}
.sticker-editor-item {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card-bg); font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25));
}
.sticker-editor-item:hover { border-color: var(--accent); }

/* Utility */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.flex { display: flex; }
.gap-8 { gap: 8px; }

/* ---- Pantalla de confirmacion de correo ---- */
.verify-box {
    background: var(--surface-2, #f6f7f9);
    border: 1px solid var(--border, #e3e6ea);
    border-radius: 14px;
    padding: 20px 18px;
    text-align: center;
    margin-bottom: 18px;
}

.verify-icon {
    font-size: 34px;
    line-height: 1;
    margin-bottom: 10px;
}

.verify-box p {
    margin: 0 0 6px;
    font-size: 15px;
    word-break: break-word;
}

.verify-hint {
    font-size: 13px;
    opacity: .7;
}

.link-button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--accent, #7b2ff7);
    cursor: pointer;
    text-decoration: underline;
}

/* ---- Verificacion en dos pasos ---- */
.otp-input {
    font-size: 26px;
    letter-spacing: 10px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.two-factor-on {
    display: inline-block;
    background: #e6f8ee;
    color: #1a7f4b;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    margin: 0 0 14px;
}

.resend-form {
    text-align: center;
    margin-top: 12px;
}
