/* ═══════════════════════════════════════════════════════════
   CAPITAL DA BOA MESA — Design System
   Goiânia, GO 1933
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables: Dark Theme (default) ── */
:root {
  --primary:       #1A5C3A;
  --primary-light: #2E7D52;
  --primary-dark:  #0F3A22;
  --accent:        #C9A84C;
  --accent-light:  #E8C96A;
  --accent-dark:   #A8882E;

  --bg:            #000000;
  --bg-2:          #0A0A0A;
  --surface:       #1C1C1E;
  --surface-2:     #2C2C2E;
  --surface-3:     #3A3A3C;

  --text:          #F5F0E8;
  --text-sub:      #B8B0A0;
  --text-muted:    #6B6560;
  --border:        rgba(201,168,76,0.15);
  --border-subtle: rgba(255,255,255,0.06);

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.6);
  --shadow-gold:   0 4px 20px rgba(201,168,76,0.2);

  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;
  --radius-full:   9999px;

  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'Inter', -apple-system, sans-serif;

  --nav-height:    64px;
  --topbar-height: 56px;
  --safe-bottom:   env(safe-area-inset-bottom, 0px);
  --safe-top:      env(safe-area-inset-top, 0px);

  --transition:    0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --spring:        0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Light Theme ── */
[data-theme="light"] {
  --bg:            #F5F0E8;
  --bg-2:          #EDE8DF;
  --surface:       #FFFFFF;
  --surface-2:     #F0EBE0;
  --surface-3:     #E5DFD4;

  --text:          #1A1714;
  --text-sub:      #4A4540;
  --text-muted:    #8A8278;
  --border:        rgba(26,92,58,0.15);
  --border-subtle: rgba(0,0,0,0.06);

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.12);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ── App Shell ── */
#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}
/* Desktop overrides handled in discover.css */

/* ── Splash Screen ── */
#splash {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.7s ease;
}

#splash.hiding {
  opacity: 0;
  pointer-events: none;
}

#splash img {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

#splash .splash-tagline {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 24px;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.2s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Top Navigation Bar ── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 56px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
  /* Removed backdrop-filter - causes blank headers on Android WebView */
  /* Only apply when supported */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
@supports (backdrop-filter: blur(1px)) {
  .topbar { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}

/* Avatar circle (left) */
.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  letter-spacing: 0.02em;
}

/* City name (center) */
.topbar-city {
  display: flex; align-items: center; gap: 4px;
  background: transparent; border: none;
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  color: var(--text);
  cursor: pointer; padding: 0;
  letter-spacing: 0.01em;
}
.topbar-city i { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* Right actions */
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar-nav-btn,
.topbar-plus-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; color: var(--text);
  transition: background 0.15s;
}
.topbar-nav-btn:active,
.topbar-plus-btn:active { background: var(--border); }
/* GPS arrow points right (NE) */
.topbar-nav-btn i { transform: rotate(45deg); display: inline-block; }

/* ── Avatar Button ── */
.avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}
.avatar-btn:active { transform: scale(0.94); }
.avatar-btn .notif-dot {
  position: absolute;
  top: -2px; right: -2px;
  width: 10px; height: 10px;
  background: #FF453A;
  border-radius: 50%;
  border: 2px solid var(--bg);
}
.avatar-btn img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ── Icon Buttons ── */
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { background: var(--surface); transform: scale(0.9); }

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: stretch;
  z-index: 100;
  /* backdrop-filter only where supported - Android fix */
  /* Safe area for iPhone home bar */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(56px + env(safe-area-inset-bottom, 0px));
}

.nav-btn {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  border: none; background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.nav-btn i { font-size: 1.35rem; line-height: 1; }
.nav-btn span { line-height: 1; }
.nav-btn.active { color: var(--primary); }
.nav-btn.active i { color: var(--primary); }
.nav-btn:active { opacity: 0.7; }

/* ── Screen Container ── */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100dvh;
  padding-top: 56px;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
}
.screen.active { display: flex; }

/* ── Scrollable Content ── */
.scroll-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.scroll-content::-webkit-scrollbar { display: none; }

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 24px 16px 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.section-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

/* ── Hero Carousel ── */
.hero-carousel {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: var(--surface);
}

.hero-carousel .slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide .slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
}

.hero-slide .slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 20px 16px;
}

.hero-slide .slide-arrow {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.hero-subtitle {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 4px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-subtle);
  transition: var(--transition);
  cursor: pointer;
}
.dot.active {
  background: var(--accent);
  width: 18px;
  border-radius: 3px;
}

/* ── Search Bar ── */
.search-bar {
  margin: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
}
.search-bar:active { border-color: var(--accent); }
.search-bar .search-icon { color: var(--text-muted); font-size: 1rem; }
.search-bar .search-placeholder {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.search-bar .search-filter {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-sub);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

/* ── City Intro Card ── */
.city-intro {
  margin: 8px 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.city-intro-img {
  width: 100%; height: 180px;
  object-fit: cover;
}
.city-intro-content { padding: 16px; }
.city-intro-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.city-intro-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.city-intro-text {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-sub);
}
.city-intro-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
}
.city-tab {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.city-tab.active {
  background: var(--primary);
  color: var(--accent-light);
  border-color: var(--primary);
}

/* ── Horizontal Scroll Row ── */
.h-scroll {
  display: flex;
  gap: 12px;
  padding: 0 16px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }

/* ── Must Eat Cards ── */
.must-eat-card {
  min-width: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  cursor: pointer;
  transition: var(--transition);
}
.must-eat-card:active { transform: scale(0.97); }
.must-eat-card img {
  width: 100%; height: 130px; object-fit: cover;
}
.must-eat-card .mec-body { padding: 10px 12px; }
.must-eat-card .mec-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.must-eat-card .mec-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.must-eat-card .mec-try {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 6px;
}

/* ── Restaurant Mini Card ── */
.restaurant-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.restaurant-mini:active { opacity: 0.8; }
.restaurant-mini img {
  width: 42px; height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.restaurant-mini .rm-info { flex: 1; min-width: 0; }
.restaurant-mini .rm-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.restaurant-mini .rm-location {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.restaurant-mini .rm-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.bookmark-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.bookmark-btn.saved { color: var(--accent); }
.bookmark-btn:active { transform: scale(0.85); }

/* ── Area Cards ── */
.area-card {
  min-width: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  height: 100px;
  transition: var(--transition);
}
.area-card:active { transform: scale(0.97); }
.area-card img { width: 100%; height: 100%; object-fit: cover; }
.area-card .area-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
}
.area-card .area-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

/* ── Invite Friends Banner ── */
.invite-banner {
  margin: 16px;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}
.invite-banner .invite-icon {
  width: 48px; height: 48px;
  background: rgba(201,168,76,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.invite-banner .invite-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 2px;
}
.invite-banner .invite-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.4;
}
.invite-banner .invite-cta {
  margin-top: 10px;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--primary-dark);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.invite-banner .invite-cta:active { transform: scale(0.96); }

/* ── Sponsors Strip ── */
.sponsors-section { margin: 4px 0 20px; overflow: hidden; }
.sponsors-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}
.sponsors-track {
  display: flex;
  gap: 0;
  animation: marquee 35s linear infinite;
  width: max-content;
}
.sponsors-track:hover { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.sponsor-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
  min-width: 120px;
}
.sponsor-item:active { opacity: 0.7; }
.sponsor-item img {
  height: 32px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  filter: grayscale(0.3) brightness(0.9);
  transition: var(--transition);
}
[data-theme="dark"] .sponsor-item img {
  filter: grayscale(0.4) brightness(0.85) invert(0.05);
}
.sponsor-item:hover img { filter: none; }
.sponsor-name {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* ── Restaurant List Card ── */
.restaurant-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.restaurant-card:active { background: var(--surface); }
.restaurant-card img {
  width: 70px; height: 70px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}
.rc-info { flex: 1; min-width: 0; }
.rc-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.rc-tags {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rc-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rc-hours {
  font-size: 0.72rem;
  font-weight: 500;
  color: #4CAF50;
}
.rc-hours.closed { color: #FF453A; }
.price-dots { display: flex; gap: 2px; }
.price-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.price-dot.empty { background: var(--surface-3); }

/* ── Search Screen ── */
.search-screen-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
}
.search-screen-input .back-btn {
  background: none; border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}
.search-input-field {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
}
.search-input-field::placeholder { color: var(--text-muted); }

.filter-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-subtle);
}
.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.filter-chip:active { background: var(--surface-2); }
.filter-chip.active {
  background: var(--primary);
  color: var(--accent-light);
  border-color: var(--primary);
}
.filter-chip .chevron { font-size: 0.6rem; }

.map-toggle {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--primary);
  color: var(--accent-light);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: var(--spring);
}
.map-toggle:active { transform: translateX(-50%) scale(0.95); }

/* ── Restaurant Detail ── */
.restaurant-detail {
  display: none;
  flex-direction: column;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.restaurant-detail.open { display: flex; }

.detail-header {
  position: absolute;
  top: calc(8px + var(--safe-top));
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 10;
}

.detail-photo-carousel {
  width: 100%;
  height: 280px;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}
.detail-photo-carousel .slides { display: flex; height: 100%; transition: transform 0.4s ease; }
.detail-photo-carousel img { min-width: 100%; height: 100%; object-fit: cover; }
.detail-photo-carousel .photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, transparent 40%, transparent 60%, rgba(0,0,0,0.4) 100%);
}
.photo-credit {
  position: absolute;
  bottom: 12px; right: 12px;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
}
.photo-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
  background: var(--bg);
}

.detail-body { padding: 16px; }

.detail-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}
.detail-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 10px;
  cursor: pointer;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.tag-pill {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-sub);
  background: transparent;
}
.tag-pill.more { color: var(--accent); border-color: var(--accent); }

.detail-stats-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.stat-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-sub);
}
.stat-badge .val { font-weight: 600; color: var(--text); }

.detail-hours {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.detail-hours .open { color: #4CAF50; font-weight: 500; }

.detail-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-sub);
  margin: 12px 0;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 60px;
  gap: 8px;
  margin: 16px 0;
}
.btn-recommend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-recommend:active { background: var(--surface); }
.btn-recommend.recommended {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--accent-light);
}

.btn-dislike {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

.action-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 16px;
  padding-bottom: 2px;
}
.action-pills::-webkit-scrollbar { display: none; }
.action-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.action-pill:active { background: var(--surface); }

.detail-map {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
}

.detail-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin: 0 -16px;
  padding: 0 16px;
}
.detail-tab {
  padding: 10px 0;
  margin-right: 24px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.detail-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.sub-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.sub-tab {
  flex: 1;
  padding: 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.sub-tab.active {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

/* ── Recommendation Posts ── */
.rec-post { padding: 16px 0; border-bottom: 1px solid var(--border-subtle); }
.rec-post-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.rec-author-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}
.rec-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rec-author-info { flex: 1; }
.rec-author-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.rec-author-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.rec-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.rec-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-sub);
  margin-bottom: 10px;
}
.rec-text .more { color: var(--accent); cursor: pointer; }
.rec-photo {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  max-height: 220px;
  object-fit: cover;
}

/* ── Community Tabs ── */
.community-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 16px;
}
.community-tab {
  padding: 12px 0;
  margin-right: 24px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.community-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ── Minha Mesa (Profile) ── */
.profile-complete-card {
  margin: 12px 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  position: relative;
}
.pcc-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pcc-icon {
  width: 44px; height: 44px;
  background: var(--surface-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 10px;
}
.pcc-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 4px;
}
.pcc-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 14px;
}

.progress-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.progress-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}
.progress-item:last-child { border-bottom: none; }
.progress-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: white;
}
.progress-check.done {
  background: var(--primary);
  border-color: var(--primary);
}
.progress-check.done::after { content: '✓'; }
.progress-label {
  font-size: 0.88rem;
  color: var(--text);
}
.progress-label.done {
  text-decoration: line-through;
  color: var(--text-muted);
}

.profile-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 16px;
  gap: 0;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: var(--transition);
}
.profile-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}
.empty-icon {
  width: 64px; height: 64px;
  background: var(--surface-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 16px;
}
.empty-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.empty-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 220px;
}

.collection-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 12px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.coll-btn {
  padding: 9px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.coll-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ── Bottom Sheet (Create Menu) ── */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.sheet-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 301;
  padding-bottom: calc(24px + var(--safe-bottom));
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  border: 1px solid var(--border);
  border-bottom: none;
}
.bottom-sheet.open {
  transform: translateX(-50%) translateY(0);
}

.sheet-handle {
  width: 36px; height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  margin: 12px auto 0;
}
.sheet-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  padding: 14px 20px 8px;
}
.sheet-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.create-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.create-option:active { background: var(--surface-2); }
.create-option + .create-option {
  border-top: 1px solid var(--border-subtle);
}
.create-option .co-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.create-option .co-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.create-option .co-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Check-In / Rec / Collection Sheets ── */
.flow-sheet-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 14px;
  background: var(--surface-2);
  margin: 8px 16px;
  border-radius: var(--radius-lg);
}
.flow-icon { font-size: 2rem; margin-bottom: 8px; }
.flow-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.flow-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.flow-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 16px;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}
.flow-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
}
.flow-search input::placeholder { color: var(--text-muted); }

.flow-restaurant-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-subtle);
}
.flow-restaurant-item:active { background: var(--surface-2); }
.flow-restaurant-item img {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.fri-info { flex: 1; }
.fri-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.fri-sub { font-size: 0.75rem; color: var(--text-muted); }
.fri-stats { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.fri-action {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.fri-action.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--accent-light);
}

.checkin-form {
  padding: 12px 16px;
}
.checkin-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.checkin-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.checkin-chip.active {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}
.checkin-note {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text);
  resize: none;
  min-height: 80px;
  outline: none;
  transition: var(--transition);
}
.checkin-note::placeholder { color: var(--text-muted); }
.checkin-note:focus { border-color: var(--accent); }

/* ── Primary Button ── */
.btn-primary {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: var(--accent-light);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 14px;
}
.btn-primary:active { transform: scale(0.98); opacity: 0.9; }
.btn-primary.gold {
  background: var(--accent);
  color: var(--primary-dark);
}

/* ── Config Menu ── */
.config-menu {
  display: flex;
  flex-direction: column;
}
.config-user-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.config-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 10px;
  overflow: hidden;
}
.config-avatar img { width: 100%; height: 100%; object-fit: cover; }
.config-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.config-profile-btn {
  padding: 10px 32px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.config-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-subtle);
}
.config-item:active { background: var(--surface-2); }
.config-item .ci-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.config-item .ci-label {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.config-item .ci-right {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.config-item.danger .ci-label { color: #FF453A; }
.config-item.danger .ci-icon { background: rgba(255,69,58,0.1); }

/* ── Auth Screen ── */
.auth-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.auth-logo { width: 120px; margin-bottom: 24px; }
.auth-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 6px;
}
.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}
.auth-form { width: 100%; max-width: 360px; }
.auth-input-group { margin-bottom: 14px; }
.auth-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.auth-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}
.auth-input:focus { border-color: var(--accent); }
.auth-input::placeholder { color: var(--text-muted); }
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-switch span {
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ── Map View ── */
#map-container {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
#map-container.open { display: block; }
#leaflet-map { width: 100%; height: 100%; }
.map-close {
  position: fixed;
  top: calc(16px + var(--safe-top));
  right: 16px;
  z-index: 210;
  width: 42px; height: 42px;
  background: var(--surface);
  border-radius: 50%;
  border: none;
  color: var(--text);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
.map-gps-toast {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 20px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  white-space: nowrap;
  z-index: 220;
  opacity: 0;
  transition: opacity 0.3s ease;
  max-width: 90vw;
  text-align: center;
  white-space: normal;
}
.map-gps-toast.show { opacity: 1; }

/* ── Toast Notifications ── */
.toast {
  position: fixed;
  top: calc(16px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: var(--surface);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  z-index: 999;
  transition: transform 0.35s var(--spring);
  max-width: 90vw;
  text-align: center;
  white-space: normal;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--primary); }
.toast.error { border-color: #FF453A; }

/* ── Booking CTA ── */
.sticky-book {
  position: sticky;
  bottom: 0;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  z-index: 10;
}
.btn-book {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--accent-light);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: var(--spring);
  box-shadow: var(--shadow-gold);
}
.btn-book:active { transform: scale(0.97); }

/* ── Skeleton Loader ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Page Loader ── */
.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.page-loader img {
  width: 60px; height: 60px;
  object-fit: contain;
}

/* ── Utilities ── */
.gold { color: var(--accent); }
.text-display { font-family: var(--font-display); }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border-subtle); margin: 8px 0; }
.spacer-nav { height: calc(var(--nav-height) + var(--safe-bottom) + 16px); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.p-16 { padding: 0 16px; }

/* ── Leaflet overrides ── */
.leaflet-container { background: var(--surface-2) !important; }
.leaflet-tile { filter: none; }
[data-theme="dark"] .leaflet-tile { filter: brightness(0.7) invert(1) contrast(1.1) hue-rotate(180deg); }

/* ── Scrollbar (desktop) ── */
@media (min-width: 430px) {
  #app { box-shadow: 0 0 60px rgba(0,0,0,0.5); }
  ::-webkit-scrollbar { width: 4px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 2px; }
}

/* ── Animations ── */
.fade-in { animation: fadeIn 0.3s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.slide-up { animation: slideUp 0.35s ease forwards; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stagger > * {
  opacity: 0;
  animation: slideUp 0.35s ease forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* ── btn-icon (used in owner panel & detail) ── */
.btn-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); }
.btn-icon:active { transform: scale(0.9); }

/* ── auth-input select ── */
.auth-input[type="select"], select.auth-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6560' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
select.auth-input option { background: var(--surface); color: var(--text); }

/* ── Guest prompt card ── */
.guest-prompt-card {
  margin: 16px;
  padding: 28px 20px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-align: center;
}
.guest-prompt-card .gpc-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.guest-prompt-card .gpc-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 8px;
}
.guest-prompt-card .gpc-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
  margin-bottom: 20px;
}
.guest-prompt-card .gpc-benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 20px;
}
.guest-prompt-card .gpc-benefit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
}
.guest-prompt-card .gpc-benefit-icon {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.guest-prompt-card .btn-join {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--primary-dark);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--spring);
  margin-bottom: 10px;
}
.guest-prompt-card .btn-join:active { transform: scale(0.97); }
.guest-prompt-card .btn-login-link {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
}
.guest-prompt-card .btn-login-link span { color: var(--accent-light); }

/* ── Change password modal ── */
.change-pw-sheet {
  text-align: center;
  padding: 0 20px 20px;
}
.change-pw-sheet .cpw-icon { font-size: 2.5rem; margin-bottom: 12px; }
.change-pw-sheet .cpw-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.change-pw-sheet .cpw-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* ── Menu display on restaurant detail ── */
.menu-section { margin-top: 8px; }
.menu-category-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  padding: 12px 0 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.menu-item-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.menu-item-row:last-child { border-bottom: none; }
.menu-item-img {
  width: 64px; height: 64px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.menu-item-info { flex: 1; min-width: 0; }
.menu-item-name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.menu-item-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 4px;
}
.menu-item-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

/* ── Owner panel tab ── */
.owner-tab { -webkit-tap-highlight-color: transparent; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE & DESKTOP LAYOUT
   Mobile-first base → tablet → desktop
   ═══════════════════════════════════════════════════════════ */

/* ── Mobile touch improvements ── */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

* {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Scrollable containers — momentum + hide scrollbars */
.scroll-content,
.h-scroll,
#community-feed,
.profile-tabs,
.filter-row,
.action-pills,
.auth-sheet-body {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

/* Mobile: lock body, scroll inside #app */
@media (max-width: 767px) {
  body {
    overscroll-behavior-y: none;
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  #app {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    -webkit-overflow-scrolling: touch;
  }
}

/* Larger tap targets on mobile */
@media (max-width: 767px) {
  .nav-item { min-height: 52px; }
  .icon-btn { width: 44px; height: 44px; }
  .filter-chip { padding: 8px 16px; min-height: 40px; }
  .config-item { padding: 18px 20px; }
  .create-option { padding: 20px; }
  .flow-restaurant-item { padding: 14px 16px; }
  .checkin-chip { padding: 10px 18px; min-height: 44px; }
  .btn-primary { padding: 16px; font-size: 1rem; }
  .avatar-btn { width: 40px; height: 40px; }
  .restaurant-card { padding: 16px; }
  .profile-tab { padding: 14px 16px; }
  .detail-tab { padding: 12px 0; }
  .community-tab { padding: 14px 0; }
}

/* Active state feedback for all interactive elements */
button:active,
[onclick]:active,
.restaurant-card:active,
.must-eat-card:active,
.area-card:active,
.rec-post:active,
.flow-restaurant-item:active,
.config-item:active,
.create-option:active {
  opacity: 0.75;
  transition: opacity 0.08s ease;
}

/* Improve swipe targets — no accidental text selection */
.hero-carousel,
.detail-photo-carousel,
.h-scroll {
  user-select: none;
  -webkit-user-select: none;
}

/* ── TABLET (768px+) ── */
@media (min-width: 768px) {
  body {
    position: static;
    height: auto;
    overflow: auto;
    background: #0a0a0a;
  }

  #app {
    height: auto;
    overflow: visible;
    max-width: none;
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    margin: 0;
    box-shadow: none;
    background: var(--bg);
  }

  /* Topbar spans full width on tablet */
  .topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    position: sticky !important;
    top: 0;
    z-index: 100;
    padding: 0 24px;
    /* On desktop the topbar is not fixed, it's sticky within the grid */
    left: auto !important;
    right: auto !important;
    width: auto !important;
    transform: none !important;
  }

  /* Bottom nav becomes a left sidebar */
  .bottom-nav {
    position: sticky !important;
    top: var(--topbar-height);
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    grid-column: 1;
    grid-row: 2;
    width: 240px;
    height: calc(100vh - var(--topbar-height));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 16px 8px;
    border-top: none;
    border-right: 1px solid var(--border-subtle);
    border-bottom: none;
    transform: none !important;
    max-width: none;
    gap: 4px;
    overflow-y: auto;
    align-self: start;
    background: var(--bg) !important;
    /* reset mobile fixed positioning */
    height: calc(100vh - 56px);
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    min-height: 44px;
  }
  .nav-item .nav-label {
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
    opacity: 1;
    display: block !important;
  }
  .nav-item .nav-icon { font-size: 1.2rem; }
  .nav-item.active {
    background: var(--surface);
    border-radius: var(--radius-md);
  }
  .nav-item.active .nav-icon { transform: none; }

  /* Main content area */
  .screen {
    grid-column: 2;
    grid-row: 2;
    padding-bottom: 48px;
    min-height: calc(100vh - var(--topbar-height));
    /* On desktop screens have normal scrolling, not fixed height */
    height: auto !important;
    overflow: visible !important;
    padding-top: 0 !important;
  }

  .screen .scroll-content {
    height: auto;
    overflow: visible;
  }

  /* Spacer no longer needed */
  .spacer-nav { display: none; }

  /* Map toggle position fix */
  .map-toggle {
    left: calc(240px + 50%);
    transform: translateX(-50%);
  }
  .map-toggle:active { transform: translateX(-50%) scale(0.96); }

  /* Sheets stay mobile-sized but centered */
  .bottom-sheet {
    max-width: 480px;
    border-radius: var(--radius-xl);
    bottom: 5vh;
  }
  .bottom-sheet.open {
    transform: translateX(-50%) translateY(0);
  }

  /* Restaurant detail as side panel */
  .restaurant-detail {
    left: 240px;
  }

  /* Hero carousel taller */
  .hero-carousel { height: 300px; }

  /* Content max-width for readability */
  .screen > .scroll-content > *,
  .screen > .scroll-content > div {
    max-width: 860px;
  }
}

/* ── DESKTOP (1024px+) ── */
@media (min-width: 1024px) {

  #app {
    grid-template-columns: 260px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px var(--border-subtle);
  }

  .bottom-nav {
    width: 260px;
  }

  /* Nav sidebar — add extra items for desktop */
  .bottom-nav::after {
    content: '';
    flex: 1;
  }

  .restaurant-detail { left: 260px; }

  /* Home: two-column grid for cards */
  #must-eats-scroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 16px 4px;
    overflow-x: visible;
    flex-wrap: wrap;
  }
  .must-eat-card { min-width: 0; }

  #areas-scroll {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 16px 4px;
    overflow-x: visible;
  }
  .area-card { min-width: 0; height: 120px; }

  /* Search results grid */
  #search-results-list .stagger {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  #search-results-list .restaurant-card {
    border-right: 1px solid var(--border-subtle);
  }
  #search-results-list .restaurant-card:nth-child(even) {
    border-right: none;
  }

  /* Community: wider post layout */
  #community-feed .rec-post {
    max-width: 700px;
  }

  .hero-carousel { height: 360px; }
  .hero-title { font-size: 2rem; }

  /* Map toggle for desktop */
  .map-toggle {
    left: calc(260px + 50%);
  }

  /* Wider invite banner */
  .invite-banner {
    margin: 16px;
  }
}

/* ── LARGE DESKTOP (1280px+) ── */
@media (min-width: 1280px) {
  #app {
    grid-template-columns: 280px 1fr 320px;
  }

  /* Third column: contextual panel */
  .screen {
    grid-column: 2;
  }

  /* Sidebar wider */
  .bottom-nav { width: 280px; }
  .restaurant-detail { left: 280px; }
  .map-toggle { left: calc(280px + 50%); }

  /* Right panel: trending / community preview */
  .desktop-right-panel {
    display: flex;
    flex-direction: column;
    grid-column: 3;
    grid-row: 2;
    position: sticky;
    top: var(--topbar-height);
    height: calc(100vh - var(--topbar-height));
    overflow-y: auto;
    padding: 20px 16px;
    border-left: 1px solid var(--border-subtle);
    gap: 20px;
  }
}

/* ── Topbar desktop improvements ── */
@media (min-width: 768px) {
  .topbar-center {
    font-size: 1.4rem;
  }

  /* Search bar inline in topbar on desktop */
  .topbar-search-desktop {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    flex: 1;
    max-width: 360px;
    margin: 0 24px;
    cursor: text;
  }
  .topbar-search-desktop input {
    border: none;
    background: none;
    outline: none;
    font-size: 0.88rem;
    color: var(--text);
    width: 100%;
    font-family: var(--font-body);
  }
  .topbar-search-desktop input::placeholder { color: var(--text-muted); }
}

/* ── Right panel widget styles ── */
.right-panel-section {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.right-panel-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.right-panel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
}
.right-panel-item:last-child { border-bottom: none; }
.right-panel-item:hover { background: var(--surface-2); }
.right-panel-item img {
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.right-panel-item .rpi-info { flex: 1; min-width: 0; }
.right-panel-item .rpi-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.right-panel-item .rpi-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Splash responsive ── */
@media (min-width: 768px) {
  #splash { background: #000000; }
  #splash img { width: 240px; height: 240px; }
}

/* ── Enhanced carousel transitions ── */
.hero-carousel .slides {
  will-change: transform;
  transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.detail-photo-carousel .slides {
  will-change: transform;
  transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Grab cursor for horizontal scroll on desktop */
@media (min-width: 768px) {
  .h-scroll { cursor: grab; }
  .h-scroll:active { cursor: grabbing; }
}

/* ── Bottom sheet touch improvements ── */
.bottom-sheet {
  will-change: transform;
  /* Prevent overscroll chaining */
  overscroll-behavior: contain;
}

/* ── Improve scroll performance ── */
.scroll-content,
#community-feed,
.restaurant-detail {
  will-change: scroll-position;
  contain: layout style;
}

/* ── Nav active indicator — animated dot for mobile ── */
@media (max-width: 767px) {
  .nav-item.active::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
  }
  .nav-item { position: relative; }
}

/* ── Smooth screen transitions ── */
.screen { animation: none; }
.screen.animate-in {
  animation: screenIn 0.18s ease forwards;
}
@keyframes screenIn {
  from { opacity: 0.8; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Desktop topbar grid area ── */
@media (min-width: 768px) {
  .topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0;
  }
  .topbar-left { justify-self: start; }
  .topbar-search-desktop { justify-self: stretch; margin: 0 16px; }
  .topbar-right { justify-self: end; display: flex; gap: 4px; }
}

/* ════════════════════════════════════════════════
   HOME SCREEN — WoM-Style Sections
   ════════════════════════════════════════════════ */

/* Fix GPS arrow direction — should point RIGHT (NE) */
.topbar-nav-btn i { transform: rotate(45deg); display: inline-block; }

/* scrollable home content */
#home-content { overflow-y: auto; height: calc(100vh - 56px); }

/* ── Banner ── */
.home-banner {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: var(--surface);
}
.banner-slides {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94);
  will-change: transform;
}
.banner-slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}
.banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.6) 100%);
}
.banner-content {
  position: absolute;
  bottom: 24px; left: 20px; right: 20px;
  color: #fff;
}
.banner-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem; font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.banner-sub {
  font-size: 0.8rem; opacity: 0.9;
  margin-top: 3px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.banner-cta {
  margin-top: 10px;
  background: var(--primary); color: var(--bg);
  border: none; border-radius: 20px;
  padding: 7px 18px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; letter-spacing: 0.03em;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.banner-cta:active { opacity: 0.8; }
.banner-dots {
  position: absolute; bottom: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 5px;
}
.bdot {
  width: 6px; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.45);
  cursor: pointer; transition: all 0.3s;
}
.bdot.active { width: 18px; background: #fff; }

/* ── Branded identity strip ── */
.home-brand-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 18px 11px 16px;
  background: var(--primary);
  border-bottom: 1.5px solid var(--accent);
  position: relative;
  overflow: hidden;
  /* GPU composite — prevents Android repaint on scroll */
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}
/* Subtle gold shimmer top-right */
.home-brand-strip::before {
  content: '';
  position: absolute;
  right: 0; top: 0;
  width: 140px; height: 100%;
  background: linear-gradient(270deg, rgba(201,168,76,0.14) 0%, transparent 100%);
  pointer-events: none;
}
/* Thin gold line accent */
.home-brand-strip::after {
  content: '';
  position: absolute;
  left: 16px; bottom: 0;
  right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(201,168,76,0.6) 0%, transparent 60%);
  pointer-events: none;
}
.home-brand-logo {
  width: 30px; height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  /* Make logo white on the dark green background */
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.home-brand-wordmark {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1;
}
.home-brand-cap {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.62rem;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.home-brand-main {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.22rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.home-brand-city {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  flex-shrink: 0;
  opacity: 0.9;
}

/* ── Search Bar ── */
.home-search-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 16px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 11px 16px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.home-search-bar:active { border-color: var(--primary); }
.home-search-bar i { font-size: 1.1rem; color: var(--text-muted); }
.home-search-bar span { font-size: 0.88rem; color: var(--text-muted); }

/* ── Sections ── */
.home-section { padding: 18px 0 4px; }
.home-section-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  padding: 0 16px; margin-bottom: 12px;
}
.home-section-title {
  font-size: 1rem; font-weight: 700;
  color: var(--text);
}
.home-section-sub {
  font-size: 0.75rem; color: var(--text-muted);
  margin-top: 2px;
}
.home-see-all {
  background: transparent; border: none;
  font-size: 0.8rem; color: var(--primary);
  font-weight: 600; cursor: pointer;
  white-space: nowrap; padding: 0;
  margin-top: 2px;
}

/* ── H-scroll wrapper ── */
.h-scroll {
  display: flex; gap: 12px;
  overflow-x: auto; overflow-y: hidden;
  padding: 0 16px 12px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }

/* ── Nearby status ── */
.nearby-status {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Restaurant Card (home horizontal) ── */
.home-rest-card {
  flex-shrink: 0; width: 160px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s;
}
.home-rest-card:active { transform: scale(0.97); }
.hrc-img-wrap { position: relative; height: 110px; }
.hrc-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.hrc-save {
  position: absolute; top: 7px; right: 7px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.45); border: none;
  color: #fff; font-size: 0.85rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.hrc-save.saved { background: var(--primary); }
.hrc-closed {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(0,0,0,0.6); color: #fff;
  font-size: 0.65rem; font-weight: 600;
  padding: 2px 6px; border-radius: 10px;
  letter-spacing: 0.04em;
}
.hrc-info { padding: 9px 10px; }
.hrc-name {
  font-size: 0.82rem; font-weight: 700;
  color: var(--text);
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.hrc-meta {
  font-size: 0.7rem; color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.hrc-stats {
  display: flex; gap: 8px;
  font-size: 0.68rem; color: var(--text-muted);
  margin-top: 5px;
}
.hrc-stats i { font-size: 0.7rem; }

/* ── Mini Map ── */
.home-mini-map {
  position: relative;
  height: 180px; margin: 0 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.home-map-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  padding: 20px 12px 12px;
  display: flex; justify-content: flex-end;
}
.home-map-cta {
  background: rgba(255,255,255,0.9);
  color: var(--text);
  border: none; border-radius: 20px;
  padding: 7px 14px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
}

/* ── Category Cards ── */
.cat-card {
  flex-shrink: 0; width: 130px; height: 100px;
  border-radius: var(--radius-md); overflow: hidden;
  position: relative; cursor: pointer;
  transition: transform 0.2s;
}
.cat-card:active { transform: scale(0.96); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,0.72) 100%);
  display: flex; flex-direction: column;
  justify-content: flex-end; padding: 8px;
}
.cat-name { font-size: 0.78rem; font-weight: 700; color: #fff; }
.cat-count { font-size: 0.65rem; color: rgba(255,255,255,0.8); margin-top: 1px; }

/* ── Chef Post Card ── */
.chef-post-card {
  flex-shrink: 0; width: 260px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  cursor: pointer;
}
.cpc-header {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px 8px;
}
.cpc-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.cpc-name { font-size: 0.8rem; font-weight: 700; color: var(--text); }
.cpc-role { font-size: 0.68rem; color: var(--text-muted); }
.cpc-time { font-size: 0.68rem; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }
.cpc-photo {
  width: 100%; height: 160px; object-fit: cover; display: block;
}
.cpc-body { padding: 10px 12px 6px; }
.cpc-rest {
  font-size: 0.82rem; font-weight: 700;
  color: var(--text); margin-bottom: 4px;
}
.cpc-text {
  font-size: 0.78rem; color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.cpc-footer {
  display: flex; justify-content: space-between;
  align-items: center;
  padding: 7px 12px 10px;
  font-size: 0.68rem; color: var(--text-muted);
}
.cpc-type { font-weight: 600; }

/* ── Collection Card ── */
.collection-card {
  flex-shrink: 0; width: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  cursor: pointer;
}
.cc-img-wrap { position: relative; height: 140px; }
.cc-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.75) 100%);
}
.cc-save {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,0.45); border: none;
  color: #fff; font-size: 0.9rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cc-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 12px;
}
.cc-title {
  font-size: 0.85rem; font-weight: 700; color: #fff;
  line-height: 1.25;
}
.cc-count {
  font-size: 0.7rem; color: rgba(255,255,255,0.8);
  margin-top: 3px;
}
.cc-count i { font-size: 0.7rem; }
.cc-chef {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
}
.cc-chef-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cc-chef-name { font-size: 0.78rem; font-weight: 600; color: var(--text); }
.cc-chef-role { font-size: 0.65rem; color: var(--text-muted); }

/* ── Chef Follow Card ── */
.chef-follow-card {
  flex-shrink: 0; width: 140px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 18px 12px 14px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  display: flex; flex-direction: column;
  align-items: center; gap: 5px;
}
.cfc-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.cfc-name {
  font-size: 0.8rem; font-weight: 700;
  color: var(--text); line-height: 1.2;
  text-align: center;
}
.cfc-role {
  font-size: 0.65rem; color: var(--text-muted);
  line-height: 1.3; text-align: center;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.cfc-stats {
  font-size: 0.68rem; color: var(--text-muted);
  margin-top: 2px;
}
.cfc-follow-btn {
  margin-top: 8px;
  background: var(--primary); color: var(--bg);
  border: none; border-radius: 20px;
  padding: 7px 16px; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 5px;
  transition: opacity 0.2s;
}
.cfc-follow-btn:active { opacity: 0.8; }

/* ── Event Card ── */
.event-card {
  flex-shrink: 0; width: 240px;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  cursor: pointer;
}
.ec-img-wrap { position: relative; height: 130px; }
.ec-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ec-date-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,0.72); color: #fff;
  border-radius: 8px; padding: 6px 10px;
  text-align: center; min-width: 42px;
  backdrop-filter: blur(4px);
}
.ec-day { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.ec-month { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.06em; }
.ec-urgency {
  position: absolute; bottom: 8px; right: 8px;
  background: var(--accent); color: var(--bg);
  font-size: 0.65rem; font-weight: 700;
  padding: 3px 8px; border-radius: 10px;
}
.ec-info { padding: 11px 12px 12px; }
.ec-title {
  font-size: 0.85rem; font-weight: 700; color: var(--text);
  line-height: 1.2; margin-bottom: 4px;
}
.ec-rest {
  font-size: 0.72rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.ec-meta {
  display: flex; gap: 10px; margin-top: 5px;
  font-size: 0.7rem; color: var(--text-muted);
}
.ec-meta span { display: flex; align-items: center; gap: 3px; }
.ec-spots {
  margin-top: 7px;
  font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted);
}
.ec-spots.urgent { color: #e05a00; }

/* ── Popular Cards (full-width stacked, WoM style) ── */
.popular-card {
  display: flex; align-items: center; gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: pointer; position: relative;
  overflow: hidden;
  transition: background 0.15s;
}
.popular-card:first-child { border-top: 1px solid var(--border); }
.popular-card:active { background: var(--surface-elevated); }
.popular-img {
  width: 100px; height: 80px;
  object-fit: cover; flex-shrink: 0;
}
.popular-info { flex: 1; padding: 10px 12px; min-width: 0; }
.popular-name {
  font-size: 0.88rem; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.popular-meta {
  font-size: 0.72rem; color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.popular-stats {
  display: flex; gap: 10px; margin-top: 6px;
  font-size: 0.7rem; color: var(--text-muted);
}
.popular-stats span { display: flex; align-items: center; gap: 3px; }
.popular-save {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none;
  font-size: 1.1rem; color: var(--text-muted);
  cursor: pointer; padding: 8px;
}
.popular-save i.ph-fill { color: var(--primary); }

/* ── Share Banner ── */
.home-share-banner {
  margin: 20px 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-md);
  padding: 20px;
}
.share-banner-inner {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.share-banner-emoji { font-size: 2rem; }
.share-banner-title {
  font-size: 1rem; font-weight: 700; color: var(--bg);
  font-family: 'Cormorant Garamond', serif;
}
.share-banner-desc {
  font-size: 0.78rem; color: rgba(255,255,255,0.85);
  margin-top: 2px; line-height: 1.4;
}
.share-banner-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.share-btn {
  flex: 1; min-width: 90px;
  background: rgba(255,255,255,0.2);
  color: #fff; border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 8px 12px; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 5px;
  transition: background 0.2s;
}
.share-btn:active { background: rgba(255,255,255,0.35); }

/* ── Sponsors Carousel ── */
.home-sponsors-section {
  padding: 20px 0 10px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.sponsors-title {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted);
  text-align: center; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 16px; margin-bottom: 14px;
}
.sponsors-carousel-wrap {
  overflow: hidden;
  border-radius: var(--radius-md);
  margin: 0 16px;
}
.sponsors-carousel {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94);
  will-change: transform;
}
.sponsor-slide {
  min-width: 100%; padding: 2px;
  cursor: pointer;
}
.sponsor-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: transform 0.2s;
}
.sponsor-card:active { transform: scale(0.98); }
.sponsor-logo-area { flex-shrink: 0; }
.sponsor-initials {
  width: 48px; height: 48px; border-radius: 12px;
  color: #fff; font-size: 1rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.sponsor-info { flex: 1; min-width: 0; }
.sponsor-name {
  font-size: 0.88rem; font-weight: 700; color: var(--text);
}
.sponsor-tagline {
  font-size: 0.72rem; color: var(--text-muted);
  margin-top: 2px;
}
.sponsors-dots {
  display: flex; justify-content: center; gap: 5px;
  margin-top: 12px; padding-bottom: 6px;
}
.sp-dot {
  width: 6px; height: 6px; border-radius: 3px;
  background: var(--border);
  cursor: pointer; transition: all 0.3s;
}
.sp-dot.active {
  width: 18px;
  background: var(--primary);
}

/* ── Spacer for bottom nav ── */
.spacer-nav { height: 72px; }

/* ── Dark mode banner tab ── */
@media (prefers-color-scheme: dark) {
  .home-mini-map { background: #1a1a1a; }
}

/* ── Screen layout (mobile-first) ── */
.screen {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
}
.screen.active { display: block; }
#screen-discover.active { display: flex; flex-direction: column; }
.home-scroll {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#home-content {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ════════════════════════════════════════════════
   MOBILE FOUNDATION — Final overrides
   Ensures header + footer look like a real app
   ════════════════════════════════════════════════ */

/* Lock the body to viewport — no page scroll, app handles scroll internally */
html, body {
  height: 100%; height: 100dvh;
  overflow: hidden;
  position: fixed; width: 100%;
}

/* ── Topbar — clean mobile header ── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  z-index: 200;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 800; color: #fff;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.topbar-city {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; font-weight: 700; color: var(--text);
  letter-spacing: 0.01em;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.topbar-city i { font-size: 0.7rem; color: var(--text-muted); }

.topbar-actions {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto;
}
.topbar-nav-btn, .topbar-plus-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); font-size: 1rem;
  transition: background 0.15s;
}
.topbar-nav-btn:active, .topbar-plus-btn:active { background: var(--border); }
.topbar-nav-btn i { transform: rotate(45deg); display: inline-block; }

/* ── Bottom Nav — 5-tab mobile bar ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 200;
  display: flex; align-items: stretch;
  background: var(--bg);
  border-top: 1px solid var(--border-subtle);
}

.nav-btn {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; padding: 0;
  border: none; background: transparent;
  color: var(--text-muted);
  font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}
.nav-btn i { font-size: 1.3rem; line-height: 1; }
.nav-btn span { line-height: 1.1; }
.nav-btn.active { color: var(--primary); }
.nav-btn:active { opacity: 0.65; }

/* ── Screens — fill between fixed header and footer ── */
.screen {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background: var(--bg);
}
.screen.active { display: block; }
#screen-discover.active { display: flex; flex-direction: column; overflow: hidden; }

/* Home needs its own scroller */
#home-content {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* ── Desktop: restore normal body scroll ── */
@media (min-width: 768px) {
  html, body {
    position: static; overflow: auto; height: auto;
  }
}

/* ════════════════════════════════════════════════
   COMPONENT CSS — Restaurant Sheet, Map, Search,
   Community, Profile, Auth
   ════════════════════════════════════════════════ */

/* ── Restaurant Detail Sheet ── */
.r-backdrop {
  position: fixed; inset: 0; z-index: 299;
  background: rgba(0,0,0,0.5);
}
.r-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 300;
  max-height: 94vh;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.25,0.46,0.45,0.94);
}
.r-sheet.open { transform: translateY(0); }
.r-sheet-inner {
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  max-height: 94vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* Restaurant detail content */
.rd-photos { position: relative; height: 260px; overflow: hidden; background: #111; }
.rd-slides { display: flex; height: 100%; transition: transform 0.35s ease; }
.rd-slides img { min-width:100%; height:100%; object-fit:cover; flex-shrink:0; }
.rd-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.95rem;
}
.rd-save-hero {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.95rem;
}
.rd-save-hero.saved { background: var(--primary); }
.rd-photo-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px;
}
.rd-dot { width:6px; height:6px; border-radius:3px; background:rgba(255,255,255,0.4); cursor:pointer; transition: all 0.3s; }
.rd-dot.active { width:16px; background:#fff; }

.rd-body { padding: 16px 18px; }
.rd-status-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.rd-badge { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 20px; letter-spacing: 0.05em; }
.rd-badge.open { background: rgba(20,160,70,0.12); color: #1A8045; }
.rd-badge.closed { background: rgba(0,0,0,0.06); color: var(--text-muted); }
.rd-price { font-size: 0.8rem; font-weight: 700; color: var(--accent); }
.rd-category { font-size: 0.75rem; color: var(--text-muted); }
.rd-name { font-family:'Cormorant Garamond',serif; font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1.1; margin-bottom: 8px; }
.rd-location { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--primary); font-weight: 500; cursor: pointer; margin-bottom: 10px; }
.rd-rating-row { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; }
.rd-stars { color: #FFD700; font-size: 0.85rem; }
.rd-rating-num { font-weight: 700; font-size: 0.85rem; }
.rd-rec-count { font-size: 0.75rem; color: var(--text-muted); }

.rd-actions { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.rd-action-btn {
  flex: 1; min-width: 70px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 8px; border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--surface); color: var(--text);
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.rd-action-btn.primary { background: var(--primary); color: var(--bg); border-color: var(--primary); }
.rd-action-btn:active { opacity: 0.75; }

.rd-must-try { background: var(--surface); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.rd-must-label { font-size: 0.65rem; font-weight: 800; color: var(--accent); letter-spacing: 0.08em; margin-bottom: 4px; }
.rd-must-text { font-size: 0.85rem; color: var(--text); }

.rd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rd-tag { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 20px; padding: 4px 12px; font-size: 0.75rem; color: var(--text-muted); }

.rd-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 18px; }

.rd-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.rd-info-item { display: flex; align-items: flex-start; gap: 9px; background: var(--surface); padding: 10px 12px; border-radius: 12px; }
.rd-info-item i { font-size: 1rem; color: var(--primary); flex-shrink: 0; margin-top: 1px; }
.rd-info-label { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 2px; }
.rd-info-val { font-size: 0.78rem; color: var(--text); font-weight: 500; }

.rd-map-wrap { position: relative; margin-bottom: 20px; border-radius: 12px; overflow: hidden; cursor: pointer; }
.rd-map-cta { position: absolute; bottom: 8px; right: 8px; background: rgba(255,255,255,0.9); border-radius: 20px; padding: 6px 12px; font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; gap: 5px; }

.rd-section-title { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 20px 0 10px; }

.rd-chef-card { display: flex; gap: 12px; background: var(--surface); border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.rd-chef-avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--accent)); color: #fff; font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rd-chef-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; }
.rd-chef-role { font-size: 0.72rem; color: var(--primary); font-weight: 600; margin-bottom: 5px; }
.rd-chef-bio { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

.rd-event-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.rd-event-date { background: var(--primary); color: var(--bg); border-radius: 10px; padding: 8px 10px; text-align: center; flex-shrink: 0; min-width: 44px; }
.rd-event-day { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.rd-event-month { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.05em; }
.rd-event-info { flex: 1; }
.rd-event-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 2px; }
.rd-event-meta { font-size: 0.72rem; color: var(--text-muted); }
.rd-event-btn { background: var(--accent); color: var(--bg); border: none; border-radius: 20px; padding: 7px 14px; font-size: 0.75rem; font-weight: 700; cursor: pointer; white-space: nowrap; }

.rd-coll-item { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.rd-coll-cover { width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0; background: var(--border); }
.rd-coll-title { font-weight: 700; font-size: 0.82rem; margin-bottom: 2px; }
.rd-coll-chef { font-size: 0.7rem; color: var(--text-muted); }

.rd-stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 20px; }
.rd-stat { background: var(--surface); border-radius: 12px; padding: 14px; text-align: center; }
.rd-stat-num { font-family:'Cormorant Garamond',serif; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.rd-stat-lbl { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

/* ── Map Overlay ── */
.map-overlay {
  position: fixed; inset: 0; z-index: 400;
  display: flex; flex-direction: column;
  background: #fff;
}
.map-header {
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 14px;
  background: var(--bg); border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.map-close-btn, .map-gps-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; flex-shrink: 0;
  color: var(--text);
}
.map-gps-btn i { transform: rotate(45deg); display: inline-block; }
.map-title { font-weight: 700; font-size: 0.95rem; flex: 1; }
.gps-toast {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.8); color: #fff;
  padding: 10px 18px; border-radius: 24px; font-size: 0.82rem;
  white-space: nowrap; opacity: 0; transition: opacity 0.25s; pointer-events: none; z-index: 10;
}
.gps-toast.show { opacity: 1; }

/* ── Search Screen ── */
.search-top { padding: 10px 14px 6px; background: var(--bg); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border-subtle); }
.search-input-wrap { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 24px; padding: 10px 14px; margin-bottom: 10px; }
.search-input-wrap i { font-size: 1rem; color: var(--text-muted); flex-shrink: 0; }
.search-input-wrap input { flex: 1; border: none; background: transparent; font-size: 0.9rem; color: var(--text); outline: none; }
#search-clear { background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; padding: 0; }
.filter-chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip { flex-shrink: 0; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border-subtle); background: var(--surface); font-size: 0.78rem; font-weight: 500; color: var(--text); cursor: pointer; display: flex; align-items: center; gap: 4px; white-space: nowrap; transition: all 0.15s; }
.filter-chip.active { background: var(--primary); color: var(--bg); border-color: var(--primary); }
.filter-chip i { font-size: 0.7rem; }
.search-count { padding: 12px 16px 6px; font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.search-card { display: flex; align-items: center; border-bottom: 1px solid var(--border-subtle); cursor: pointer; position: relative; transition: background 0.12s; }
.search-card:active { background: var(--surface); }
.search-card-img { width: 90px; height: 80px; object-fit: cover; flex-shrink: 0; }
.search-card-info { flex: 1; padding: 10px 12px 10px 12px; min-width: 0; }
.search-card-name { font-weight: 700; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-card-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.search-card-tags { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-card-bottom { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.search-open { font-size: 0.7rem; font-weight: 600; color: #1A8045; }
.search-open.closed { color: var(--text-muted); }
.search-save { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 1.1rem; color: var(--text-muted); cursor: pointer; padding: 8px; }
.search-save.saved i { color: var(--primary); }
.cat-pill { padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border-subtle); background: var(--surface); font-size: 0.82rem; cursor: pointer; transition: all 0.15s; }
.cat-pill.active { background: var(--primary); color: var(--bg); border-color: var(--primary); }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border-subtle); margin: 12px auto 0; }

/* ── Community Screen ── */
.comm-tabs { display: flex; background: var(--bg); border-bottom: 1px solid var(--border-subtle); position: sticky; top: 0; z-index: 10; }
.comm-tab { flex: 1; padding: 13px; border: none; background: transparent; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; }
.comm-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.comm-post { padding: 16px 16px 0; border-bottom: 8px solid var(--surface); }
.comm-post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.comm-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--accent)); color: #fff; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.comm-author-name { font-weight: 700; font-size: 0.85rem; }
.comm-author-role { font-size: 0.7rem; color: var(--text-muted); }
.comm-post-time { margin-left: auto; font-size: 0.7rem; color: var(--text-muted); }
.comm-post-img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; display: block; margin-bottom: 10px; cursor: pointer; }
.comm-post-text { font-size: 0.85rem; line-height: 1.55; color: var(--text); margin-bottom: 10px; }
.comm-rest-mini { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 12px; padding: 10px; margin-bottom: 10px; cursor: pointer; }
.comm-rest-thumb { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.comm-rest-name { font-weight: 700; font-size: 0.82rem; }
.comm-rest-sub { font-size: 0.7rem; color: var(--text-muted); }
.comm-rest-open { font-size: 0.7rem; font-weight: 600; color: #1A8045; }
.comm-rest-open.closed { color: var(--text-muted); }
.comm-post-actions { display: flex; align-items: center; gap: 8px; padding: 10px 0 16px; }
.comm-action-btn { display: flex; align-items: center; gap: 5px; padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border-subtle); background: transparent; font-size: 0.78rem; font-weight: 600; cursor: pointer; color: var(--text-muted); }
.comm-post-type { margin-left: auto; font-size: 0.7rem; color: var(--text-muted); }
.comm-chef-card { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border-subtle); position: relative; }
.comm-chef-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--accent)); color: #fff; font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.comm-chef-body { flex: 1; }
.comm-chef-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; }
.comm-chef-role { font-size: 0.72rem; color: var(--primary); font-weight: 600; margin-bottom: 5px; }
.comm-chef-bio { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 8px; }
.comm-chef-stats { display: flex; gap: 12px; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 8px; }
.comm-chef-rest { display: flex; align-items: center; gap: 6px; background: var(--surface); border: none; border-radius: 20px; padding: 6px 12px; font-size: 0.75rem; font-weight: 600; color: var(--primary); cursor: pointer; }
.comm-follow-btn { position: absolute; top: 16px; right: 16px; background: var(--primary); color: var(--bg); border: none; border-radius: 20px; padding: 7px 14px; font-size: 0.75rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.comm-event-card { margin: 12px 16px; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.comm-event-img { width: 100%; height: 150px; object-fit: cover; display: block; }
.comm-event-body { display: flex; gap: 12px; padding: 14px; }
.comm-event-date-badge { background: var(--primary); color: var(--bg); border-radius: 10px; padding: 8px 10px; text-align: center; flex-shrink: 0; min-width: 46px; }
.ced-day { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.ced-month { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.05em; }
.comm-event-info { flex: 1; }
.comm-event-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.comm-event-rest { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-bottom: 5px; }
.comm-event-meta { display: flex; gap: 10px; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 5px; }
.comm-event-spots { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; }
.comm-event-spots.urgent { color: #e05a00; }
.comm-event-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 10px; }
.comm-event-btn { background: var(--primary); color: var(--bg); border: none; border-radius: 20px; padding: 9px 18px; font-size: 0.8rem; font-weight: 700; cursor: pointer; width: 100%; }

/* ── Profile Screen ── */
.profile-guest { padding: 48px 24px 32px; text-align: center; }
.profile-guest-icon { font-size: 3rem; margin-bottom: 12px; }
.profile-guest-title { font-family:'Cormorant Garamond',serif; font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.profile-guest-sub { color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; margin-bottom: 24px; }
.profile-login-btn { background: var(--primary); color: var(--bg); border: none; border-radius: 24px; padding: 14px 36px; font-size: 0.95rem; font-weight: 700; cursor: pointer; letter-spacing: 0.02em; }
.profile-guest-preview { margin-top: 32px; text-align: left; background: var(--surface); border-radius: 14px; padding: 16px; }
.profile-preview-title { font-weight: 700; font-size: 0.82rem; margin-bottom: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.profile-perk { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 0.85rem; border-bottom: 1px solid var(--border-subtle); }
.profile-perk:last-child { border-bottom: none; }
.profile-perk i { font-size: 1.1rem; color: var(--primary); flex-shrink: 0; }
.profile-header { display: flex; align-items: center; gap: 14px; padding: 20px 16px 16px; }
.profile-avatar { width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--accent)); color: #fff; font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-name { font-weight: 700; font-size: 1rem; }
.profile-email { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.profile-edit-btn { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-subtle); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.9rem; }
.profile-stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 0 16px 16px; }
.profile-stat { background: var(--surface); border-radius: 12px; padding: 14px; text-align: center; }
.pstat-num { font-family:'Cormorant Garamond',serif; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.pstat-lbl { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.profile-section-title { display: flex; align-items: center; gap: 7px; padding: 0 16px; font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.profile-saved-card { display: flex; align-items: center; border-bottom: 1px solid var(--border-subtle); cursor: pointer; transition: background 0.1s; }
.profile-saved-card:active { background: var(--surface); }
.profile-saved-img { width: 80px; height: 70px; object-fit: cover; flex-shrink: 0; }
.profile-saved-info { flex: 1; padding: 10px 12px; }
.profile-saved-name { font-weight: 700; font-size: 0.88rem; }
.profile-saved-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.profile-saved-open { font-size: 0.7rem; font-weight: 600; color: #1A8045; margin-top: 3px; }
.profile-saved-open.closed { color: var(--text-muted); }
.profile-saved-remove { background: none; border: none; padding: 12px; cursor: pointer; font-size: 1.1rem; }
.profile-empty-saved { padding: 32px 16px; text-align: center; }
.profile-setting-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 16px; background: transparent; border: none; border-bottom: 1px solid var(--border-subtle); font-size: 0.88rem; cursor: pointer; color: var(--text); }
.profile-setting-row i:first-child { font-size: 1.1rem; color: var(--primary); }

/* ── Toast ── */
.toast {
  position: fixed;
  /* Sit above bottom nav + safe area on all devices */
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  left: 50%; z-index: 1100;
  transform: translateX(-50%) translateY(8px);
  background: rgba(18,18,18,0.93); color: #fff;
  padding: 10px 20px; border-radius: 24px;
  font-size: 0.84rem; font-weight: 500;
  /* Allow text to wrap for longer messages */
  white-space: nowrap;
  max-width: calc(100vw - 48px);
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
  /* GPU composite */
  -webkit-transform: translateX(-50%) translateY(8px);
  will-change: opacity, transform;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); -webkit-transform: translateX(-50%) translateY(0); }
.toast.toast-success { background: rgba(20,120,60,0.95); }
.toast.toast-error { background: rgba(180,30,30,0.95); }

/* ── Empty state ── */
.empty-state { padding: 60px 24px; text-align: center; }
