/* ── TOKENS ── */
:root {
  --bg:        #07120d;
  --bg2:       #0a1a12;
  --bg3:       #132219;
  --border:    #1a2e1f;
  --border2:   #2a4a35;
  --gold:      #8a7a5a;
  --gold-dim:  rgba(138,122,90,0.18);
  --gold-mid:  rgba(138,122,90,0.35);
  --cream:     #f5f1e8;
  --cream-dim: rgba(245,241,232,0.12);
  --muted:     #c0c5c9;
  --muted-dim: rgba(192,197,201,0.55);
  --ember:     #b05a2a;
  --ember-dim: rgba(176,90,42,0.18);
  --serif:     'Cormorant Garamond', Georgia, serif;
  --sans:      'Inter', system-ui, sans-serif;
  --r-card:    18px;
  --r-pill:    9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; background: var(--bg); color: var(--cream); font-family: var(--sans); font-size: 14px; line-height: 1.6; }

::selection { background: var(--gold-mid); }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── LAYOUT ── */
.site-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
@media (max-width: 900px) {
  .site-wrap { grid-template-columns: 1fr; }
}

/* ── NAV ── */
.nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  height: 58px;
  border-bottom: 1px solid var(--border);
  background: rgba(7,18,13,0.95);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
  overflow-x: auto;
}
.nav-brand {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--cream);
  white-space: nowrap;
  margin-right: 12px;
  flex-shrink: 0;
}
.nav-brand em { font-style: italic; color: var(--gold); }
.nav-tabs { display: flex; gap: 2px; flex: 1; }
.nav-tab {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted-dim);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-tab:hover { color: var(--cream); background: var(--cream-dim); }
.nav-tab.active { color: var(--cream); background: var(--gold-dim); }
.nav-tab .lock-icon { font-size: 9px; margin-left: 4px; opacity: 0.6; }
.nav-auth { display: flex; gap: 8px; margin-left: auto; flex-shrink: 0; }
.btn { padding: 7px 16px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; transition: all 0.15s; }
.btn-ghost { border: 1px solid var(--border2); color: var(--muted); }
.btn-ghost:hover { border-color: var(--gold); color: var(--cream); }
.btn-gold { background: var(--cream); color: var(--bg2); }
.btn-gold:hover { background: var(--gold); color: var(--bg2); }
.btn-ember { background: var(--ember); color: var(--cream); }
.btn-ember:hover { opacity: 0.85; }

/* ── MAIN CONTENT ── */
.main-col { min-width: 0; padding: 32px 28px 60px; }

/* ── FEED COLUMN ── */
.feed-col {
  border-left: 1px solid var(--border);
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow: hidden;
}

@media (max-width: 900px) {
  .feed-col {
    position: static;
    height: auto;
    max-height: 75vh;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

.feed-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.feed-title { font-family: var(--serif); font-size: 15px; font-weight: 300; letter-spacing: 0.04em; }
.feed-entries { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.feed-entry {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
}
.feed-entry-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.feed-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--gold); flex-shrink: 0;
}
.feed-name { font-weight: 500; font-size: 11px; color: var(--cream); }
.feed-time { font-size: 10px; color: var(--muted-dim); margin-left: auto; }
.feed-text { color: var(--muted); font-size: 12px; }
.feed-image {
  display: block;
  width: 100%;
  max-height: 260px;
  margin-top: 8px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--border);
}
.feed-image.placeholder { aspect-ratio: 16 / 9; }
   .feed-snippet { position: relative; }
   .feed-snippet-play {
     position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
     padding: 6px 16px; border-radius: var(--r-pill);
     background: rgba(7,18,13,0.85); border: 1px solid var(--gold);
     color: var(--cream); font-size: 11px; letter-spacing: 0.03em; white-space: nowrap;
     backdrop-filter: blur(4px);
     transition: background 0.15s, color 0.15s;
   }
   .feed-snippet-play:hover { background: var(--gold); color: var(--bg2); }
   .feed-snippet-play:disabled { opacity: 0.6; cursor: wait; }
.feed-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-dim);
  line-height: 1.6;
}
.feed-attach-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.feed-attach-name {
  display: inline-block; max-width: 150px; vertical-align: bottom;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-compose { padding: 12px; border-top: 1px solid var(--border); }
.feed-compose textarea {
  width: 100%; background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; padding: 10px 12px; font-size: 12px; color: var(--cream);
  resize: none; outline: none; line-height: 1.5;
}
.feed-compose textarea:focus { border-color: var(--gold); }
.feed-compose-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.feed-attach { font-size: 11px; color: var(--muted-dim); }
.feed-attach:hover { color: var(--gold); }

/* ── TABS ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Creator dashboard: the feed column is hidden on this tab */
body.host-mode .site-wrap { grid-template-columns: 1fr; }
body.host-mode .feed-col { display: none; }

/* ── HOMEPAGE ── */
.hero {
  max-width: 680px;
  padding: 48px 0 40px;
}
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 20px;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(46px, 7vw, 76px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin-bottom: 24px;
}
.hero-title em { font-style: italic; color: var(--gold); }
.hero-body {
  font-size: 15px;
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.75;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-divider {
  margin: 48px 0;
  border: none;
  border-top: 1px solid var(--border);
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.home-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px;
  transition: border-color 0.2s;
  cursor: pointer;
}
.home-card:hover { border-color: var(--gold); }
.home-card-icon { font-size: 22px; margin-bottom: 14px; }
.home-card-title { font-family: var(--serif); font-size: 19px; font-weight: 400; margin-bottom: 8px; }
.home-card-desc { font-size: 12px; color: var(--muted-dim); line-height: 1.6; }
.home-card-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 10px;
  letter-spacing: 0.05em;
  border: 1px solid var(--border2);
  color: var(--muted-dim);
}
.home-card-badge.gold { border-color: var(--gold); color: var(--gold); }
.faq details { border-top: 1px solid var(--border); padding: 8px 0; }
.faq details:first-child { border-top: none; padding-top: 0; }
.faq summary { cursor: pointer; color: var(--cream); font-size: 12px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '+ '; color: var(--gold); }
.faq details[open] summary::before { content: '− '; }
.faq p { margin-top: 6px; }


/* ── SECTION HEADERS ── */
.section-head { margin-bottom: 24px; }
.section-title { font-family: var(--serif); font-size: 32px; font-weight: 300; letter-spacing: -0.01em; margin-bottom: 6px; }
.section-sub { font-size: 12px; color: var(--muted-dim); }
.section-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }

/* ── VIDEO GRID ── */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.video-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}
.video-thumb {
  aspect-ratio: 16/9;
  background: var(--bg3);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.video-thumb iframe { width: 100%; height: 100%; border: none; }
.video-label {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--muted-dim);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
}
.video-label .dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
}
.dot-gold { background: var(--gold); }
.dot-ember { background: var(--ember); }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.youtube-link {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border2); border-radius: var(--r-pill);
  padding: 8px 18px; font-size: 12px; color: var(--muted);
  transition: all 0.15s;
}
.youtube-link:hover { border-color: var(--ember); color: var(--cream); }
.youtube-link svg { width: 16px; height: 16px; fill: var(--ember); }

/* ── AGE GATE ── */
.age-gate-box {
  max-width: 480px; width: 100%;
  background: var(--bg2);
  border: 1px solid var(--gold-mid);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
}
.age-gate-icon { font-size: 36px; margin-bottom: 20px; }
.age-gate-title { font-family: var(--serif); font-size: 30px; font-weight: 300; margin-bottom: 12px; }
.age-gate-body { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 28px; max-width: 38ch; margin-left: auto; margin-right: auto; }
.age-gate-cta { display: flex; flex-direction: column; gap: 10px; }
.age-gate-sub { font-size: 11px; color: var(--muted-dim); margin-top: 16px; line-height: 1.6; }
.age-gate-sub a { color: var(--gold); text-decoration: underline; }
.age-gate-member-nudge {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
  border-radius: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: left;
}
.age-gate-member-nudge strong { color: var(--cream); }

/* ── AUDIO PLAYER ── */
.audio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.audio-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: border-color 0.2s;
}
.audio-card:hover { border-color: var(--gold); }
.audio-card-top { padding: 20px 20px 16px; }
.audio-category {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 10px;
  letter-spacing: 0.05em;
  border: 1px solid var(--border2);
  color: var(--muted-dim);
  margin-bottom: 12px;
}
.audio-category.mature { border-color: var(--ember); color: var(--ember); }
.audio-category.all-ages { border-color: var(--gold); color: var(--gold); }
.audio-title { font-family: var(--serif); font-size: 18px; font-weight: 400; margin-bottom: 6px; }
.audio-meta { font-size: 11px; color: var(--muted-dim); }
.audio-player {
  background: var(--bg3);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
}
audio { width: 100%; height: 32px; accent-color: var(--gold); }
audio::-webkit-media-controls-panel { background: var(--bg3); }
.audio-actions {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.action-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted-dim);
  transition: color 0.15s;
}
.action-btn:hover, .action-btn.liked { color: var(--gold); }
.action-btn svg { width: 14px; height: 14px; }

/* ── COMMENTS ── */
.comments-section { padding: 16px 20px; border-top: 1px solid var(--border); }
.comments-toggle { font-size: 11px; color: var(--muted-dim); cursor: pointer; margin-bottom: 12px; }
.comments-toggle:hover { color: var(--cream); }
.comment-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.comment {
  background: var(--bg3); border-radius: 10px; padding: 10px 12px; font-size: 12px;
}
.comment-name { font-weight: 500; color: var(--cream); margin-bottom: 2px; font-size: 11px; }

.comment-text { color: var(--muted); }
.comment-form { display: flex; gap: 8px; }
.comment-form input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--r-pill); padding: 8px 14px; font-size: 12px;
  outline: none; transition: border-color 0.15s;
}
.comment-form input:focus { border-color: var(--gold); }
.comment-form button { padding: 8px 16px; border-radius: var(--r-pill); background: var(--gold-dim); border: 1px solid var(--gold-mid); font-size: 12px; color: var(--gold); }
.comment-form button:hover { background: var(--gold-mid); }
.anon-notice { font-size: 10px; color: var(--muted-dim); margin-top: 6px; font-style: italic; }

/* ── SEARCH + FILTER BAR ── */
.filter-bar { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-search {
  flex: 1; min-width: 200px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--r-pill); padding: 9px 16px 9px 38px;
  font-size: 13px; color: var(--cream); outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a7a5a' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
  transition: border-color 0.15s;
}
.filter-search:focus { border-color: var(--gold); }
.filter-select {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--r-pill); padding: 9px 16px;
  font-size: 12px; color: var(--muted); outline: none;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--gold); }
.filter-tag {
  padding: 8px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--border2); font-size: 12px; color: var(--muted-dim);
  transition: all 0.15s; cursor: pointer; background: none;
}
.filter-tag:hover, .filter-tag.active { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }

/* ── MEMBER GATE BANNER ── */
.member-gate {
  background: var(--bg2);
  border: 1px solid var(--gold-mid);
  border-radius: var(--r-card);
  padding: 32px;
  text-align: center;
  margin-top: 32px;
}
.member-gate-icon { font-size: 28px; margin-bottom: 16px; }
.member-gate-title { font-family: var(--serif); font-size: 26px; font-weight: 300; margin-bottom: 10px; }
.member-gate-body { font-size: 13px; color: var(--muted); max-width: 44ch; margin: 0 auto 24px; line-height: 1.7; }
.member-gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── PAID GATE ── */
.paid-gate {
  background: linear-gradient(135deg, var(--ember-dim), var(--gold-dim));
  border: 1px solid var(--ember);
  border-radius: var(--r-card);
  padding: 32px;
  text-align: center;
}
.paid-gate-title { font-family: var(--serif); font-size: 26px; font-weight: 300; margin-bottom: 10px; }

/* ── EARLY ACCESS TABS ── */
.ea-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.ea-tab {
  padding: 8px 20px; border-radius: var(--r-pill);
  border: 1px solid var(--border2); font-size: 12px; color: var(--muted-dim);
  cursor: pointer; transition: all 0.15s;
}
.ea-tab.active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.ea-tab.active.ember { background: var(--ember-dim); border-color: var(--ember); color: var(--ember); }

/* ── BEHIND THE SCENES ── */
.bts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.bts-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-card); overflow: hidden;
  position: relative;
}
.bts-card .new-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--ember); color: var(--cream);
  font-size: 9px; padding: 3px 8px; border-radius: var(--r-pill);
  letter-spacing: 0.06em;
}
.bts-card-body { padding: 20px; }
.bts-card-type { font-size: 10px; color: var(--muted-dim); letter-spacing: 0.08em; margin-bottom: 10px; }
.bts-card-title { font-family: var(--serif); font-size: 18px; font-weight: 400; margin-bottom: 8px; }
.bts-card-desc { font-size: 12px; color: var(--muted-dim); line-height: 1.6; }
.bts-player { padding: 16px 20px; background: var(--bg3); border-top: 1px solid var(--border); }
.bts-counter { font-size: 10px; color: var(--muted-dim); margin-top: 8px; }

/* ── ABOUT TAB ── */
.about-hero {
  display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap;
  margin-bottom: 40px;
}
.about-portrait {
  width: 160px; height: 200px; border-radius: 16px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; flex-shrink: 0;
}
.about-text .about-title { font-family: var(--serif); font-size: 40px; font-weight: 300; line-height: 1.1; margin-bottom: 16px; }
.about-text p { font-size: 14px; color: var(--muted); line-height: 1.8; max-width: 55ch; margin-bottom: 16px; }
.about-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.about-placeholder {
  background: var(--bg2); border: 2px dashed var(--border2);
  border-radius: var(--r-card); padding: 40px;
  text-align: center; font-size: 13px; color: var(--muted-dim);
  margin-top: 32px;
}

/* ── AUTH MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(7,18,13,0.92);
  backdrop-filter: blur(10px);
  display: none; justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-box {
  max-width: 420px; width: 100%;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 24px; padding: 36px;
  margin: auto;
}
.modal-title { font-family: var(--serif); font-size: 28px; font-weight: 300; margin-bottom: 6px; }
.modal-sub { font-size: 12px; color: var(--muted-dim); margin-bottom: 24px; }
.modal-tabs { display: flex; gap: 2px; margin-bottom: 24px; padding: 4px; background: var(--bg3); border-radius: var(--r-pill); }
.modal-tab { flex: 1; padding: 8px; border-radius: var(--r-pill); font-size: 12px; color: var(--muted-dim); text-align: center; cursor: pointer; }
.modal-tab.active { background: var(--bg2); color: var(--cream); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 11px; color: var(--muted-dim); letter-spacing: 0.04em; }
.field input {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--cream);
  outline: none; transition: border-color 0.15s;
}
.field input:focus { border-color: var(--gold); }
.modal-divider { position: relative; text-align: center; margin: 20px 0; }
.modal-divider::before { content: ''; position: absolute; inset: 50% 0 auto; height: 1px; background: var(--border); }
.modal-divider span { position: relative; background: var(--bg2); padding: 0 12px; font-size: 11px; color: var(--muted-dim); }
.patreon-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px; border-radius: 10px;
  background: #FF424D; color: #fff; font-size: 13px; font-weight: 500;
  transition: opacity 0.15s;
}
.patreon-btn:hover { opacity: 0.88; }
.modal-close { position: absolute; top: 16px; right: 16px; font-size: 18px; color: var(--muted-dim); cursor: pointer; }
.modal-box { position: relative; }

/* ── UTILITIES ── */
.pill {
  display: inline-block; padding: 4px 12px;
  border-radius: var(--r-pill); font-size: 11px;
  border: 1px solid var(--border2); color: var(--muted-dim);
}
.pill.gold { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.pill.ember { border-color: var(--ember); color: var(--ember); background: var(--ember-dim); }
.spacer { height: 32px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.flex-row { display: flex; align-items: center; gap: 10px; }
.text-muted { color: var(--muted-dim); font-size: 12px; }
.text-gold { color: var(--gold); }
.loading { text-align: center; padding: 40px; color: var(--muted-dim); font-size: 13px; }

/* ── FOOTER ── */
footer {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding: 24px 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 11px; color: var(--muted-dim);
}
footer a:hover { color: var(--gold); }
.footer-links { display: flex; gap: 16px; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  background: var(--bg3); border: 1px solid var(--gold-mid);
  border-radius: 12px; padding: 12px 18px;
  font-size: 13px; color: var(--cream);
  transform: translateY(80px); opacity: 0;
  transition: all 0.3s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast { pointer-events: none; }

/* ── PLAYER BAR ── */
:root { --bar-h: 0px; }
body.player-open {
  --bar-h: 68px;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}
.player-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--bar-h) + env(safe-area-inset-bottom));
  padding: 0 20px env(safe-area-inset-bottom);
  display: none; align-items: center; gap: 12px;
  background: rgba(10,26,18,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--gold-mid);
}
body.player-open .player-bar { display: flex; }
.pb-btn {
  flex-shrink: 0;
  min-width: 36px; height: 36px; padding: 0 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border2);
  font-size: 12px; color: var(--muted);
  transition: all 0.15s;
}
.pb-btn:hover { border-color: var(--gold); color: var(--cream); }
.pb-main { width: 44px; height: 44px; background: var(--cream); color: var(--bg2); border: none; font-size: 15px; }
.pb-main:hover { background: var(--gold); color: var(--bg2); }
.pb-info { flex: 1; min-width: 0; }
.pb-title { font-family: var(--serif); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-progress { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--muted-dim); font-variant-numeric: tabular-nums; }
.pb-progress input { flex: 1; min-width: 0; accent-color: var(--gold); }
.pb-speed {
  flex-shrink: 0;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--r-pill); padding: 6px 10px;
  font-size: 11px; color: var(--muted); outline: none; cursor: pointer;
}
body.player-open .toast { bottom: calc(var(--bar-h) + 16px + env(safe-area-inset-bottom)); }
@media (min-width: 901px) {
  body.player-open .feed-col { height: calc(100vh - 58px - var(--bar-h)); }
}
@media (max-width: 600px) {
  body.player-open { --bar-h: 108px; }
  .player-bar { flex-wrap: wrap; align-content: center; row-gap: 8px; column-gap: 10px; padding-left: 16px; padding-right: 16px; }
  .pb-info { order: -1; flex-basis: 100%; }
  .pb-speed { margin-left: auto; }
}


/* ── MESSAGES (3E, dms.js) ── */
.nav-dm {
  flex-shrink: 0; width: 34px; height: 34px; padding: 0;
  border-radius: 50%; overflow: hidden;
  border: 1px solid var(--border2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nav-dm img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.3); transform-origin: 50% 38%;   /* zoom in on the candle */
}
.nav-dm:hover { border-color: var(--gold); }
.nav-dm.has-unread { border-color: var(--gold); box-shadow: 0 0 10px rgba(255, 170, 60, 0.45); }
.dm-box { max-width: 520px; display: flex; flex-direction: column; }
.dm-box .modal-sub { margin-bottom: 16px; }
.dm-thread {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 50vh; min-height: 120px; overflow-y: auto;
  padding: 14px; margin-bottom: 14px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 14px;
}
.dm-empty { margin: auto; text-align: center; font-size: 12px; color: var(--muted-dim); max-width: 34ch; line-height: 1.6; }
.dm-msg { display: flex; flex-direction: column; max-width: 85%; }
.dm-msg.mine { align-self: flex-end; align-items: flex-end; }
.dm-msg.theirs { align-self: flex-start; align-items: flex-start; }
.dm-bubble {
  padding: 9px 13px; border-radius: 14px;
  font-size: 13px; line-height: 1.5; color: var(--cream);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.dm-msg.mine .dm-bubble { background: var(--gold-dim); border: 1px solid var(--gold-mid); border-bottom-right-radius: 4px; }
.dm-msg.theirs .dm-bubble { background: var(--bg2); border: 1px solid var(--border2); border-bottom-left-radius: 4px; }
.dm-meta { margin-top: 4px; font-size: 10px; color: var(--muted-dim); }
.dm-from { color: var(--gold); }
.dm-delete { font-size: 10px; color: var(--muted-dim); text-decoration: underline dotted; text-underline-offset: 2px; }
.dm-delete:hover { color: var(--ember); }
.dm-compose textarea {
  width: 100%; background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--cream);
  resize: vertical; outline: none; line-height: 1.5;
}
.dm-compose textarea:focus { border-color: var(--gold); }
.dm-compose-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.dm-count { font-size: 11px; color: var(--muted-dim); font-variant-numeric: tabular-nums; }
.dm-count.over { color: var(--ember); }
#dm-send:disabled { opacity: 0.6; cursor: wait; }
@media (max-width: 600px) {
  .dm-box { padding: 28px 20px 20px; }
  .dm-thread { max-height: 45vh; }
}