/* ════════════════════════════════════════
   KAFFA — Premium Coffee Discovery
   Matches the original warm card design
════════════════════════════════════════ */

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

:root {
  --bg:      #f5ebe0;
  --bg2:     #fffaf6;
  --bg3:     #f0e2d0;
  --card:    #ffffff;
  --border:  rgba(120,70,30,.1);
  --accent:  #7b3f1e;
  --accent2: #9b5a35;
  --accent3: #c47a50;
  --text:    #2c1a0e;
  --text2:   #6b4a30;
  --text3:   #a07858;
  --red:     #c0392b;
  --green:   #27ae60;
  --blue:    #2c6fa8;
  --gold:    #e8a000;
  --shadow:  0 2px 16px rgba(120,70,30,.10);
  --shadow2: 0 6px 32px rgba(120,70,30,.15);
  --radius:  20px;
  --radius-sm: 12px;
  --nav-h:   68px;
  --header-h: 56px;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .brand-title { font-family: 'Playfair Display', Georgia, serif; }

/* ──────────────────────────────────────
   APP SHELL
────────────────────────────────────── */
#app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

#desktop-sidebar { display: none; }
#right-panel      { display: none; }

#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ──────────────────────────────────────
   DESKTOP 3-COLUMN (≥ 920px)
────────────────────────────────────── */
@media (min-width: 920px) {
  #app { flex-direction: row; height: 100vh; }

  #desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 240px;
    min-width: 240px;
    height: 100vh;
    background: var(--card);
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    box-shadow: 2px 0 12px rgba(120,70,30,.06);
  }

  #main-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    height: 100vh;
    border-right: none;
  }

  /* Hide the separate right panel — content merged into main feed */
  #right-panel { display: none !important; }

  #bottom-nav { display: none !important; }
}

/* ──────────────────────────────────────
   LEFT SIDEBAR
────────────────────────────────────── */
.sidebar-brand {
  display: flex; flex-direction: column;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  color: var(--text3); text-transform: uppercase; margin-bottom: 2px;
}
.sidebar-brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 900; color: var(--accent);
}

.sidebar-nav {
  display: flex; flex-direction: column; padding: 10px 0;
}
.sidebar-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px; cursor: pointer; color: var(--text2);
  font-size: 15px; font-weight: 500; transition: all .12s;
  border-radius: 0; user-select: none;
}
.sidebar-nav-item:hover { background: var(--bg3); color: var(--text); }
.sidebar-nav-item.active { color: var(--accent); font-weight: 700; background: #fdf0e6; }
.sidebar-nav-item .s-icon  { font-size: 20px; width: 24px; text-align: center; }
.sidebar-nav-item .s-label { flex: 1; }
.sidebar-badge {
  background: var(--red); color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 700; padding: 2px 6px; min-width: 18px; text-align: center;
}

.sidebar-post-btn {
  margin: 12px 16px 8px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 24px; padding: 13px; font-size: 14px; font-weight: 700;
  cursor: pointer; text-align: center; transition: background .15s;
  font-family: inherit;
}
.sidebar-post-btn:hover { background: var(--accent2); }

.sidebar-user-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; margin-top: auto; border-top: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
}
.sidebar-user-row:hover { background: var(--bg3); }
.sidebar-user-name   { font-weight: 700; font-size: 14px; color: var(--text); }
.sidebar-user-handle { font-size: 12px; color: var(--text3); }
.sidebar-logout {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; cursor: pointer; color: var(--text3);
  font-size: 14px; border-top: 1px solid var(--border); transition: all .12s;
}
.sidebar-logout:hover { color: var(--red); background: #fff5f5; }

/* ──────────────────────────────────────
   RIGHT PANEL
────────────────────────────────────── */
.right-search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 24px; padding: 0 14px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.right-search-wrap input {
  flex: 1; background: none; border: none; color: var(--text);
  font-size: 14px; padding: 10px 0; outline: none; font-family: inherit;
}
.right-search-wrap input::placeholder { color: var(--text3); }
.right-search-icon { color: var(--text3); font-size: 14px; }

.right-section {
  background: var(--card); border-radius: var(--radius);
  margin-bottom: 16px; overflow: hidden; box-shadow: var(--shadow);
}
.right-section-title {
  font-size: 15px; font-weight: 800; padding: 14px 16px;
  border-bottom: 1px solid var(--border); color: var(--text);
}
.right-shop-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
}
.right-shop-row:hover { background: var(--bg3); }
.right-shop-row:last-of-type { border-bottom: none; }
.right-shop-rank  { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.right-shop-info  { flex: 1; min-width: 0; }
.right-shop-name  { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.right-shop-meta  { font-size: 12px; color: var(--text3); margin-top: 1px; }
.right-shop-rating { font-size: 13px; font-weight: 700; color: var(--gold); }
.right-section-more {
  padding: 11px 16px; font-size: 13px; color: var(--accent);
  cursor: pointer; border-top: 1px solid var(--border); font-weight: 600;
}
.right-section-more:hover { text-decoration: underline; }
.right-user-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
}
.right-user-row:last-of-type { border-bottom: none; }
.right-user-info  { flex: 1; min-width: 0; }
.right-user-name  { font-weight: 700; font-size: 13px; color: var(--text); }
.right-user-handle { font-size: 12px; color: var(--text3); }

/* ──────────────────────────────────────
   LOADING
────────────────────────────────────── */
#loading-screen {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; gap: 8px; animation: fadeIn .4s ease; background: var(--bg);
}
.loading-logo { font-size: 60px; animation: pulse 1.5s ease-in-out infinite; }
.loading-text {
  font-family: 'Playfair Display', serif;
  font-size: 32px; font-weight: 900; color: var(--accent); letter-spacing: 1px;
}
.loading-sub  { font-size: 13px; color: var(--text3); }
@keyframes pulse   { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }
@keyframes fadeIn  { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
@keyframes slideUp { from{transform:translateY(40px);opacity:0} to{transform:none;opacity:1} }
@keyframes scaleIn { from{opacity:0;transform:scale(.85)} to{opacity:1;transform:scale(1)} }
@keyframes spin    { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

/* ──────────────────────────────────────
   AUTH
────────────────────────────────────── */
#auth-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 24px;
  background: linear-gradient(150deg, #f5ebe0 0%, #ead5be 100%);
}
.auth-card {
  background: #fff; border-radius: var(--radius);
  padding: 40px 36px; width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow2); animation: fadeIn .3s ease;
}
.auth-logo  { font-size: 52px; text-align: center; }
.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 900; color: var(--accent); text-align: center;
}
.auth-sub   { font-size: 13px; color: var(--text3); text-align: center; margin-bottom: 6px; }
.auth-input {
  width: 100%; background: var(--bg3); border: 1.5px solid transparent;
  border-radius: var(--radius-sm); color: var(--text);
  padding: 13px 15px; font-size: 15px; outline: none; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.auth-input:focus { border-color: var(--accent); background: #fff; }
.auth-btn {
  width: 100%; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 14px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background .15s; margin-top: 4px; font-family: inherit;
}
.auth-btn:disabled { opacity: .55; cursor: default; }
.auth-btn:not(:disabled):hover { background: var(--accent2); }
.auth-switch { font-size: 13px; color: var(--text3); text-align: center; cursor: pointer; }
.auth-switch span { color: var(--accent); font-weight: 600; }
.auth-forgot { text-align: center; margin-bottom: 4px; }
.auth-forgot span { font-size: 13px; color: var(--text3); cursor: pointer; }
.auth-forgot span:hover { color: var(--accent); text-decoration: underline; }
.auth-error { font-size: 13px; color: var(--red); text-align: center; }

/* ──────────────────────────────────────
   VIEW HEADER
────────────────────────────────────── */
.view-header {
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
  height: var(--header-h);
  background: rgba(245,235,224,.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; position: sticky; top: 0; z-index: 10;
}
.view-header-eyebrow {
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  color: var(--text3); text-transform: uppercase;
}
.view-header-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 900; color: var(--text); flex: 1;
}
.view-header .back-btn {
  background: #fff; border: none; color: var(--accent);
  font-size: 20px; cursor: pointer; padding: 6px 10px;
  border-radius: 50%; line-height: 1; box-shadow: var(--shadow); transition: all .12s;
}
.view-header .back-btn:hover { background: var(--bg3); }
.view-header-actions { display: flex; gap: 6px; }
.header-icon-btn {
  background: #fff; border: none; font-size: 18px; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); color: var(--text2); position: relative;
  transition: all .12s;
}
.header-icon-btn:hover { background: var(--bg3); }

/* ──────────────────────────────────────
   SCROLL
────────────────────────────────────── */
.scroll-content {
  flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  background: var(--bg);
}
.scroll-content::-webkit-scrollbar { width: 4px; }
.scroll-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ──────────────────────────────────────
   BOTTOM NAV
────────────────────────────────────── */
#bottom-nav {
  display: flex; align-items: center; background: #fff;
  border-top: 1px solid var(--border); height: var(--nav-h);
  flex-shrink: 0; z-index: 20;
  box-shadow: 0 -4px 20px rgba(120,70,30,.08);
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; padding: 8px 4px; background: none; border: none;
  color: var(--text3); transition: color .15s;
}
.nav-btn.active { color: var(--accent); }
.nav-btn.add-btn {
  background: var(--accent); border-radius: 16px;
  margin: 8px 10px; color: #fff; height: calc(var(--nav-h) - 16px);
  flex: 1.2; box-shadow: 0 4px 14px rgba(123,63,30,.35);
}
.nav-btn.add-btn:hover { background: var(--accent2); }
.nav-btn .nav-icon  { font-size: 22px; position: relative; }
.nav-btn .nav-label { font-size: 10px; font-weight: 600; }
.nav-badge {
  position: absolute; top: -4px; right: -6px;
  background: var(--red); color: #fff; border-radius: 10px;
  font-size: 10px; font-weight: 700; padding: 1px 5px; min-width: 16px; text-align: center;
}

/* ──────────────────────────────────────
   FEED — HERO CARD
────────────────────────────────────── */
.feed-wrap { padding: 14px 24px 20px; max-width: 100%; }

.feed-hero {
  background: linear-gradient(135deg, #7b3f1e 0%, #5a2d0f 100%);
  border-radius: var(--radius);
  padding: 24px 22px; color: #fff; margin-bottom: 16px;
  box-shadow: 0 8px 28px rgba(90,45,15,.35);
  position: relative; overflow: hidden;
}
.feed-hero::after {
  content: "☕"; position: absolute; right: 16px; bottom: -8px;
  font-size: 80px; opacity: .12; transform: rotate(-12deg);
  pointer-events: none;
}
.feed-hero h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 900; line-height: 1.3; margin-bottom: 8px;
}
.feed-hero p { font-size: 13px; opacity: .8; line-height: 1.5; margin-bottom: 14px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-tag {
  background: rgba(255,255,255,.2); color: #fff;
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; font-weight: 600; backdrop-filter: blur(4px);
}

/* ──────────────────────────────────────
   TASTE DASHBOARD
────────────────────────────────────── */
.section-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.section-row .sec-title { font-size: 15px; font-weight: 800; color: var(--text); }
.section-row .sec-sub   { font-size: 12px; color: var(--text3); font-weight: 500; }

.taste-cards {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px;
  scrollbar-width: none;
}
.taste-cards::-webkit-scrollbar { display: none; }
.taste-card {
  background: #fff; border-radius: var(--radius-sm); padding: 16px 14px;
  min-width: 120px; flex-shrink: 0; box-shadow: var(--shadow);
}
.taste-card-label { font-size: 11px; color: var(--text3); margin-bottom: 6px; }
.taste-card-val   { font-size: 28px; font-weight: 900; color: var(--text); line-height: 1; margin-bottom: 2px; }
.taste-card-val.dash { font-size: 20px; color: var(--text3); }
.taste-card-sub   { font-size: 11px; color: var(--text3); margin-top: 4px; }
.taste-card-dna   { font-size: 13px; font-weight: 700; color: var(--accent); }

/* ──────────────────────────────────────
   POST CARDS
────────────────────────────────────── */
.post-card {
  background: var(--card); border-radius: var(--radius);
  margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: var(--shadow2); transform: translateY(-2px); }

.post-header { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  background: var(--bg3); flex-shrink: 0; cursor: pointer;
  border: 2px solid var(--border);
}
.avatar-placeholder {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff;
  cursor: pointer; flex-shrink: 0; border: 2px solid var(--border);
}
.post-meta { flex: 1; min-width: 0; }
.post-username { font-weight: 700; font-size: 14px; cursor: pointer; color: var(--text); }
.post-username:hover { color: var(--accent); }
.post-time { font-size: 12px; color: var(--text3); }

.post-img-wrap { width: 100%; cursor: pointer; }
.post-img-wrap img { width: 100%; max-height: 300px; object-fit: cover; display: block; }

.post-body { padding: 12px 14px 10px; }

.post-cafe-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.post-cafe-name { font-size: 16px; font-weight: 800; color: var(--text); cursor: pointer; }
.post-cafe-name:hover { color: var(--accent); }
.post-rating-badge {
  display: flex; align-items: center; gap: 4px;
  background: var(--accent); color: #fff;
  border-radius: 20px; padding: 4px 10px;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.post-rating-stars { color: #ffd700; font-size: 12px; }

.post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.post-tag {
  background: var(--bg3); color: var(--text2); border-radius: 20px;
  padding: 3px 10px; font-size: 12px; font-weight: 600;
}

.post-note-row {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px;
  padding: 8px 10px; background: var(--bg3); border-radius: var(--radius-sm);
}
.post-note-avatar { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.post-note-text   { font-size: 13px; color: var(--text2); line-height: 1.4; font-style: italic; }

.post-caption { font-size: 14px; color: var(--text2); line-height: 1.6; margin-bottom: 6px; }
.post-extras  { font-size: 13px; color: var(--text3); margin-bottom: 4px; }
.post-extras span { color: var(--accent2); font-weight: 600; }
.post-tagged  { font-size: 13px; color: var(--text3); margin-bottom: 6px; }
.post-tagged span { color: var(--blue); cursor: pointer; font-weight: 600; }
.post-tagged span:hover { text-decoration: underline; }

.post-actions {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 14px; border-top: 1px solid var(--border);
}
.post-action-btn {
  background: none; border: none; color: var(--text3); font-size: 13px;
  cursor: pointer; display: flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 20px; font-family: inherit;
  transition: all .12s;
}
.post-action-btn:hover { background: var(--bg3); color: var(--text); }
.post-action-btn.liked { color: var(--red); }
.post-action-btn .icon { font-size: 16px; }
.post-action-btn:last-child { margin-left: auto; }

/* ──────────────────────────────────────
   DISCOVER
────────────────────────────────────── */
.discover-wrap { padding: 14px; }

.discover-search {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: none; border-radius: 24px;
  padding: 0 16px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.discover-search input {
  flex: 1; background: none; border: none; color: var(--text);
  font-size: 14px; padding: 13px 0; outline: none; font-family: inherit;
}
.discover-search input::placeholder { color: var(--text3); }
.discover-search .si { color: var(--text3); font-size: 15px; }

.discover-filters { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.discover-filters::-webkit-scrollbar { display: none; }
.discover-filter {
  flex-shrink: 0; background: #fff; border: none;
  border-radius: 20px; color: var(--text2); font-size: 13px; font-weight: 600;
  padding: 7px 18px; cursor: pointer; transition: all .15s; font-family: inherit;
  box-shadow: var(--shadow);
}
.discover-filter.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(123,63,30,.3); }

.discover-section-title {
  font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 10px;
}

/* User cards in Discover */
.user-card {
  background: #fff; border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px; cursor: pointer; transition: box-shadow .15s;
}
.user-card:hover { box-shadow: var(--shadow2); }
.user-card-info { flex: 1; min-width: 0; }
.user-card-name   { font-weight: 700; font-size: 14px; color: var(--text); }
.user-card-handle { font-size: 12px; color: var(--text3); margin-top: 1px; }
.user-card-bio    { font-size: 12px; color: var(--text2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.follow-btn {
  background: transparent; color: var(--accent);
  border: 2px solid var(--accent); border-radius: 20px;
  padding: 6px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer; flex-shrink: 0; font-family: inherit; transition: all .15s;
}
.follow-btn.following {
  background: var(--bg3); color: var(--text3); border-color: var(--border);
}
.follow-btn:hover:not(.following) { background: var(--accent); color: #fff; }

/* Shop cards in Discover */
.shop-card {
  background: #fff; border-radius: var(--radius); margin-bottom: 10px;
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow); transition: box-shadow .15s;
}
.shop-card:hover { box-shadow: var(--shadow2); }
.shop-card-body { padding: 14px; }
.shop-card-name { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 3px; }
.shop-card-meta { font-size: 12px; color: var(--text3); }
.shop-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg3); border-top: 1px solid var(--border);
}
.shop-rating { font-size: 13px; color: var(--gold); font-weight: 700; }
.shop-posts  { font-size: 12px; color: var(--text3); }
.bookmark-shop-btn {
  background: none; border: 1.5px solid var(--border); border-radius: 20px;
  color: var(--text3); font-size: 12px; padding: 5px 12px; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.bookmark-shop-btn.bookmarked { border-color: var(--accent); color: var(--accent); }

/* ──────────────────────────────────────
   LISTS
────────────────────────────────────── */
.lists-tabs-wrap { padding: 14px 14px 0; }
.lists-tabs {
  display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none;
}
.lists-tabs::-webkit-scrollbar { display: none; }
.lists-tab {
  flex-shrink: 0; background: #fff; border: none;
  border-radius: 20px; color: var(--text2); font-size: 13px; font-weight: 600;
  padding: 8px 18px; cursor: pointer; font-family: inherit;
  box-shadow: var(--shadow); transition: all .15s;
}
.lists-tab.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(123,63,30,.3); }

.lists-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; margin-bottom: 10px;
}
.lists-header .lh-title { font-size: 15px; font-weight: 800; color: var(--text); }
.lists-header .lh-count { font-size: 13px; color: var(--text3); }

.lists-wrap { padding: 0 14px 20px; }

/* Ranked post card */
.rank-post-card {
  background: var(--card); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow);
}
.rank-post-header {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px;
}
.rank-badge {
  background: var(--accent); color: #fff; border-radius: 8px;
  font-size: 11px; font-weight: 800; padding: 3px 7px; flex-shrink: 0;
}
.rank-badge.gold   { background: #c9860c; }
.rank-badge.silver { background: #888; }
.rank-badge.bronze { background: #a06020; }

/* Best Shops list */
.shop-rank-card {
  background: var(--card); border-radius: var(--radius);
  margin-bottom: 10px; padding: 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  transition: box-shadow .15s;
}
.shop-rank-card:hover { box-shadow: var(--shadow2); }
.rank-num-big { font-size: 22px; font-weight: 900; width: 36px; text-align: center; flex-shrink: 0; }
.shop-rank-info  { flex: 1; }
.shop-rank-name  { font-weight: 700; font-size: 15px; color: var(--text); }
.shop-rank-sub   { font-size: 12px; color: var(--text3); margin-top: 2px; }
.shop-rank-stars { font-size: 15px; font-weight: 800; color: var(--gold); }

/* Bookmarks (Saved tab) */
.bookmark-card {
  background: var(--card); border-radius: var(--radius);
  margin-bottom: 10px; padding: 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  transition: box-shadow .15s;
}
.bookmark-card:hover { box-shadow: var(--shadow2); }
.bookmark-icon  { font-size: 28px; flex-shrink: 0; }
.bookmark-info  { flex: 1; }
.bookmark-name  { font-weight: 700; font-size: 15px; color: var(--text); }
.bookmark-sub   { font-size: 12px; color: var(--text3); margin-top: 2px; }
.bookmark-remove-btn {
  background: none; border: 1.5px solid var(--border); border-radius: 20px;
  color: var(--text3); font-size: 12px; padding: 5px 12px; cursor: pointer;
  font-family: inherit; transition: all .15s; flex-shrink: 0;
}
.bookmark-remove-btn:hover { border-color: var(--red); color: var(--red); }

/* ──────────────────────────────────────
   PROFILE
────────────────────────────────────── */
.profile-wrap { padding: 20px 16px; }

.profile-top { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.profile-avatar-big {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent); background: var(--bg3); flex-shrink: 0;
}
.profile-avatar-big-placeholder {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.profile-stats-row { display: flex; gap: 20px; flex-wrap: wrap; }
.profile-stat { text-align: center; cursor: pointer; }
.profile-stat-num   { font-size: 20px; font-weight: 900; color: var(--text); }
.profile-stat-label { font-size: 11px; color: var(--text3); }

.profile-name-row { margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.profile-name { font-size: 20px; font-weight: 800; color: var(--text); }
.profile-handle { font-size: 13px; color: var(--text3); margin-bottom: 8px; }
.profile-bio    { font-size: 14px; color: var(--text2); line-height: 1.55; margin-bottom: 12px; }

.profile-btns { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.profile-btn-row { display: flex; gap: 8px; }
.profile-action-btn {
  flex: 1; background: #fff; border: 1.5px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 10px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; box-shadow: var(--shadow);
  transition: all .15s; text-align: center;
}
.profile-action-btn:hover { border-color: var(--accent); color: var(--accent); }
.profile-action-btn.logout {
  border-color: var(--red); color: var(--red); background: #fff;
}
.profile-action-btn.logout:hover { background: #fff5f5; }
.profile-action-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Profile DNA circles */
.profile-dna-row {
  display: flex; gap: 10px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none;
}
.profile-dna-row::-webkit-scrollbar { display: none; }
.profile-dna-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex-shrink: 0; min-width: 90px;
}
.dna-circle {
  width: 68px; height: 68px; border-radius: 50%; background: #fff;
  border: 2px solid #e8d8c4; display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: var(--shadow);
}
.dna-val   { font-size: 18px; font-weight: 900; color: var(--text); line-height: 1; }
.dna-label { font-size: 11px; color: var(--text3); text-align: center; font-weight: 600; }
.dna-sub   { font-size: 10px; color: var(--text3); text-align: center; }

.profile-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.profile-tab {
  flex: 1; padding: 13px 8px; font-size: 14px; font-weight: 600;
  text-align: center; cursor: pointer; color: var(--text3);
  border-bottom: 3px solid transparent; font-family: inherit; transition: all .15s;
}
.profile-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.posts-grid-item { aspect-ratio: 1; overflow: hidden; cursor: pointer; background: var(--bg3); }
.posts-grid-item img { width: 100%; height: 100%; object-fit: cover; }
.posts-grid-item .no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--text3); }

/* Edit profile */
.edit-profile-sheet {
  background: #fff; border-radius: var(--radius) var(--radius) 0 0;
  padding: 22px 20px 36px; width: 100%; max-width: 560px; animation: slideUp .25s ease;
}
.edit-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.edit-avatar-img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); background: var(--bg3); flex-shrink: 0; }
.change-photo-btn { background: none; border: 1.5px solid var(--accent); color: var(--accent); border-radius: var(--radius-sm); padding: 9px 18px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.sheet-label { font-size: 12px; color: var(--text3); margin-bottom: 5px; font-weight: 600; }
.sheet-input { width: 100%; background: var(--bg3); border: 1.5px solid transparent; border-radius: var(--radius-sm); color: var(--text); padding: 12px 13px; font-size: 15px; margin-bottom: 13px; outline: none; font-family: inherit; transition: border-color .15s; }
.sheet-input:focus { border-color: var(--accent); background: #fff; }
.sheet-btn { width: 100%; background: var(--accent); border: none; border-radius: var(--radius-sm); color: #fff; font-size: 15px; font-weight: 700; padding: 14px; cursor: pointer; font-family: inherit; }
.sheet-btn:hover { background: var(--accent2); }
.sheet-btn:disabled { opacity: .55; cursor: default; }
.sheet-error { color: var(--red); font-size: 13px; margin-top: 6px; }

/* ──────────────────────────────────────
   COMPOSE — NEW POST
────────────────────────────────────── */
.compose-photo-area {
  position: relative; width: 100%; min-height: 200px; max-height: 280px;
  background: var(--bg3); overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  color: var(--text3); gap: 8px;
}
.compose-photo-area img { width: 100%; height: 280px; object-fit: cover; display: block; }
.compose-photo-overlay {
  position: absolute; inset: 0; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25); color: #fff; gap: 6px;
}
.compose-photo-icon { font-size: 32px; }
.compose-photo-text { font-size: 14px; font-weight: 600; }
.compose-photo-remove {
  position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.5);
  border: none; border-radius: 50%; width: 32px; height: 32px; color: #fff;
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.compose-body { padding: 18px 16px; display: flex; flex-direction: column; gap: 16px; }
.compose-field-label {
  font-size: 12px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .7px; margin-bottom: 6px;
}

/* Big star rating in compose */
.star-big-row { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.star-big { font-size: 36px; cursor: pointer; color: #ddd; transition: color .12s; user-select: none; }
.star-big.lit  { color: var(--gold); }
.star-big:hover { transform: scale(1.1); }
.star-num-display { font-size: 16px; font-weight: 700; color: var(--gold); }
.star-track-wrap { background: var(--bg3); border-radius: var(--radius); padding: 10px 14px; }

.compose-input {
  width: 100%; background: var(--bg3); border: 1.5px solid transparent;
  border-radius: var(--radius-sm); color: var(--text); padding: 12px 14px;
  font-size: 15px; outline: none; font-family: inherit; resize: none;
  transition: border-color .15s, background .15s;
}
.compose-input:focus { border-color: var(--accent); background: #fff; }
.compose-textarea { min-height: 80px; }

.compose-submit-btn {
  width: 100%; background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 16px; font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background .15s; margin-top: 4px;
}
.compose-submit-btn:hover { background: var(--accent2); }

/* Tag users */
.tag-search-wrap { position: relative; }
.tag-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); max-height: 180px; overflow-y: auto;
  z-index: 50; box-shadow: var(--shadow2);
}
.tag-result-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  cursor: pointer; transition: background .1s; border-bottom: 1px solid var(--border);
}
.tag-result-item:hover { background: var(--bg3); }
.tag-result-item:last-child { border-bottom: none; }
.tagged-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tagged-chip {
  background: #fdf0e6; border: 1.5px solid #e8c8a0; border-radius: 20px;
  font-size: 12px; padding: 4px 10px; display: flex; align-items: center;
  gap: 6px; color: var(--accent2); font-weight: 600;
}
.tagged-chip .remove-tag { cursor: pointer; color: var(--text3); font-size: 14px; }
.tagged-chip .remove-tag:hover { color: var(--red); }

/* ──────────────────────────────────────
   OVERLAYS
────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; background: rgba(44,26,14,.55);
  display: flex; align-items: flex-end; justify-content: center; z-index: 100;
}
.overlay.hidden { display: none; }
.overlay-sheet {
  background: #fff; border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 20px 36px; width: 100%; max-width: 560px;
  animation: slideUp .25s ease;
}
.overlay-title { font-size: 17px; font-weight: 700; text-align: center; margin-bottom: 18px; color: var(--text); }
.post-type-btns { display: flex; gap: 12px; }
.post-type-btn {
  flex: 1; background: var(--bg3); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 20px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.post-type-btn:hover { border-color: var(--accent); background: #fdf0e6; }
.post-type-btn:disabled { opacity: .6; cursor: default; }
.post-type-emoji { font-size: 36px; }
.post-type-btn strong { font-size: 15px; color: var(--text); }
.post-type-btn .post-type-sub { font-size: 12px; color: var(--text3); text-align: center; }

.rating-warning-sheet {
  background: #fff; border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 20px 36px; width: 100%; max-width: 560px;
  text-align: center; animation: slideUp .25s ease;
}
.rating-warning-sheet p { color: var(--text2); margin-bottom: 18px; font-size: 14px; }
.rating-warning-btns { display: flex; gap: 10px; }
.rating-warning-btns button { flex: 1; padding: 13px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; cursor: pointer; border: none; font-family: inherit; }
.btn-cancel { background: var(--bg3); color: var(--text2); border: 1.5px solid var(--border) !important; }
.btn-post   { background: var(--accent); color: #fff; }

/* ──────────────────────────────────────
   SHOP DETAIL
────────────────────────────────────── */
.shop-detail-hero {
  padding: 22px 20px 18px; background: linear-gradient(135deg, #fdf0e6, #fff);
  border-bottom: 1px solid var(--border);
}
.shop-detail-name { font-size: 26px; font-weight: 900; color: var(--accent); margin-bottom: 4px; }
.shop-detail-meta { font-size: 13px; color: var(--text3); margin-bottom: 14px; }
.shop-detail-stats { display: flex; gap: 20px; margin-bottom: 16px; }
.shop-stat       { text-align: center; }
.shop-stat-val   { font-size: 22px; font-weight: 900; color: var(--text); }
.shop-stat-label { font-size: 11px; color: var(--text3); }
.shop-action-row { display: flex; gap: 8px; }
.shop-action-btn {
  flex: 1; padding: 11px; border-radius: var(--radius-sm); font-size: 13px;
  font-weight: 700; cursor: pointer; border: none; font-family: inherit; transition: all .15s;
}
.btn-maps { background: var(--blue); color: #fff; }
.btn-save { background: var(--bg3); border: 1.5px solid var(--border) !important; color: var(--text2); }
.btn-save.saved { border-color: var(--accent) !important; color: var(--accent); background: #fdf0e6; }

.followers-tried {
  padding: 14px 20px; border-bottom: 1px solid var(--border); background: #fff;
  margin: 0 14px 10px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.followers-tried-title {
  font-size: 12px; font-weight: 700; color: var(--text3); margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .7px;
}
.followers-avatars { display: flex; align-items: center; }
.follower-avatar-mini {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  border: 2.5px solid #fff; margin-right: -10px; cursor: pointer; background: var(--bg3);
}
.follower-avatar-mini-placeholder {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); border: 2.5px solid #fff; margin-right: -10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; cursor: pointer;
}
.followers-more { font-size: 13px; color: var(--text3); margin-left: 16px; }

/* ──────────────────────────────────────
   DM / COMMENTS
────────────────────────────────────── */
.dm-view { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--bg); }
.dm-messages {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch;
}
.dm-bubble-row { display: flex; gap: 8px; }
.dm-bubble-row.me { flex-direction: row-reverse; }
.dm-bubble {
  max-width: 72%; padding: 11px 15px; border-radius: 18px;
  font-size: 14px; line-height: 1.5;
}
.dm-bubble-row.them .dm-bubble { background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 4px 18px 18px 18px; box-shadow: var(--shadow); }
.dm-bubble-row.me   .dm-bubble { background: var(--accent); color: #fff; border-radius: 18px 4px 18px 18px; }
.dm-bubble-time { font-size: 10px; opacity: .6; margin-top: 3px; text-align: right; }
.dm-input-bar {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-top: 1px solid var(--border); background: #fff;
}
.dm-input {
  flex: 1; background: var(--bg3); border: 1.5px solid transparent;
  border-radius: 22px; padding: 10px 16px; color: var(--text);
  font-size: 14px; outline: none; font-family: inherit; transition: border-color .15s;
}
.dm-input:focus { border-color: var(--accent); }
.dm-send-btn {
  background: var(--accent); border: none; border-radius: 50%;
  width: 40px; height: 40px; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}

.comment-bubble { padding: 13px 16px; border-bottom: 1px solid var(--border); background: #fff; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.comment-username { font-weight: 700; font-size: 13px; cursor: pointer; color: var(--text); }
.comment-username:hover { color: var(--accent); }
.comment-time { font-size: 11px; color: var(--text3); }
.comment-text { font-size: 14px; color: var(--text2); line-height: 1.55; }

/* ──────────────────────────────────────
   INBOX
────────────────────────────────────── */
.inbox-wrap { padding: 12px; }
.inbox-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: #fff; border-radius: var(--radius);
  margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow); transition: box-shadow .1s;
}
.inbox-row:hover { box-shadow: var(--shadow2); }
.inbox-row.unread { border-left: 3px solid var(--accent); }
.inbox-content { flex: 1; min-width: 0; }
.inbox-top { display: flex; justify-content: space-between; align-items: baseline; }
.inbox-name { font-size: 14px; color: var(--text); }
.inbox-time { font-size: 11px; color: var(--text3); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ──────────────────────────────────────
   SOCIAL LIST
────────────────────────────────────── */
.social-list-wrap { padding: 12px 14px; }

/* ──────────────────────────────────────
   TOAST / POPUP
────────────────────────────────────── */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 11px 22px;
  border-radius: 24px; font-size: 14px; font-weight: 600; z-index: 200;
  white-space: nowrap; box-shadow: var(--shadow2); animation: slideUp .3s ease;
}
.toast.hidden { display: none; }

.thankyou-popup {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  z-index: 300; background: rgba(44,26,14,.5); animation: fadeIn .2s ease;
}
.thankyou-popup.hidden { display: none; }
.thankyou-inner {
  background: #fff; border: 2px solid var(--accent); border-radius: var(--radius);
  padding: 36px 48px; text-align: center; animation: scaleIn .25s ease; box-shadow: var(--shadow2);
}
.thankyou-emoji { font-size: 52px; margin-bottom: 10px; }
.thankyou-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 900; color: var(--accent); }
.thankyou-sub   { font-size: 14px; color: var(--text3); margin-top: 6px; }

/* ──────────────────────────────────────
   UTILITIES
────────────────────────────────────── */
.hidden { display: none !important; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 24px; gap: 10px; text-align: center;
}
.empty-state .empty-icon { font-size: 52px; }
.empty-state p { font-size: 15px; line-height: 1.6; color: var(--text2); }

.btn-primary {
  background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 13px 26px; font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.btn-primary:hover { background: var(--accent2); }
.btn-primary:disabled { opacity: .55; cursor: default; }

.nearby-loading {
  display: flex; align-items: center; gap: 10px; padding: 16px 18px;
  color: var(--text3); font-size: 13px;
}
.location-prompt {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 48px 24px; gap: 12px;
}
.location-prompt .loc-icon { font-size: 52px; }
.location-prompt p { font-size: 14px; line-height: 1.5; color: var(--text2); }

.spinning { animation: spin .8s linear infinite; display: inline-block; }
