/* ============================================================
   Sync Haven — 2026 refresh
   Dark, cinematic, built for creators. Class hooks are dictated
   by the components (DiscoveryFeed, TrendingPosts, Auth, NavBar);
   do not rename them here without changing the JS.
   ============================================================ */

:root {
  /* surfaces */
  --bg: #07080b;
  --bg-elev: #0d0f14;
  --surface: #12141b;
  --surface-2: #171a22;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* text */
  --text-primary: #f4f6fb;
  --text-secondary: rgba(244, 246, 251, 0.62);
  --text-tertiary: rgba(244, 246, 251, 0.38);

  /* brand */
  --primary-color: #7c5cff;
  --primary-color-dark: #6344e8;
  --primary-hover: #8b6dff;
  --accent-gradient: linear-gradient(135deg, #7c5cff 0%, #409cff 100%);

  /* the two scoring axes */
  --creative-color: #58a6ff;
  --impact-color: #ff7b54;
  --creative-glow: rgba(88, 166, 255, 0.28);
  --impact-glow: rgba(255, 123, 84, 0.28);
  --crown: #ffc73a;

  /* legacy aliases still referenced by older component css */
  --card-bg: var(--surface);
  --background-dark: var(--bg);
  --background-light: rgba(255, 255, 255, 0.06);
  --border-color: var(--border);
  --hover-overlay: rgba(255, 255, 255, 0.05);
  --input-bg: rgba(255, 255, 255, 0.05);
  --creative-gradient: linear-gradient(135deg, rgba(88, 166, 255, 0.16), rgba(88, 166, 255, 0.05));
  --impact-gradient: linear-gradient(135deg, rgba(255, 123, 84, 0.16), rgba(255, 123, 84, 0.05));

  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 1px var(--border);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient colour wash behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60rem 40rem at 12% -10%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(50rem 36rem at 92% 8%, rgba(64, 156, 255, 0.12), transparent 62%);
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ── Navigation ─────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(7, 8, 11, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.navbar.scrolled { border-bottom-color: var(--border); background: rgba(7, 8, 11, 0.9); }

.nav-container {
  width: min(1240px, 100% - 3rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 0.4rem; }
.nav-right { margin-left: auto; gap: 0.65rem; }

.logo { display: flex; align-items: center; margin-right: 1.25rem; }
.logo-image { height: 30px; width: auto; }

.nav-link {
  position: relative;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { color: var(--text-primary); background: var(--hover-overlay); }

.sign-in {
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 550;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.sign-in:hover { background: var(--hover-overlay); border-color: rgba(255, 255, 255, 0.28); }

.start-selling {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 6px 22px rgba(124, 92, 255, 0.36);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.start-selling:hover { filter: brightness(1.08); box-shadow: 0 10px 30px rgba(124, 92, 255, 0.5); }

.nav-profile-pic, .profile-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}
.user-profile-link { display: flex; align-items: center; }
.user-profile-link.hidden { display: none !important; }

.profile-dropdown {
  position: absolute;
  top: calc(var(--nav-h) - 8px);
  right: 1.5rem;
  min-width: 190px;
  padding: 0.4rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.profile-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: block; width: 100%;
  padding: 0.6rem 0.8rem;
  border: none; background: none;
  border-radius: 9px;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.dropdown-item:hover { background: var(--hover-overlay); color: var(--text-primary); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(78vh, 660px);
  display: grid;
  place-items: center;
  padding: 5rem 1.5rem 6rem;
  overflow: hidden;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  transform: scale(1.06);
  filter: saturate(0.85) contrast(1.05);
}
.hero-overlay {
  position: absolute; inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7,8,11,0.55) 0%, rgba(7,8,11,0.78) 55%, var(--bg) 100%),
    radial-gradient(70% 60% at 50% 40%, transparent 0%, rgba(7,8,11,0.5) 100%);
}
.hero-content { width: min(760px, 100%); text-align: center; }

.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #ffffff 30%, rgba(255, 255, 255, 0.68) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-content > p {
  margin: 0 auto 2.25rem;
  max-width: 42ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-secondary);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem;
  background: rgba(18, 20, 27, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.search-box:focus-within {
  border-color: rgba(124, 92, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.16), var(--shadow);
}
.search-box input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 1rem;
  border: none; background: none; outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.search-box input::placeholder { color: var(--text-tertiary); }
.search-box select {
  border: none; outline: none;
  background: var(--surface-2);
  color: var(--text-secondary);
  padding: 0.6rem 0.75rem;
  border-radius: 999px;
  font-size: 0.88rem;
}
.search-box button {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  transition: filter 0.2s ease;
}
.search-box button:hover { filter: brightness(1.1); }

.trending-tags {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.tag {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.tag:hover { color: var(--text-primary); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.08); }

/* ── Section shell ──────────────────────────────────────── */
.trending-section,
.discovery-feed-section,
#create-post-container {
  position: relative;
  z-index: 1;
  width: min(1240px, 100% - 3rem);
  margin: 0 auto;
  padding: 3.25rem 0;
}
.section-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.5rem; }
.section-header h2 {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.section-header h2 i { color: var(--impact-color); font-size: 1.1rem; }
.discovery-feed-section .section-header h2 i { color: var(--creative-color); }

/* ── Trending ───────────────────────────────────────────── */
.trending-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 1.1rem;
}

.trending-card {
  position: relative;
  padding: 1.15rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.28s cubic-bezier(.2,.7,.3,1), border-color 0.28s ease, box-shadow 0.28s ease;
}
.trending-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}
/* the leader */
.trending-card:has(.crown-icon) {
  border-color: rgba(255, 199, 58, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 199, 58, 0.2), 0 18px 50px rgba(255, 199, 58, 0.1);
}

.crown-icon {
  /* centred with left/right rather than translateX so the motion
     layer can own `transform` without knocking it off-centre */
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  text-align: center;
  margin-bottom: 4px;
  font-size: 22px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 3px 10px rgba(255, 199, 58, 0.55));
}

.trending-header, .post-header { display: flex; align-items: center; gap: 0.7rem; }
.trending-avatar, .post-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.trending-meta h4, .post-author { font-size: 0.92rem; font-weight: 600; }
.trending-time, .post-time { font-size: 0.76rem; color: var(--text-tertiary); }
.trending-content, .post-text {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

/* trending read-only tallies */
.reaction-groups { display: flex; gap: 0.5rem; margin-top: 0.95rem; }
.reaction-box {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.86rem;
  line-height: 1;
}
.reaction-box.blue { background: var(--creative-gradient); border-color: rgba(88, 166, 255, 0.34); color: var(--creative-color); }
.reaction-box.fire { background: var(--impact-gradient); border-color: rgba(255, 123, 84, 0.34); color: var(--impact-color); }
.reaction-box .count { font-weight: 650; font-variant-numeric: tabular-nums; }
.reaction-groups.read-only .reaction-box { cursor: default; }
.reaction-total { margin-top: 0.6rem; font-size: 0.76rem; color: var(--text-tertiary); }

/* ── Composer ───────────────────────────────────────────── */
.create-post-card {
  padding: 1.25rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.create-post-header { display: flex; gap: 0.85rem; align-items: flex-start; }
.create-post-input { flex: 1; }
.create-post-input textarea {
  width: 100%;
  min-height: 76px;
  padding: 0.7rem 0.9rem;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.create-post-input textarea::placeholder { color: var(--text-tertiary); }
.create-post-input textarea:focus { border-color: rgba(124, 92, 255, 0.5); background: rgba(255, 255, 255, 0.06); }

.create-post-actions {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.upload-btn, .icon-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 0.86rem;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.upload-btn:hover:not(:disabled), .icon-btn:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.07);
}
.upload-btn:disabled, .icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.post-btn {
  margin-left: auto;
  padding: 0.55rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 6px 22px rgba(124, 92, 255, 0.34);
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}
.post-btn:hover { filter: brightness(1.08); box-shadow: 0 10px 30px rgba(124, 92, 255, 0.48); }
.post-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* CreatePost renders its own markup (.create-post / .primary-btn),
   which is what actually ships - the static .create-post-card in
   index.html gets replaced on init. Both are styled. */
.create-post {
  padding: 1.25rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.create-post textarea {
  width: 100%;
  min-height: 84px;
  padding: 0.85rem 1rem;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.create-post textarea::placeholder { color: var(--text-tertiary); }
.create-post textarea:focus { border-color: rgba(124, 92, 255, 0.5); background: rgba(255, 255, 255, 0.06); }
.create-post textarea:disabled { opacity: 0.55; cursor: not-allowed; }

.post-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.media-upload { display: flex; gap: 0.45rem; }
.media-upload .icon-btn { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; }

.media-preview {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.35rem 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.35);
  font-size: 0.82rem;
  max-width: 100%;
}
.media-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18ch; }
.remove-media {
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.7rem;
}
.remove-media:hover { background: rgba(255, 255, 255, 0.2); color: var(--text-primary); }

.primary-btn, .submit-btn, .create-post-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 6px 22px rgba(124, 92, 255, 0.34);
  transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.16s ease;
}
.primary-btn:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 10px 30px rgba(124, 92, 255, 0.48); }
.primary-btn:active:not(:disabled) { transform: scale(0.97); }
.primary-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ── Feed ───────────────────────────────────────────────── */
.discovery-feed { display: grid; gap: 1.1rem; }

.post-card {
  padding: 1.35rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.28s cubic-bezier(.2,.7,.3,1), border-color 0.28s ease, box-shadow 0.28s ease;
}
.post-card:hover { border-color: var(--border-strong); box-shadow: 0 16px 42px rgba(0, 0, 0, 0.44); }
.post-body { margin-top: 0.9rem; }
.post-text { font-size: 0.98rem; color: var(--text-primary); }
.post-media { margin-top: 0.9rem; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.post-media video, .post-media audio, .post-video, .post-audio { width: 100%; display: block; }
.post-media audio, .post-audio { padding: 0.75rem; background: var(--surface-2); }

/* interactive reaction pills — emoji + count, no labels */
.reaction-section {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.reaction-group { display: flex; gap: 0.5rem; }

.reaction-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.16s cubic-bezier(.2,.7,.3,1), border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.reaction-btn:hover { transform: translateY(-2px); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.07); }
.reaction-btn:active { transform: scale(0.94); }
.reaction-icon { font-size: 1.02rem; }
.reaction-count { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-secondary); min-width: 0.75rem; text-align: left; }

.reaction-group.creative .reaction-btn.active {
  background: var(--creative-gradient);
  border-color: rgba(88, 166, 255, 0.5);
  box-shadow: 0 0 18px var(--creative-glow);
}
.reaction-group.impact .reaction-btn.active {
  background: var(--impact-gradient);
  border-color: rgba(255, 123, 84, 0.5);
  box-shadow: 0 0 18px var(--impact-glow);
}
.reaction-btn.active .reaction-count { color: var(--text-primary); }

/* ── Empty / error states ───────────────────────────────── */
.no-posts, .no-results, .error-message, .no-content, .no-trending {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-tertiary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.015);
}
.no-posts i, .no-results i, .error-message i, .no-content i {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 0.7rem;
  opacity: 0.55;
}
.error-message { color: var(--impact-color); border-color: rgba(255, 123, 84, 0.3); }

/* ── Modal ──────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: rgba(4, 5, 8, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s;
}
.modal.show { opacity: 1; visibility: visible; pointer-events: auto; }

.modal-content {
  position: relative;
  width: min(420px, 100%);
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1);
}
.modal.show .modal-content { transform: translateY(0) scale(1); }

.modal-header { margin-bottom: 1.25rem; text-align: center; }
.modal-header h2 { font-size: 1.25rem; }
.close-modal, .modal-close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  transition: background 0.2s ease, color 0.2s ease;
}
.close-modal:hover, .modal-close:hover { background: rgba(255, 255, 255, 0.12); color: var(--text-primary); }

.auth-providers { display: grid; gap: 0.65rem; }
.auth-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.94rem;
  font-weight: 550;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.16s ease;
}
.auth-btn:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.3); }
.auth-btn:active { transform: scale(0.985); }

.auth-error {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 123, 84, 0.12);
  border: 1px solid rgba(255, 123, 84, 0.4);
  color: var(--impact-color);
  font-size: 0.85rem;
  text-align: left;
}

/* ── Misc ───────────────────────────────────────────────── */
.container { width: min(1240px, 100% - 3rem); margin: 0 auto; }
.hashtag, .mention { color: var(--creative-color); }
.loading { color: var(--text-tertiary); }

::selection { background: rgba(124, 92, 255, 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #23262f; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2e323d; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-container { width: calc(100% - 2rem); gap: 1rem; }
  .nav-left .nav-link { display: none; }
  .trending-section, .discovery-feed-section, #create-post-container { width: calc(100% - 2rem); padding: 2.25rem 0; }
}

@media (max-width: 620px) {
  .hero { min-height: 62vh; padding: 3.5rem 1rem 4rem; }
  .search-box { flex-wrap: wrap; border-radius: 20px; }
  .search-box input { flex: 1 1 100%; }
  .search-box select { flex: 1; }
  .post-card, .create-post-card { padding: 1.1rem; }
  .reaction-section { gap: 0.75rem; }
  .start-selling span { display: none; }
}

/* Animations are driven by motion.dev in animations.js; anyone who
   asks for less motion gets none of it. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-video { display: none; }
}

/* ── Track row (inside a post) ──────────────────────────────
   Compact catalogue row. Pressing play hands the track to the
   dock at the bottom of the page.                            */
.sync-player {
  display: grid;
  grid-template-columns: 44px auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.012) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}
.sync-player:hover { border-color: var(--border-strong); }
.sync-player.active {
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.18), 0 10px 30px rgba(124, 92, 255, 0.1);
}
.sync-player > audio { display: none; }
.sync-player:not([data-ready]) > audio { display: block; width: 100%; }

.st-art {
  width: 44px; height: 44px;
  border-radius: 9px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
}
.st-art img { width: 100%; height: 100%; object-fit: cover; }

.st-play {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: none; border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.8rem;
  box-shadow: 0 4px 16px rgba(124, 92, 255, 0.35);
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}
.st-play:hover { transform: scale(1.08); box-shadow: 0 6px 22px rgba(124, 92, 255, 0.55); }
.sync-player.playing .st-play { box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.25); }

.st-meta { min-width: 0; }
.st-title { font-size: 0.92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-sub { font-size: 0.76rem; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-dur { font-size: 0.78rem; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }

/* little equaliser that only moves while this track is playing */
.st-bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; opacity: 0; transition: opacity 0.25s ease; }
.sync-player.playing .st-bars { opacity: 1; }
.st-bars span {
  width: 3px; height: 30%;
  background: var(--creative-color);
  border-radius: 2px;
}
.sync-player.playing .st-bars span { animation: st-eq 0.9s ease-in-out infinite; }
.sync-player.playing .st-bars span:nth-child(2) { animation-delay: 0.15s; }
.sync-player.playing .st-bars span:nth-child(3) { animation-delay: 0.3s; }
.sync-player.playing .st-bars span:nth-child(4) { animation-delay: 0.45s; }
@keyframes st-eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* ── Dock (persistent bottom player) ────────────────────── */
.sync-dock {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  width: min(1240px, calc(100% - 2rem));
  z-index: 1500;
  display: grid;
  grid-template-columns: 46px minmax(120px, 1fr) auto minmax(0, 3.2fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(23, 26, 34, 0.92) 0%, rgba(13, 15, 20, 0.94) 100%);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(124, 92, 255, 0.08);
  transform: translate(-50%, calc(100% + 1.5rem));
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1);
}
.sync-dock.active { transform: translate(-50%, 0); }
body:has(.sync-dock.active) { padding-bottom: 112px; }

/* thin accent seam along the top edge, echoing the brand gradient */
.sync-dock::before {
  content: "";
  position: absolute;
  top: -1px; left: 12%; right: 12%;
  height: 1px;
  background: var(--accent-gradient);
  opacity: 0.7;
}

.sd-art {
  width: 46px; height: 46px;
  border-radius: 9px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
}
.sd-art img { width: 100%; height: 100%; object-fit: cover; }

.sd-meta { min-width: 0; }
.sd-title { font-size: 0.92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-sub { font-size: 0.76rem; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sd-transport { display: flex; align-items: center; gap: 0.4rem; }
.sd-btn {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border: none; border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  transition: color 0.18s ease, background 0.18s ease, transform 0.14s ease;
}
.sd-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); }
.sd-btn:active { transform: scale(0.9); }
.sd-play {
  width: 42px; height: 42px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.42);
}
.sd-play:hover { color: #fff; transform: scale(1.07); box-shadow: 0 8px 26px rgba(124, 92, 255, 0.6); }

.sd-wave { position: relative; height: 44px; cursor: pointer; touch-action: none; }
.sd-wave canvas { display: block; width: 100%; height: 100%; }

.sd-time { font-size: 0.78rem; color: var(--text-tertiary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sd-cur { color: var(--text-secondary); }

.sd-vol { display: flex; align-items: center; gap: 0.45rem; }
.sd-vol input {
  -webkit-appearance: none; appearance: none;
  width: 80px; height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  outline: none;
}
.sd-vol input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--creative-color); cursor: pointer;
}
.sd-vol input::-moz-range-thumb {
  width: 12px; height: 12px; border: none; border-radius: 50%;
  background: var(--creative-color); cursor: pointer;
}

@media (max-width: 860px) {
  .sync-player { grid-template-columns: 40px auto minmax(0, 1fr) auto; gap: 0.6rem; }
  .st-bars { display: none; }
  .sync-dock {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    grid-template-areas: "art meta transport" "wave wave wave";
    row-gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    bottom: 0.6rem;
    width: calc(100% - 1.2rem);
  }
  .sd-art { grid-area: art; }
  .sd-meta { grid-area: meta; }
  .sd-transport { grid-area: transport; }
  .sd-wave { grid-area: wave; height: 34px; }
  .sd-time, .sd-vol { display: none; }
  body:has(.sync-dock.active) { padding-bottom: 130px; }
}

/* ── Dock identity ──────────────────────────────────────────
   Deliberately not the flat catalogue bar: the dock is tinted by
   the artwork it is playing, the play button carries a progress
   ring, and the waveform is mirrored with a brand gradient.      */
.sync-dock { position: fixed; overflow: hidden; }

.sd-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: blur(42px) saturate(180%);
  opacity: 0.22;
  transform: scale(1.35);
  transition: opacity 0.6s ease;
}
.sync-dock:not(.active) .sd-bg { opacity: 0; }

/* progress ring around the transport button */
.sd-playwrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 3px;
  border-radius: 50%;
  background:
    conic-gradient(#ffc73a calc(var(--p, 0) * 360deg), rgba(255, 255, 255, 0.14) 0deg);
  transition: background 0.1s linear;
}

.sd-art {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.sd-title { letter-spacing: -0.01em; }
