/* ============================================================
   FUNDAR Theme — Warm Graphite
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  --bg: #22252D;
  --surface: #2A2E38;
  --surface-2: #323743;
  --border: #3A3F4C;
  --border-strong: #4A5060;
  --text: #E8E9ED;
  --text-soft: #C7CAD2;
  --text-muted: #9A9FAC;
  --text-dim: #6B7280;
  --primary: #F0B24D;
  --primary-deep: #D99A34;
  --primary-soft: rgba(240,178,77,.12);
  --primary-glow: rgba(240,178,77,.28);
  --success: #6BCB9C;
  --success-soft: rgba(107,203,156,.14);
  --warning: #E8B84B;
  --warning-soft: rgba(232,184,75,.14);
  --danger: #E77A7A;
  --danger-soft: rgba(231,122,122,.14);
  --anon: #C9A0C9;
  --anon-soft: rgba(201,160,201,.10);
  --anon-border: rgba(201,160,201,.32);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-full: 9999px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.15);
  --shadow-md: 0 4px 14px rgba(0,0,0,.22);
  --shadow-fab: 0 8px 26px rgba(240,178,77,.32);
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.45;
  min-height: 100vh; -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
a { color: var(--primary); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .85; }

/* ── TYPOGRAPHY ─────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.3px; color: var(--text); }
h1 em, h2 em, h3 em { font-style: italic; color: var(--primary); font-weight: 800; }

/* ── UTILITIES ──────────────────────────────────────── */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-14 { margin-top: 14px; } .mt-18 { margin-top: 18px; }
.mb-8 { margin-bottom: 8px; } .mb-14 { margin-bottom: 14px; }

/* ── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: var(--r-full); font-family: inherit;
  font-size: 14.5px; font-weight: 700; cursor: pointer; border: none;
  text-align: center; white-space: nowrap;
  transition: transform .15s, opacity .2s, background .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-primary { background: var(--primary); color: #22252D; box-shadow: 0 4px 14px var(--primary-glow); }
.btn-primary:hover:not(:disabled) { background: var(--primary-deep); }
.btn-ghost { background: transparent; border: 1px solid var(--border-strong); color: var(--text-soft); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }
.btn-success { background: var(--success-soft); color: var(--success); border: 1px solid var(--success); }

/* ── FORMS ──────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; letter-spacing: .2px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--text); font-family: var(--font); font-size: 14.5px;
  outline: none; transition: border-color .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); background: var(--surface-2); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field textarea { min-height: 80px; resize: vertical; }
.field input[type="file"] { padding: 10px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.field-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 46px; }
.password-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: var(--r-full); background: transparent;
  border: none; color: var(--text-muted); display: grid; place-items: center;
  cursor: pointer; transition: color .15s, background .15s;
}
.password-toggle:hover { color: var(--text); background: var(--surface-2); }
.password-toggle svg { width: 18px; height: 18px; }

/* ── FLASH ──────────────────────────────────────────── */
.flashes { max-width: 480px; margin: 0 auto; padding: 12px 16px 0; }
.flash {
  padding: 11px 14px; border-radius: var(--r-md); font-size: 13.5px;
  font-weight: 600; margin-bottom: 8px; border: 1px solid;
  animation: fadeIn .2s ease;
}
.flash.error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.flash.success { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.flash.warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── AUTH CARDS ─────────────────────────────────────── */
.center-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px 24px; }
.card-wide { max-width: 480px; }
.card h1 { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.4px; margin-bottom: 4px; }
.card h1 em { font-style: italic; color: var(--primary); }
.card .sub { color: var(--text-muted); font-size: 14px; margin-bottom: 22px; line-height: 1.5; }
.card-footer { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--text-muted); }

.brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px;
  background: linear-gradient(135deg, #F0B24D 0%, #E09535 100%);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 21px;
  color: #22252D; font-style: italic; box-shadow: 0 4px 14px var(--primary-glow);
  flex-shrink: 0;
}
.brand-name { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.4px; font-style: italic; line-height: 1; color: var(--text); }
.brand-sub { font-size: 10.5px; color: var(--text-muted); font-weight: 500; letter-spacing: .3px; margin-top: 3px; }

/* ── APP SHELL ──────────────────────────────────────── */
.app { width: 100%; max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 100px; position: relative; }

/* ── HEADER ─────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(34,37,45,.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border); padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.header-brand { display: flex; align-items: center; gap: 11px; }
.header-mark {
  width: 38px; height: 38px; border-radius: 13px;
  background: linear-gradient(135deg, #F0B24D 0%, #E09535 100%);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 19px;
  color: #22252D; font-style: italic;
  box-shadow: 0 4px 14px var(--primary-glow); flex-shrink: 0;
}
.header-brand-text { display: flex; flex-direction: column; }
.header-brand-name { font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: -.4px; color: var(--text); line-height: 1; font-style: italic; }
.header-brand-sub { font-size: 10.5px; color: var(--text-muted); font-weight: 500; margin-top: 3px; letter-spacing: .3px; }
.header-icons { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--text-soft);
  cursor: pointer; position: relative;
  transition: background .2s, transform .15s, color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .dot {
  position: absolute; top: 9px; right: 10px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 2px var(--surface);
}

/* ── GREETING ───────────────────────────────────────── */
.greeting { padding: 16px 18px 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.greet-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.4px; line-height: 1.15; color: var(--text); }
.greet-title em { font-style: italic; color: var(--primary); font-weight: 800; }
.greet-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.weather-pill {
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 12px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 600; color: var(--text-soft);
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap; flex-shrink: 0;
}

/* ── QUICK ACTIONS ──────────────────────────────────── */
.actions { padding: 4px 12px 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 6px; border-radius: var(--r-md); cursor: pointer;
  transition: transform .15s; border: none; background: transparent;
  color: inherit; font-family: inherit;
}
.action:active { transform: scale(.94); }
.action-icon {
  width: 52px; height: 52px; border-radius: 17px;
  display: grid; place-items: center; font-size: 22px;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s, background .2s;
}
.action:hover .action-icon { border-color: var(--border-strong); background: var(--surface-2); }
.action-label { font-size: 11.5px; font-weight: 600; color: var(--text-soft); text-align: center; }

/* ── CHIPS & SECTION LABELS ─────────────────────────── */
.chips { display: flex; gap: 8px; padding: 10px 18px 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 8px 15px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  white-space: nowrap; cursor: pointer; font-family: inherit;
  transition: all .2s;
}
.chip:hover { color: var(--text-soft); border-color: var(--border-strong); }
.chip.active {
  background: var(--primary); border-color: var(--primary);
  color: #22252D; font-weight: 700; box-shadow: 0 4px 14px var(--primary-glow);
}
.chip-badge {
  display: inline-block; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800; padding: 1px 6px;
  border-radius: var(--r-full); margin-left: 4px; vertical-align: middle;
}

.section-label {
  padding: 8px 18px 10px; font-family: var(--font-display);
  font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -.2px;
}
.section-label em { font-style: italic; color: var(--primary); font-weight: 800; }

/* ── FEED & POSTS ───────────────────────────────────── */
.feed { padding: 0 12px; display: flex; flex-direction: column; gap: 12px; }
.post {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 15px;
  animation: fadeUp .35s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.post.anon { background: linear-gradient(180deg, rgba(201,160,201,.06) 0%, var(--surface) 55%); border-color: var(--anon-border); }
.post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.post-meta { flex: 1; min-width: 0; }
.post-name-row { display: flex; align-items: center; gap: 6px; }
.post-name { font-size: 14.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-name-link { color: var(--text); text-decoration: none; transition: color .15s; }
.post-name-link:hover { color: var(--primary); text-decoration: underline; }
.verified {
  width: 15px; height: 15px; border-radius: 50%; background: var(--primary);
  display: inline-grid; place-items: center; color: #22252D; font-size: 9px;
  font-weight: 900; flex-shrink: 0;
}
.badge-anon {
  font-size: 9px; font-weight: 800; letter-spacing: .6px;
  padding: 3px 7px; border-radius: 6px;
  background: var(--anon-soft); color: var(--anon); border: 1px solid var(--anon-border);
}
.post-time { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.post-more {
  color: var(--text-muted); padding: 6px; border-radius: 8px;
  cursor: pointer; background: transparent; border: none; font-size: 18px;
  line-height: 1; flex-shrink: 0;
}
.post-more:hover { background: var(--surface-2); color: var(--text); }
.post-body { font-size: 14.5px; line-height: 1.55; color: var(--text-soft); margin-bottom: 11px; word-wrap: break-word; white-space: pre-wrap; }
.post-img { width: 100%; border-radius: var(--r-md); margin-bottom: 11px; display: block; object-fit: cover; max-height: 320px; border: 1px solid var(--border); }
.post-actions { display: flex; align-items: center; gap: 4px; padding-top: 11px; border-top: 1px solid var(--border); }
.act {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 11px; border-radius: var(--r-full);
  background: transparent; border: none; color: var(--text-muted);
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: background .15s, color .15s, transform .1s;
}
.act:hover { background: var(--surface-2); color: var(--text); }
.act:active { transform: scale(.94); }
.act svg { width: 18px; height: 18px; }
.act.liked { color: var(--primary); }
.act.liked svg { fill: var(--primary); }
.act-spacer { flex: 1; }
.act-save { padding: 8px; }
.avatar-link { text-decoration: none; display: inline-block; transition: transform .15s; }
.avatar-link:active { transform: scale(.94); }

/* ── AVATARS (all blank variants combined) ──────────── */
.avatar, .comment-avatar, .search-avatar, .room-avatar, .msg-avatar, .connect-avatar, .chat-peer-avatar {
  border-radius: var(--r-full); object-fit: cover; flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border);
}
.avatar { width: 42px; height: 42px; }
.avatar-anon { background: linear-gradient(135deg, #C9A0C9 0%, #A87CA8 100%); display: grid; place-items: center; color: #fff; font-size: 19px; border: none; }

/* Every blank avatar uses the same silhouette */
.avatar-blank, .search-avatar-blank, .room-avatar-blank, .msg-avatar-blank,
.user-pick-avatar-blank, .connect-avatar-blank, .profile-avatar-blank {
  background: #FFFFFF !important; border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.avatar-blank::after, .search-avatar-blank::after, .room-avatar-blank::after,
.msg-avatar-blank::after, .user-pick-avatar-blank::after, .connect-avatar-blank::after,
.profile-avatar-blank::after {
  content: ''; position: absolute; inset: 25%;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzdDQUQyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTIiIGN5PSI4IiByPSI0Ii8+PHBhdGggZD0iTTIwIDIxYTggOCAwIDAgMC0xNiAwIi8+PC9zdmc+");
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: .55;
}
.room-avatar-group { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); font-size: 22px; display: grid; place-items: center; }

/* ── FAB ────────────────────────────────────────────── */
.fab {
  position: fixed; bottom: 92px; right: calc(50% - 240px + 20px);
  width: 58px; height: 58px; border-radius: var(--r-full);
  background: linear-gradient(135deg, #F0B24D 0%, #E09535 100%);
  border: none; color: #22252D; font-size: 28px; font-weight: 300;
  line-height: 1; display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow-fab); z-index: 40;
  transition: transform .15s; padding-bottom: 4px;
}
.fab:active { transform: scale(.9); }

/* ── BOTTOM NAV ─────────────────────────────────────── */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(34,37,45,.94);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: 10px 0 16px; z-index: 45;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 16px; background: transparent; border: none;
  color: var(--text-muted); font-family: inherit; cursor: pointer;
  transition: color .2s;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item span { font-size: 10.5px; font-weight: 600; }
.nav-item.active { color: var(--primary); }
.nav-item.active span { color: var(--primary); }
.nav-item:hover { color: var(--text-soft); }

/* ── MODALS ─────────────────────────────────────────── */
.modal-back {
  position: fixed; inset: 0;
  background: rgba(15,17,21,.65);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 100; display: none; align-items: flex-end; justify-content: center;
}
.modal-back.open { display: flex; animation: fadeIn .2s; }
.modal {
  width: 100%; max-width: 480px; background: var(--surface);
  border: 1px solid var(--border); border-bottom: none;
  border-top-left-radius: var(--r-xl); border-top-right-radius: var(--r-xl);
  padding: 20px; animation: slideUp .3s cubic-bezier(.2,.9,.3,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.modal-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.3px; flex: 1; text-align: center; }
.modal-close {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-soft); width: 34px; height: 34px;
  border-radius: var(--r-full); display: grid; place-items: center;
  cursor: pointer; font-size: 15px; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--surface); color: var(--text); }
.modal-head-spacer { width: 34px; flex-shrink: 0; }
.post-btn {
  background: var(--primary); color: #22252D; border: none;
  padding: 9px 20px; border-radius: var(--r-full);
  font-weight: 800; font-size: 14px; font-family: inherit;
  cursor: pointer; transition: opacity .2s, background .2s; flex-shrink: 0;
}
.post-btn:hover:not(:disabled) { background: var(--primary-deep); }
.post-btn:disabled { opacity: .3; cursor: not-allowed; }
.modal-tall { height: 80vh; max-height: 700px; display: flex; flex-direction: column; }

/* Anonymous toggle */
.anon-toggle {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-md);
  margin-bottom: 14px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.anon-toggle.on { border-color: rgba(201,160,201,.5); background: var(--anon-soft); }
.anon-toggle svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.anon-toggle.on svg { color: var(--anon); }
.anon-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.anon-toggle.on .anon-label { color: var(--anon); }
.switch { width: 42px; height: 24px; border-radius: var(--r-full); background: #454A57; padding: 3px; transition: background .2s; flex-shrink: 0; }
.anon-toggle.on .switch { background: var(--anon); }
.knob { width: 18px; height: 18px; border-radius: 50%; background: #E8E9ED; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.anon-toggle.on .knob { transform: translateX(18px); }
.anon-chip {
  width: 40px; height: 40px; border-radius: var(--r-full);
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.anon-chip.on { background: var(--anon-soft); border-color: var(--anon); }

/* Composer */
.composer { width: 100%; background: transparent; border: none; color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; min-height: 130px; resize: none; outline: none; }
.composer::placeholder { color: var(--text-dim); }
.composer-tools { display: flex; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 8px; }
.tool-btn {
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); display: grid; place-items: center;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.tool-btn:hover { background: var(--surface-2); color: var(--primary); border-color: var(--border-strong); }
.tool-btn:active { transform: scale(.94); }
.tool-btn svg { width: 18px; height: 18px; }
.composer-preview { position: relative; margin: 8px 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); }
.composer-preview img { width: 100%; display: block; max-height: 220px; object-fit: cover; }
.preview-remove {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px;
  border-radius: var(--r-full); background: rgba(0,0,0,.7); color: #fff;
  font-size: 14px; display: grid; place-items: center;
}

/* Comments */
.comments-list { flex: 1; overflow-y: auto; padding: 6px 0; display: flex; flex-direction: column; gap: 14px; }
.comment-item { display: flex; gap: 10px; padding: 0 4px; }
.comment-avatar { width: 34px; height: 34px; font-size: 15px; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.comment-author { font-size: 13.5px; font-weight: 700; color: var(--text); }
.comment-time { font-size: 11px; color: var(--text-muted); }
.comment-body p { font-size: 14px; color: var(--text-soft); line-height: 1.5; word-break: break-word; }
.comment-input-row { display: flex; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; }
.comment-input-row input { flex: 1; padding: 11px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-full); color: var(--text); font-family: inherit; font-size: 14px; outline: none; }
.comment-input-row input:focus { border-color: var(--primary); }

/* ── ADMIN ──────────────────────────────────────────── */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 24px 20px 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-head h1 { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.admin-head h1 em { font-style: italic; color: var(--primary); }
.admin-head .sub { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }
.admin-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-section-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 14px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; }
.stat-num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-top: 6px; }

.verify-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; margin-bottom: 14px; }
.verify-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; gap: 12px; }
.verify-name { font-weight: 700; font-size: 15px; color: var(--text); }
.verify-contact { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.verify-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin-bottom: 14px; font-size: 13.5px; }
.verify-row .k { color: var(--text-muted); font-weight: 600; display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.verify-row .v { color: var(--text); font-weight: 600; }
.verify-doc { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; margin-bottom: 12px; }
.verify-doc img { max-width: 100%; max-height: 380px; border-radius: var(--r-sm); display: block; margin: 0 auto; }
.verify-doc a { font-size: 13.5px; font-weight: 600; }
.verify-actions { display: flex; gap: 10px; align-items: flex-start; }
.verify-actions form { flex: 1; }
.verify-actions .field { margin-bottom: 8px; }
.reject-form { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.reject-input {
  width: 100%; padding: 11px 14px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--text); font-family: var(--font); font-size: 13.5px;
  outline: none; transition: border-color .2s;
}
.reject-input:focus { border-color: var(--danger); }
.reject-input::placeholder { color: var(--text-dim); }

.ai-meter { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.ai-meter span { flex-shrink: 0; }
.ai-safe { background: var(--success-soft); color: var(--success); }
.ai-warn { background: var(--warning-soft); color: var(--warning); }
.ai-danger { background: var(--danger-soft); color: var(--danger); }
.ai-bar { height: 6px; flex: 1; background: rgba(255,255,255,.08); border-radius: var(--r-full); overflow: hidden; }
.ai-bar > div { height: 100%; background: currentColor; border-radius: var(--r-full); transition: width .4s ease; }
.ai-flags { font-size: 12.5px; color: var(--text-muted); margin-bottom: 12px; padding-left: 18px; line-height: 1.6; }
.ai-flags li { margin-bottom: 2px; }
.recent-list .verify-card { opacity: .78; }
.recent-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.recent-name { font-weight: 700; font-size: 14px; }
.recent-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.recent-reason { font-size: 12.5px; color: var(--danger); margin-top: 8px; }

/* ── PENDING ────────────────────────────────────────── */
.pending-hero { text-align: center; padding: 40px 20px 20px; }
.pending-icon { width: 80px; height: 80px; border-radius: var(--r-full); background: var(--primary-soft); display: grid; place-items: center; margin: 0 auto 18px; font-size: 36px; }
.pending-icon.danger { background: var(--danger-soft); color: var(--danger); }
.pending-icon.success { background: var(--success-soft); color: var(--success); }
.pending-hero h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.pending-hero p { color: var(--text-muted); font-size: 14px; line-height: 1.5; max-width: 340px; margin: 0 auto; }
.detail-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; margin: 20px 0; }
.detail-list .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; gap: 14px; }
.detail-list .row:last-child { border-bottom: none; }
.detail-list .row span:first-child { color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.detail-list .row span:last-child { color: var(--text); font-weight: 600; text-align: right; word-break: break-word; }

/* ── EMPTY & TAGS ───────────────────────────────────── */
.empty { text-align: center; padding: 50px 20px; color: var(--text-muted); font-size: 14px; }
.tag {
  display: inline-block; padding: 3px 9px; border-radius: var(--r-full);
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; white-space: nowrap;
}
.tag-pending { background: var(--warning-soft); color: var(--warning); }
.tag-approved { background: var(--success-soft); color: var(--success); }
.tag-rejected { background: var(--danger-soft); color: var(--danger); }
.tag-verified { background: var(--primary-soft); color: var(--primary); }

/* ── CHAT ───────────────────────────────────────────── */
.chat-app { width: 100%; max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; overflow: hidden; }
.chat-screen { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.chat-screen.hidden { display: none; }

.chat-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(34,37,45,.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.chat-topbar-title { flex: 1; min-width: 0; }
.chat-topbar-name { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: var(--text); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-topbar-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-topbar-actions { display: flex; gap: 6px; }
.chat-peer { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-peer-avatar { width: 38px; height: 38px; overflow: hidden; background: #FFFFFF; }
.chat-peer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-peer-text { min-width: 0; flex: 1; }

.chat-rooms-list { flex: 1; overflow-y: auto; padding-bottom: 100px; }
.room-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px;
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  cursor: pointer; text-align: left; color: inherit; font-family: inherit;
  transition: background .15s;
}
.room-item:hover { background: var(--surface); }
.room-item:active { background: var(--surface-2); }
.room-avatar { width: 50px; height: 50px; font-size: 18px; }
.room-info { flex: 1; min-width: 0; }
.room-name { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.room-last { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-time { font-size: 11.5px; color: var(--text-muted); flex-shrink: 0; align-self: flex-start; margin-top: 2px; }

.chat-empty { text-align: center; padding: 80px 30px; color: var(--text-muted); }
.chat-empty-emoji { font-size: 56px; margin-bottom: 14px; }
.chat-empty-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.chat-empty-sub { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }

.chat-fab {
  position: fixed; bottom: 24px; right: calc(50% - 240px + 20px);
  width: 56px; height: 56px; border-radius: var(--r-full);
  background: linear-gradient(135deg, #F0B24D 0%, #E09535 100%);
  border: none; color: #22252D;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow-fab); z-index: 25;
  transition: transform .15s;
}
.chat-fab:active { transform: scale(.9); }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px 14px 100px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 82%; animation: msgIn .18s ease both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar { width: 30px; height: 30px; }
.msg-bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 9px 13px; max-width: 100%; word-wrap: break-word; word-break: break-word; }
.msg.mine .msg-bubble { background: var(--primary); color: #22252D; border-color: var(--primary); }
.msg-author { font-size: 11.5px; font-weight: 800; color: var(--primary); margin-bottom: 3px; letter-spacing: .2px; }
.msg-content { font-size: 14.5px; line-height: 1.4; white-space: pre-wrap; }
.msg-time { font-size: 10.5px; opacity: .7; margin-top: 4px; text-align: right; }
.msg.mine .msg-time { color: rgba(34,37,45,.65); }

.chat-composer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; display: flex; gap: 8px;
  padding: 12px 14px;
  background: rgba(34,37,45,.96);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border); z-index: 20;
}
.chat-composer input {
  flex: 1; padding: 12px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-full);
  color: var(--text); font-family: inherit; font-size: 15px;
  outline: none; transition: border-color .15s;
}
.chat-composer input:focus { border-color: var(--primary); }
.chat-composer input::placeholder { color: var(--text-dim); }
.chat-send-btn {
  width: 46px; height: 46px; border-radius: var(--r-full);
  background: var(--primary); color: #22252D; border: none;
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
  transition: transform .15s, background .15s;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.chat-send-btn:hover { background: var(--primary-deep); }
.chat-send-btn:active { transform: scale(.9); }

/* Chat search */
.chat-search { background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 14px; position: relative; }
.chat-search-input-wrap { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-full); padding: 8px 14px; }
.chat-search-input-wrap svg { color: var(--text-muted); flex-shrink: 0; }
.chat-search-input-wrap input { flex: 1; background: transparent; border: none; color: var(--text); font-family: inherit; font-size: 14px; outline: none; }
.chat-search-close { color: var(--text-muted); font-size: 14px; padding: 2px 6px; background: transparent; border: none; cursor: pointer; }
.chat-search-results {
  position: absolute; top: calc(100% + 4px); left: 14px; right: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-md);
  max-height: 320px; overflow-y: auto; z-index: 60; padding: 6px;
}

/* Search rows (shared chat + global) */
.search-empty { padding: 20px 12px; text-align: center; color: var(--text-muted); font-size: 13px; }
.search-item, .search-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px; background: transparent;
  border: none; border-radius: var(--r-md); cursor: pointer;
  text-align: left; color: inherit; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.search-item:hover { background: var(--surface-2); }
.search-row { background: var(--surface); border: 1px solid var(--border); }
.search-row:hover { background: var(--surface-2); border-color: var(--border-strong); }
.search-avatar { width: 40px; height: 40px; }
.search-avatar-group { background: var(--primary-soft); color: var(--primary); font-size: 18px; border-color: var(--primary); display: grid; place-items: center; }
.search-avatar-emoji { font-size: 20px; background: var(--surface-2); display: grid; place-items: center; }
.search-body, .search-row-body { flex: 1; min-width: 0; }
.search-name, .search-row-title { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-row-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; margin-bottom: 2px; }
.search-meta, .search-row-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-action { font-size: 12px; font-weight: 700; color: var(--primary); flex-shrink: 0; }

/* User picker (group modal) */
.user-picker { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.user-pick-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); cursor: pointer; font-size: 14px; }
.user-pick-item:hover { background: var(--surface-2); }
.user-pick-item input { width: 18px; height: 18px; accent-color: var(--primary); }
.user-pick-item img, .user-pick-avatar-blank { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* Global search overlay */
.search-overlay { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: none; overflow-y: auto; }
.search-overlay.open { display: block; animation: fadeIn .15s ease; }
.search-overlay-inner { max-width: 480px; margin: 0 auto; padding: 16px 14px 40px; min-height: 100vh; }
.search-overlay-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.search-overlay-input-wrap { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-full); padding: 10px 16px; }
.search-overlay-input-wrap svg { color: var(--text-muted); flex-shrink: 0; }
.search-overlay-input-wrap input { flex: 1; background: transparent; border: none; color: var(--text); font-family: inherit; font-size: 15px; outline: none; }
.search-overlay-input-wrap input::placeholder { color: var(--text-dim); }
.search-overlay-close { color: var(--primary); font-size: 14px; font-weight: 700; background: transparent; border: none; cursor: pointer; padding: 6px 8px; flex-shrink: 0; }
.search-overlay-results { display: flex; flex-direction: column; gap: 20px; }
.search-tip { text-align: center; color: var(--text-muted); font-size: 13.5px; padding: 40px 20px; line-height: 1.6; }
.search-loading { text-align: center; color: var(--text-muted); font-size: 13.5px; padding: 40px 20px; }
.search-section { display: flex; flex-direction: column; gap: 8px; }
.search-section-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; padding: 0 4px; }
.search-section-body { display: flex; flex-direction: column; gap: 4px; }

/* ── PROFILE ────────────────────────────────────────── */
.profile-hero { text-align: center; padding: 24px 20px; border-bottom: 1px solid var(--border); }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--primary); margin: 0 auto 12px; display: block; object-fit: cover; }
.profile-name { font-family: var(--font-display); font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.profile-bio { color: var(--text-muted); font-size: 13.5px; max-width: 340px; margin: 0 auto 12px; line-height: 1.5; }
.profile-tags { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.profile-stats { display: flex; justify-content: center; gap: 32px; padding: 12px 0; margin-bottom: 14px; }
.profile-stats > div { text-align: center; }
.profile-stats .stat-num { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--primary); }
.profile-stats .stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; margin-top: 2px; }
.profile-stat-btn { background: transparent; border: none; cursor: pointer; padding: 0; font-family: inherit; color: inherit; transition: opacity .15s; }
.profile-stat-btn:hover { opacity: .75; }
.profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 12px; }
.profile-avatar-edit {
  position: absolute; bottom: 4px; right: 4px; width: 32px; height: 32px;
  border-radius: var(--r-full); background: var(--primary); color: #22252D;
  display: grid; place-items: center; cursor: pointer; border: 2px solid var(--bg);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.profile-avatar-edit:hover { background: var(--primary-deep); }
.profile-avatar-remove {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px;
  border-radius: var(--r-full); background: var(--danger); color: #fff;
  font-size: 12px; display: grid; place-items: center; cursor: pointer;
  border: 2px solid var(--bg);
}
.profile-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.profile-details { margin: 20px 12px; }
.profile-tabs { padding-top: 6px; padding-bottom: 14px; }
.profile-panel { padding-bottom: 100px; }
.profile-panel.hidden { display: none; }

/* ── CONNECT (Add Up) ───────────────────────────────── */
.connect-panel { padding-bottom: 100px; }
.connect-list { padding: 0 12px; display: flex; flex-direction: column; gap: 10px; }
.connect-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; }
.connect-avatar { width: 52px; height: 52px; }
.connect-body { flex: 1; min-width: 0; }
.connect-name { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.connect-meta { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 3px; }
.connect-bio { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.connect-action { flex-shrink: 0; }
.connect-actions { display: flex; flex-direction: column; gap: 6px; }

/* ── FOLLOW BUTTON ──────────────────────────────────── */
.follow-inline {
  margin-left: 6px; padding: 2px 8px; font-size: 10.5px; font-weight: 700;
  color: var(--primary); background: transparent; border: 1px solid var(--primary);
  border-radius: var(--r-full); cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s; vertical-align: middle;
}
.follow-inline:hover { background: var(--primary); color: #22252D; }
.follow-inline[data-following="true"] { color: var(--text-muted); border-color: var(--border-strong); }
.follow-inline[data-following="true"]:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

/* ── PRIVACY BANNER ─────────────────────────────────── */
.privacy-banner {
  display: flex; align-items: center; gap: 8px; margin: 12px;
  padding: 12px 14px; background: var(--primary-soft);
  border: 1px solid rgba(240,178,77,.3); border-radius: var(--r-md);
  color: var(--text-soft); font-size: 12.5px; line-height: 1.5;
}
.privacy-banner svg { color: var(--primary); flex-shrink: 0; }

/* ── PWA INSTALL BANNER ─────────────────────────────── */
.install-banner {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px;
  width: calc(100% - 24px); max-width: 456px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: 0 8px 26px rgba(0,0,0,.35); z-index: 150;
  animation: slideUpBanner .3s ease;
}
.install-banner.hidden { display: none; }
@keyframes slideUpBanner { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.install-banner-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, #F0B24D 0%, #E09535 100%);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  color: #22252D; font-style: italic; flex-shrink: 0;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.install-banner-text { flex: 1; min-width: 0; }
.install-banner-title { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.install-banner-sub { font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }
.install-banner-btn {
  background: var(--primary); color: #22252D; border: none;
  padding: 8px 14px; border-radius: var(--r-full);
  font-family: inherit; font-size: 12.5px; font-weight: 800;
  cursor: pointer; flex-shrink: 0; transition: background .15s;
}
.install-banner-btn:hover { background: var(--primary-deep); }
.install-banner-close { background: transparent; border: none; color: var(--text-muted); font-size: 14px; padding: 4px 6px; cursor: pointer; flex-shrink: 0; }

/* ── MARKETPLACE ────────────────────────────────────── */
.market-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 12px; }
.listing { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.listing-img-wrap { position: relative; }
.listing-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.listing-img-empty { display: grid; place-items: center; font-size: 40px; background: var(--surface-2); color: var(--text-muted); }
.listing-sold { position: absolute; inset: 0; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; font-weight: 800; letter-spacing: 2px; font-size: 14px; }
.listing.is-sold { opacity: .7; }
.listing-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.listing-title { font-size: 13.5px; font-weight: 700; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.listing-price { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: var(--primary); }
.listing-meta { font-size: 11px; color: var(--text-muted); }
.listing-sold-btn {
  margin-top: 6px; padding: 6px 10px; border-radius: var(--r-full);
  background: var(--primary-soft); color: var(--primary);
  font-size: 11.5px; font-weight: 700; border: none; cursor: pointer;
}
.listing-buy-btn {
  margin-top: 8px; padding: 8px 12px; background: var(--primary);
  color: #22252D; border: none; border-radius: var(--r-full);
  font-size: 12px; font-weight: 800; font-family: inherit;
  cursor: pointer; transition: background .15s; width: 100%;
}
.listing-buy-btn:hover { background: var(--primary-deep); }
.listing.is-featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.listing-featured-badge {
  position: absolute; top: 6px; left: 6px;
  padding: 3px 8px; background: var(--primary); color: #22252D;
  font-size: 10px; font-weight: 800; border-radius: var(--r-full); z-index: 2;
}

/* Seller setup banner */
.seller-banner {
  display: flex; align-items: center; gap: 12px; margin: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(34,197,94,.12) 0%, rgba(240,178,77,.10) 100%);
  border: 1px solid rgba(34,197,94,.30); border-radius: var(--r-lg);
}
.seller-banner.hidden { display: none; }
.seller-banner-icon { font-size: 28px; flex-shrink: 0; }
.seller-banner-body { flex: 1; min-width: 0; }
.seller-banner-title { font-size: 13.5px; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.seller-banner-sub { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

/* Buy modal */
.buy-item { display: flex; gap: 12px; padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); }
.buy-item img, .buy-item-img-empty {
  width: 72px; height: 72px; border-radius: var(--r-md); flex-shrink: 0;
}
.buy-item img { object-fit: cover; }
.buy-item-img-empty { background: var(--surface-2); display: grid; place-items: center; font-size: 28px; }
.buy-item-info { flex: 1; min-width: 0; }
.buy-item-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.buy-item-price { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: var(--primary); margin-bottom: 3px; }
.buy-item-seller { font-size: 11.5px; color: var(--text-muted); }

/* Promote / Ad pricing */
.listing-promote-btn {
  margin-top: 6px; padding: 8px 12px;
  background: linear-gradient(135deg, #F0B24D 0%, #E09535 100%);
  color: #22252D; border: none; border-radius: var(--r-full);
  font-size: 12px; font-weight: 800; font-family: inherit;
  cursor: pointer; width: 100%; transition: transform .15s;
}
.listing-promote-btn:hover { transform: scale(1.02); }
.promo-tiers { display: grid; gap: 8px; margin-top: 8px; }
.promo-tier {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer; font-family: inherit; color: var(--text);
  text-align: left; transition: all .15s;
}
.promo-tier:hover { border-color: var(--primary); background: var(--surface-2); }
.promo-tier.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.promo-tier-days { font-size: 14px; font-weight: 800; color: var(--text); min-width: 60px; flex-shrink: 0; }
.promo-tier-price { font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--primary); flex-shrink: 0; }
.promo-tier-per { font-size: 11px; color: var(--text-muted); flex: 1; }
.promo-tier-saving { font-size: 10px; font-weight: 800; color: var(--success); padding: 3px 7px; background: var(--success-soft); border-radius: var(--r-full); flex-shrink: 0; }

.transfer-details-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; margin-top: 8px; }
.transfer-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.transfer-row:last-child { border-bottom: none; }
.transfer-row span { color: var(--text-muted); font-size: 12.5px; font-weight: 600; }
.transfer-row strong { color: var(--text); font-size: 14px; font-weight: 700; text-align: right; word-break: break-word; }
.transfer-row.transfer-row-highlight { background: var(--primary-soft); margin: 6px -14px -14px; padding: 10px 14px; border-radius: 0 0 var(--r-md) var(--r-md); border-bottom: none; }
.transfer-account-number { font-family: var(--font-mono); font-size: 16px !important; letter-spacing: .5px; color: var(--primary) !important; }
.transfer-amount { font-family: var(--font-display); font-size: 18px !important; color: var(--primary) !important; }

/* ── ASSIGNMENTS ────────────────────────────────────── */
.assign-list { padding: 0 12px; display: flex; flex-direction: column; gap: 10px; }
.assign-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 14px;
  border-left: 4px solid var(--border-strong);
}
.assign-item.urgency-overdue { border-left-color: var(--danger); }
.assign-item.urgency-urgent { border-left-color: var(--warning); }
.assign-item.urgency-soon { border-left-color: var(--primary); }
.assign-item.urgency-later { border-left-color: var(--success); }
.assign-item.done { opacity: .55; }
.assign-item.done .assign-title { text-decoration: line-through; }
.assign-check input { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; margin-top: 2px; }
.assign-body { flex: 1; min-width: 0; }
.assign-course { font-size: 11.5px; font-weight: 700; color: var(--primary); letter-spacing: .3px; text-transform: uppercase; margin-bottom: 4px; }
.assign-title { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.assign-desc { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.assign-due { font-size: 12px; color: var(--text-soft); font-weight: 600; }
.assign-del { color: var(--text-muted); padding: 4px; font-size: 14px; background: transparent; border: none; cursor: pointer; }
.assign-del:hover { color: var(--danger); }

/* Assignment attachments */
.assign-attach { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 8px; text-decoration: none; transition: opacity .15s; }
.assign-attach:hover { opacity: .85; }
.assign-attach-image img { max-width: 100%; max-height: 180px; border-radius: var(--r-md); border: 1px solid var(--border); display: block; }
.assign-attach-file { padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); font-size: 13px; font-weight: 600; max-width: 100%; }
.assign-attach-file:hover { border-color: var(--primary); color: var(--primary); }
.assign-attach-icon { font-size: 16px; flex-shrink: 0; }
.assign-attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.assign-file-name { padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 12px; }

/* ── EVENTS ─────────────────────────────────────────── */
.events-list { padding: 0 12px; display: flex; flex-direction: column; gap: 14px; }
.event-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.event-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.event-img-empty { display: grid; place-items: center; font-size: 60px; background: var(--primary-soft); color: var(--primary); }
.event-body { padding: 14px 16px 16px; }
.event-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.event-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-soft); margin-bottom: 10px; }
.event-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.event-actions { display: flex; align-items: center; gap: 12px; }
.event-count { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 520px) {
  .fab, .chat-fab { right: 20px; }
  .install-banner { bottom: 82px; }
  .greet-title { font-size: 22px; }
  .card { padding: 24px 20px; }
  .verify-row { grid-template-columns: 1fr; }
  .verify-actions { flex-direction: column; }
  .verify-actions form { width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .action-icon { width: 46px; height: 46px; font-size: 20px; }
  .action-label { font-size: 10.5px; }
}
@supports (padding: max(0px)) {
  .nav { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .app { padding-bottom: max(100px, calc(env(safe-area-inset-bottom) + 80px)); }
  /* ═══════════════════════════════════════════
   FUNDER-STYLE MARKETPLACE
   ═══════════════════════════════════════════ */

/* Search bar */
.market-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 14px 6px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}
.market-search-wrap svg { color: var(--text-muted); flex-shrink: 0; }
.market-search-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.market-search-wrap input::placeholder { color: var(--text-dim); }

/* Listing card — restructured */
.market-grid .listing-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.market-grid .listing-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 2px;
}
.market-grid .listing-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  margin-bottom: 4px;
}
.listing-seller {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.seller-verified {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--primary);
  color: #22252D;
  font-size: 8px;
  font-weight: 900;
  flex-shrink: 0;
}

/* Contact row */
.listing-contact-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.listing-contact-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all .15s;
}
.listing-contact-btn:hover:not(:disabled) {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary);
}
.listing-contact-btn:disabled {
  opacity: .55;
  cursor: default;
}
.listing-contact-btn.primary {
  background: var(--primary);
  color: #22252D;
  border-color: var(--primary);
}
.listing-contact-btn.primary:hover {
  background: var(--primary-deep);
  color: #22252D;
}
.listing-contact-btn.wa {
  color: #25D366;
  border-color: rgba(37, 211, 102, .35);
  background: rgba(37, 211, 102, .08);
}
.listing-contact-btn.wa:hover {
  background: rgba(37, 211, 102, .16);
  border-color: #25D366;
  color: #25D366;
}
.listing-contact-btn.wa-add {
  color: var(--text-muted);
  border-style: dashed;
}
.listing-contact-btn.wa-add:hover {
  color: #25D366;
  border-color: #25D366;
}

/* Boost modal summary card */
.boost-summary {
  background: linear-gradient(135deg, rgba(240,178,77,.12) 0%, rgba(201,160,201,.08) 100%);
  border: 1px solid rgba(240,178,77,.3);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.boost-summary-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.boost-summary-icon {
  font-size: 26px;
  flex-shrink: 0;
}
.boost-summary-body { flex: 1; min-width: 0; }
.boost-summary-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}
.boost-summary-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}
.boost-summary-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}

/* Boost button on own listing */
.listing-promote-btn {
  margin-top: 6px;
  padding: 9px 12px;
  background: linear-gradient(135deg, #F0B24D 0%, #E09535 100%);
  color: #22252D;
  border: none;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  transition: transform .15s;
}
.listing-promote-btn:hover { transform: scale(1.02); }
}