/* ============================================================
   of-style.css -- OpenForum.social shared stylesheet
   Single source of truth for all design tokens and components.
   Every HTML page imports this file. Never duplicate these rules.
   Last updated: March 30, 2026
   ============================================================ */

/* ── DESIGN TOKENS ── */
:root {
  --bg:      #0f0d0b;
  --bg2:     #171410;
  --bg3:     #1e1a16;
  --bg4:     #252018;
  --warm:    #c8a96e;
  --warm2:   #e8c98a;
  --warm3:   #f5e6c8;
  --purple:  #7B6CF0;
  --purple2: #6355cc;
  --purple3: #4d41a3;
  --text:    #f0ebe3;
  --text2:   #b8a898;
  --text3:   #7a6e62;
  --border:  rgba(200,169,110,0.15);
  --border2: rgba(200,169,110,0.08);
  --border3: rgba(200,169,110,0.30);
  --nav-h:   62px;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── BASE BODY ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + 16px);
}

/* ── GRAIN OVERLAY ── */
body::after {
  content: ''; position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999; opacity: 0.28;
}

/* ── TOP BAR ── */
.top-bar {
  /* iOS native shell: padding-top extends the bar's content into the
     safe-area below the notch / Dynamic Island.  No-op on web (env()
     returns 0 when the meta viewport lacks viewport-fit=cover, which
     the Capacitor bootstrap injects only on native). */
  padding-top: env(safe-area-inset-top);
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,13,11,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border2);
}
.top-logo-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: 50px;
}
.logo { display: inline-flex; align-items: baseline; gap: 1px; text-decoration: none; }
.logo-main {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.3rem;
  background: linear-gradient(135deg, #cdb0f5 0%, #7B6CF0 55%, #6355cc 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: -0.02em;
}
.logo-sub {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 400; font-size: 1.3rem;
  color: var(--text3); letter-spacing: -0.02em;
}
.top-right { display: flex; align-items: center; gap: 2px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 8px; background: transparent; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; color: var(--text3); transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--bg3); color: var(--text2); }

/* ── PRESET BAR ── */
.preset-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px 6px; overflow-x: auto; scrollbar-width: none;
}
.preset-bar::-webkit-scrollbar { display: none; }
.preset-chip {
  position: relative;
  flex-shrink: 0; padding: 5px 14px; border-radius: 20px;
  font-size: 0.77rem; font-weight: 500; font-family: 'DM Sans', sans-serif;
  border: 1px solid var(--border); background: var(--bg3); color: var(--text3);
  cursor: pointer; white-space: nowrap; transition: all 0.2s ease;
  display: inline-flex; align-items: center; gap: 4px;
}
.preset-chip:hover { border-color: var(--border3); color: var(--text2); }
.preset-chip.active { background: rgba(123,108,240,0.12); border-color: rgba(123,108,240,0.35); color: var(--purple); }

/* × delete affordance on each saved-view chip.  Touch devices always see
   the × so it is tappable.  Pointer-fine hover-capable desktops hide it
   until the user hovers the chip, then fade it in. */
.preset-chip .chip-del {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; padding: 5px; margin: -3px -6px -3px 0;
  border-radius: 50%; cursor: pointer;
  color: var(--text3); font-size: 13px; line-height: 1;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.preset-chip .chip-del:hover { color: #e07070; background: rgba(232,112,112,0.12); }
@media (hover: hover) and (pointer: fine) {
  .preset-chip .chip-del { opacity: 0; }
  .preset-chip:hover .chip-del { opacity: 0.8; }
  .preset-chip .chip-del:hover { opacity: 1; }
}
.preset-add {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg3); border: 1px dashed var(--border3); color: var(--text3);
  font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.preset-add:hover { border-color: var(--purple); color: var(--purple); }

/* ── QUICK FILTER BAR ── */
.filter-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px 10px; overflow-x: auto; overflow-y: visible; scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-pill {
  flex-shrink: 0; display: flex; align-items: center; gap: 4px;
  padding: 5px 11px; border-radius: 7px;
  font-size: 0.72rem; font-family: 'DM Mono', monospace; letter-spacing: 0.04em;
  border: 1px solid var(--border); background: var(--bg3); color: var(--text3);
  cursor: pointer; white-space: nowrap; transition: all 0.2s ease;
  position: relative; z-index: 10;
}
.filter-pill:hover { border-color: var(--border3); color: var(--text2); }
.filter-pill.active { border-color: rgba(123,108,240,0.35); color: var(--purple); background: rgba(123,108,240,0.08); }
.filter-caret { font-size: 0.55rem; opacity: 0.6; }
.filter-all-btn {
  flex-shrink: 0; display: flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 7px;
  font-size: 0.72rem; font-family: 'DM Mono', monospace; letter-spacing: 0.04em;
  border: 1px solid var(--border3); background: transparent; color: var(--text2);
  cursor: pointer; white-space: nowrap; transition: all 0.2s ease;
}
.filter-all-btn:hover { border-color: var(--purple); color: var(--purple); background: rgba(123,108,240,0.06); }
.filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; background: var(--purple); color: #fff;
  border-radius: 50%; font-size: 0.58rem; font-weight: 600;
}

/* ── FEED LAYOUT ── */
.feed-offset { height: 126px; }
.feed { max-width: 640px; margin: 0 auto; padding: 10px 12px; }

/* ── POST CARD ── */
.post-card {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px;
  margin-bottom: 10px; overflow: hidden; position: relative;
  border-left: 3px solid rgba(123,108,240,0.25);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover { border-color: var(--border); border-left-color: rgba(123,108,240,0.55); box-shadow: 0 4px 20px rgba(0,0,0,0.22); }
/* Orange "Hidden -- only you can see this" badge shown to authors on their
   own hidden posts (post-detail page and own-profile post list). */
.post-hidden-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(212,98,42,0.14);
  border: 1px solid rgba(212,98,42,0.4);
  color: #f0b089;
  font-family: 'DM Mono', monospace; font-size: 0.66rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.post-hidden-badge::before { content: '🔒'; font-size: 0.7rem; }
/* AG-47 (2026-04-24): the old absolute-positioned .seen-badge
   overlapped the rxn buttons on tight cards.  ofRenderPostCard now
   uses an in-flow footer row with its own Seen-by + See-breakdown +
   report controls.  Any legacy .seen-badge markup (older prototype
   pages that haven't been migrated) now flows in-document instead
   of overlapping.  Kept the visual look (muted mono tag). */
.seen-badge {
  display: inline-block; margin-top: 8px;
  font-family: 'DM Mono', monospace; font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text3); background: var(--bg3); border: 1px solid var(--border2);
  padding: 2px 6px; border-radius: 3px; pointer-events: none;
}
.post-inner { padding: 14px 16px 12px; }
.post-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.post-author { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg4); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 500; color: var(--purple);
  flex-shrink: 0; font-family: 'DM Sans', sans-serif;
}
.author-name { font-size: 0.88rem; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 5px; }
.verified-mark { font-size: 0.65rem; color: var(--purple); }
.post-meta {
  font-family: 'DM Mono', monospace; font-size: 0.62rem; color: var(--text3);
  letter-spacing: 0.03em; margin-top: 2px; display: flex; align-items: center; gap: 5px;
}
.tier-tag {
  padding: 1px 5px; border-radius: 3px;
  background: var(--bg3); border: 1px solid var(--border2);
  font-size: 0.58rem; letter-spacing: 0.05em; color: var(--text3);
}
.post-menu-btn {
  color: var(--text3); font-size: 1.1rem; cursor: pointer;
  padding: 4px 6px; border-radius: 6px; transition: background 0.2s, color 0.2s;
  background: none; border: none;
}
.post-menu-btn:hover { background: var(--bg3); color: var(--text2); }
.post-body { font-size: 0.91rem; color: var(--text); line-height: 1.65; margin-bottom: 12px; }
.post-body.clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.read-more-btn {
  font-size: 0.76rem; color: var(--purple); cursor: pointer;
  background: none; border: none; padding: 0; margin-top: 3px; display: block;
  font-family: 'DM Sans', sans-serif;
}
.read-more-btn:hover { text-decoration: underline; }
.post-img {
  width: 100%; border-radius: 8px; margin-bottom: 12px;
  background: var(--bg3); aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 0.76rem; font-family: 'DM Mono', monospace; letter-spacing: 0.08em;
  border: 1px solid var(--border2);
}

/* ── POLL ── */
.post-poll { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.poll-q { font-size: 0.86rem; font-weight: 500; color: var(--text); margin-bottom: 10px; }
.poll-opts { display: flex; flex-direction: column; gap: 6px; }
.poll-opt {
  position: relative; padding: 8px 11px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--bg4);
  font-size: 0.8rem; color: var(--text2); cursor: pointer; overflow: hidden;
  transition: border-color 0.2s;
}
.poll-opt:hover { border-color: rgba(123,108,240,0.3); }
.poll-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: rgba(123,108,240,0.12); pointer-events: none; border-radius: 6px 0 0 6px;
  width: 0; transition: width 0.55s var(--ease);
}
.poll-row { position: relative; z-index: 1; display: flex; justify-content: space-between; }
.poll-pct { font-family: 'DM Mono', monospace; font-size: 0.68rem; color: var(--purple); opacity: 0; transition: opacity 0.4s ease 0.2s; }
.poll-voted .poll-pct { opacity: 1; }
.poll-opt.voted-choice { border-color: rgba(123,108,240,0.45) !important; }
.poll-foot { font-size: 0.69rem; color: var(--text3); margin-top: 8px; font-family: 'DM Mono', monospace; letter-spacing: 0.03em; }

/* ── SEEN-BY ROW ── */
.seen-row {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-family: 'DM Mono', monospace; font-size: 0.68rem; color: var(--text3); letter-spacing: 0.03em;
}
.seen-link { color: var(--purple); text-decoration: none; cursor: pointer; transition: opacity 0.2s; }
.seen-link:hover { opacity: 0.72; text-decoration: underline; }
.seen-sep { opacity: 0.4; }
.analyze-link { color: var(--text3); text-decoration: none; cursor: pointer; transition: color 0.2s; font-size: 0.66rem; }
.analyze-link:hover { color: var(--purple); }

/* ── REACTIONS ── */
.reactions-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px; border-top: 1px solid var(--border2);
}
.reactions-left { display: flex; align-items: center; gap: 1px; }
.rxn-btn {
  display: flex; align-items: center; gap: 3px;
  padding: 5px 7px; border-radius: 7px;
  background: transparent; border: none; cursor: pointer;
  font-size: 0.95rem; color: var(--text3); font-family: 'DM Sans', sans-serif;
  transition: background 0.18s ease, transform 0.12s ease; position: relative;
}
.rxn-btn:hover { background: var(--bg3); transform: scale(1.07); }
.rxn-btn.active { background: rgba(123,108,240,0.1); }
.rxn-count { font-size: 0.68rem; font-family: 'DM Mono', monospace; color: var(--text3); letter-spacing: 0.02em; }
.rxn-btn.active .rxn-count { color: var(--purple); }

/* ── REACTION STATE (feed-level posts) ──
   toggleRxnPost() adds these classes. Without these rules,
   reaction highlight/dim on feed posts silently fails.
   Comment overlay elements have their own .comment-op-rxn.active-rxn
   and .comment-rxn.active-rxn rules below. These cover .rxn-btn. */
.rxn-btn.active-rxn { background: rgba(123,108,240,0.1); }
.rxn-btn.active-rxn .rxn-count { color: var(--purple); }
.rxn-btn.dimmed-rxn { opacity: 0.38; }
.disagree-tip {
  position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%);
  background: var(--bg4); border: 1px solid var(--border3); border-radius: 7px;
  padding: 5px 9px; font-size: 0.69rem; color: var(--text2); white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity 0.15s; z-index: 10;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4); font-family: 'DM Sans', sans-serif;
}
.rxn-btn[data-rxn="disagree"]:hover .disagree-tip { opacity: 1; }
.reactions-right { display: flex; align-items: center; gap: 2px; }
.act-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 9px; border-radius: 7px;
  background: transparent; border: none; cursor: pointer;
  font-size: 0.74rem; color: var(--text3); font-family: 'DM Sans', sans-serif; letter-spacing: 0.01em;
  transition: background 0.2s, color 0.2s;
}
.act-btn:hover { background: var(--bg3); color: var(--text2); }
.report-btn {
  padding: 5px 7px; border-radius: 7px; background: transparent; border: none;
  cursor: pointer; font-size: 0.88rem; color: var(--text3); transition: background 0.2s, color 0.2s;
}
.report-btn:hover { background: rgba(180,60,60,0.08); color: #b04040; }

/* ── MEMORY CARD ── */
.memory-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 10px;
  background: rgba(123,108,240,0.06); border: 1px solid rgba(123,108,240,0.18); border-radius: 12px;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.memory-card:hover { border-color: rgba(123,108,240,0.3); background: rgba(123,108,240,0.09); }
.memory-icon { font-size: 1.1rem; flex-shrink: 0; }
.memory-text { font-size: 0.81rem; color: var(--text2); line-height: 1.45; }
.memory-text strong { color: var(--purple); font-weight: 500; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  /* iOS native shell: extend the nav into the home-indicator safe
     area so the tabs sit above the indicator pill rather than under
     it.  height grows by the inset; padding-bottom pushes the tab
     row up so flex centering still aligns the icons over the
     original nav-h band.  No-op on web. */
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 0 6px env(safe-area-inset-bottom);
  background: rgba(15,13,11,0.97); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 100;
}
.nav-tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 10px; border-radius: 10px; cursor: pointer;
  background: none; border: none; color: var(--text3);
  font-family: 'DM Mono', monospace; font-size: 0.56rem; letter-spacing: 0.08em; text-transform: uppercase;
  min-width: 52px; transition: background 0.2s;
}
.nav-tab:hover { background: var(--bg3); }
.nav-tab.active { color: var(--purple); }
.nav-icon { font-size: 1.2rem; line-height: 1; }
.nav-compose {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--purple); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; margin-bottom: 6px;
  box-shadow: 0 4px 18px rgba(123,108,240,0.38); position: relative; overflow: hidden;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.nav-compose::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(135deg, rgba(255,255,255,0.14) 0%, transparent 55%); pointer-events: none; }
.nav-compose:hover { background: var(--purple2); transform: scale(1.05); box-shadow: 0 6px 26px rgba(123,108,240,0.48); }

/* ── OVERLAY + SHEETS ── */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.58); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity 0.28s ease; visibility: hidden;
}
.overlay.open { opacity: 1; pointer-events: all; visibility: visible; }
.sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg2); border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0; z-index: 201;
  transform: translateY(100%); transition: transform 0.38s var(--ease);
  max-height: 88vh; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--border3) transparent;
  visibility: hidden;
}
.sheet::-webkit-scrollbar { width: 4px; }
.sheet::-webkit-scrollbar-track { background: transparent; }
.sheet::-webkit-scrollbar-thumb { background: var(--border3); border-radius: 2px; }
.sheet.open { transform: translateY(0); visibility: visible; }
.sheet-handle { width: 34px; height: 4px; background: var(--border3); border-radius: 2px; margin: 12px auto 6px; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px 14px; }
.sheet-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.1rem; font-weight: 700; color: var(--warm3); }
.sheet-close { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 1rem; padding: 4px; border-radius: 6px; transition: background 0.2s, color 0.2s; }
.sheet-close:hover { background: var(--bg3); color: var(--text2); }
.sheet-btn-row { padding: 12px 20px 28px; display: flex; gap: 9px; }

/* ── SEARCH DROPDOWN (anchored to top-right search icon, replaces old sheet) ── */
.search-dd {
  position: fixed;
  top: 58px;                      /* top-bar is 50px + 8px gap */
  right: 16px;                    /* matches .top-logo-row padding */
  width: 480px;
  max-width: calc(100vw - 32px);  /* 16px padding both sides on narrow screens */
  max-height: 70vh;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 201;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  visibility: hidden;
}
.search-dd.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}
.search-dd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}
.search-dd-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.95rem; font-weight: 700; color: var(--warm3);
}
.search-dd-close {
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 0.9rem;
  padding: 4px 6px; border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.search-dd-close:hover { background: var(--bg3); color: var(--text2); }
.search-dd-body {
  padding: 14px 16px 16px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border3) transparent;
}
.search-dd-body::-webkit-scrollbar { width: 4px; }
.search-dd-body::-webkit-scrollbar-thumb { background: var(--border3); border-radius: 2px; }

/* ── CENTERED COMPOSE / CONFIRM MODAL (reusable) ──
   Used by the new-message composer (messages.html) and the change-email
   confirm modal (settings.html).  Lifted out of inline styles so both
   pages get the same look without duplication.  Any page that wants the
   pattern: render a .compose-modal + .compose-modal-backdrop pair and
   toggle the .open class on both in sync. */
.compose-modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.55);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s var(--ease);
  visibility: hidden;
}
.compose-modal-backdrop.open {
  opacity: 1; pointer-events: auto; visibility: visible;
}
.compose-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: 480px; max-width: calc(100vw - 32px);
  max-height: 70vh;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  z-index: 201;
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  visibility: hidden;
}
.compose-modal.open {
  opacity: 1; pointer-events: auto; visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.compose-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}
.compose-modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem; font-weight: 700; color: var(--warm3);
}
.compose-modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 1rem;
  padding: 4px 6px; border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.compose-modal-close:hover { background: var(--bg3); color: var(--text2); }

/* Avatar-change modal option rows (three big choices: Upload / Use existing / Remove) */
.avatar-option {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 16px;
  background: none; border: none; border-radius: 10px;
  cursor: pointer; text-align: left;
  transition: background 0.15s;
  font-family: inherit;
}
.avatar-option:hover { background: var(--bg3); }
.avatar-option:disabled { opacity: 0.5; cursor: wait; }
.avatar-option-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.avatar-option-text { flex: 1; min-width: 0; }
.avatar-option-title { font-size: 0.92rem; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.avatar-option-desc { font-size: 0.78rem; color: var(--text3); line-height: 1.4; }
.avatar-option-danger .avatar-option-title { color: #c85050; }

.avatar-back-btn {
  background: none; border: none;
  color: var(--text3); font-size: 0.82rem;
  font-family: inherit; cursor: pointer;
  padding: 6px 10px; margin-bottom: 10px; border-radius: 6px;
}
.avatar-back-btn:hover { background: var(--bg3); color: var(--text2); }

.avatar-gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; max-height: 360px; overflow-y: auto;
}
.avatar-gallery-item {
  aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  cursor: pointer; position: relative;
  border: 2px solid transparent; transition: border-color 0.15s;
  background: var(--bg3);
}
.avatar-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.avatar-gallery-item:hover { border-color: var(--purple); }
.avatar-gallery-loading,
.avatar-gallery-empty {
  grid-column: 1 / -1; text-align: center;
  padding: 40px 20px; color: var(--text3); font-size: 0.88rem;
}

/* ── BUTTONS ── */
.btn-primary {
  flex: 1; padding: 13px; background: var(--purple); color: #fff; border: none;
  border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--purple2); transform: translateY(-1px); }
.btn-ghost {
  padding: 13px 18px; background: transparent; color: var(--text3);
  border: 1px solid var(--border); border-radius: 8px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--border3); color: var(--text2); }

/* ── REPORT SHEET ── */
.report-intro { padding: 0 20px 16px; font-size: 0.82rem; color: var(--text2); line-height: 1.6; border-bottom: 1px solid var(--border2); }
.report-intro .policy-title { font-weight: 500; color: var(--text); margin-bottom: 6px; font-size: 0.86rem; }
.report-intro .policy-cats { font-size: 0.79rem; color: var(--text3); margin: 8px 0 8px 12px; }
.report-intro .policy-cats li { margin-bottom: 4px; list-style: none; padding-left: 14px; position: relative; }
.report-intro .policy-cats li::before { content: '—'; position: absolute; left: 0; color: var(--border3); }
.report-intro .protection-stmt { font-style: italic; color: var(--text3); font-size: 0.77rem; margin-top: 8px; }
.report-options { padding: 14px 20px; display: flex; flex-direction: column; gap: 9px; }
.report-opt {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 11px;
  cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.report-opt:hover { border-color: rgba(123,108,240,0.3); background: rgba(123,108,240,0.05); transform: translateX(3px); }
.report-opt.danger:hover { border-color: rgba(180,60,60,0.3); background: rgba(180,60,60,0.04); transform: translateX(3px); }
.report-opt-icon { font-size: 1.1rem; flex-shrink: 0; width: 28px; text-align: center; }
.report-opt-label { font-size: 0.88rem; font-weight: 500; color: var(--text); }
.report-opt-desc { font-size: 0.74rem; color: var(--text3); margin-top: 2px; line-height: 1.4; }
.violation-cats { padding: 14px 20px; display: flex; flex-direction: column; gap: 9px; }
.violation-cat {
  display: flex; align-items: flex-start; gap: 14px; padding: 13px 16px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 11px;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.violation-cat:hover { border-color: rgba(180,60,60,0.3); background: rgba(180,60,60,0.04); }
.violation-cat.selected { border-color: rgba(180,60,60,0.5); background: rgba(180,60,60,0.07); }
.vcat-num { font-family: 'DM Mono', monospace; font-size: 0.72rem; color: var(--text3); padding-top: 2px; flex-shrink: 0; }
.vcat-label { font-size: 0.86rem; font-weight: 500; color: var(--text); }
.vcat-desc { font-size: 0.74rem; color: var(--text3); margin-top: 2px; line-height: 1.4; }
.stakes-box { margin: 0 20px 16px; padding: 12px 16px; background: rgba(200,169,110,0.07); border: 1px solid rgba(200,169,110,0.2); border-radius: 10px; }
.stakes-title { font-size: 0.76rem; font-weight: 500; color: var(--warm); margin-bottom: 5px; font-family: 'DM Mono', monospace; letter-spacing: 0.06em; text-transform: uppercase; }
.stakes-body { font-size: 0.77rem; color: var(--text3); line-height: 1.6; }
.stakes-body strong { color: var(--warm); font-weight: 500; }

/* ── DISAGREE SHEET ── */
.attrib-options { padding: 14px 20px; display: flex; flex-direction: column; gap: 9px; }
.attrib-opt {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 11px;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.attrib-opt:hover { border-color: rgba(123,108,240,0.35); background: rgba(123,108,240,0.06); }
.attrib-icon { font-size: 1.2rem; flex-shrink: 0; width: 28px; text-align: center; }
.attrib-label { font-size: 0.88rem; font-weight: 500; color: var(--text); }
.attrib-desc { font-size: 0.74rem; color: var(--text3); margin-top: 2px; }

/* ── FILTER PANEL ── */
.panel-section { padding: 0 20px 18px; }
.panel-section-label { font-family: 'DM Mono', monospace; font-size: 0.63rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); margin-bottom: 9px; }
.filter-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.ftag {
  padding: 6px 13px; border-radius: 20px; font-size: 0.77rem;
  font-family: 'DM Sans', sans-serif; border: 1px solid var(--border);
  background: var(--bg3); color: var(--text2); cursor: pointer; transition: all 0.2s ease;
}
.ftag:hover { border-color: var(--border3); color: var(--text); }
.ftag.on { background: rgba(123,108,240,0.12); border-color: rgba(123,108,240,0.35); color: var(--purple); }
.panel-section.suppressed { opacity: 0.28; pointer-events: none; position: relative; }
.panel-section.suppressed .panel-section-label::after { content: ' — not applicable here'; font-style: italic; opacity: 0.7; }

/* ── ANALYTICS SHEET ── */
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0 20px 16px; }
.analytics-stat { padding: 12px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; }
.analytics-label { font-family: 'DM Mono', monospace; font-size: 0.62rem; color: var(--text3); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.analytics-value { font-size: 1.3rem; font-weight: 600; color: var(--text); font-family: 'Playfair Display', serif; }
.analytics-cost-box { margin: 0 20px 16px; padding: 12px 16px; background: rgba(200,169,110,0.07); border: 1px solid rgba(200,169,110,0.18); border-radius: 10px; }
.analytics-cost-label { font-family: 'DM Mono', monospace; font-size: 0.65rem; color: var(--warm); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 5px; }
.analytics-cost-body { font-size: 0.79rem; color: var(--text3); line-height: 1.55; }

/* ── SEARCH SHEET ── */
.search-input-wrap { position: relative; margin: 0 20px 16px; display: block; }
.search-input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 13px 16px 13px 42px !important; font-size: 0.93rem; font-family: 'DM Sans', sans-serif;
  font-weight: 300; border-radius: 10px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.search-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(123,108,240,0.12); }
.search-input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 1rem; pointer-events: none; opacity: 0.5; z-index: 1; }
.search-section-label { font-family: 'DM Mono', monospace; font-size: 0.63rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); margin: 0 20px 10px; }
.search-items { display: flex; flex-direction: column; gap: 7px; padding: 0 20px; }
.search-recent-item {
  padding: 10px 14px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.84rem; color: var(--text2); cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.search-recent-item:hover { border-color: var(--border3); color: var(--text); }
.search-result-card {
  padding: 12px 14px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: border-color 0.2s;
}
.search-result-card:hover { border-color: rgba(123,108,240,0.3); }
.search-result-type { font-family: 'DM Mono', monospace; font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); margin-bottom: 4px; }
.search-result-title { font-size: 0.88rem; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.search-result-sub { font-size: 0.76rem; color: var(--text3); }

/* ── MODAL (save preset) ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.62); z-index: 300;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease; visibility: hidden;
}
.modal-overlay.open { opacity: 1; pointer-events: all; visibility: visible; }
.modal-box {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 20px 20px 0 0;
  padding: 24px 24px 36px; width: 100%; max-width: 480px;
  transform: translateY(32px); transition: transform 0.3s var(--ease);
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.1rem; font-weight: 700; color: var(--warm3); margin-bottom: 14px; }
.modal-input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 12px 14px; font-size: 0.9rem; font-family: 'DM Sans', sans-serif; font-weight: 300;
  border-radius: 8px; outline: none; margin-bottom: 10px;
}
.modal-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(123,108,240,0.12); }
.modal-hint { font-size: 0.73rem; color: var(--text3); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 9px; }
.modal-confirm { flex: 1; padding: 12px; background: var(--purple); color: #fff; border: none; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: background 0.2s; }
.modal-confirm:hover { background: var(--purple2); }
.modal-cancel { padding: 12px 16px; background: transparent; color: var(--text3); border: 1px solid var(--border); border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; cursor: pointer; }
.modal-cancel:hover { border-color: var(--border3); color: var(--text2); }

/* ── COMING SOON ── */
.coming-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 400;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s; visibility: hidden;
}
.coming-overlay.open { opacity: 1; pointer-events: all; visibility: visible; }
.coming-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 32px 40px; text-align: center; max-width: 320px; }
.coming-icon { font-size: 2rem; margin-bottom: 14px; }
.coming-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.2rem; font-weight: 700; color: var(--warm3); margin-bottom: 8px; }
.coming-body { font-size: 0.84rem; color: var(--text3); line-height: 1.55; margin-bottom: 20px; }
.coming-close { padding: 11px 28px; background: var(--purple); color: #fff; border: none; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: background 0.2s; }
.coming-close:hover { background: var(--purple2); }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: calc(var(--nav-h) + 18px); left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg3); border: 1px solid var(--border3); border-radius: 10px;
  padding: 10px 18px; font-size: 0.78rem; color: var(--text2); font-family: 'DM Sans', sans-serif;
  white-space: nowrap; z-index: 500; opacity: 0; transition: opacity 0.25s, transform 0.25s;
  pointer-events: none; box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* ── FILTER PILL DROPDOWN ── */
.pill-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: var(--bg2);
  border: 1px solid var(--border3);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
  z-index: 9000;
  overflow: hidden;
  animation: dropIn 0.18s var(--ease) both;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pill-dropdown-item {
  padding: 10px 14px;
  font-size: 0.82rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  border-bottom: 1px solid var(--border2);
}
.pill-dropdown-item:last-child { border-bottom: none; }
.pill-dropdown-item:hover { background: var(--bg3); color: var(--text); }
.pill-dropdown-item.selected { color: var(--purple); background: rgba(123,108,240,0.08); }

/* ── FEED FOOTER ── */
.feed-footer {
  text-align: center; font-family: 'DM Mono', monospace; font-size: 0.58rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--text3); opacity: 0.35;
  padding: 18px 0 6px;
}

/* ── ANIMATIONS ── */
@keyframes popIn { 0% { transform: scale(0.5); opacity: 0; } 65% { transform: scale(1.18); } 100% { transform: scale(1); opacity: 1; } }
.popping { animation: popIn 0.28s var(--ease) both; }

/* ============================================================
   AVATAR BADGE SYSTEM
   Applies to every avatar across the platform.
   Three badge types -- org type band, org verified checkmark,
   individual connection count. Never mix org and individual badges.

   Usage: wrap .avatar in .avatar-wrap, then call renderAvatar().
   ============================================================ */

/* Wrapper -- required for badge positioning */
.avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

/* ── ORG TYPE BAND ── */
/* Amber strip across the bottom of the avatar. Org accounts only. */
.org-type-band {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(200,169,110,0.92);
  color: #1a1410;
  font-family: 'DM Mono', monospace;
  font-size: 0.38rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1;
  padding: 2px 1px;
  border-radius: 0 0 50% 50%;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

/* ── ORG VERIFIED BADGE ── */
/* Purple checkmark circle, bottom-right of avatar. Org accounts only. */
.org-verified-badge {
  position: absolute;
  bottom: -1px; right: -2px;
  width: 13px; height: 13px;
  background: var(--purple);
  border: 1.5px solid var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.45rem;
  color: #fff;
  font-weight: 700;
  pointer-events: none;
  z-index: 3;
  line-height: 1;
}

/* Larger variant for profile page hero avatar */
.avatar-wrap.avatar-lg .org-verified-badge {
  width: 20px; height: 20px;
  font-size: 0.65rem;
  bottom: -2px; right: -3px;
  border-width: 2px;
}
.avatar-wrap.avatar-lg .org-type-band {
  font-size: 0.48rem;
  padding: 2px 2px;
}

/* ── INDIVIDUAL CONNECTION COUNT BADGE ── */
/* Tiny dark chip, bottom-right of avatar. Individual users only. */
.connection-badge {
  position: absolute;
  bottom: -3px; right: -4px;
  background: var(--bg4);
  border: 1px solid var(--border3);
  border-radius: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.42rem;
  font-weight: 600;
  color: var(--warm);
  padding: 1px 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* Larger variant for profile page */
.avatar-wrap.avatar-lg .connection-badge {
  font-size: 0.58rem;
  padding: 2px 6px;
  border-radius: 8px;
  bottom: -5px; right: -6px;
}

/* ── ORG AVATAR TINT ── */
/* Verified orgs get a subtle purple tint on their avatar background */
.avatar-wrap.is-org .avatar {
  background: rgba(123,108,240,0.14);
  border-color: rgba(123,108,240,0.3);
  color: var(--purple);
}

/* ── DEFAULT FEED SORT NOTE ── */
/* NEXT.JS BUILD: server-side query must ORDER BY created_at DESC.
   Client-side fallback below is prototype-only. */

/* ============================================================
   END AVATAR BADGE SYSTEM
   ============================================================ */

/* ── DESKTOP ── */
@media (min-width: 680px) {
  .feed { padding: 10px 0; }
  .bottom-nav { max-width: 640px; left: 50%; right: auto; transform: translateX(-50%); border-left: 1px solid var(--border2); border-right: 1px solid var(--border2); }
  .sheet { max-width: 640px; left: 50%; right: auto; transform: translateX(-50%) translateY(100%); border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-radius: 20px 20px 0 0; visibility: hidden; }
  .sheet.open { transform: translateX(-50%) translateY(0); visibility: visible; }
}


/* ============================================================
   SESSION TIMER -- slider and alarm popup (used on feed, polls, all pages)
   ============================================================ */
.timer-roller-wrap { padding: 8px 0 4px; }
.timer-roller { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.timer-roller-label {
  font-family: 'DM Mono', monospace; font-size: 0.72rem;
  color: var(--purple); min-width: 48px; text-align: right; font-weight: 500;
}
.timer-roller input[type=range] {
  flex: 1; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 2px;
  background: var(--bg4); outline: none;
}
.timer-roller input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--purple); cursor: pointer;
  border: 2px solid var(--bg2);
  box-shadow: 0 0 0 3px rgba(123,108,240,0.25);
}
.timer-roller input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--purple); cursor: pointer;
  border: 2px solid var(--bg2);
}
.timer-off-btn {
  padding: 4px 10px; border: 1px solid var(--border2); border-radius: 14px;
  background: none; font-family: 'DM Mono', monospace; font-size: 0.6rem;
  color: var(--text3); cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.timer-off-btn:hover { border-color: var(--purple); color: var(--purple); }
.timer-off-btn.active { border-color: var(--purple); color: var(--purple); background: rgba(123,108,240,0.1); }

/* Timer alarm popup -- appears bottom-center above nav */
.timer-alarm {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--bg2); border: 1px solid var(--border3);
  border-left: 3px solid var(--purple); border-radius: 14px;
  padding: 16px 20px; z-index: 600; width: 90%; max-width: 380px;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.6);
  display: none;
}
.timer-alarm.show {
  display: block;
  animation: alarmSlide 0.35s var(--ease);
}
@keyframes alarmSlide {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.alarm-icon { font-size: 1.4rem; margin-bottom: 6px; }
.alarm-msg {
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem; color: var(--text);
  line-height: 1.55; margin-bottom: 14px; font-weight: 300;
}
.alarm-btns { display: flex; gap: 10px; }


/* ============================================================
   STATE SELECTOR COMPONENT
   Inline slide-down state picker, reused across compose,
   feed filters, dating, marketplace.
   ============================================================ */
.state-sel-panel {
  position: fixed; bottom: -100%; left: 0; right: 0;
  background: var(--bg2); border-top: 1px solid var(--border3);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.55);
  z-index: 500; max-height: 75vh;
  display: flex; flex-direction: column;
  transition: bottom 0.35s var(--ease);
  overflow: hidden;
}
.state-sel-panel.open {
  bottom: 0;
}
.state-sel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 10px; border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}
.state-sel-header-title {
  font-family: 'Playfair Display', serif; font-size: 1rem;
  font-weight: 600; color: var(--warm3);
}
.state-sel-close {
  background: none; border: none; color: var(--text3);
  font-size: 1rem; cursor: pointer; padding: 4px 8px;
  border-radius: 6px; transition: color 0.15s;
}
.state-sel-close:hover { color: var(--text); }
.state-sel-home {
  padding: 14px 16px; cursor: pointer;
  background: rgba(123,108,240,0.07);
  border-bottom: 1px solid var(--border2);
  transition: background 0.15s;
}
.state-sel-home:hover { background: rgba(123,108,240,0.13); }
.state-sel-home-label {
  font-family: 'DM Mono', monospace; font-size: 0.58rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--purple);
  margin-bottom: 3px;
}
.state-sel-home-name {
  font-family: 'Playfair Display', serif; font-size: 1.1rem;
  font-weight: 600; color: var(--warm3); line-height: 1.2;
}
.state-sel-home-hint {
  font-size: 0.7rem; color: var(--text3); margin-top: 3px;
  font-family: 'DM Mono', monospace;
}
.state-sel-divider {
  padding: 8px 16px; font-size: 0.7rem;
  color: var(--text3); font-family: 'DM Mono', monospace;
  letter-spacing: 0.06em; background: var(--bg3);
  border-bottom: 1px solid var(--border2);
}
.state-sel-search-wrap {
  padding: 10px 12px; border-bottom: 1px solid var(--border2);
}
.state-sel-input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 9px 12px; font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif; font-weight: 300;
  border-radius: 8px; outline: none; transition: border-color 0.2s;
  box-sizing: border-box;
}
.state-sel-input:focus { border-color: var(--purple); }
.state-sel-list {
  overflow-y: auto; flex: 1;
}
.state-sel-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border2);
  transition: background 0.12s; font-size: 0.88rem; color: var(--text2);
}
.state-sel-item:last-child { border-bottom: none; }
.state-sel-item:hover { background: var(--bg3); }
.state-abbr {
  font-family: 'DM Mono', monospace; font-size: 0.68rem;
  color: var(--purple); width: 28px; flex-shrink: 0;
}

/* Claude Bar strip (used on events geo upgrade) */
.claude-bar-strip {
  margin: 0 16px 12px;
  padding: 12px 14px;
  background: rgba(123,108,240,0.07);
  border: 1px solid rgba(123,108,240,0.2);
  border-radius: 10px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: background 0.18s, border-color 0.18s;
}
.claude-bar-strip:hover {
  background: rgba(123,108,240,0.13);
  border-color: rgba(123,108,240,0.35);
}
.claude-bar-strip-icon { font-size: 1.1rem; flex-shrink: 0; }
.claude-bar-strip-body { flex: 1; }
.claude-bar-strip-title {
  font-size: 0.86rem; color: var(--purple); font-weight: 500;
  margin-bottom: 2px;
}
.claude-bar-strip-desc {
  font-size: 0.72rem; color: var(--text3); line-height: 1.45;
  font-family: 'DM Mono', monospace;
}
.claude-bar-strip-price {
  font-family: 'DM Mono', monospace; font-size: 0.8rem;
  color: var(--warm); font-weight: 500; flex-shrink: 0;
}


/* ============================================================
   SHARED COMMENT OVERLAY, REACTOR OVERLAY, AND REACTION STATE
   Used by: feed, polls, events, live, groups, profile, marketplace
   Do not duplicate these in individual page <style> blocks.
   ============================================================ */

.active-rxn { opacity:1; }

  /* ── COMMENT OVERLAY ── */
  .comment-overlay { position:fixed; inset:0; z-index:600; display:none; flex-direction:column; background:var(--bg); max-width:600px; left:50%; transform:translateX(-50%); right:auto; width:100%; box-shadow:0 0 60px rgba(0,0,0,0.6); }
  .comment-overlay.open { display:flex; }
  .comment-overlay-header { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--border2); flex-shrink:0; }
  .comment-overlay-title { font-family:'Playfair Display',Georgia,serif; font-size:1.1rem; font-weight:700; color:var(--warm3); }
  .comment-overlay-close { background:none; border:none; color:var(--text3); font-size:1.2rem; cursor:pointer; padding:6px 8px; border-radius:6px; transition:color 0.2s,background 0.2s; }
  .comment-overlay-close:hover { color:var(--text); background:var(--bg3); }
  .comment-op { padding:16px 18px; border-bottom:1px solid var(--border2); background:var(--bg2); flex-shrink:0; }
  .comment-op-author { font-size:0.78rem; font-weight:600; color:var(--text2); margin-bottom:4px; }
  .comment-op-text { font-size:0.88rem; color:var(--text); line-height:1.6; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
  .comment-op-rxns { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
  .comment-op-rxn { background:none; border:1px solid var(--border); border-radius:20px; padding:4px 10px; font-size:0.75rem; color:var(--text3); cursor:pointer; font-family:'DM Sans',sans-serif; transition:border-color 0.2s,color 0.2s,background 0.2s,opacity 0.2s; display:flex; align-items:center; gap:5px; }
  .comment-op-rxn:hover { border-color:rgba(123,108,240,0.4); color:var(--text); background:rgba(123,108,240,0.06); }
  .comment-op-rxn.active-rxn { border-color:var(--purple); color:var(--purple); background:rgba(123,108,240,0.1); font-weight:600; }
  .comment-op-rxn.dimmed-rxn { opacity:0.38; }
  .comment-op-rxn .rxn-emoji,.comment-op-rxn .rxn-num { pointer-events:auto; }
  .comment-op-rxn .rxn-num { text-decoration:underline; text-underline-offset:2px; min-width:18px; display:inline-block; text-align:center; }
  .comments-list { flex:1; overflow-y:auto; padding:8px 0; }
  .comment-item { padding:12px 18px; border-bottom:1px solid var(--border2); }
  .comment-item-header { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
  .comment-avatar { width:28px; height:28px; border-radius:50%; background:var(--bg4); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:0.6rem; font-weight:600; color:var(--text2); flex-shrink:0; font-family:'DM Mono',monospace; }
  .comment-author { font-size:0.82rem; font-weight:600; color:var(--text2); }
  .comment-time { font-size:0.7rem; color:var(--text3); margin-left:auto; }
  .comment-text { font-size:0.87rem; color:var(--text); line-height:1.6; margin-bottom:8px; }
  .comment-actions { display:flex; gap:10px; align-items:center; }
  .comment-rxn-row { display:flex; gap:5px; flex-wrap:wrap; }
  .comment-rxn { background:none; border:1px solid var(--border); border-radius:16px; padding:3px 8px; font-size:0.72rem; color:var(--text3); cursor:pointer; font-family:'DM Sans',sans-serif; transition:all 0.18s; display:flex; align-items:center; gap:3px; }
  .comment-rxn .rxn-emoji,.comment-rxn .rxn-num { pointer-events:auto; }
  .comment-rxn .rxn-num { text-decoration:underline; text-underline-offset:2px; font-size:0.68rem; min-width:14px; display:inline-block; text-align:center; }
  .comment-rxn:hover { border-color:rgba(123,108,240,0.4); color:var(--text); }
  .comment-rxn.active-rxn { border-color:var(--purple); color:var(--purple); background:rgba(123,108,240,0.08); font-weight:600; }
  .comment-rxn.dimmed-rxn { opacity:0.38; }
  .comment-reply-btn { background:none; border:none; font-size:0.72rem; color:var(--text3); cursor:pointer; font-family:'DM Sans',sans-serif; padding:2px 6px; border-radius:4px; transition:color 0.2s; }
  .comment-reply-btn:hover { color:var(--purple); }
  .comment-input-bar { display:flex; align-items:flex-end; gap:10px; padding:12px 18px; border-top:1px solid var(--border2); background:var(--bg); flex-shrink:0; }
  .comment-input { flex:1; background:var(--bg3); border:1px solid var(--border); color:var(--text); padding:10px 14px; font-size:0.88rem; font-family:'DM Sans',sans-serif; border-radius:20px; outline:none; resize:none; min-height:38px; max-height:100px; transition:border-color 0.2s; line-height:1.4; }
  .comment-input:focus { border-color:var(--purple); }
  /* Unified send/submit button: one canonical visual for every
     paper-airplane action across the platform (DM send, comment send,
     stream chat send, inline-compose send, etc).  Class names below
     are aliased so existing JS selectors -- .comment-send-btn,
     .thread-send, .chat-send, .inline-compose-send -- keep working
     without requiring per-page refactors.  Buttons should also carry
     the .of-send-btn class going forward so future code can reach the
     canonical visual directly. */
  .of-send-btn,
  .comment-send-btn,
  .thread-send,
  .chat-send,
  .inline-compose-send {
    background: var(--purple); border: none; color: #fff;
    width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; flex-shrink: 0; padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.2s, transform 0.15s, background 0.2s;
  }
  .of-send-btn:hover,
  .comment-send-btn:hover,
  .thread-send:hover,
  .chat-send:hover,
  .inline-compose-send:hover {
    opacity: 0.85; transform: scale(1.05);
  }
  .of-send-btn:disabled,
  .comment-send-btn:disabled,
  .thread-send:disabled,
  .chat-send:disabled,
  .inline-compose-send:disabled {
    opacity: 0.5; cursor: not-allowed; transform: none;
  }
  /* Lucide Send icon: visual mass tilts toward the lower-right because
     the airplane body extends past the bounding box on that diagonal.
     A 1px nudge up + left re-centers the visual instead of the box. */
  .of-send-btn svg,
  .comment-send-btn svg,
  .thread-send svg,
  .chat-send svg,
  .inline-compose-send svg {
    width: 20px; height: 20px;
    transform: translate(-1px, -1px);
    pointer-events: none;
  }
  .comment-overlay-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:599; display:none; }
  .comment-overlay-backdrop.open { display:block; }
  .comment-disagree-prompt { position:absolute; inset:0; z-index:10; display:none; align-items:flex-end; justify-content:center; background:rgba(0,0,0,0.6); }
  .comment-disagree-prompt.open { display:flex; }
  .comment-disagree-box { background:var(--bg2); border-radius:20px 20px 0 0; width:100%; padding:24px 20px 32px; border-top:1px solid var(--border2); }
  .comment-disagree-title { font-family:'Playfair Display',Georgia,serif; font-size:1.05rem; font-weight:700; color:var(--warm3); margin-bottom:6px; }
  .comment-disagree-sub { font-size:0.78rem; color:var(--text3); line-height:1.5; margin-bottom:18px; }
  .comment-disagree-opts { display:flex; flex-direction:column; gap:10px; }
  .comment-disagree-opt { display:flex; align-items:center; gap:14px; padding:14px 16px; background:var(--bg3); border:1px solid var(--border); border-radius:12px; cursor:pointer; transition:border-color 0.2s,background 0.2s; }
  .comment-disagree-opt:hover { border-color:rgba(123,108,240,0.4); background:rgba(123,108,240,0.06); }
  .comment-disagree-opt-icon { font-size:1.3rem; flex-shrink:0; }
  .comment-disagree-opt-label { font-size:0.88rem; font-weight:500; color:var(--text); margin-bottom:2px; }
  .comment-disagree-opt-desc { font-size:0.74rem; color:var(--text3); line-height:1.4; }
  .comment-disagree-cancel { width:100%; margin-top:12px; padding:11px; background:transparent; color:var(--text3); border:1px solid var(--border); border-radius:8px; font-family:'DM Sans',sans-serif; font-size:0.88rem; cursor:pointer; }

  /* ── REACTOR LIST OVERLAY ── */
  .reactor-overlay { position:fixed; inset:0; z-index:700; display:none; align-items:flex-end; justify-content:center; }
  .reactor-overlay.open { display:flex; }
  .reactor-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0.55); }
  .reactor-sheet { position:relative; z-index:1; background:var(--bg2); border-radius:20px 20px 0 0; width:100%; max-width:540px; max-height:70vh; display:flex; flex-direction:column; }
  .reactor-handle { width:36px; height:4px; background:var(--border3); border-radius:2px; margin:10px auto 0; flex-shrink:0; }
  .reactor-header { display:flex; align-items:center; justify-content:space-between; padding:14px 18px 10px; border-bottom:1px solid var(--border2); flex-shrink:0; }
  .reactor-title { font-size:0.9rem; font-weight:600; color:var(--text); }
  .reactor-close { background:none; border:none; color:var(--text3); font-size:1.1rem; cursor:pointer; padding:4px 8px; border-radius:6px; }
  .reactor-tabs { display:flex; padding:0 18px; border-bottom:1px solid var(--border2); flex-shrink:0; overflow-x:auto; }
  .reactor-tab { background:none; border:none; border-bottom:2px solid transparent; padding:10px 14px; font-size:0.82rem; color:var(--text3); cursor:pointer; font-family:'DM Sans',sans-serif; white-space:nowrap; transition:color 0.2s,border-color 0.2s; }
  .reactor-tab.active { color:var(--purple); border-bottom-color:var(--purple); }
  .reactor-list { flex:1; overflow-y:auto; padding:8px 0; }
  .reactor-row { display:flex; align-items:center; gap:12px; padding:10px 18px; transition:background 0.15s; }
  .reactor-row:hover { background:rgba(255,255,255,0.02); }
  .reactor-avatar { width:36px; height:36px; border-radius:50%; background:var(--bg4); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:0.65rem; font-weight:600; color:var(--text2); flex-shrink:0; font-family:'DM Mono',monospace; }
  .reactor-name { font-size:0.88rem; color:var(--text); flex:1; }
  .reactor-rxn-badge { font-size:1rem; }
  .reactor-anon { font-size:0.78rem; color:var(--text3); font-style:italic; }

/* ============================================================
   PERSON ROW -- reusable across member lists, follower lists,
   connection lists, group members, search results.
   Used by: profile, profile-org, groups, messages, search.
   Pattern: purple circle avatar, name, meta line, tier tag right.
   ============================================================ */
.person-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border2);
  transition: background 0.12s;
}
.person-row:last-child { border-bottom: none; }
.person-row:hover { background: rgba(255,255,255,0.015); }
.person-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(123,108,240,0.14); border: 1px solid rgba(123,108,240,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 600; color: var(--purple);
  flex-shrink: 0; font-family: 'DM Mono', monospace;
}
.person-info { flex: 1; min-width: 0; }
.person-name {
  font-size: 0.88rem; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.person-meta {
  font-family: 'DM Mono', monospace; font-size: 0.62rem;
  color: var(--text3); letter-spacing: 0.04em; margin-top: 2px;
}
.person-tag {
  padding: 2px 8px; border-radius: 4px;
  background: var(--bg3); border: 1px solid var(--border2);
  font-family: 'DM Mono', monospace; font-size: 0.58rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text3); flex-shrink: 0; white-space: nowrap;
}
.person-tag-admin {
  background: rgba(200,169,110,0.12); border-color: rgba(200,169,110,0.25);
  color: var(--warm);
}

/* Inline tier selector shown on own-profile connection rows.  Replaces
   the static .conn-tier-badge / .person-tag when IS_OWN is true. */
.conn-tier-select {
  padding: 4px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  cursor: pointer;
  outline: none;
  margin-left: auto;
  flex-shrink: 0;
}
.conn-tier-select:focus { border-color: var(--purple); }

/* ============================================================
   INLINE COMPOSE BAR -- reusable post input for groups,
   comment sections, direct message threads, BST listings.
   Used by: groups (each tab), feed inline reply.
   ============================================================ */
.inline-compose {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 8px 0 14px; border-bottom: 1px solid var(--border2);
  margin-bottom: 10px;
}
.inline-compose .avatar { width: 32px; height: 32px; font-size: 0.7rem; flex-shrink: 0; }
.inline-compose-input {
  flex: 1; width: 100%;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 9px 12px; font-size: 0.86rem; font-family: 'DM Sans', sans-serif;
  font-weight: 300; border-radius: 18px; outline: none; resize: none;
  min-height: 36px; max-height: 150px; line-height: 1.4; box-sizing: border-box;
  transition: border-color 0.2s;
}
.inline-compose-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(123,108,240,0.12); }
/* .inline-compose-send visuals now live in the unified send-button
   block above (search "Unified send/submit button").  Kept as an empty
   placeholder so the original line range stays referenced cleanly in
   git history. */
.inline-compose-body { flex: 1; display: flex; flex-direction: column; gap: 0; }
.inline-compose-media {
  display: flex; gap: 2px; padding: 4px 0 0;
}
.inline-compose-media-btn {
  padding: 4px 8px; border-radius: 6px; background: none; border: none;
  font-size: 0.78rem; color: var(--text3); cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: background 0.15s, color 0.15s;
  display: flex; align-items: center; gap: 3px;
}
.inline-compose-media-btn:hover { background: var(--bg4); color: var(--text2); }
.inline-compose-approval {
  font-family: 'DM Mono', monospace; font-size: 0.56rem;
  color: var(--text3); letter-spacing: 0.04em; padding: 3px 0 0;
  opacity: 0.7;
}

/* ── FULLSCREEN VIDEO MODE ── */
.of-video-wrap {
  position: relative;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
.of-video-wrap video,
.of-video-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
}
/* Fullscreen enter button: bottom-right of video */
.of-fs-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background: rgba(15, 13, 11, 0.7);
  border: 1px solid rgba(200, 169, 110, 0.25);
  border-radius: 8px;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.of-fs-btn:hover {
  background: rgba(15, 13, 11, 0.9);
  border-color: var(--purple);
}
/* Fullscreen exit button: purple X, upper-right */
.of-fs-exit {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(15, 13, 11, 0.8);
  border: 2px solid var(--purple);
  border-radius: 50%;
  color: var(--purple);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: background 0.2s, transform 0.15s;
  backdrop-filter: blur(12px);
}
.of-fs-exit:hover {
  background: rgba(123, 108, 240, 0.15);
  transform: scale(1.1);
}
/* When fullscreen is active: video fills the screen, black background */
.of-fullscreen-active {
  background: #000 !important;
  border-radius: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.of-fullscreen-active video,
.of-fullscreen-active iframe {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* Hide the enter-fullscreen button while in fullscreen */
.of-fullscreen-active .of-fs-btn {
  display: none;
}

/* ── ADMIN VIEW BANNER ──
   Rendered by ofCheckAdminBanner() in of-shared.js when the logged-in user
   has is_admin=true on /api/users/me.  Fixed to the top of every page,
   body.has-admin-banner shifts all known fixed top bars down by 34px. */
#admin-view-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: rgba(200, 169, 110, 0.15);
  border-bottom: 1px solid rgba(200, 169, 110, 0.45);
  color: var(--warm);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  text-align: center;
  backdrop-filter: blur(10px);
}
#admin-view-banner a {
  color: var(--warm);
  text-decoration: underline;
  margin-left: 6px;
}
#admin-view-banner a:hover { color: #fff; }

body.has-admin-banner { padding-top: 34px; }
body.has-admin-banner .msg-top-bar,
body.has-admin-banner .feed-top-bar,
body.has-admin-banner .top-bar,
body.has-admin-banner [class*="top-bar"] {
  top: 34px;
}

/* ── POST MEDIA PREVIEW (Sprint 3) ──
   Single-tile preview shown in feed and post-detail cards.  When the
   post has 2+ media items, only the first is shown plus a +N badge;
   tapping anywhere on the tile opens the lightbox.  object-fit:contain
   is mandatory -- the entire image must be visible (no cropping); the
   black background lets non-16:9 aspect ratios letterbox cleanly.  */
.post-media-preview {
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  margin: 8px 0 12px;
  max-height: 400px;
  background: #000;
}
.post-media-img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  background: #000;
  display: block;
}
.post-media-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 13, 11, 0.78);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  /* Final Wiring 1b: double the +N badge so it reads at glance on
     full-width preview tiles.  Doubled font-size, padding, and
     radius from the prior values. */
  font-size: 1.1rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(200, 169, 110, 0.25);
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* ── POST LIGHTBOX (Sprint 3) ──
   Full-screen viewer for cycling through a post's media.  Distinct
   from the profile-page .media-overlay, which has its own
   reactions/comments chrome.  Backdrop click, Escape, and the purple
   X all close it.  Arrow keys + nav buttons cycle when multiple items
   exist.  Video items render inside .of-video-wrap so the existing
   fullscreen button auto-attaches.  */
.post-lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
}
.post-lightbox.open { display: flex; }
.post-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}
.post-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(15, 13, 11, 0.7);
  border: 2px solid var(--purple);
  border-radius: 50%;
  color: var(--purple);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 910;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  transition: background 0.2s, transform 0.15s;
}
.post-lightbox-close:hover {
  background: rgba(123, 108, 240, 0.15);
  transform: scale(1.1);
}
.post-lightbox-stage {
  position: relative;
  z-index: 905;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90vw;
  height: 90vh;
}
.post-lightbox-media {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}
.post-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 910;
  /* Final Wiring 1c: bigger arrows (was 48px / 1.8rem) -- they're the
     primary navigation gesture on multi-photo posts and were too small
     to find without thinking on full-screen images. */
  width: 72px;
  height: 72px;
  background: rgba(15, 13, 11, 0.6);
  border: 1px solid rgba(200, 169, 110, 0.2);
  border-radius: 50%;
  color: var(--text);
  font-size: 2.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s;
  font-family: 'DM Sans', sans-serif;
  line-height: 1;
}
.post-lightbox-nav:hover {
  background: rgba(123, 108, 240, 0.18);
  border-color: var(--purple);
}
.post-lightbox-prev { left: 16px; }
.post-lightbox-next { right: 16px; }
.post-lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 910;
  font-family: 'DM Mono', monospace;
  font-size: 0.74rem;
  color: rgba(240, 235, 227, 0.8);
  background: rgba(15, 13, 11, 0.6);
  padding: 5px 14px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  letter-spacing: 0.06em;
}
/* Sprint 3B: mobile lightbox tweak.  Bumps the close-X background
   contrast and shrinks it slightly so it stays tappable on top of
   any image -- even white photos with high contrast against the
   purple ring -- without dominating a small viewport. */
@media (max-width: 640px) {
  .post-lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(15, 13, 11, 0.85);
  }
}

/* Final Wiring 1a: SEEN marker now sits IN-FLOW inside the card
   header, right-aligned next to the three-dot menu, instead of
   absolute-positioned over the avatar.  ofRenderPostCard inserts the
   span between the meta block and the menu wrap; flexbox in the
   header pushes it to the right via margin-left:auto.  .card-seen
   on the card itself is kept as a hook for any future
   visited-state styling. */
.card-seen {}
.card-seen-marker {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(240, 235, 227, 0.35);
  background: rgba(15, 13, 11, 0.5);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(200, 169, 110, 0.1);
  margin-left: auto;
  margin-right: 6px;
  flex-shrink: 0;
  align-self: center;
  pointer-events: none;
}

/* Final Wiring 1c: shrink the lightbox arrows on small viewports so
   they don't take up half the screen on a phone but stay clearly
   tappable. */
@media (max-width: 640px) {
  .post-lightbox-nav {
    width: 56px;
    height: 56px;
    font-size: 2.2rem;
  }
}
