/* ============================================
   Before The Data — Main Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --bg: #ffffff;
  --bg-2: #f5f5f5;
  --tx-1: #000000;
  --tx-2: #222222;
  --tx-3: #888888;
  --bd: #e0e0e0;
  --acc: #000000;
  --sidebar-w: 230px;
  --player-h: 56px;
  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--tx-2);
  line-height: 1.5;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ============================================
   PLAYER BAR (fixed top)
   ============================================ */
/* ── Player Bar (Hillydilly-style) ── */
#player-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--player-h);
  background: var(--bg);
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center;
  padding: 0;
  z-index: 1000;
}

/* Brand — sits inside the sidebar width, left of the divider */
.player-brand {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--bd);
  height: 100%;
  text-decoration: none;
}
.player-brand img {
  height: 36px; width: auto; display: block;
}

/* Controls — start right of the sidebar divider */
#player-bar .player-controls {
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
  padding: 0 12px 0 16px;
}
#player-bar .player-controls button {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--tx-2);
  border-radius: 50%;
  transition: background .15s, color .15s;
}
#player-bar .player-controls button svg { width: 20px; height: 20px; }
#player-bar .player-controls button:hover { background: var(--bg-2); }
#player-bar .player-controls .play-btn {
  width: 44px; height: 44px;
  background: transparent; color: var(--tx);
  border-radius: 50%; font-size: 20px; padding-left: 3px;
}
#player-bar .player-controls .play-btn svg { width: 22px; height: 22px; }
#player-bar .player-controls .play-btn:hover { background: var(--bg-2); }

/* Center — art + title + progress */
.player-center {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0; padding-right: 16px;
}
.player-center .player-art {
  width: 36px; height: 36px;
  border-radius: 3px; object-fit: cover;
  background: var(--bg-2); flex-shrink: 0;
  display: none; /* hidden until a track loads */
}
.player-center .player-art.has-art { display: block; }
#player-bar .player-info {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0; flex-shrink: 0; max-width: 260px;
}
#player-bar .player-info .player-title {
  font-size: 13px; font-weight: 500; color: var(--tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#player-bar .player-info .player-source,
#player-bar .player-info a.player-source {
  font-size: 10px; color: var(--tx-3);
  text-transform: uppercase; letter-spacing: .6px;
  text-decoration: none; font-weight: 500;
}
#player-bar .player-info a.player-source:hover { color: var(--acc); }
.player-progress-wrap {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  background: var(--bg-2);
  height: 100%;
  padding: 0 16px;
  border-left: 1px solid var(--bd);
}
#player-bar .player-progress {
  width: 100%; height: 3px;
  background: var(--bd); border-radius: 2px; cursor: pointer;
}
#player-bar .player-progress-fill {
  height: 100%; background: var(--tx-3);
  width: 0%; transition: width .3s linear; border-radius: 2px;
}

/* Right zone — volume button then empty sidebar-width gap */
#player-bar .player-right {
  display: flex; align-items: center; justify-content: flex-start;
  flex-shrink: 0;
  width: calc(56px + var(--sidebar-w));
  padding: 0 0 0 8px;
  background: transparent;
  height: 100%;
  position: relative;
}
#player-bar .player-right-shade { display: none; }

#player-bar .player-right .volume-btn {
  color: var(--tx-3);
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  transition: background .15s, color .15s; flex-shrink: 0;
  position: relative;
}
#player-bar .player-right .volume-btn svg { width: 24px; height: 24px; }
#player-bar .player-right .volume-btn:hover { background: var(--bg-2); color: var(--tx-2); }

/* Volume popup — drops DOWN below the bar */
.volume-popup {
  position: absolute; top: calc(100% + 4px); left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 12px 10px;
  display: none; flex-direction: column; align-items: center; gap: 8px;
  z-index: 2000;
  width: 36px;
}
.volume-popup.open { display: flex; }
.volume-popup .volume-label {
  font-size: 10px; color: var(--tx-3); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}
.volume-slider {
  -webkit-appearance: slider-vertical; appearance: slider-vertical;
  writing-mode: vertical-lr; direction: rtl;
  width: 4px; height: 72px;
  background: var(--bd); border-radius: 2px; outline: none; cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  background: var(--tx-2); border-radius: 50%; cursor: pointer;
}
/* Player bar search — hidden until search icon clicked */
.player-search-wrap {
  position: relative;
  flex-shrink: 0;
}
.player-search-input {
  width: 0; overflow: hidden;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 15px;
  font-size: 12px;
  background: var(--bg-2);
  color: var(--tx-1);
  outline: none;
  transition: width .2s ease, padding .2s ease, border-color .2s ease;
  opacity: 0;
}
.player-search-wrap.search-open .player-search-input {
  width: 200px; padding: 0 10px;
  border-color: var(--bd); opacity: 1;
}
.player-search-wrap.search-open .player-search-input:focus { border-color: var(--acc); }
.player-search-input::placeholder { color: var(--tx-3); }
.player-search-results {
  position: absolute; top: 36px; right: 0;
  width: 280px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 2000;
  max-height: 360px;
  overflow-y: auto;
  display: none;
}
.player-search-results.open { display: block; }
.player-search-result {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .1s;
}
.player-search-result:hover { background: var(--bg-2); }
.player-search-result img {
  width: 36px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0;
}
.player-search-result .psr-info { min-width: 0; }
.player-search-result .psr-title {
  font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-search-result .psr-artist {
  font-size: 11px; color: var(--tx-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Hide search on small screens */
@media (max-width: 767px) {
  .player-search-wrap { display: none; }
}

/* ============================================
   SIDEBAR
   ============================================ */
#sidebar {
  position: fixed; top: var(--player-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg);
  border-right: 1px solid var(--bd);
  display: flex; flex-direction: column;
  z-index: 900;
  padding: 24px 0;
  overflow-y: auto;
}
#sidebar .sidebar-brand {
  padding: 0 24px; margin-bottom: 8px;
  display: flex; align-items: center;
  text-decoration: none;
}
#sidebar .sidebar-brand .brand-name {
  font-family: var(--font-heading);
  font-size: 18px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--tx-1);
}
#sidebar .sidebar-user {
  padding: 12px 24px 16px;
  font-size: 13px; font-weight: 500; color: var(--tx-2);
  border-bottom: 1px solid var(--bd);
  margin-bottom: 16px;
}
#sidebar nav { flex: 1; }
#sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px;
  font-size: 14px; font-weight: 500;
  color: var(--tx-3);
  transition: color .15s, background .15s;
  border-left: 3px solid transparent;
}
#sidebar nav a:hover { color: var(--tx-2); background: var(--bg-2); }
#sidebar nav a.active {
  color: var(--acc); border-left-color: var(--acc); font-weight: 600;
}
#sidebar nav a .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
/* ── Sidebar login block ── */
#sidebar-login-block {
  padding: 14px 24px;
  border-top: 1px solid var(--bd);
}
#sidebar-login-btn {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  color: var(--tx-2); cursor: pointer;
  background: none; border: none; padding: 0;
  letter-spacing: 0.3px;
}
#sidebar-login-btn:hover { color: var(--tx-1); }
#sidebar-login-btn .login-icon { font-size: 14px; }
#sidebar-account-info {
  font-size: 11px; color: var(--tx-3); line-height: 1.5;
}
#sidebar-account-info strong { color: var(--tx-2); font-size: 12px; display: block; margin-bottom: 2px; }
#sidebar-account-info .sidebar-logout {
  color: var(--tx-3); cursor: pointer; text-decoration: underline; font-size: 10px;
  background: none; border: none; padding: 0;
}

#sidebar .sidebar-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--bd);
  display: flex; flex-wrap: wrap; gap: 8px 16px;
}
#sidebar .sidebar-footer a {
  font-size: 11px; color: var(--tx-3);
}
#sidebar .sidebar-footer a:hover { color: var(--tx-2); }

/* Account tab — mobile bottom nav only, hidden on desktop */
#btd-mobile-account-tab { display: none; }
@media (max-width: 767px) {
  #btd-mobile-account-tab { display: flex; }
  /* Kill 300ms iOS tap delay on all nav items */
  #sidebar nav a, #btd-mobile-account-tab { touch-action: manipulation; }
}

/* ── Mobile top bar ── */
#btd-mobile-topbar {
  display: none;
}
@media (max-width: 767px) {
  #btd-mobile-topbar {
    display: flex;
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    height: 48px;
    align-items: center; justify-content: space-between;
    padding: 0 16px;
    background: var(--bg-1);
    border-bottom: 1px solid var(--bd);
  }
  #btd-mobile-topbar .mtb-brand {
    font-size: 13px; font-weight: 800; letter-spacing: 1px;
    text-transform: uppercase; color: var(--tx-1); text-decoration: none;
  }
  #btd-mobile-topbar .mtb-account-btn {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-2); border: 1px solid var(--bd);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; cursor: pointer; color: var(--tx-2);
    position: relative;
  }
  #btd-mobile-topbar .mtb-account-btn.logged-in {
    background: var(--tx-1); color: var(--bg-1); border-color: var(--tx-1);
    font-size: 11px; font-weight: 700;
  }
  /* No mobile top bar — account accessible via bottom nav */
}

/* ── Mobile account dropdown ── */
#btd-mobile-account-menu {
  display: none;
  position: fixed; top: 56px; right: 12px; z-index: 300;
  background: var(--bg-1); border: 1px solid var(--bd);
  padding: 14px 18px; min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
#btd-mobile-account-menu.visible { display: block; }
#btd-mobile-account-menu .mam-email { font-size: 13px; font-weight: 700; color: var(--tx-1); margin-bottom: 2px; }
#btd-mobile-account-menu .mam-tier { font-size: 11px; color: var(--tx-3); margin-bottom: 12px; }
#btd-mobile-account-menu a, #btd-mobile-account-menu button {
  display: block; font-size: 12px; color: var(--tx-2);
  text-decoration: underline; background: none; border: none;
  cursor: pointer; padding: 3px 0;
}

/* ── Site auth modal ── */
#btd-auth-modal {
  position: fixed; inset: 0; z-index: 9100;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6);
}
#btd-auth-modal.visible { display: flex; }
#btd-auth-modal .am-card {
  background: #ffffff; color: #111111;
  padding: 36px 32px; max-width: 380px; width: 90%;
  box-shadow: 0 16px 48px rgba(0,0,0,.3);
  border-radius: 2px;
}
#btd-auth-modal .am-title {
  font-size: 20px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; margin: 0 0 8px;
}
#btd-auth-modal .am-sub {
  font-size: 13px; color: #666; margin: 0 0 20px; line-height: 1.5;
}
#btd-auth-modal .am-input {
  width: 100%; padding: 12px 14px; border: 1px solid #ddd;
  background: #f8f8f8; color: #111;
  font-size: 14px; outline: none; box-sizing: border-box; margin-bottom: 10px;
}
#btd-auth-modal .am-input:focus { border-color: #111; }
#btd-auth-modal .am-btn {
  width: 100%; padding: 13px; background: #111111; color: #ffffff;
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; border: none; cursor: pointer;
}
#btd-auth-modal .am-btn:hover { opacity: 0.85; }
#btd-auth-modal .am-note {
  font-size: 11px; color: #888; text-align: center;
  margin: 12px 0 0; line-height: 1.5;
}
#btd-auth-modal .am-note a { color: #444; }
#btd-auth-modal .am-dismiss {
  display: block; text-align: center; margin-top: 14px;
  font-size: 12px; color: #888; cursor: pointer;
  background: none; border: none;
}
#btd-auth-modal .am-dismiss:hover { color: #111; }
#btd-auth-modal .am-success { text-align: center; padding: 8px 0; }
#btd-auth-modal .am-success p { font-size: 14px; color: #333; line-height: 1.6; }

/* ============================================
   MAIN CONTENT
   ============================================ */
#main {
  margin-left: var(--sidebar-w);
  margin-top: var(--player-h);
  min-height: calc(100vh - var(--player-h));
  padding: 0 40px 60px;
}

/* --- Section Headers --- */
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--acc);
  padding: 24px 0 8px;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.section-header .updated {
  font-size: 12px; color: var(--tx-3);
}

/* ============================================
   NEW MUSIC — Horizontal Scroll
   ============================================ */
.music-scroll {
  display: flex; gap: 20px;
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.music-scroll::-webkit-scrollbar { display: none; }
.scroll-view-more {
  flex: 0 0 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-3);
  text-decoration: none;
  white-space: nowrap;
  padding: 0 8px;
  transition: color .15s;
}
.scroll-view-more:hover { color: var(--tx-1); }

.music-card {
  flex: 0 0 170px;
  scroll-snap-align: start;
  cursor: pointer;
}
.music-card .card-art {
  position: relative;
  width: 170px; height: 170px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-2);
}
.music-card .card-art img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .2s;
}
.music-card .card-art:hover img { transform: scale(1.05); }
.music-card .card-art .play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.3);
  opacity: 0; transition: opacity .2s;
}
.music-card .card-art:hover .play-overlay { opacity: 1; }
/* Keep overlay visible + show pause when this card is actively playing */
.music-card .card-art.is-playing .play-overlay { opacity: 1; }
.play-overlay .play-circle {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--tx-1);
}
/* Swap ▶ to ⏸ when playing */
.card-art.is-playing .play-circle { font-size: 0; }
.card-art.is-playing .play-circle::before { content: '⏸'; font-size: 18px; color: var(--tx-1); }
.music-card .card-title {
  display: block;
  margin-top: 8px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; text-decoration: none; color: var(--tx-1);
}
.music-card .card-title:hover { text-decoration: underline; }
.music-card .card-artist {
  display: block;
  font-size: 12px; color: var(--tx-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; text-decoration: none;
}
.music-card .card-artist:hover { text-decoration: underline; }
.card-flag { font-size: 12px; margin-left: 4px; vertical-align: middle; }

/* ============================================
   CHARTS / POPULAR LIST
   ============================================ */
.chart-list { margin-top: 8px; }
.chart-row {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-2);
  transition: background .15s;
  cursor: pointer;
}
.chart-row:hover { background: var(--bg-2); }
.chart-rank {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700;
  color: var(--acc);
  width: 32px; text-align: center; flex-shrink: 0;
}
/* Chart play button is now overlaid on art — hide standalone button */
.chart-play { display: none; }
.chart-art-wrap {
  position: relative; flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 4px; overflow: hidden;
  background: var(--bg-2);
  cursor: pointer;
}
.chart-art {
  width: 48px; height: 48px;
  border-radius: 4px; object-fit: cover;
  display: block;
}
.chart-art-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.chart-row:hover .chart-art-overlay,
.chart-art-wrap.is-playing .chart-art-overlay { opacity: 1; }
.chart-art-overlay .chart-play-circle {
  width: 24px; height: 24px;
  background: rgba(255,255,255,.9); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #000; padding-left: 1px;
}
.chart-info { flex: 1; min-width: 0; }
.chart-info .chart-artist {
  font-size: 13px; color: var(--tx-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chart-info .chart-title {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chart-actions {
  display: flex; gap: 12px; flex-shrink: 0;
}
.chart-actions button {
  color: var(--tx-3); font-size: 16px;
  transition: color .15s;
}
.chart-actions button:hover { color: var(--tx-2); }

/* ============================================
   NEW MUSIC PAGE — Grid
   ============================================ */
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}
.music-grid .music-card { flex: none; width: auto; }
.music-grid .music-card .card-art { width: 100%; height: 0; padding-bottom: 100%; }
.music-grid .music-card .card-art img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.music-grid .music-card .card-art .play-overlay { position: absolute; }
.music-grid .card-date { font-size: 11px; color: var(--tx-3); margin-top: 4px; }

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-container { max-width: 700px; }
.search-input-wrap {
  position: relative; margin-bottom: 32px;
}
.search-input-wrap input {
  width: 100%; padding: 14px 20px 14px 48px;
  font-size: 16px; font-family: var(--font-body);
  border: 2px solid var(--bd); border-radius: 8px;
  outline: none; transition: border-color .15s;
  background: var(--bg);
}
.search-input-wrap input:focus { border-color: var(--acc); }
.search-input-wrap .search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--tx-3);
}
.search-results { display: flex; flex-direction: column; gap: 12px; }
.search-result {
  display: flex; align-items: center; gap: 16px;
  padding: 12px; border-radius: 8px;
  transition: background .15s; cursor: pointer;
}
.search-result:hover { background: var(--bg-2); }
.search-result img {
  width: 56px; height: 56px; border-radius: 4px; object-fit: cover;
  background: var(--bg-2); flex-shrink: 0;
}
.search-result .result-info { flex: 1; min-width: 0; }
.search-result .result-artist {
  font-size: 13px; color: var(--tx-3);
}
.search-result .result-title {
  font-size: 15px; font-weight: 600;
}
.search-result .result-date {
  font-size: 11px; color: var(--tx-3);
}

/* ============================================
   POST DETAIL
   ============================================ */

/* Post page: grey body, hero flush to player bar */
body[data-page="post"] {
  background: var(--bg-2);
}
body[data-page="post"] #main {
  background: var(--bg-2);
  position: fixed !important;
  top: var(--player-h) !important;
  left: var(--sidebar-w) !important;
  right: 0 !important;
  bottom: 0 !important;
  overflow-y: auto !important;
  margin: 0 !important;
  padding: 0 var(--sidebar-w) 60px 0 !important;
  width: auto !important;
  min-height: unset !important;
}

/* The post card — fills content area, flush to top */
#post-content {
  background: var(--bg);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  overflow: hidden;
  width: 100%;
}

.post-hero {
  position: relative;
  margin: 0;
  padding: 40px;
  display: flex; gap: 0;
  align-items: flex-end;
  background: var(--bg-2);
  overflow: hidden;
}
.post-hero-bg {
  position: absolute; inset: -20px;
  background-size: cover; background-position: center;
  filter: blur(28px) brightness(.9);
  opacity: .9;
}
.post-art-wrap {
  position: relative; z-index: 1;
  flex-shrink: 0;
  width: 280px; height: 280px;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  overflow: hidden;
  cursor: pointer;
}
.post-art-wrap:hover .post-art-overlay,
.post-art-wrap.is-playing .post-art-overlay { opacity: 1; }
.post-art-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
  border-radius: 8px;
}
.post-art-overlay .art-play-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: #000;
  padding-left: 4px; /* optical center for ▶ */
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  transition: transform .15s ease;
}
.post-art-wrap:hover .art-play-circle { transform: scale(1.08); }
.post-hero-art {
  width: 280px; height: 280px;
  border-radius: 8px; object-fit: cover;
  display: block;
}
.post-hero-meta {
  position: relative; z-index: 1;
  flex: 1; min-width: 0;
  display: flex; align-items: stretch;
}
/* White card matches artwork height exactly */
.post-hero-card {
  background: #fff;
  border-radius: 0;
  padding: 28px 32px;
  display: flex; flex-direction: column; gap: 10px;
  justify-content: center;
  flex: 1; width: 100%;
  height: 280px;
  box-shadow: none;
  box-sizing: border-box;
}
.post-hero-card .post-title {
  font-family: var(--font-heading);
  font-size: 42px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: #111; line-height: 1.1;
}
.post-hero-card .post-artist {
  font-size: 28px; font-weight: 700; color: #333;
  text-decoration: none; text-transform: uppercase;
  letter-spacing: .5px; display: block;
}
.post-hero-card .post-artist:hover { color: #000; }
.post-hero-card .post-flag {
  font-size: 32px; line-height: 1; margin-top: 2px;
}
.post-hero-card .post-date {
  font-size: 12px; color: #666;
}
.post-hero-card .post-date-rel { color: var(--acc); font-weight: 600; }
.post-hero-card .post-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.post-hero-card .post-stream-links {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px;
}

.post-body-wrap {
  display: flex; gap: 40px; margin-top: 0;
  padding: 32px 40px 40px;
}
.post-body {
  flex: 1; min-width: 0;
  font-size: 16px; line-height: 1.75; color: var(--tx-2);
}
.post-body p { margin-bottom: 16px; }

/* ── Inline track player row (replaces Spotify embed) ── */
.post-inline-player {
  display: flex; align-items: center; gap: 16px;
  margin-top: 28px;
  padding: 16px;
  background: var(--bg-2);
  border-radius: 8px;
  border: 1px solid var(--bd);
  cursor: pointer;
  transition: background 0.15s;
}
.post-inline-player:hover { background: var(--bg-3, #efefef); }
.pip-art-wrap {
  position: relative; flex-shrink: 0;
  width: 72px; height: 72px;
  border-radius: 6px; overflow: hidden; cursor: pointer;
}
.pip-art {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .2s;
}
.pip-art-wrap:hover .pip-art { transform: scale(1.05); }
.pip-play-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity .15s;
  border-radius: 6px;
}
.pip-play-btn {
  width: 36px; height: 36px;
  background: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #000; padding-left: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: transform .15s;
  cursor: pointer;
}
.pip-art-wrap:hover .pip-play-btn { transform: scale(1.08); }
.pip-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pip-title {
  font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--tx-1);
}
.pip-artist { font-size: 13px; color: var(--tx-2); }
.pip-source {
  font-size: 11px; color: var(--tx-3);
  text-transform: uppercase; letter-spacing: .5px;
  text-decoration: none; margin-top: 2px;
}
.pip-source:hover { color: var(--acc); }

/* ── Comments ── */
.post-comments {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--bd);
}
.comments-header h4 {
  font-family: var(--font-heading);
  font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--tx-3); margin-bottom: 16px;
}
.comments-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.comment-item { padding: 12px 0; border-bottom: 1px solid var(--bd); }
.comment-meta { font-size: 12px; color: var(--tx-3); margin-bottom: 4px; }
.comment-meta strong { color: var(--tx-2); margin-right: 8px; }
.comment-text { font-size: 14px; line-height: 1.6; color: var(--tx-2); }
.comment-empty { font-size: 13px; color: var(--tx-3); padding: 8px 0; }
.comments-gate { text-align: center; padding: 16px 0; }
.comments-gate p { font-size: 13px; color: var(--tx-3); margin-bottom: 12px; }
.comments-signin-btn {
  padding: 8px 20px; background: var(--acc); color: #fff;
  border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: opacity .15s;
}
.comments-signin-btn:hover { opacity: .85; }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.comment-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--bd); border-radius: 6px;
  font-size: 14px; font-family: var(--font-body); color: var(--tx-2);
  background: var(--bg); resize: vertical; outline: none;
  transition: border-color .15s;
}
.comment-input:focus { border-color: var(--acc); }
.comment-submit {
  align-self: flex-end;
  padding: 8px 20px; background: var(--acc); color: #fff;
  border-radius: 4px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; transition: opacity .15s;
}
.comment-submit:hover { opacity: .85; }
.comment-submit:disabled { opacity: .5; cursor: default; }

.post-spotify-embed {
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
}
.post-spotify-embed iframe { display: block; border-radius: 12px; }

/* Spotify embed blocks inside post write-ups */
.btd-tracks {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.btd-track-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.btd-track-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btd-track-embed iframe {
  display: block;
  border-radius: 8px;
}

.post-tracklist { margin-top: 32px; }
.post-tracklist h3 {
  font-family: var(--font-heading);
  font-size: 18px; font-weight: 700;
  text-transform: uppercase; margin-bottom: 12px;
}
.track-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--bd);
  cursor: pointer; transition: background .15s;
}
.track-row:hover { background: var(--bg-2); }
.track-row .track-play {
  width: 28px; height: 28px;
  border: 2px solid var(--tx-3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--tx-3);
  flex-shrink: 0; transition: border-color .15s, color .15s;
}
.track-row:hover .track-play { border-color: var(--acc); color: var(--acc); }
.track-row .track-name { font-size: 14px; font-weight: 500; flex: 1; }
.track-row .track-artist-name { font-size: 12px; color: var(--tx-3); }
.track-embed { padding: 6px 0; border-bottom: 1px solid var(--bd); }
.track-embed iframe { border-radius: 6px; display: block; }

.post-sidebar {
  width: 220px; flex-shrink: 0;
}
.post-sidebar section { margin-bottom: 28px; }
.post-sidebar h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--tx-3); margin-bottom: 12px;
}
.post-sidebar .written-by {
  display: flex; align-items: center; gap: 12px;
}
.post-sidebar .written-by .author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-2); display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 600;
}
.post-sidebar .written-by .author-name { font-size: 14px; font-weight: 600; }
.post-sidebar .written-by .author-location { font-size: 12px; color: var(--tx-3); }
.post-sidebar .next-post, .post-sidebar .related-item {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; cursor: pointer;
}
.post-sidebar .next-post img, .post-sidebar .related-item img {
  width: 48px; height: 48px; border-radius: 4px; object-fit: cover;
  background: var(--bg-2); flex-shrink: 0;
}
.post-sidebar .related-item .rel-title { font-size: 13px; font-weight: 600; }
.post-sidebar .related-item .rel-artist { font-size: 12px; color: var(--tx-3); }

/* ============================================
   EMPTY / LOADING STATES
   ============================================ */
.loading-msg {
  text-align: center; padding: 60px 0;
  color: var(--tx-3); font-size: 14px;
}
/* Post hero has dark placeholder while Firebase loads — no white flash */
.post-hero {
  min-height: 280px;
  background: #1a1a1a;
}
.post-hero .loading-msg {
  color: rgba(255,255,255,.4);
}

/* ============================================
   MOBILE (<768px)
   ============================================ */
@media (max-width: 767px) {
  #sidebar {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0;
    width: 100%; height: 60px;
    flex-direction: row; padding: 0;
    border-right: none; border-top: 1px solid var(--bd);
    overflow: visible;
  }
  #sidebar .sidebar-brand,
  #sidebar .sidebar-user,
  #sidebar .sidebar-footer,
  #sidebar-login-block { display: none; }
  #sidebar nav {
    display: flex; width: 100%;
    align-items: center; justify-content: space-around;
  }
  #sidebar nav a {
    flex-direction: column; gap: 2px;
    padding: 8px 0; font-size: 10px;
    border-left: none; border-top: 2px solid transparent;
    text-align: center;
  }
  #sidebar nav a.active { border-left-color: transparent; border-top-color: var(--acc); }
  #sidebar nav a .nav-icon { font-size: 20px; }
  #sidebar nav a[href='/search.html'],
  #sidebar nav a[href='search.html'],
  #sidebar nav a[href='/search'],
  #sidebar nav a[href='search'] { display: none !important; }
  /* Hide Submit Music on mobile — accessible via desktop sidebar + direct URL */
  #sidebar nav a[href='/submit.html'],
  #sidebar nav a[href='submit.html'],
  #sidebar nav a[href='/submit'],
  #sidebar nav a[href='submit'] { display: none !important; }

  /* Archive — desktop sidebar only, not in mobile bottom nav */
  #sidebar nav a[href='/archive'],
  #sidebar nav a[href='archive'],
  #sidebar nav a[href='/archive.html'] { display: none !important; }

  #main {
    margin-left: 0;
    margin-top: 0;
    padding: calc(var(--player-h) + 12px) 16px 80px;
  }
  /* Discover page only: extra padding for fixed search bar (~58px tall) */
  body[data-page="discover"] #main {
    padding-top: calc(var(--player-h) + 70px);
  }
  .section-header { margin-bottom: 14px; padding-top: 0; }
  .music-scroll { gap: 12px; }

  /* ── Post page mobile ── */
  body[data-page="post"] #main {
    left: 0 !important;
    padding: 0 0 80px 0 !important;
  }

  /* Hero: stacked, full-width art on top */
  .post-hero {
    flex-direction: column;
    padding: 0;
    margin: 0;
    gap: 0;
    align-items: stretch;
  }
  .post-art-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  .post-hero-art { width: 100%; height: 100%; object-fit: cover; }

  /* Info card below the art */
  .post-hero-meta { display: block; }
  .post-hero-card {
    height: auto;
    padding: 20px 16px 16px;
    border-radius: 0;
    gap: 8px;
    background: var(--bg);
    border-bottom: 1px solid var(--bd);
  }
  .post-hero-card .post-title { font-size: 28px; line-height: 1.1; }
  .post-hero-card .post-artist { font-size: 18px; }
  .post-hero-card .post-flag { font-size: 22px; }
  .post-hero-card .post-stream-links { margin-top: 8px; }

  /* Body: single column, no sidebar */
  .post-body-wrap {
    flex-direction: column;
    gap: 0;
    padding: 20px 16px 0;
  }
  .post-body { font-size: 15px; line-height: 1.7; }
  .post-sidebar { width: 100%; padding-top: 24px; }

  /* Genre pills */
  .post-hero-card .post-tags .genre-pill {
    padding: 8px 14px;
    font-size: 12px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
  .list-genres .genre-pill {
    padding: 4px 10px;
    font-size: 10px;
  }

  .post-body-wrap { flex-direction: column; }
  .post-sidebar { width: 100%; }

  .music-card { flex: 0 0 140px; }
  .music-card .card-art { width: 140px; height: 140px; }

  /* Mobile player bar — hide desktop-only elements, clean layout */
  #player-bar .player-brand { display: none; }
  #player-bar .player-right { width: auto; padding: 0 8px; }
  #player-bar .player-right .volume-btn { display: none; }
  #player-bar .player-info .player-source { display: none; }

  #player-bar {
    padding: 0 12px;
    gap: 8px;
  }
  #player-bar .player-controls {
    padding: 0 4px 0 0;
    gap: 4px;
  }
  #player-bar .player-controls button {
    width: 32px; height: 32px;
    font-size: 14px;
    background: none;
    border: none;
  }
  #player-bar .player-controls .play-btn {
    width: 38px; height: 38px;
    font-size: 16px;
  }
  #player-bar .player-controls svg {
    width: 15px; height: 15px;
  }
  #player-bar .player-art {
    width: 34px; height: 34px;
  }
  #player-bar .player-info {
    max-width: 150px;
  }
  #player-bar .player-info .player-title {
    font-size: 12px;
  }
  .player-progress-wrap {
    display: none;
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.mt-40 { margin-top: 40px; }
.hidden { display: none !important; }

/* ============================================
   YOUTUBE PLAYER MODAL
   ============================================ */
#yt-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s ease;
  pointer-events: none;
}
#yt-modal.open { opacity: 1; pointer-events: all; }
.yt-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
}
.yt-panel {
  position: relative; z-index: 1;
  background: var(--tx-1);
  border-radius: 12px;
  overflow: hidden;
  width: min(600px, 95vw);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  transform: translateY(20px);
  transition: transform .25s ease;
}
#yt-modal.open .yt-panel { transform: translateY(0); }
.yt-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
}
.yt-title { font-family: var(--font-heading); font-size: 18px; font-weight: 700; color: #fff; letter-spacing: .03em; }
.yt-artist { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 2px; }
.yt-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; flex-shrink: 0;
  transition: background .15s;
}
.yt-close:hover { background: rgba(255,255,255,.3); }
.yt-embed { position: relative; padding-bottom: 56.25%; height: 0; }
.yt-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* Explicit badge */
.explicit {
  display: inline-block;
  font-size: 9px; font-weight: 700;
  background: var(--tx-3); color: #fff;
  padding: 1px 4px; border-radius: 3px;
  vertical-align: middle; margin-left: 4px;
}

/* ============================================
   POST PAGE — STREAM LINKS + SOCIAL PILLS
   ============================================ */
.post-stream-links {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin: 14px 0 10px;
}
.post-play-btn {
  background: rgba(255,255,255,0.95); color: #111;
  border: none; border-radius: 20px;
  padding: 8px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer; letter-spacing: .03em;
  transition: all .15s; white-space: nowrap;
}
.post-play-btn:hover { background: #fff; transform: scale(1.03); }
.stream-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 16px; border-radius: 20px; font-size: 12px;
  font-weight: 700; letter-spacing: .04em; text-decoration: none;
  transition: opacity .15s; white-space: nowrap;
}
.stream-pill:hover { opacity: .85; }
.spotify-pill { background: #1DB954; color: #fff; }
.apple-pill { background: #fff; color: #000; }
.post-socials { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.social-pill {
  display: inline-block; padding: 5px 14px; border-radius: 16px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-decoration: none; background: rgba(0,0,0,.65);
  color: #fff; border: 1px solid rgba(255,255,255,.2);
  transition: background .15s;
}
.social-pill:hover { background: rgba(0,0,0,.85); }

/* ============================================
   NEW MUSIC — LIST VIEW
   ============================================ */

.view-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

.view-toggle button {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--tx-3);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.view-toggle button.active {
  border-color: var(--tx-2);
  color: var(--tx-1);
}

/* List view container */
#music-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* List item */
.music-list-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--bd);
  cursor: pointer;
  transition: background 0.15s;
}

.music-list-item:hover {
  background: var(--bg-2);
}

.music-list-item .list-art {
  position: relative;
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 4px;
  overflow: hidden;
}

.music-list-item .list-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.music-list-item .list-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  opacity: 1;
  transition: opacity 0.15s;
}

.music-list-item:hover .list-play-overlay,
.music-list-item.playing .list-play-overlay {
  opacity: 1;
}

.music-list-item .list-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  border: none;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-list-item .list-info {
  flex: 1;
  min-width: 0;
}

.music-list-item .list-artist {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tx-3);
  margin-bottom: 4px;
}

.music-list-item .list-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--tx-1);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-list-item .list-writeup {
  font-size: 13px;
  color: var(--tx-3);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.music-list-item .list-date {
  font-size: 11px;
  color: var(--tx-3);
  margin-top: 6px;
}

/* ============================================
   NEW MUSIC — MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .music-list-item .list-art {
    width: 100px;
    height: 100px;
  }
}

/* ── Genre Pills & Filter Bar ─────────────────────────────────── */
.genre-pill {
  display: inline-block;
  padding: 3px 10px;
  background: #000;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  margin-right: 6px;
  transition: opacity 0.15s;
  cursor: pointer;
  position: relative;
  z-index: 5;
}
.genre-pill:hover { opacity: 0.75; }
/* Card + list genre pills */
.card-genres{margin-top:6px;display:flex;flex-wrap:wrap;gap:4px;}
.card-genres .genre-pill{font-size:9px;padding:2px 7px;}
.list-genres{margin-top:4px;display:flex;flex-wrap:wrap;gap:4px;}
.list-genres .genre-pill{font-size:9px;padding:2px 7px;}


#genre-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}
.genre-btn {
  padding: 5px 12px;
  background: #f2f2f2;
  border: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.genre-btn:hover { background: #e0e0e0; }
.genre-btn.active { background: #000; color: #fff; }

.year-filter-wrap {
  position: relative;
  display: inline-block;
}
.year-pill { min-width: 68px; }
.year-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 100;
  padding: 4px 0;
  min-width: 80px;
  max-height: 260px;
  overflow-y: auto;
}
.year-dropdown.open { display: block; }
.year-option {
  display: block;
  width: 100%;
  padding: 6px 14px;
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.5px;
  color: #222;
}
.year-option:hover { background: #f2f2f2; }
.year-option.active { background: #000; color: #fff; }

/* ── Artist Pages ─────────────────────────────────────────────── */
.artist-hero {
  padding: 0;
  margin-bottom: 0;
}
.artist-hero-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 24px;
  background: #f7f7f7;
  border-bottom: 1px solid #eee;
}
.artist-hero-art {
  width: 100px; height: 100px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.artist-hero-name {
  font-size: 32px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 6px;
}
.artist-hero-count {
  font-size: 13px;
  color: #888;
}
.artist-posts {
  padding: 0 24px 40px;
}

/* Artist name links — no underline, inherit color, pointer */
.list-artist, .card-artist, .post-artist {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.list-artist:hover, .card-artist:hover, .post-artist:hover {
  text-decoration: underline;
}

/* Artwork is clickable */
.list-art {
  cursor: pointer;
}

/* ── Chart Trend Arrows ───────────────────────────────────────── */
.chart-trend {
  font-size: 13px;
  font-weight: 700;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.trend-up   { color: #22c55e; } /* green */
.trend-down { color: #ef4444; } /* red */
.trend-neutral { color: #999; font-size: 11px; }

/* Remove old chart-actions styles */
.chart-actions { display: none; }

/* ── Artist page list fix ─────────────────────────────────────── */
.artist-posts .music-list-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.artist-posts .list-art {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}
.artist-posts .list-art img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}
.artist-posts .list-info {
  flex: 1;
  min-width: 0;
}

/* ── Heard First nav — always visible, never hidden ────────────── */
.nav-heard-first,
.nav-heard-first.active {
  display: flex !important;
  color: #000 !important;
  font-weight: 700 !important;
  background: #f5f0e8 !important;
  border-radius: 8px !important;
  border-left-color: transparent !important;
  margin-top: 4px;
}
.nav-heard-first:hover,
.nav-heard-first.active:hover {
  background: #ebe4d4 !important;
  color: #000 !important;
}
[data-theme="dark"] .nav-heard-first,
[data-theme="dark"] .nav-heard-first.active {
  color: #ffd700 !important;
  background: rgba(255,215,0,0.1) !important;
}
[data-theme="dark"] .nav-heard-first:hover {
  background: rgba(255,215,0,0.16) !important;
}

/* ── Mobile Heard First sticky CTA ─────────────────────────────── */
#hf-mobile-cta {
  display: none;
}
@media (max-width: 700px) {
  #hf-mobile-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #000;
    border-top: 1px solid #222;
  }
  #hf-mobile-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
  #hf-mobile-cta .hf-sub {
    font-size: 12px;
    font-weight: 400;
    color: #888;
  }
  /* Pad bottom of page so content isn't hidden behind the bar */
  body { padding-bottom: 56px; }
}

/* ── Mobile sticky search bar ──────────────────────────────────── */
#mobile-search-bar {
  display: none; /* hidden on desktop */
}
@media (max-width: 700px) {
  #mobile-search-bar {
    display: block;
    position: fixed;
    top: var(--player-h);
    left: 0;
    right: 0;
    z-index: 90;
    background: var(--bg);
    padding: 10px 16px;
    border-bottom: 1px solid var(--bd);
  }
  #mobile-search-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--bd);
    background: var(--bg-3);
    color: var(--tx-1);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
  }
  #mobile-search-input::placeholder {
    color: var(--tx-3);
  }
  #mobile-search-input:focus {
    border-color: var(--acc);
    background: var(--bg-2);
  }
}

/* ── List item playing state ────────────────────────────────────── */
.music-list-item .list-art.is-playing .list-play-overlay {
  background: rgba(0,0,0,0.6);
}
.music-list-item .list-art.is-playing .list-play-btn {
  background: var(--acc);
  color: #fff;
}

/* ── List writeup — clickable ───────────────────────────────────── */
.music-list-item .list-writeup {
  cursor: pointer;
}
.music-list-item .list-writeup:hover {
  color: var(--tx-1);
}

/* ── Author avatar — photo ──────────────────────────────────────── */
.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

@keyframes btd-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Sidebar: Next Post + Related Tracks ─────────────────────────────────── */
.pfn-next-item,
.pfn-related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
  transition: opacity 0.15s;
}
.pfn-next-item:hover,
.pfn-related-item:hover { opacity: 0.65; }
.pfn-next-item img,
.pfn-related-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--bg-2);
}
.pfn-next-title,
.pfn-related-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--tx-1);
}
.pfn-next-artist,
.pfn-related-artist {
  font-size: 12px;
  color: var(--tx-3);
  margin-top: 2px;
}
