/* ================================
   ARTSEEN — app.css
   ================================ */

:root {
  --ink: #1e1b18;
  --ink-2: #4a4540;
  --ink-3: #8a847e;
  --paper: #faf8f4;
  --paper-2: #f2ede6;
  --paper-3: #e8e2d8;
  --accent: #c4922a;
  --accent-light: #f5e9d3;
  --seen: #2d6a4f;
  --want: #c4922a;
  --divider: rgba(30,27,24,0.1);
  --radius: 10px;
  --radius-lg: 16px;
  --sidebar-w: 220px;
}

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

html { font-size: 15px; }

body {
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}

/* ── AUTH ── */
#authOverlay {
  z-index: 1000;
}

.auth-logo {
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.auth-tagline {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.auth-tabs {
  display: flex;
  border: 0.5px solid var(--divider);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  background: transparent;
  border: none;
  font-size: 13px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  cursor: pointer;
  color: var(--ink-3);
  transition: all 0.15s;
}

.auth-tab.active {
  background: var(--ink);
  color: white;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0.5px solid var(--divider);
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 14px;
  margin-bottom: 0.75rem;
  background: var(--paper);
  color: var(--ink);
  display: block;
}

.auth-input:focus { outline: none; border-color: var(--ink); }

.auth-btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.15s;
}

.auth-btn:hover { background: var(--accent); }
.auth-skip { font-size: 12px; color: var(--ink-3); margin-top: 1.25rem; cursor: pointer; }
.auth-skip:hover { color: var(--ink); }

/* ── APP LAYOUT ── */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}



/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--paper-2);
  border-right: 0.5px solid var(--divider);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding: 0 0.5rem 1.5rem;
  border-bottom: 0.5px solid var(--divider);
  margin-bottom: 1.5rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border: none;
  background: transparent;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  width: 100%;
  text-align: left;
}

.nav-item:hover { background: var(--paper-3); color: var(--ink); }
.nav-item.active { background: var(--ink); color: white; }

.log-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.75rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin: 1.5rem 0;
  transition: opacity 0.15s;
}

.log-btn:hover { opacity: 0.88; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  border-top: 0.5px solid var(--divider);
  padding-top: 1rem;
  margin-top: auto;
}

.sidebar-user:hover { background: var(--paper-3); }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500;
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 500; }
.user-stats { font-size: 11px; color: var(--ink-3); }

/* ── MAIN ── */
.main {
  padding: 2rem 2.5rem 6rem;
  max-width: 900px;
  overflow-x: hidden;
  width: 100%;
}

.view { animation: fadeIn 0.2s ease; }
.view.hidden { display: none; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.view-title {
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 1.9rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* ── FILTER CHIPS ── */
.filter-chips, .profile-filters, .wishlist-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.chip {
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  border: 0.5px solid var(--divider);
  background: transparent;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip.active { background: var(--ink); color: white; border-color: var(--ink); }

/* ── FEED GRID ── */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

/* ── ARTWORK CARD ── */
.artwork-card {
  background: white;
  border: 0.5px solid var(--divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.artwork-card:hover { transform: translateY(-2px); }

.card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--paper-2);
  position: relative;
}

.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.artwork-card:hover .card-image img { transform: scale(1.03); }
.card-image > div { width: 100%; height: 100%; transition: transform 0.4s; }
.artwork-card:hover .card-image > div { transform: scale(1.03); }

.card-image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}

.card-status {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 100px;
}

.card-status.seen { background: rgba(45,106,79,0.9); color: white; }
.card-status.want { background: rgba(196,146,42,0.9); color: white; }

.card-body { padding: 0.85rem 1rem 1rem; }
.card-title { font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif; font-size: 1.05rem; font-weight: 400; letter-spacing: -0.01em; margin-bottom: 2px; }
.card-artist { font-size: 12px; color: var(--ink-3); margin-bottom: 0.5rem; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 0.5rem; }

.meta-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--paper-2);
  color: var(--ink-2);
}

.card-note { font-size: 12px; color: var(--ink-2); line-height: 1.5; font-style: italic; margin-top: 0.5rem; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-top: 0.5px solid var(--divider);
  gap: 4px;
  min-height: 36px;
}

.card-footer > div:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.card-user { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; flex: 1; }
.card-user-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: white; font-size: 9px; display: flex; align-items: center; justify-content: center; }
.card-user-name { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.card-likes { font-size: 12px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 3px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.card-likes:hover { color: var(--accent); }
.card-stars { font-size: 11px; color: var(--accent); letter-spacing: 1px; }

/* ── SORT ROW ── */
.sort-row { display: flex; align-items: center; gap: 10px; margin-bottom: 1.25rem; }
.sort-label { font-size: 12px; color: var(--ink-3); }
.sort-select {
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: white;
  border: 0.5px solid var(--divider);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}

/* ── DISCOVER ── */
.search-input {
  flex: 1;
  max-width: 340px;
  padding: 0.6rem 1rem;
  border: 0.5px solid var(--divider);
  border-radius: 100px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 14px;
  background: white;
  color: var(--ink);
}

.search-input:focus { outline: none; border-color: var(--ink); }

.discover-section { margin-bottom: 2.5rem; }
.section-label { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.85rem; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; overflow-x: hidden; }

.trend-tag {
  padding: 0.45rem 1rem;
  border: 0.5px solid var(--divider);
  border-radius: 100px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
  color: var(--ink-2);
}

.trend-tag:hover { background: var(--ink); color: white; border-color: var(--ink); }
.trend-tag .count { font-size: 11px; color: var(--ink-3); margin-left: 4px; }

.artist-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1.25rem 0.75rem;
  padding-bottom: 0.5rem;
  width: 100%;
}

.artist-pill {
  text-align: center;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.artist-pill:hover { background: var(--paper-2); }

.artist-pill-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--paper-3);
  margin: 0 auto 0.5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  color: var(--ink-2);
  overflow: hidden;
  flex-shrink: 0;
}

.artist-pill-name { font-size: 12px; font-weight: 500; white-space: normal; word-break: break-word; line-height: 1.3; }
.artist-pill-count { font-size: 11px; color: var(--ink-3); }

.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }

.city-card {
  background: white;
  border: 0.5px solid var(--divider);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.15s;
}

.city-card:hover { transform: translateY(-1px); }
.city-card-name { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.city-card-venues { font-size: 11px; color: var(--ink-2); margin-bottom: 1px; }
.city-card-count { font-size: 11px; color: var(--ink-3); }

/* ── MAP ── */
.map-container { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; }
.map-placeholder { border-radius: var(--radius-lg); overflow: hidden; border: 0.5px solid var(--divider); }
.map-pin-item { display: flex; align-items: center; gap: 10px; padding: 0.75rem 0; border-bottom: 0.5px solid var(--divider); cursor: pointer; }
.map-pin-item:hover { background: var(--paper-2); padding-left: 4px; border-radius: 6px; }
.map-pin-dot { width: 10px; height: 10px; border-radius: 50%; background: #c78aed; flex-shrink: 0; }
.map-pin-dot.want { background: #8bd9a5; }
.map-pin-label { font-size: 13px; }
.map-pin-sub { font-size: 11px; color: var(--ink-3); }

/* ── PROFILE ── */
.profile-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 0.5px solid var(--divider);
  margin-bottom: 1.5rem;
}

.profile-avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 1.4rem;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.profile-name { font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif; font-size: 1.7rem; font-weight: 400; margin-bottom: 0.35rem; }
.profile-bio { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-bottom: 1rem; max-width: 420px; }

.profile-stats-row { display: flex; gap: 1.5rem; align-items: center; }
.profile-stat { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat-n { display: block; font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif; font-size: 1.4rem; line-height: 1.2; }
.stat-l { font-size: 11px; color: var(--ink-3); margin-top: 2px; display: block; }

.btn-outline {
  padding: 0.5rem 1.2rem;
  border: 0.5px solid var(--divider);
  border-radius: 8px;
  background: transparent;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
  margin-left: auto;
  align-self: flex-start;
}

.btn-outline:hover { background: var(--paper-2); }

/* ── MODAL ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(30,27,24,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
  box-sizing: border-box;
}

#detailModal { z-index: 600; }

.modal-backdrop.open { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-detail { max-width: 860px; display: flex; flex-direction: row; max-height: 90vh; align-items: stretch; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 0.5px solid var(--divider);
  position: sticky; top: 0; background: white; z-index: 1;
}

.modal-title { font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif; font-size: 1.25rem; font-weight: 400; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--ink-3); padding: 4px; border-radius: 6px; }
.modal-close:hover { background: var(--paper-2); color: var(--ink); }

.modal-tabs { display: flex; padding: 0.75rem 1.5rem 0; gap: 6px; }
.modal-tab { padding: 0.4rem 1rem; border-radius: 100px; border: 0.5px solid var(--divider); background: transparent; font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.modal-tab.active { background: var(--ink); color: white; border-color: var(--ink); }

.modal-body { padding: 1rem 1.5rem; overflow: visible; }

.upload-zone {
  border: 1.5px dashed var(--paper-3);
  border-radius: var(--radius);
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-bottom: 1.25rem;
  transition: border-color 0.15s, background 0.15s;
  overflow: hidden;
  text-align: center;
}

.upload-zone:hover { border-color: var(--ink-3); background: var(--paper); }
.upload-zone p { font-size: 13px; color: var(--ink-3); }
.upload-hint { font-size: 11px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; overflow: visible; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-full { grid-column: span 2; }

.form-group label { font-size: 11px; font-weight: 500; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }

.form-group input, .form-group select, .form-group textarea {
  padding: 0.6rem 0.75rem;
  border: 0.5px solid var(--divider);
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
  resize: vertical;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--ink); }

.star-row { display: flex; gap: 4px; }
.star { font-size: 1.4rem; cursor: pointer; color: var(--paper-3); transition: color 0.1s; }
.star.on { color: var(--accent); }

.modal-footer {
  display: flex; gap: 0.75rem; justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 0.5px solid var(--divider);
  position: sticky; bottom: 0; background: white;
}

.btn-primary-sm {
  padding: 0.6rem 1.4rem;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary-sm:hover { background: var(--accent); }

.btn-ghost-sm {
  padding: 0.6rem 1.2rem;
  background: transparent;
  color: var(--ink-2);
  border: 0.5px solid var(--divider);
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  cursor: pointer;
}

.edit-exhibition-dates-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.edit-exhibition-dates-link:hover { text-decoration: underline; }

.exhibition-dates-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  background: var(--paper-2);
  border-radius: var(--radius);
}

.exhibition-dates-editor .form-group { min-width: 140px; }

.exhibition-dates-editor-actions {
  display: flex;
  gap: 8px;
}

.exhibition-dates-editor-msg {
  width: 100%;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
}

/* ── DETAIL MODAL ── */
.detail-image-wrap { background: #ffffff; display: flex; align-items: center; justify-content: center; width: 50%; flex-shrink: 0; padding: 1.5rem; box-sizing: border-box; }
.detail-image-wrap img { max-width: 100%; max-height: 80vh; width: auto; height: auto; display: block; object-fit: contain; }
.detail-body { padding: 1.5rem; overflow-y: auto; padding-bottom: 2rem; flex: 1; min-width: 0; }
.detail-title { font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif; font-size: 1.5rem; margin-bottom: 4px; }
.detail-artist { font-size: 13px; color: var(--ink-3); margin-bottom: 1rem; }
.detail-field { margin-bottom: 0.85rem; }
.detail-field-label { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 2px; }
.detail-field-value { font-size: 14px; color: var(--ink); }
.detail-note { font-style: italic; font-size: 14px; line-height: 1.6; color: var(--ink-2); border-left: 2px solid var(--paper-3); padding-left: 0.75rem; margin: 1rem 0; }

/* ── MOBILE NAV ── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 0.5px solid var(--divider);
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0 0.75rem;
  z-index: 200;
}

.mnav-item {
  background: none; border: none;
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  color: var(--ink-3);
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 10px;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 8px;
  transition: color 0.15s;
}

.mnav-item.active { color: var(--ink); }
.mnav-item:hover { color: var(--ink); }

.mnav-log {
  background: var(--ink);
  color: white;
  border-radius: 50%;
  width: 48px; height: 48px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
}

.mnav-log:hover { background: var(--accent); color: white; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; }
  .main { padding: 1.25rem 1rem 5rem; overflow-x: hidden; max-width: 100vw; margin-left: 0 !important; }
  .map-container { grid-template-columns: 1fr; }
  .modal-detail {
    flex-direction: column;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    align-items: stretch;
  }
  .detail-image-wrap {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: unset;
    flex-shrink: 0;
    padding: 1rem;
    box-sizing: border-box;
    overflow: hidden;
  }
  .detail-image-wrap img {
    max-height: 55vw;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
  }
  .detail-body {
    overflow-y: visible;
    padding: 1.25rem;
    padding-bottom: 3rem;
    width: 100%;
    flex: none;
  }
  .profile-header { flex-wrap: wrap; }
  .feed-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; max-width: 100%; }
}

@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-full { grid-column: span 1; }
  .feed-grid { grid-template-columns: 1fr 1fr; }
}

/* ── EDIT / DELETE ── */
.btn-delete-sm {
  padding: 0.6rem 1.2rem;
  background: transparent;
  color: #c0392b;
  border: 0.5px solid #c0392b;
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-delete-sm:hover { background: #c0392b; color: white; }

.card-edit-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(255,255,255,0.92);
  border: 0.5px solid var(--divider);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  cursor: pointer;
  color: var(--ink2);
  display: none;
  transition: all 0.15s;
  z-index: 1;
}
.artwork-card:hover .card-edit-btn { display: block; }
.card-edit-btn:hover { background: var(--ink); color: white; }

.estar {
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--paper-3);
  transition: color 0.1s;
}
.estar.on { color: var(--accent); }

/* ── SIGN OUT BUTTON ── */
.signout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
}
.signout-btn:hover { background: var(--paper-3); color: #c0392b; }

/* ── USER PROFILE MODAL ── */
.modal-user-profile {
  max-width: 700px;
  width: 100%;
  height: 88vh;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.user-profile-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.75rem 1.5rem 1.25rem;
  border-bottom: 0.5px solid var(--divider);
  flex-shrink: 0;
}

.user-profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 1.4rem;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.user-profile-info { flex: 1; }
.user-profile-name { font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif; font-size: 1.4rem; font-weight: 400; margin-bottom: 2px; }
.user-profile-username { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.user-profile-bio { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-bottom: 0.75rem; max-width: 360px; }
.user-profile-stats { display: flex; gap: 1.25rem; }

.follow-btn {
  padding: 0.5rem 1.25rem;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  align-self: flex-start;
}

.follow-btn:hover { background: var(--accent); }
.follow-btn.following {
  background: transparent;
  color: var(--ink-2);
  border: 0.5px solid var(--divider);
}
.follow-btn.following:hover { background: #fee; color: #c0392b; border-color: #c0392b; }

.user-profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 0.5px solid var(--divider);
  flex-shrink: 0;
}

.user-profile-tab {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: none;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.user-profile-tab:hover { color: var(--ink); }
.user-profile-tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }

.user-profile-grid {
  overflow-y: auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  align-content: start;
  min-height: 320px;
}

.up-thumb-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.up-thumb-image {
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 0.5px solid var(--divider);
}

.up-thumb-image img,
.up-thumb-image > div {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}



@media (max-width: 580px) {
  .user-profile-header { flex-wrap: wrap; }
  .user-profile-grid { grid-template-columns: repeat(4, 1fr); gap: 0.35rem; padding: 0.75rem; }
  .modal-user-profile { height: 95vh; max-height: 95vh; width: 100%; max-width: 100%; }
}

/* ── LIVE MAP ── */
.map-container-live {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: auto 1fr;
  gap: 0;
  height: 600px;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.map-toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--paper);
  border-bottom: 0.5px solid var(--divider);
  gap: 1rem;
  flex-wrap: wrap;
}

.map-filter-chips { display: flex; gap: 6px; }
.map-stats { font-size: 12px; color: var(--ink-3); }

#liveMap {
  height: 100%;
  min-height: 500px;
  background: #faf8f4;
}

.map-sidebar {
  background: #faf8f4;
  border-left: 0.5px solid var(--divider);
  overflow-y: auto;
  padding: 1rem;
}

.map-sidebar::-webkit-scrollbar { width: 3px; }
.map-sidebar::-webkit-scrollbar-thumb { background: var(--paper-3); }

.map-pin-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0.6rem 0;
  border-bottom: 0.5px solid var(--divider);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 6px;
}

.map-pin-item:hover { background: var(--paper-2); padding-left: 4px; }
.map-pin-dot { width: 9px; height: 9px; border-radius: 50%; background: #c78aed; flex-shrink: 0; margin-top: 4px; }
.map-pin-dot.want { background: #8bd9a5; }
.map-pin-dot.mixed { background: linear-gradient(135deg, var(--ink) 50%, var(--accent) 50%); }
.map-pin-label { font-size: 12px; font-weight: 500; color: var(--ink); }
.map-pin-sub { font-size: 11px; color: var(--ink-3); }
.map-pin-count { font-size: 10px; color: var(--accent); margin-top: 1px; }

/* Map popup panel */
.map-popup {
  display: none;
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  width: 300px;
  background: white;
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--divider);
  box-shadow: 0 4px 24px rgba(30,27,24,0.12);
  z-index: 10;
  max-height: 380px;
  overflow: hidden;
  flex-direction: column;
}

.map-popup.open { display: flex; }

.map-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 0.5px solid var(--divider);
}

.map-popup-venue { font-size: 14px; font-weight: 500; color: var(--ink); }
.map-popup-city { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.map-popup-artworks { overflow-y: auto; padding: 0.75rem; display: flex; flex-direction: column; gap: 8px; }

.popup-art-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  transition: background 0.15s;
}

.popup-art-item:hover { background: var(--paper-2); }
.popup-art-thumb { width: 36px; height: 36px; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.popup-art-title { font-size: 12px; font-weight: 500; color: var(--ink); }
.popup-art-artist { font-size: 11px; color: var(--ink-3); }
.popup-art-status { font-size: 9px; padding: 1px 6px; border-radius: 100px; margin-top: 2px; display: inline-block; }
.popup-art-status.seen { background: rgba(45,106,79,0.12); color: var(--seen); }
.popup-art-status.want { background: rgba(196,146,42,0.12); color: var(--accent); }

/* Mapbox marker overrides */
.custom-marker {
  width: 13px; height: 13px;
  border-radius: 50%;
  transform: none;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(30,27,24,0.2);
  transition: transform 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.custom-marker:hover { transform: scale(1.3); }
.custom-marker.seen { background: #c78aed; }
.custom-marker.want { background: #8bd9a5; }
.custom-marker.mixed { background: linear-gradient(135deg, #c78aed 50%, #8bd9a5 50%); }

.marker-count {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: 700;
  color: white;
  pointer-events: none;
}

@media (max-width: 860px) {
  .map-container-live {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    height: auto;
    min-height: 0;
  }
  #liveMap {
    height: 55vw;
    min-height: 260px;
    max-height: 380px;
    width: 100%;
    display: block;
  }
  .map-sidebar {
    max-height: 200px;
    border-left: none;
    border-top: 0.5px solid var(--divider);
  }
  .map-popup {
    width: calc(100% - 2rem);
    max-height: 280px;
    bottom: 0.5rem;
    left: 0.5rem;
  }
}

@media (max-width: 480px) {
  #liveMap {
    height: 260px;
    min-height: 260px;
  }
}

/* ── PERSONALISED DISCOVER ── */
.discover-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.discover-section-hint {
  font-size: 11px;
  color: var(--ink-3);
  font-style: italic;
}

.discover-loading {
  font-size: 13px;
  color: var(--ink-3);
  padding: 0.5rem 0;
  grid-column: 1 / -1;
}

.discover-empty {
  font-size: 13px;
  color: var(--ink-3);
  padding: 0.5rem 0;
  grid-column: 1 / -1;
  font-style: italic;
}

.medium-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 1rem;
  border: 0.5px solid var(--divider);
  border-radius: 100px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
  color: var(--ink-2);
}

.medium-tag:hover { background: var(--ink); color: white; border-color: var(--ink); }

.medium-tag-count {
  font-size: 11px;
  background: var(--paper-2);
  padding: 1px 7px;
  border-radius: 100px;
  color: var(--ink-3);
}

.medium-tag:hover .medium-tag-count {
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}

.artist-pill-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── VENUE AUTOCOMPLETE ── */
.venue-suggestions {
  position: fixed;
  background: white;
  border: 0.5px solid var(--divider);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(30,27,24,0.15);
  z-index: 9999;
  max-height: 260px;
  overflow-y: auto;
  display: none;
  pointer-events: none;
  opacity: 0;
}

.venue-suggestions.open {
  display: block;
  pointer-events: auto;
  opacity: 1;
}

.venue-suggestion {
  padding: 0.7rem 1rem;
  cursor: pointer;
  border-bottom: 0.5px solid var(--divider);
  transition: background 0.1s;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.venue-suggestion:last-child { border-bottom: none; }
.venue-suggestion:hover { background: var(--paper-2); }

.venue-suggestion-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.venue-suggestion-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.venue-suggestion-address {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
}

.venue-suggestion-loading {
  padding: 0.75rem 1rem;
  font-size: 13px;
  color: var(--ink-3);
}

.venue-mini-map {
  grid-column: span 2;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
  border: 0.5px solid var(--divider);
  margin-top: 4px;
  position: relative;
}

.venue-mini-map-pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%);
  font-size: 24px;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.venue-confirmed {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--seen);
  margin-top: 4px;
  grid-column: span 2;
}

/* ── FOLLOW LIST ── */
.profile-stat-btn {
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
  transition: background 0.15s;
}
.profile-stat-btn:hover { background: var(--paper-2); }

.follow-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background 0.15s;
}
.follow-list-item:hover { background: var(--paper-2); }
.follow-list-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500;
  flex-shrink: 0;
  overflow: hidden;
}
.follow-list-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.follow-list-username { font-size: 12px; color: var(--ink-3); }
.follow-list-empty { padding: 2rem 1.5rem; font-size: 13px; color: var(--ink-3); text-align: center; }

/* ── PROFILE STATUS TABS ── */
.profile-status-tabs {
  display: flex;
  border-bottom: 0.5px solid var(--divider);
  margin-bottom: 1.25rem;
}

.profile-status-tab {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: none;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 14px;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  max-width: 160px;
}

.profile-status-tab:hover { color: var(--ink); }
.profile-status-tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }

/* ── MOBILE HEADER ── */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  padding-top: max(0.85rem, env(safe-area-inset-top));
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  background: rgba(250,248,244,0.96);
  border-bottom: 0.5px solid var(--divider);
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mobile-header-logo {
  font-family: 'Segoe UI', Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mobile-header-log {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.mobile-header-log:hover { background: var(--accent); }

#mobileHeaderAuth {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 860px) {
  .mobile-header { display: flex; }
}

/* ── GUEST / AUTH STATE ── */
.mobile-signin-btn {
  padding: 0.4rem 1rem;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.mobile-signin-btn:hover { background: var(--accent); }

.auth-box {
  width: 100%;
  max-width: 380px;
  padding: 2.5rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--divider);
  text-align: center;
}

/* ── TOP NAVBAR ── */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: rgba(250,248,244,0.96);
  border-bottom: 0.5px solid var(--divider);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 100%;
}

.topnav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.topnav-logo {
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.topnav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.topnav-link {
  padding: 0.4rem 0.85rem;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
  text-decoration: none;
  border: none;
  background: transparent;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
}

.topnav-link:hover { background: var(--paper-2); color: var(--ink); }
.topnav-link.active { background: var(--ink); color: white; }

.topnav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topnav-signin {
  padding: 0.4rem 1rem;
  background: transparent;
  color: var(--ink);
  border: 0.5px solid var(--divider);
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.topnav-signin:hover { background: var(--paper-2); }

.topnav-signup {
  padding: 0.4rem 1rem;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.topnav-signup:hover { background: var(--accent); }

.log-btn-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.9rem;
  background: var(--paper-2);
  color: var(--ink);
  border: 0.5px solid var(--divider);
  border-radius: 8px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.log-btn-top:hover { background: var(--paper-3); }

.log-btn-top-icon {
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
  color: var(--ink-2);
}

.topnav-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.15s;
}

.topnav-user-avatar:hover { opacity: 0.8; }

.topnav-signout {
  background: transparent;
  border: none;
  color: var(--ink-3);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex; align-items: center;
}

.topnav-signout:hover { background: var(--paper-2); color: var(--ink); }

/* App layout — top nav, full width content */
.app {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh;
}

.main {
  padding: 1.5rem 2rem 6rem;
  width: 100%;
  overflow-x: hidden;
  flex: 1;
}

/* Hide old sidebar */
.sidebar { display: none !important; }

/* Mobile nav adjustments */
@media (max-width: 680px) {
  .topnav { padding: 0 1rem; }
  .topnav-links { display: none; }
  .topnav-logo span { display: none; }
  .mobile-nav { display: flex; }
}

@media (min-width: 681px) {
  .mobile-nav { display: none !important; }
  .mobile-header { display: none !important; }
}

/* ── TWO-ROW HEADER ── */
.topheader {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,248,244,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 0.5px solid var(--divider);
  width: 100%;
}

.topheader-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  border-bottom: 0.5px solid var(--divider);
  width: 100%;
}

.topheader-logo {
  display: flex;
  align-items: center;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.topheader-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topheader-row2 {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 2rem;
}

/* Mobile adjustments */
@media (max-width: 680px) {
  .topheader-row1 { padding: 0.65rem 1rem; }
  .topheader-row2 { display: none; }
  .mobile-nav { display: flex; }
}

@media (min-width: 681px) {
  .mobile-nav { display: none !important; }
  .mobile-header { display: none !important; }
}

/* ── NEW SIDEBAR ── */
.new-sidebar {
  width: 220px;
  background: var(--paper);
  border-right: 0.5px solid var(--divider);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  flex-shrink: 0;
}

@media (min-width: 861px) {
  .main { margin-left: 220px; }
}

.ns-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2.5rem;
  cursor: pointer;
}

.ns-logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.ns-logo span {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-family: 'Segoe UI', Helvetica, 'Helvetica Neue', Arial, sans-serif;
}

.ns-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.ns-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0.55rem 0.5rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
  text-decoration: none;
  border: none;
  background: transparent;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  width: 100%;
  text-align: left;
}

.ns-item:hover { background: var(--paper-2); }
.ns-item.active { font-weight: 700; }

.ns-icon {
  font-size: 1.2rem;
  font-weight: 300;
  width: 20px;
  text-align: center;
  color: var(--ink);
  flex-shrink: 0;
}

.ns-plus { margin-bottom: 2px; }

/* Divider between + and x sections */
.ns-x:first-of-type { margin-top: 1rem; }

.ns-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--divider);
  margin-top: auto;
}

.ns-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.15s;
}
.ns-user:hover { background: var(--paper-2); }

.ns-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 11px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.ns-username { font-size: 12px; font-weight: 500; color: var(--ink); }
.ns-userstats { font-size: 11px; color: var(--ink-3); }

.ns-signout {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  padding: 4px;
  border-radius: 6px;
  display: flex; align-items: center;
}
.ns-signout:hover { color: var(--ink); background: var(--paper-2); }

/* ── TOP-RIGHT SIGN IN (desktop, guests only) ── */
.topbar-actions {
  display: none;
}

.topbar-signin-btn {
  padding: 0.5rem 1.4rem;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  transition: background 0.15s;
}
.topbar-signin-btn:hover { background: var(--accent); }

/* Sign out button shown in the top-right when logged in */
.topbar-signout-btn {
  padding: 0.5rem 1.4rem;
  background: none;
  color: var(--ink-3);
  border: 0.5px solid var(--divider);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  transition: background 0.15s, color 0.15s;
}
.topbar-signout-btn:hover { background: var(--paper-2); color: var(--ink); }

@media (min-width: 861px) {
  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: 1.5rem;
    right: 2.5rem;
    z-index: 200;
  }
}

/* ── ABOUT PAGE ── */
.about-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
  max-width: 640px;
}
.about-content p { margin: 0 0 1.1rem; }
.about-content p:last-child { margin-bottom: 0; }
.about-entity {
  margin-top: 2rem !important;
  font-size: 0.85rem !important;
  color: var(--ink-3) !important;
}

/* ── SITE FOOTER ── */
.site-footer {
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
  padding: 2rem 1rem 3rem;
  border-top: 0.5px solid var(--divider);
  margin-top: 2rem;
}

/* App layout with new sidebar */
.app {
  display: flex !important;
  flex-direction: row !important;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.main {
  flex: 1;
  padding: 1.5rem 2rem 6rem;
  overflow-x: hidden;
  min-width: 0;
  max-width: 100%;
}

/* Mobile — hide sidebar, show bottom nav */
@media (max-width: 768px) {
  .new-sidebar { display: none; }
  .mobile-nav { display: flex; }
  .main { padding: 1rem 1rem 5rem; }
}

@media (min-width: 769px) {
  .mobile-nav { display: none !important; }
  .mobile-header { display: none !important; }
}

/* ── FORGOT PASSWORD ── */
.auth-forgot {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 0.75rem;
  cursor: pointer;
  text-align: center;
}
.auth-forgot:hover { color: var(--ink); }

/* ── ENTITY PAGES ── */
.modal-entity {
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.entity-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 0.5px solid var(--divider);
  flex-shrink: 0;
}

.entity-type-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--paper-2);
  color: var(--ink-3);
  margin-bottom: 0.75rem;
}

.entity-name {
  font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.entity-meta {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 0.75rem;
}

.entity-stats {
  display: flex;
  gap: 1.5rem;
}

.entity-stat-item { text-align: center; }
.entity-stat-n { font-size: 1.4rem; font-weight: 600; color: var(--ink); display: block; }
.entity-stat-l { font-size: 11px; color: var(--ink-3); }
.entity-avg-stars { font-size: 1.1rem; color: var(--accent); }

.entity-tabs {
  display: flex;
  border-bottom: 0.5px solid var(--divider);
  flex-shrink: 0;
}

.entity-tab {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: none;
  font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.entity-tab:hover { color: var(--ink); }
.entity-tab.active { color: var(--ink); border-bottom-color: var(--ink); }

.entity-panel {
  overflow-y: auto;
  padding: 1rem;
  flex: 1;
}

.entity-panel.hidden { display: none; }

.review-write-bar {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 0.5px solid var(--divider);
}

/* Review card */
.review-card {
  padding: 1rem 0;
  border-bottom: 0.5px solid var(--divider);
  display: flex;
  gap: 12px;
}

.review-card:last-child { border-bottom: none; }

.review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.review-body { flex: 1; }
.review-author { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.review-date { font-size: 11px; color: var(--ink-3); margin-bottom: 6px; }
.review-stars { font-size: 13px; color: var(--accent); margin-bottom: 6px; }
.review-text { font-size: 13px; color: var(--ink-2); line-height: 1.6; }

.review-photo {
  margin-top: 0.75rem;
  border-radius: 8px;
  overflow: hidden;
  max-width: 240px;
}

.review-photo img { width: 100%; display: block; border-radius: 8px; }

/* Clickable meta tags */
.meta-tag-link {
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.meta-tag-link:hover {
  background: var(--ink);
  color: white;
}

.entity-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s;
}

.entity-link:hover { text-decoration-color: var(--accent); }

.review-empty {
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  padding: 2rem 0;
}

@media (max-width: 580px) {
  .modal-entity { max-height: 95vh; }
  .entity-header { padding: 1.5rem 1rem 1rem; }
  .entity-name { font-size: 1.3rem; }
}

.entity-extra-meta {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

/* ── ARTIST LINK ── */
.artist-link {
  cursor: pointer;
  transition: opacity 0.15s;
}
.artist-link:hover { opacity: 0.7; text-decoration: underline; }

/* ── SHARE BUTTON ── */
.share-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  padding: 2px 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  line-height: 1;
  flex-shrink: 0;
}
.share-btn:hover { color: var(--accent); }
.share-btn svg { display: block; }

/* ── COMMENTS ── */
.comments-section {
  border-top: 0.5px solid var(--divider);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}

.comments-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.comments-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.comments-count {
  font-size: 12px;
  color: var(--ink-3);
  background: var(--paper-2);
  padding: 1px 7px;
  border-radius: 100px;
}

.comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 1.1rem;
}

.comment-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 11px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.comment-content { flex: 1; min-width: 0; }

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.comment-author { font-size: 12px; font-weight: 600; color: var(--ink); }
.comment-date { font-size: 11px; color: var(--ink-3); }

.comment-delete-btn {
  font-size: 11px;
  color: var(--ink-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}
.comment-delete-btn:hover { color: #c0392b; }

.comment-body {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-bottom: 6px;
}

.comment-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.comment-react-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--paper-2);
  border: 0.5px solid var(--divider);
  border-radius: 100px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.comment-react-btn span { font-size: 11px; color: var(--ink-3); }
.comment-react-btn.reacted { background: var(--accent-light); border-color: var(--accent); }
.comment-react-btn:hover { background: var(--paper-3); }

.comment-emoji-trigger { position: relative; }

.comment-add-reaction-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 0.5px solid var(--divider);
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  transition: background 0.15s;
}
.comment-add-reaction-btn:hover { background: var(--paper-3); }

.comment-emoji-popup {
  display: none;
  position: absolute;
  bottom: 30px;
  left: 0;
  background: white;
  border: 0.5px solid var(--divider);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(30,27,24,0.12);
  z-index: 100;
  white-space: nowrap;
}

.comment-emoji-trigger.open .comment-emoji-popup { display: flex; gap: 4px; }

.comment-add-emoji {
  font-size: 18px;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: transform 0.1s;
}
.comment-add-emoji:hover { transform: scale(1.2); }

/* Comment input */
.comment-input-row {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
  align-items: flex-start;
}

.comment-input-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 11px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.comment-input-wrap { flex: 1; }

.comment-emoji-bar {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 6px;
  flex-wrap: wrap;
}

.comment-emoji-pick {
  font-size: 16px;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: transform 0.1s;
}
.comment-emoji-pick:hover { transform: scale(1.2); }

.comment-submit-btn {
  margin-left: auto;
  padding: 0.3rem 0.9rem;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.comment-submit-btn:hover { opacity: 0.85; }
.comment-submit-btn:disabled { opacity: 0.4; }

/* ── TIMELINE ── */
.timeline-wrap { padding: 1rem 0; }

.timeline-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 0.6rem 0;
  border-bottom: 0.5px solid var(--divider);
  min-height: 52px;
}

.timeline-decade {
  width: 48px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  padding-top: 6px;
  letter-spacing: 0.03em;
}

.timeline-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  align-items: flex-start;
  padding-top: 2px;
}

.timeline-empty-row {
  height: 36px;
}

.timeline-thumb {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: visible;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  border: 0.5px solid var(--divider);
  transition: transform 0.15s, box-shadow 0.15s;
}

.timeline-thumb > img,
.timeline-thumb > div:first-child {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
  display: block;
}

.timeline-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(30,27,24,0.15);
  z-index: 10;
}

.timeline-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(30,27,24,0.18);
  border: 0.5px solid var(--divider);
  overflow: hidden;
  z-index: 200;
  pointer-events: none;
}

.timeline-thumb:hover .timeline-tooltip {
  display: block;
}

/* ── VENUE GRID ── */
.venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin-top: 0.5rem; }

.venue-card {
  background: white;
  border: 0.5px solid var(--divider);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.15s;
}

.venue-card:hover { transform: translateY(-1px); background: white; }

.venue-card-info { padding: 0; }

.venue-card-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.venue-card-meta {
  font-size: 11px;
  color: var(--ink-3);
}

/* ── PROFILE ACTIONS (Edit + Sign out) ── */
.profile-edit-btn {
  margin-left: auto;
  flex-shrink: 0;
}

/* Mobile-only sign out (desktop uses the global top-right Sign out) */
.profile-mobile-signout {
  display: none;
}

@media (max-width: 860px) {
  .profile-stats-row {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }
  .profile-edit-btn {
    margin-left: 0;
    flex: 1;
    order: 10;
    text-align: center;
    font-size: 12px;
    padding: 0.4rem 0.5rem;
  }
  .profile-mobile-signout {
    display: block;
    order: 11;
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 0.4rem 0.5rem;
    color: var(--ink-3);
  }
  .profile-header {
    flex-wrap: wrap;
  }
}

/* ── DISCOVER SIGN IN PROMPT ── */
.discover-signin-prompt {
  font-size: 13px;
  color: var(--ink-3);
  font-style: italic;
  padding: 0.5rem 0;
  margin: 0;
}

/* Map background beige */
.mapboxgl-canvas-container,
.mapboxgl-map { background: #faf8f4 !important; }

/* ── SEARCH WITH CLEAR BUTTON ── */
.search-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-bottom: 1.25rem;
}

.search-input-full {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-right: 2.5rem;
  flex: none;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-3);
  padding: 4px;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.15s;
}
.search-clear-btn:hover { color: var(--ink); }

/* ── TIMELINE ARTIST FILTER ── */
.timeline-filter-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 0 0.5rem 0;
}

/* ── PWA STANDALONE MODE: single-column feed for installed app ── */
@media (display-mode: standalone) {
  .feed-grid {
    grid-template-columns: 1fr !important;
    max-width: 480px;
    margin: 0 auto;
    gap: 1.25rem;
  }

  /* Keep dense grids (timeline thumbs, profile thumbs, venue/city cards) as-is */
  .user-profile-grid,
  .venue-grid,
  .city-grid,
  .timeline-dots {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .venue-grid, .city-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
  }
}

/* ── PREVENT MOBILE AUTO-ZOOM ON INPUT FOCUS ──
   iOS Safari (and some Android browsers) zoom the page in whenever a focused
   input/textarea/select has a font-size below 16px. Several inputs across
   the app (form fields, comment box, search, venue search, coordinate paste,
   etc.) are styled at 13-14px, some via inline styles. Force all of them to
   16px on small screens so focusing a field never triggers an unwanted zoom. */
@media (max-width: 480px) {
  input, textarea, select {
    font-size: 16px !important;
  }
}

/* ── AI-assisted field suggestions (identify-artwork) ── */
.ai-suggest-banner {
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 9px 12px;
  border-radius: var(--radius);
  background: var(--accent-light);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.4;
}

.ai-suggest-dismiss {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
}

.ai-suggest-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: ai-suggest-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes ai-suggest-spin {
  to { transform: rotate(360deg); }
}

.ai-suggested-field {
  background: var(--accent-light) !important;
  border-color: var(--accent) !important;
  transition: background 0.4s ease;
}

.scan-label-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px 0 2px;
}

.scan-label-link {
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.scan-label-link:hover {
  text-decoration: underline;
}

.scan-label-hint {
  font-size: 11px;
  color: var(--ink-3);
}

/* ── MESSAGING ── */
.topbar-messages-btn, .mobile-header-messages {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0.5px solid var(--divider);
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.15s, color 0.15s;
}

.topbar-messages-btn:hover, .mobile-header-messages:hover { background: var(--paper-2); color: var(--ink); }

.messages-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--accent);
  color: #412402;
  font-size: 10px;
  font-weight: 500;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 100px;
  align-items: center;
  justify-content: center;
}

.modal-messages { max-width: 720px; height: 560px; max-height: 90vh; display: flex; flex-direction: column; }

.messages-layout { display: grid; grid-template-columns: 240px 1fr; flex: 1; min-height: 0; }

.conversation-list { border-right: 0.5px solid var(--divider); overflow-y: auto; }

.conversation-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border-left: 2px solid transparent;
}

.conversation-row:hover { background: var(--paper-2); }
.conversation-row.active { background: var(--accent-light); border-left-color: var(--accent); }

.conversation-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: white;
  overflow: hidden;
}

.conversation-preview { min-width: 0; }
.conversation-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.conversation-snippet {
  font-size: 11px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-thread { display: flex; flex-direction: column; min-height: 0; }

.thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 0.5px solid var(--divider);
  font-size: 13px;
  font-weight: 500;
}

.thread-header-menu { position: relative; }
.thread-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-3);
  padding: 4px 8px;
}
.thread-menu-btn:hover { color: var(--ink); }

.thread-menu-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 0.5px solid var(--divider);
  border-radius: var(--radius);
  min-width: 140px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 10;
}

.thread-menu-dropdown div {
  padding: 9px 14px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-2);
}

.thread-menu-dropdown div:hover { background: var(--paper-2); }

.thread-messages { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }

.msg-bubble {
  max-width: 70%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
}

.msg-bubble.theirs { align-self: flex-start; background: var(--paper-2); color: var(--ink); }
.msg-bubble.mine { align-self: flex-end; background: var(--accent); color: #412402; }

.thread-compose {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-top: 0.5px solid var(--divider);
}

.thread-compose input {
  flex: 1;
  height: 36px;
  border-radius: 100px;
  border: 0.5px solid var(--divider);
  padding: 0 14px;
  font-size: 13px;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
}

.thread-compose input:focus { outline: none; border-color: var(--ink); }

.thread-compose button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-size: 14px;
}

.thread-compose button:hover { background: var(--accent); }

@media (max-width: 700px) {
  .messages-layout { grid-template-columns: 1fr; }
  .messages-layout .message-thread { display: none; }
  .messages-layout.thread-active .conversation-list { display: none; }
  .messages-layout.thread-active .message-thread { display: flex; }
  .thread-back-btn { display: inline-flex !important; }
}

.thread-back-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  font-size: 15px;
  margin-right: 8px;
  padding: 4px;
}

.entity-share-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0.5px solid var(--divider);
  background: white;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.entity-share-btn:hover { background: var(--paper-2); color: var(--ink); }

.share-sendto-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.share-sendto-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 6px;
  border-radius: 8px;
}

.share-sendto-row:hover { background: var(--paper-2); }

.share-sendto-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: white;
  overflow: hidden;
}

.share-sendto-name { font-size: 13px; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.share-sendto-btn {
  padding: 4px 12px;
  border-radius: 100px;
  border: 0.5px solid var(--divider);
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Jost', 'Segoe UI', Helvetica, sans-serif;
  flex-shrink: 0;
}

.share-sendto-btn:hover { background: var(--ink); color: white; }
.share-sendto-btn.sent { background: var(--seen); color: white; border-color: var(--seen); cursor: default; }

.share-sendto-empty { font-size: 12.5px; color: var(--ink-3); padding: 8px 4px; }

.msg-link {
  color: inherit;
  text-decoration: underline;
  word-break: break-all;
}
