:root {
  --bg: #08090f;
  --bg-2: #12141f;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.11);
  --border: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(255, 255, 255, 0.22);
  --text: #f5f5fb;
  --text-dim: #9d9dae;
  --accent-1: #a855f7;
  --accent-2: #22d3ee;
  --accent-3: #ec4899;
  --live: #ff3b5c;
  --accent-grad: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --accent-grad-2: linear-gradient(135deg, var(--accent-3), var(--accent-1));
  --success: #34d399;
  --radius-lg: 22px;
  --radius-md: 15px;
  --glass-blur: blur(18px);
  --glow-1: 0 0 0 1px rgba(168, 85, 247, 0.25), 0 8px 24px -8px rgba(168, 85, 247, 0.45);
  --glow-2: 0 0 0 1px rgba(34, 211, 238, 0.25), 0 8px 24px -8px rgba(34, 211, 238, 0.45);
}

* { box-sizing: border-box; }

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.15em;
}
.icon-spin { animation: spin 0.9s linear infinite; }
.icon-label { display: inline-flex; align-items: center; gap: 4px; }

body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(168, 85, 247, 0.28), transparent 45%),
    radial-gradient(circle at 100% 15%, rgba(34, 211, 238, 0.2), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(236, 72, 153, 0.14), transparent 45%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 24px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Slow-drifting aurora glow behind the glass UI — the "alive" ambient
   layer. Fixed + soft-edged (via transparent gradient stops, not a blur
   filter — a blurred fixed layer this large is expensive on real phones)
   so it never affects layout, scroll, or battery life much. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  background:
    radial-gradient(circle at 20% 25%, rgba(168, 85, 247, 0.22), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.18), transparent 38%),
    radial-gradient(circle at 50% 90%, rgba(236, 72, 153, 0.16), transparent 42%);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { opacity: 0.75; }
  50% { opacity: 1; }
  100% { opacity: 0.85; }
}

#app { position: relative; z-index: 1; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-inline-start: 4px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.6);
  animation: livePulse 1.8s ease-out infinite;
  vertical-align: middle;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255, 59, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: rgba(8, 9, 15, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
}
.topbar-start { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar h1 { cursor: pointer; white-space: nowrap; }
/* On sub-screens the back button takes the brand's slot (iOS-style) — six
   topbar icons + back + logo don't fit a 360px phone side by side. */
.topbar-start:has(.back-btn:not(.hidden)) h1 { display: none; }
.back-btn .icon { width: 18px; height: 18px; }
.leaderboard-btn.is-current {
  color: #fff;
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), var(--glow-1);
}

.topbar h1 {
  display: flex;
  align-items: center;
  font-size: 23px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  background: var(--accent-grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.topbar-actions { display: flex; gap: 6px; }

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-inline-start: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24; /* overrides the inherited transparent from .topbar h1's gradient-text-clip */
  animation: none;
}

.more-menu-wrap { position: relative; }
.more-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 20;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--bg-2);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.more-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: start;
  padding: 9px 10px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  border-radius: 10px;
  cursor: pointer;
}
.more-menu button:active { background: var(--surface-strong); }

.leaderboard-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 4px 14px -6px rgba(0, 0, 0, 0.5);
  font-size: 17px;
  color: var(--text);
  cursor: pointer;
  width: 38px;
  height: 38px;
  padding: 0;
  line-height: 1;
  border-radius: 999px;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.leaderboard-btn:active { transform: scale(0.9); background: var(--surface-strong); }

/* Brand + streak + five or six round icons overflowed a 390px phone and made
   the whole page scroll sideways — compact the bar on phone widths. Kept
   after the base .leaderboard-btn rule so it actually wins. */
@media (max-width: 430px) {
  .topbar { padding-inline: 12px; gap: 6px; }
  .topbar h1 { font-size: 20px; }
  .topbar-actions { gap: 4px; flex-shrink: 0; }
  .leaderboard-btn { width: 34px; height: 34px; font-size: 15px; }
  .streak-badge { margin-inline-start: 5px; padding: 2px 6px; font-size: 11px; }
}
@media (max-width: 370px) {
  .topbar { padding-inline: 10px; }
  .topbar h1 { font-size: 18px; }
  .topbar-actions { gap: 3px; }
  .leaderboard-btn { width: 32px; height: 32px; font-size: 14px; }
}

.search-input {
  display: block;
  width: calc(100% - 32px);
  margin: 4px 16px 0;
  padding: 12px 18px;
  padding-inline-start: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239d9dae' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.5' y2='16.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: 18px 18px !important;
  background-position: right 16px center !important;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus { outline: none; border-color: var(--accent-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--glow-2); }

.sort-toggle {
  display: flex;
  gap: 8px;
  padding: 8px 16px 0;
}

.filters {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease, color 0.15s ease, box-shadow 0.2s ease;
}
.filter-chip:active { transform: scale(0.94); }

.filter-chip.active {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-1);
}

.tag-filters { padding-top: 0; margin-top: -2px; }

.tag-filters .filter-chip {
  font-size: 11px;
  padding: 5px 12px;
  color: var(--text-dim);
  background: transparent;
  border-color: var(--border);
}

.tag-filters .filter-chip.active {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--accent-2);
}

.advanced-filters {
  margin: 0 16px 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.meta-filter-group:not(:last-child) { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.meta-filter-label { font-size: 11.5px; font-weight: 700; color: var(--text-dim); margin: 0 0 6px; }
.meta-filter-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.meta-filter-row::-webkit-scrollbar { display: none; }
.meta-filter-row .filter-chip { padding: 6px 12px; font-size: 12px; }

.date-range-row { display: flex; align-items: center; gap: 8px; }
.date-range-row span { font-size: 11.5px; color: var(--text-dim); }
.date-range-row input[type="date"] {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  padding: 7px 8px;
  color-scheme: dark;
}

#homeTop { padding-top: 4px; }

.home-section { margin: 4px 0; }
.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 8px;
}
.home-section-title { font-size: 14px; font-weight: 800; margin: 0; }
.home-section-link {
  background: none;
  border: none;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px;
}

.home-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 6px;
  scrollbar-width: none;
}
.home-strip::-webkit-scrollbar { display: none; }
.home-strip .post-card { flex: 0 0 140px; min-height: 150px; }
/* strips are a teaser — the badges live on the full grid and the idea page */
.home-strip .post-card .badge-row { display: none; }

.home-cta {
  margin: 4px 16px 12px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--glow-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.home-cta p { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--text-dim); flex: 1; min-width: 0; }
.home-cta p .icon { flex-shrink: 0; color: var(--accent-2); }
.home-cta .filter-chip { flex-shrink: 0; }

.notif-mode-row { padding: 0 16px 14px; margin-top: -4px; }
.notif-mode-label { font-size: 12px; color: var(--text-dim); margin: 0 0 8px; }
.notif-mode-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 16px 24px;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 190px;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.25s ease;
}
.post-card:active { transform: scale(0.96); }

/* Glass sheen along the top edge — the "shiny card" cue. */
.post-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  z-index: 2;
}

.post-card .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.post-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.35) 55%, transparent 100%);
  z-index: 1;
}

.bookmark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease, box-shadow 0.2s ease;
}
.bookmark-btn:active { transform: scale(0.88); }
.bookmark-btn.active { background: var(--accent-grad); border-color: transparent; box-shadow: var(--glow-1); }
.bookmark-btn.active .icon { fill: currentColor; }

.post-card .bookmark-btn {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 3;
}

.new-ribbon {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  z-index: 3;
  background: linear-gradient(135deg, var(--live), var(--accent-3));
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 4px 14px -4px rgba(255, 59, 92, 0.65);
}

.detail-head { display: flex; align-items: center; justify-content: space-between; }
.detail-head .category { margin: 0; }

.post-card .meta { position: relative; z-index: 2; padding: 10px 12px 12px; min-width: 0; }
.post-card .title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 6px;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.post-card .category {
  font-size: 10px;
  font-weight: 700;
  margin: 0 0 7px;
}

.detail > .category {
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 10px;
}

/* category is a nominal (not ordinal) field, so each gets its own hue —
   distinct from the ordered risk/speed/difficulty color scales. */
[data-category="فیس‌لس"] { color: #60a5fa; }
[data-category="آواتار و هوش مصنوعی"] { color: #e879f9; }
[data-category="سرگرمی و تریلر"] { color: #fb923c; }
[data-category="قابل تکرار"] { color: #2dd4bf; }
[data-category="شورتس"] { color: #facc15; }
[data-category="لانگ"] { color: #fb7185; }

.badge-row { display: flex; gap: 4px; flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 700;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
}

/* Same green/yellow/red trio across all three editorial factors — good
   value, medium value, bad value — regardless of which field it's for. */
.badge-risk-کم, .badge-speed-سریع, .badge-difficulty-کم {
  background: rgba(52, 211, 153, 0.18); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.35);
}
.badge-risk-متوسط, .badge-speed-متوسط, .badge-difficulty-متوسط {
  background: rgba(251, 191, 36, 0.18); color: #fcd34d; border-color: rgba(251, 191, 36, 0.35);
}
.badge-risk-زیاد, .badge-speed-کند, .badge-difficulty-زیاد {
  background: rgba(248, 113, 113, 0.18); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35);
}

.badge-build { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; border-color: rgba(168, 85, 247, 0.35); }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 16px;
  color: var(--text-dim);
}
.empty-state .empty-icon { font-size: 34px; margin-bottom: 10px; opacity: 0.6; }
.empty-state p { margin: 0; font-size: 13.5px; }

.detail, .leaderboard { padding: 16px; animation: fadeIn 0.2s ease; }
.hidden { display: none !important; }

.detail img.sample {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

.detail h2 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.detail .body {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-dim);
}

.feedback-row { display: flex; gap: 8px; margin: 0 0 14px; }
.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}
.feedback-btn:active { transform: scale(0.94); }
.feedback-btn.active-like { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.4); box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.25); }
.feedback-btn.active-dislike { color: #fca5a5; border-color: rgba(248, 113, 113, 0.4); box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.25); }

.ai-title-box { margin-top: 12px; }
.ai-title-result {
  margin-top: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  font-size: 12.5px;
  line-height: 1.8;
}
.ai-title-result p { margin: 0 0 4px; }

.detail .kit {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 14px;
  border-radius: var(--radius-md);
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 10px;
  color: var(--text);
}

.copy-btn, .telegraph-link, .build-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  margin-inline-end: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: none;
  background: var(--surface-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.copy-btn:active, .telegraph-link:active, .build-btn:active { transform: scale(0.95); }

.telegraph-link { background: var(--accent-grad); color: #fff; border: none; box-shadow: var(--glow-1); }

.build-btn { background: linear-gradient(135deg, var(--success), #10b981); color: #06281c; border: none; box-shadow: 0 8px 24px -8px rgba(52, 211, 153, 0.55); }
.build-count { font-size: 12.5px; color: var(--text-dim); margin-top: 8px; }

.detail .badge-row { margin-bottom: 14px; }
.detail .badge { font-size: 12px; padding: 5px 12px; }

.build-link-box { margin-top: 14px; }
.build-link-label { font-size: 12px; color: var(--text-dim); margin: 0 0 8px; }
.build-link-row { display: flex; gap: 8px; }
.build-link-row input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
}
.build-link-row input:focus { outline: none; border-color: var(--accent-2); }
.build-link-row .copy-btn { margin: 0; white-space: nowrap; }
.build-link-status { font-size: 11px; color: var(--accent-2); margin: 6px 0 0; min-height: 14px; }

.related-channels { margin-top: 16px; }
.related-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  margin: 0 0 8px;
}
.related-list { display: flex; gap: 8px; flex-wrap: wrap; }
.related-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.related-chip:active { transform: scale(0.96); }
.related-weeks { font-size: 10.5px; font-weight: 600; color: var(--accent-2); }

.related-posts { margin-top: 22px; }
.related-posts .related-posts-grid { padding: 0; margin-top: 8px; }

.note-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.note-title { font-size: 12.5px; font-weight: 700; color: var(--text-dim); margin: 0 0 8px; }
.note-box textarea, [data-fold="note"] textarea {
  width: 100%;
  min-height: 70px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  resize: vertical;
}
.note-status { font-size: 11px; color: var(--accent-2); margin: 6px 0 0; min-height: 14px; }

.community { padding: 16px; animation: fadeIn 0.2s ease; }
/* These screens had no side padding, so text and cards ran into the phone's edges. */
.challenges, .proofs, .mentors { padding: 16px; animation: fadeIn 0.2s ease; }
.community h2 { font-size: 18px; font-weight: 800; margin: 0 0 16px; }

.saved { padding: 16px 0; animation: fadeIn 0.2s ease; }
.saved h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px 16px; }
.saved .post-grid { padding-top: 12px; }
.saved .empty-state { padding: 50px 16px; }

.foryou { padding: 16px 0; animation: fadeIn 0.2s ease; }
.foryou h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px 16px; }
.foryou-head { display: flex; align-items: center; justify-content: space-between; padding-inline-end: 16px; }
.foryou-head h2 { margin: 0; }
.foryou .post-grid { padding-top: 12px; }
.foryou .empty-state { padding: 50px 16px; }

.quiz-intro { padding: 0 16px; color: var(--text-dim); font-size: 13px; margin: 0 0 16px; }

.persona-quiz { padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }

.quiz-question {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: 0;
  transition: border-color 0.2s ease;
}
.quiz-question:has(input:checked) { border-color: var(--border-glow); }
.quiz-question legend {
  font-size: 13.5px;
  font-weight: 700;
  padding: 0 4px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 4px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
}
.quiz-option input { width: 16px; height: 16px; accent-color: var(--accent-1); flex-shrink: 0; }
.quiz-option:has(input:checked) { color: var(--text); font-weight: 700; }

.persona-quiz .build-btn { align-self: flex-start; }

.profile-form {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-form-title { font-size: 13.5px; font-weight: 700; margin: 0; }
.toggle-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.toggle-row input { width: 16px; height: 16px; accent-color: var(--accent-1); }

.profile-form textarea, .profile-form input[type="text"] {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  resize: vertical;
}
.profile-form textarea { min-height: 60px; }
.pro-hint { font-size: 11.5px; color: var(--text-dim); margin: 0; }
.pro-checkout-status { font-size: 11px; color: var(--accent-2); margin: -4px 0 0; min-height: 14px; }

.admin-stats { padding: 16px; animation: fadeIn 0.2s ease; }
.admin-stats h2 { font-size: 18px; font-weight: 800; margin: 0 0 16px; }
.admin-section-title { font-size: 13px; font-weight: 700; color: var(--text-dim); margin: 20px 0 8px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.stat-value { font-size: 22px; font-weight: 800; margin: 0; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 11.5px; color: var(--text-dim); margin: 4px 0 0; }

.admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: admin-rank; }
.admin-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
}
.admin-list-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-list-meta { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; }

.admin-header-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.admin-header-row h2 { margin: 0; }
.drafts-entry-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}

.drafts { padding: 16px; animation: fadeIn 0.2s ease; }
.draft-generate-box {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.draft-field-label { font-size: 11.5px; color: var(--text-dim); margin: 6px 0 0; }
.draft-input, .draft-textarea, .draft-select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  resize: vertical;
}
.draft-textarea { min-height: 90px; }
.draft-list { display: flex; flex-direction: column; gap: 14px; }
.draft-card {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.draft-source-link { font-size: 11.5px; color: var(--accent-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 4px; }
.draft-meta-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.draft-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.draft-save-btn, .draft-discard-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.draft-discard-btn { color: #fca5a5; border-color: rgba(248, 113, 113, 0.3); }
.draft-actions .build-btn { margin: 0; padding: 9px 16px; font-size: 12.5px; }
.draft-status { font-size: 11.5px; color: var(--text-dim); min-height: 14px; margin: 2px 0 0; }

.member-list { display: flex; flex-direction: column; gap: 10px; }
.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.member-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.member-name { font-size: 14px; font-weight: 700; margin: 0; }
.member-bio { font-size: 12.5px; color: var(--text-dim); margin: 6px 0; line-height: 1.6; }

.chip-category {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.contact-link, .contact-locked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}
.contact-link { background: var(--accent-grad); color: #fff; text-decoration: none; box-shadow: var(--glow-1); }
.contact-locked { background: var(--surface-strong); color: var(--text-dim); }

.loading, .gate {
  padding: 60px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent-1), var(--accent-2), var(--accent-3), var(--accent-1));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.5));
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.leaderboard h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 16px;
}

.leaderboard ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.leaderboard li:nth-child(1) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(253, 230, 138, 0.3), 0 8px 24px -10px rgba(245, 158, 11, 0.5); }

.leaderboard li::before {
  counter-increment: rank;
  content: counter(rank);
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-strong);
  color: var(--text-dim);
}

.leaderboard ol { counter-reset: rank; }
.leaderboard li:nth-child(1)::before { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #451a03; }
.leaderboard li:nth-child(2)::before { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #1f2937; }
.leaderboard li:nth-child(3)::before { background: linear-gradient(135deg, #fbbf7a, #c2703a); color: #431407; }

.leaderboard .empty { color: var(--text-dim); font-size: 13px; }
.leaderboard-period-row { display: flex; gap: 8px; margin-bottom: 14px; }

/* Achievements (more-menu → دستاوردهای من) */
.badges { padding: 16px; animation: fadeIn 0.2s ease; }
.badges h2 { margin: 0 0 14px; }
.badge-stats-row {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 8px;
}
.badge-tile.locked { opacity: 0.4; filter: grayscale(1); }
.badge-tile-icon { font-size: 22px; }
.badge-tile-icon svg { width: 22px; height: 22px; }
.badge-tile-label { font-size: 11.5px; font-weight: 600; }
.badge-tile-check {
  position: absolute;
  top: 6px;
  left: 6px;
  color: var(--success);
  width: 14px;
  height: 14px;
}

/* Profile completion (Community page) */
.completion-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.completion-label { font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.completion-bar { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.completion-bar-fill { height: 100%; background: var(--accent-grad); border-radius: 999px; transition: width 0.3s ease; }
.completion-missing { font-size: 11.5px; color: var(--text-dim); margin: 8px 0 0; }

/* Compare mode — floating bar + side-by-side view */
.compare-bar {
  position: fixed;
  bottom: 16px;
  inset-inline: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border-glow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.6), var(--glow-1);
}
.compare-bar-items { display: flex; gap: 6px; overflow: hidden; flex: 1; min-width: 0; }
.compare-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-strong);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.compare-bar-item button { border: none; background: none; color: var(--text-dim); cursor: pointer; font-size: 11px; padding: 0; }
.compare-bar .build-btn { margin: 0; padding: 8px 14px; font-size: 12px; white-space: nowrap; }
.compare-bar .build-btn:disabled { opacity: 0.5; }

.compare-view { padding: 16px; animation: fadeIn 0.2s ease; }
.compare-view h2 { font-size: 18px; font-weight: 800; margin: 0 0 16px; }
.compare-titles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.compare-title { font-size: 13px; font-weight: 700; margin: 0; text-align: center; }
.compare-table { display: flex; flex-direction: column; gap: 8px; }
.compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.compare-cell { font-size: 12.5px; text-align: center; }
.compare-row-label { font-size: 10.5px; color: var(--text-dim); white-space: nowrap; }

/* تاریخچه / راهنما / دعوت دوستان */
.history { padding: 16px 0; animation: fadeIn 0.2s ease; }
.history h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px 16px; }
.history .post-grid { padding-top: 12px; }

.referral, .faq { padding: 16px; animation: fadeIn 0.2s ease; }
.referral h2, .faq h2 { font-size: 18px; font-weight: 800; margin: 0 0 14px; }
.referral-intro { font-size: 13px; color: var(--text-dim); line-height: 1.8; margin: 0 0 14px; }
.referral-count { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.referral .build-link-row input { text-align: left; direction: ltr; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.faq-q { font-size: 13.5px; font-weight: 700; margin: 0 0 6px; }
.faq-a { font-size: 12.5px; color: var(--text-dim); line-height: 1.8; margin: 0; }

/* Bookmark folders (Saved view) */
.saved-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; margin-bottom: 8px; }
.saved-head h2 { margin: 0; }
.new-folder-row { display: flex; gap: 8px; padding: 0 16px; margin-bottom: 10px; }
.new-folder-row input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 12px;
}
.saved-folders { padding: 0 16px 4px; }
.folder-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 4px 16px 0;
  padding: 0;
  border: none;
  background: none;
  color: #fca5a5;
  font-size: 11.5px;
  cursor: pointer;
}
.card-folder-select {
  margin-top: 6px;
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 10.5px;
  padding: 4px 6px;
}

/* Hover affordances only where a real pointer hovers — on touch screens
   :hover sticks after a tap and cards stayed lifted. */
@media (hover: hover) {
  .leaderboard-btn:hover { border-color: var(--border-glow); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), var(--glow-1); transform: translateY(-1px); }
  .post-card:hover { border-color: var(--border-glow); box-shadow: 0 14px 34px -14px rgba(168, 85, 247, 0.55); transform: translateY(-2px); }
  .related-chip:hover { border-color: var(--border-glow); box-shadow: var(--glow-2); }
  .stat-tile:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--glow-1); }
  .leaderboard li:hover { transform: translateY(-1px); }
}

/* ==================================================================
   UX layer — feedback, loading, focus, motion
   ================================================================== */

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 12px; }
button, a, summary, [role="button"], [role="link"] { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
.is-pending { opacity: 0.7; pointer-events: none; }

/* Slim indeterminate bar pinned to the very top — visible wherever you are
   scrolled, unlike the old spinner at the bottom of the document. */
.top-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 2.5px;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.2s ease;
}
.top-progress::before {
  content: '';
  position: absolute;
  inset-block: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent-2), var(--accent-1), transparent);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.7);
  animation: progressSweep 1.1s ease-in-out infinite;
}
.top-progress.active { opacity: 1; }
@keyframes progressSweep { from { inset-inline-start: -40%; } to { inset-inline-start: 100%; } }

/* Toasts */
.toast-host {
  position: fixed;
  inset-inline: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
body.has-compare-bar .toast-host { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(22, 24, 36, 0.92);
  border: 1px solid var(--border-glow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.8);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  animation: toastIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.toast .icon { width: 17px; height: 17px; }
.toast-success .icon { color: var(--success); }
.toast-error { border-color: rgba(248, 113, 113, 0.45); }
.toast-error .icon { color: #fca5a5; }
.toast-info .icon { color: var(--accent-2); }
.toast.leaving { animation: toastOut 0.24s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* Screen transitions */
.view-enter { animation: viewEnter 0.32s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes viewEnter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.more-menu:not(.hidden) { animation: menuIn 0.18s cubic-bezier(0.22, 1, 0.36, 1) both; transform-origin: top left; }
@keyframes menuIn { from { opacity: 0; transform: scale(0.94) translateY(-4px); } to { opacity: 1; transform: none; } }

/* Cards: category-tinted cover when there's no image, staggered entrance */
.post-card[data-cat="فیس‌لس"] { --cat: #60a5fa; }
.post-card[data-cat="آواتار و هوش مصنوعی"] { --cat: #e879f9; }
.post-card[data-cat="سرگرمی و تریلر"] { --cat: #fb923c; }
.post-card[data-cat="قابل تکرار"] { --cat: #2dd4bf; }
.post-card[data-cat="شورتس"] { --cat: #facc15; }
.post-card[data-cat="لانگ"] { --cat: #fb7185; }
/* `backwards`, not `both`: a held final keyframe would override :active's press scale */
.post-card { animation: cardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.thumb-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 26%;
  color: var(--cat, var(--accent-1));
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--cat, #a855f7) 42%, transparent), transparent 60%),
    radial-gradient(circle at 90% 90%, color-mix(in srgb, var(--cat, #a855f7) 22%, transparent), transparent 55%),
    var(--bg-2);
}
.thumb-fallback .icon { width: 46px; height: 46px; opacity: 0.35; stroke-width: 1.5; }
.post-card .thumb { opacity: 0; transition: opacity 0.35s ease; }
.post-card .thumb.loaded { opacity: 1; }
.post-card .badge-row { gap: 3px; }
.post-card .badge { font-size: 9.5px; padding: 2px 7px; }
.post-grid.is-refreshing { opacity: 0.55; transition: opacity 0.2s ease; pointer-events: none; }

.bookmark-btn .icon { width: 16px; height: 16px; transition: fill 0.2s ease; }
.bookmark-btn.pop { animation: pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1); }
.feedback-btn.pop { animation: pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }

/* Skeletons */
.post-card.skeleton {
  cursor: default;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 12px;
  background: linear-gradient(110deg, var(--bg-2) 30%, #1b1e2c 50%, var(--bg-2) 70%);
  background-size: 250% 100%;
  animation: shimmerBg 1.4s linear infinite;
}
.post-card.skeleton::after, .post-card.skeleton::before { display: none; }
.sk-line { height: 11px; width: 85%; border-radius: 6px; background: rgba(255, 255, 255, 0.07); }
.sk-line.short { width: 50%; }
@keyframes shimmerBg { from { background-position: 100% 0; } to { background-position: -150% 0; } }

.empty-state .empty-icon .icon { width: 38px; height: 38px; stroke-width: 1.5; }
.empty-action { margin-top: 16px; }

/* Detail page */
.detail { padding-bottom: 40px; }
.detail-hero { position: relative; margin-bottom: 14px; }
.detail-hero img.sample { margin: 0; display: block; }
.detail-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 35%);
  pointer-events: none;
}
.detail-hero.no-img { display: none; }
.detail-hero-top {
  position: absolute;
  inset: 10px 10px auto 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.detail-hero-top .category {
  margin: 0;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 11.5px;
  font-weight: 700;
}
.detail-head { margin-bottom: 10px; }
.detail-head .category { font-size: 12px; font-weight: 700; }
.detail-title { margin-top: 2px; }
.detail-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.detail-meta-row .build-count { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.detail-meta-row .feedback-row { margin: 0; }
.detail .feedback-btn { padding: 7px 12px; }

.telegraph-link.wide { display: flex; justify-content: center; margin: 14px 0 0; }
.icon-trailing { opacity: 0.8; width: 0.9em; height: 0.9em; }

.kit-card {
  margin-top: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.kit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.kit-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); }
.kit-card .kit { margin: 0; border: none; border-radius: 0; background: transparent; box-shadow: none; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chip-btn:active { transform: scale(0.93); }

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 64px;
  padding: 10px 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, background 0.2s ease;
}
.action-tile .icon { width: 19px; height: 19px; color: var(--accent-2); }
.action-tile:active { transform: scale(0.94); }
.action-tile.active { border-color: rgba(168, 85, 247, 0.55); background: rgba(168, 85, 247, 0.16); }
.action-tile.active .icon { color: #d8b4fe; }
.ai-title-result { margin-top: 10px; }
.ai-result-row { display: flex; align-items: flex-start; gap: 8px; }
.ai-result-row p { flex: 1; margin: 0 0 6px; text-align: left; }

.build-cta-wrap {
  position: sticky;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 15;
  margin-top: 14px;
}
.build-cta { width: 100%; justify-content: center; margin: 0; padding: 14px 18px; font-size: 14px; }
body.has-compare-bar .build-cta-wrap { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }

.soft-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.soft-card-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin: 0 0 4px; }
.soft-card-hint { font-size: 11.5px; color: var(--text-dim); margin: 0 0 10px; line-height: 1.7; }
.soft-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-inline-start: auto;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-strong);
}
.note-box textarea { margin-top: 6px; }
.build-link-box.locked { opacity: 0.55; }
.build-link-row input[dir="ltr"] { text-align: left; }
.build-link-status, .note-status { display: flex; align-items: center; gap: 4px; }
.build-link-status.is-error, .note-status.is-error { color: #fca5a5; }
.note-status { color: var(--text-dim); }

/* Quiz */
.quiz-progress { margin: 0 16px 6px; height: 5px; border-radius: 999px; background: var(--surface-strong); overflow: hidden; }
.quiz-progress-fill { height: 100%; width: 0; border-radius: inherit; background: var(--accent-grad); transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.quiz-progress-label { margin: 0 16px 14px; font-size: 11.5px; color: var(--text-dim); }
.quiz-question legend { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.quiz-qnum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-strong);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.quiz-question:has(input:checked) .quiz-qnum { background: var(--accent-grad); color: #fff; }
.quiz-option {
  padding: 11px 12px;
  margin-top: 6px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.quiz-option:active { transform: scale(0.98); }
.quiz-option:has(input:checked) { background: rgba(168, 85, 247, 0.16); border-color: rgba(168, 85, 247, 0.5); }
.persona-quiz .build-btn { align-self: stretch; justify-content: center; padding: 14px; font-size: 14px; }
.persona-quiz #skipQuiz { align-self: center; margin-top: 0; background: transparent; border-color: transparent; color: var(--text-dim); }

/* FAQ accordion */
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; margin: 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chevron { color: var(--text-dim); transition: transform 0.25s ease; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-item[open] .faq-q { margin-bottom: 8px; }

/* Compare bar sits above the home indicator; content gets room below it */
.compare-bar { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
body.has-compare-bar { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

/* Respect reduced-motion: keep every state change, drop the ambient loops. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Explore formulas (formulaCardHtml / renderVariantCard in app.js) ---- */
.formula-card {
  margin-top: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.formula-card > summary { cursor: pointer; list-style: none; }
.formula-card > summary::-webkit-details-marker { display: none; }
.formula-card:not([open]) > summary { border-bottom: none; background: transparent; }
.formula-sub { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-dim); }
.formula-chevron { transition: transform 0.2s ease; }
.formula-card[open] .formula-chevron { transform: rotate(180deg); }
.formula-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(168, 85, 247, 0.08);
}
.formula-head .kit-label { color: var(--text); }
.formula-format {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text-dim);
}
.formula-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}
.formula-tabs::-webkit-scrollbar { display: none; }
.formula-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.formula-tab.active { background: var(--accent-grad); border-color: transparent; color: #fff; }
.formula-panel { padding: 12px 14px 14px; }
.formula-body { font-size: 13.5px; line-height: 1.95; color: var(--text); overflow-wrap: anywhere; }
.formula-body p { margin: 0 0 10px; }
.formula-body b { color: #fff; }
.formula-body ul { margin: 0 0 12px; padding-inline-start: 18px; }
.formula-body li { margin-bottom: 6px; }
.formula-body li::marker { color: var(--accent-2); }
.formula-body a { color: var(--accent-2); }
.formula-body .f-step {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
}
.formula-generic-note {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-dim);
}
.formula-generic-note .icon { margin-top: 3px; color: var(--accent-2); }
.f-prompt {
  margin: 4px 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.f-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px 7px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.f-prompt-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--text-dim); }
.f-prompt-tag.is-mine { color: #d8b4fe; }
.f-prompt pre {
  margin: 0;
  padding: 12px;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.65;
  color: #e5e7ff;
}



/* ---- Idea summary + "ویدیوی بعدیم" wizard (openVideoWizard in app.js) ---- */
.flip { transform: scaleX(-1); }
.idea-summary { margin: 4px 0 6px; }
.idea-summary-topic { margin: 0 0 12px; font-size: 14.5px; line-height: 1.9; color: var(--text); }
.idea-proof { display: flex; flex-wrap: wrap; gap: 6px; }
.idea-proof span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}
.idea-proof .icon { color: var(--accent-2); }
.wizard-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: none;
  background: none;
  color: var(--accent-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.log-video-link { color: var(--text-dim); }
.wizard-sheet { max-height: 92vh; overflow-y: auto; }
.wizard-progress { display: flex; align-items: flex-start; justify-content: center; margin: 4px 0 18px; }
.wizard-line { flex: 1; max-width: 34px; height: 2px; margin-top: 13px; background: var(--border); }
.wizard-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 52px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-align: center;
}
.wizard-dot b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}
.wizard-dot small { font-size: 10.5px; font-weight: 600; }
.wizard-dot:not(.done):not(.current) { opacity: 0.55; }
.wizard-dot.current, .wizard-dot.done { color: var(--text); }
.wizard-dot.current b { background: var(--accent-grad); border-color: transparent; color: #fff; }
.wizard-dot.done b { background: rgba(52, 211, 153, 0.15); border-color: rgba(52, 211, 153, 0.45); }
.wizard-dot .icon { width: 14px; height: 14px; color: var(--success); }
.wizard-title { margin: 0 0 8px; font-size: 17px; }
.wizard-text { margin: 0 0 12px; font-size: 13.5px; line-height: 1.9; color: var(--text); }
.wizard-muted { margin: 8px 0 12px; font-size: 12px; line-height: 1.8; color: var(--text-dim); }
.wizard-mine { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 14px; font-size: 11.5px; line-height: 1.7; color: #d8b4fe; }
.wizard-mine .icon { margin-top: 3px; }
.wizard-idea {
  margin: 0 0 10px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  font-size: 13px;
  line-height: 1.85;
}
.wizard-idea p { margin: 0 0 6px; }
.wizard-idea-title { font-size: 16px; font-weight: 800; text-align: left; line-height: 1.5; }
.wizard-steps { margin: 0 0 16px; padding-inline-start: 20px; list-style: persian; font-size: 13.5px; line-height: 1.9; }
.wizard-steps li { margin-bottom: 6px; }
.wizard-steps li::marker { color: var(--accent-2); font-weight: 800; }
.wizard-primary { width: 100%; justify-content: center; margin-top: 4px; padding: 13px 16px; font-size: 14px; }
.wizard-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.wizard-secondary:disabled { opacity: 0.5; cursor: default; }
.wizard-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  padding: 4px 0;
  border: none;
  background: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.wizard-input {
  width: 100%;
  min-height: 70px;
  margin: 12px 0 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
}
.wizard-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.wizard-copy-row > div { flex: 1; min-width: 0; }
.wizard-copy-row span { font-size: 11px; color: var(--text-dim); }
.wizard-copy-row p { margin: 2px 0 0; font-size: 13px; text-align: left; white-space: pre-line; overflow-wrap: anywhere; }

/* ---- «ثبت درآمد و جایزه» (openProofs in app.js) ---- */
.proofs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.proofs-head h2 { margin: 0; }
.coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.proofs-intro { margin: 12px 0 14px; font-size: 13.5px; line-height: 1.9; color: var(--text-dim); }
.proofs-intro b { color: var(--text); }
.proof-ladder { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.proof-ladder li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.proof-ladder li.done { border-color: rgba(52, 211, 153, 0.45); background: rgba(52, 211, 153, 0.08); }
.proof-ladder b { display: block; font-size: 13px; }
.proof-ladder small { font-size: 11.5px; color: #fde68a; }
.ladder-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-strong);
  font-size: 12px;
  font-weight: 800;
}
.proof-ladder li.done .ladder-mark { background: rgba(52, 211, 153, 0.2); color: var(--success); }
.proof-card {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.85;
}
.proof-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.proof-card-head small { color: var(--text-dim); font-size: 11px; }
.proof-status { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--surface-strong); }
.proof-status.s-approved { background: rgba(52, 211, 153, 0.18); color: var(--success); }
.proof-status.s-rejected { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.proof-numbers { margin: 0 0 6px; font-size: 12px; color: var(--text-dim); }
.proof-reward { margin: 0 0 6px; color: #fde68a; font-size: 12.5px; font-weight: 700; }
.proof-reject { margin: 0 0 6px; color: #fca5a5; font-size: 12.5px; }
.proof-analysis { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.proof-headline { margin: 0 0 6px; font-weight: 700; }
.proof-strengths { margin: 0 0 8px; padding-inline-start: 18px; color: var(--text-dim); }
.proof-sub { margin: 0 0 2px; font-weight: 700; }
.proof-next { margin: 0; }
.proof-wall { display: grid; gap: 8px; }
.wall-item { padding: 10px 12px; border-radius: var(--radius-md); background: rgba(250, 204, 21, 0.06); border: 1px solid rgba(250, 204, 21, 0.2); font-size: 12.5px; }
.wall-item p { margin: 0 0 4px; }
.wall-item small { color: #fde68a; }
.proof-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-glow);
  background: var(--surface);
  cursor: pointer;
}
.proof-pick b { display: block; font-size: 13px; }
.proof-pick small { font-size: 11.5px; color: var(--text-dim); line-height: 1.6; }
.proof-pick-thumb {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--surface-strong);
  overflow: hidden;
  font-size: 20px;
  color: var(--text-dim);
}
.proof-pick-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proof-share { margin: 12px 0 4px; font-size: 12px; line-height: 1.7; }
.shop-list { display: grid; gap: 8px; }
.shop-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.shop-icon { color: #fde68a; font-size: 18px; }
.shop-label { flex: 1; font-size: 13px; font-weight: 700; }
.shop-item .chip-btn:disabled { opacity: 0.45; }
.admin-proof { margin-bottom: 12px; padding: 12px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; }
.admin-proof-who { margin: 0 0 8px; }
.admin-proof-who a { color: var(--accent-2); }
.admin-proof-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.admin-proof-img { display: grid; place-items: center; min-height: 90px; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-strong); color: var(--text-dim); overflow: hidden; cursor: zoom-in; }
.admin-proof-img img { width: 100%; height: 100%; max-height: 160px; object-fit: cover; }
.admin-proof-img.zoomed { grid-column: 1 / -1; cursor: zoom-out; }
.admin-proof-img.zoomed img { max-height: none; object-fit: contain; }
.admin-proof-flags { margin: 0 0 8px; padding: 0; list-style: none; color: #fca5a5; }
.admin-proof-ms { display: grid; gap: 4px; margin-bottom: 8px; }
.admin-proof-ms small { color: var(--text-dim); }

/* ---- منتورها (openMentors in app.js) ---- */
.mentor-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 4px; scrollbar-width: none; }
.mentor-row::-webkit-scrollbar { display: none; }
.mentor-card {
  flex: 0 0 220px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid rgba(34, 211, 238, 0.28);
  font-size: 12.5px;
  line-height: 1.7;
}
.mentor-card p { margin: 8px 0 6px; }
.mentor-card small { color: var(--text-dim); display: inline-flex; align-items: center; gap: 4px; }
.mentor-card-top { display: flex; align-items: center; gap: 8px; }
.mentor-card-top b { display: block; font-size: 13px; }
.mentor-card-top a { font-size: 11.5px; color: var(--accent-2); }
.mentor-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 800;
}
.ask-box .wizard-input { margin-top: 0; }
.m-filters { margin: 14px 0 6px; }
.m-question {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.85;
}
.m-meta { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 11.5px; color: var(--text-dim); }
.m-meta .m-delete { margin-inline-start: auto; }
.m-body { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.m-qbody { font-weight: 700; margin-bottom: 8px; }
.m-answer { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(34, 211, 238, 0.06); border: 1px solid rgba(34, 211, 238, 0.18); }
.m-answer.is-helpful { border-color: rgba(52, 211, 153, 0.45); background: rgba(52, 211, 153, 0.07); }
.m-answer-who { margin: 0 0 4px; font-size: 11.5px; color: var(--text-dim); }
.m-answer-who a { color: var(--accent-2); }
.m-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.m-actions:empty { display: none; }
.m-helpful { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--success); }
.m-delete { padding: 4px 6px; border: none; background: none; color: var(--text-dim); cursor: pointer; }
.m-answer-form { margin-top: 8px; }
.become-mentor .draft-input, .become-mentor .draft-select { margin-bottom: 8px; }

/* ---- منتورها: تب‌ها، نقد ویدیو، جلسه‌ها ---- */
.mentor-tabs { padding: 10px 0 4px; border-bottom: none; }
.tier-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; background: rgba(250, 204, 21, 0.14); color: #fde68a; font-size: 10.5px; font-weight: 800; vertical-align: 1px; }
.review-video { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--text); text-decoration: none; }
.review-video img { width: 96px; height: 54px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface-strong); }
.review-video span { font-weight: 700; font-size: 13px; overflow-wrap: anywhere; }
.review-form textarea { min-height: 56px; margin: 6px 0; }
.review-pick-list { display: grid; gap: 8px; margin-bottom: 10px; max-height: 46vh; overflow-y: auto; }
.review-pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); cursor: pointer; }
.review-pick:has(input:checked) { border-color: rgba(168, 85, 247, 0.55); background: rgba(168, 85, 247, 0.1); }
.review-pick img { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.review-pick b { display: block; font-size: 12.5px; overflow-wrap: anywhere; }
.review-pick small { font-size: 11px; color: var(--text-dim); }
.session-when { margin: 0 0 4px; font-size: 12px; color: var(--accent-2); font-weight: 700; }
.live-dot { color: var(--live); }
.session-card .wizard-primary { display: flex; text-decoration: none; }
.wizard-secondary.is-on { border-color: rgba(52, 211, 153, 0.45); color: var(--success); }
.results-post-text { min-height: 220px; font-size: 12.5px; }

/* ---- Lighter hierarchy: secondary blocks collapse to one row ----
   foldHtml / infoTipHtml / keepFoldsOpen in app.js. One obvious thing per
   screen; everything else is a tap away, never removed. */
.fold { border-radius: 16px; border: 1px solid var(--border); background: rgba(8, 9, 15, 0.3); }
.fold > summary { list-style: none; display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 9px 12px; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--text); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary > .icon:first-child { flex-shrink: 0; width: 15px; height: 15px; color: var(--accent-2); }
.fold-title { min-width: 0; }
.fold-meta { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: auto; font-size: 11px; font-weight: 600; color: var(--text-dim); white-space: nowrap; }
.fold-meta .icon { width: 11px; height: 11px; }
.fold-meta:empty { display: none; }
.fold-meta:empty + .faq-chevron { margin-inline-start: auto; }
.fold > summary .faq-chevron { flex-shrink: 0; width: 15px; height: 15px; }
.fold[open] > summary .faq-chevron { transform: rotate(180deg); }
.fold-body { padding: 2px 12px 12px; }
.results-card .fold { margin-top: 12px; }
.coach-card .fold { margin-top: 10px; background: rgba(8, 9, 15, 0.35); }

/* «بیشتر درباره‌ی این ایده»: one card, one row per secondary block */
.more-card { margin-top: 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.more-title { margin: 0; padding: 12px 14px 6px; font-size: 12px; font-weight: 800; color: var(--text-dim); }
.more-card > details { margin: 0; border: none; border-top: 1px solid var(--border); border-radius: 0; background: transparent; }
.more-card > .fold > summary, .more-card > .formula-card > summary { padding: 9px 14px; min-height: 46px; }
.more-card > .formula-card > summary { background: transparent; }
.more-card .fold-body { padding: 2px 14px 14px; }
.more-card .formula-head .kit-label { font-size: 12.5px; }
[data-fold="note"] textarea { margin: 0; }

.info-tip { font-size: 11px; color: var(--text-dim); }
.info-tip > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; cursor: pointer; font-weight: 600; }
.info-tip > summary::-webkit-details-marker { display: none; }
.info-tip > summary .icon { width: 12px; height: 12px; }
.info-tip[open] > summary { color: var(--text); }
.info-tip > p { margin: 2px 0 4px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); line-height: 1.8; text-align: start; }
.info-tip > p .icon { width: 12px; height: 12px; vertical-align: -2px; color: #6ee7b7; }

/* «ثبتش کن» + «شرایط ثبت» share one quiet row under the main button */
.build-sub-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; column-gap: 12px; margin-top: 6px; }
.build-sub-row .wizard-link { width: auto; margin: 0; padding: 8px 2px; }
.build-sub-row .info-tip[open] { flex-basis: 100%; text-align: center; }
