/* BiteFlip Swipe UI — dark theme, mobile-first */

:root {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --surface-2: #242424;
  --text: #f5f5f5;
  --text-muted: #888;
  --accent: #e85d2f;
  --accent-hover: #c94e24;
  --like: #22c55e;
  --pass: #ef4444;
  --card-w: min(92vw, 380px);
  --card-h: min(65vh, 520px);
  --radius: 24px;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
}

/* ── Header ── */
.swipe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg);
  border-bottom: 1px solid #222;
  flex-shrink: 0;
}

.header-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.header-back:hover { background: var(--surface-2); }

.header-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
}

.group-badge {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Search Bar ── */
.search-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 6px;
  flex-shrink: 0;
}
.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}
.location-search-input {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid #333;
  border-radius: 100px;
  padding: 9px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}
.location-search-input::placeholder { color: var(--text-muted); }
.location-search-input:focus { border-color: var(--accent); }
.search-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}
.search-clear-btn:hover { color: var(--text); }

/* ── Filter Bar ── */
.filter-bar {
  padding: 4px 16px 8px;
  flex-shrink: 0;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.filter-pills::-webkit-scrollbar { display: none; }

.filter-pill {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1.5px solid #333;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.filter-pill:not(.active):hover {
  border-color: #555;
  color: var(--text);
}

.distance-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.distance-label {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.distance-slider {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
}
.distance-value {
  font-size: 12px;
  color: var(--text-muted);
  width: 42px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Card Stage ── */
.card-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px 0;
}

/* ── Card ── */
.swipe-card {
  position: absolute;
  width: var(--card-w);
  /* Fill the stage (minus room for the stacked cards peeking below) so the
     whole card is always on screen, whatever the phone height. */
  height: min(calc(100% - 40px), var(--card-h));
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  cursor: grab;
  user-select: none;
  touch-action: none;
  will-change: transform;
}
.swipe-card:active { cursor: grabbing; }

/* Card image */
.card-img-wrap {
  position: relative;
  height: 62%;
  overflow: hidden;
  background: #1a1a1a;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2d1f14 0%, #1a1209 50%, #0f0a05 100%);
  position: relative;
}
.card-img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(180, 80, 30, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(140, 60, 20, 0.1) 0%, transparent 50%);
}
.placeholder-emoji {
  font-size: 52px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
.img-fallback .card-img { display: none; }
.img-fallback::after {
  content: '🍴';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: 0.3;
}

.card-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
}
.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.5);
  color: white;
}
.badge-friends {
  background: rgba(232, 93, 47, 0.85);
  color: white;
  display: flex;
  align-items: center;
  gap: 4px;
}
.badge-saved {
  background: rgba(180, 60, 30, 0.9);
  color: white;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card info */
.card-info {
  padding: 16px 20px 12px;
  background: var(--surface);
}

.card-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.2;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.card-cuisine {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: capitalize;
}
.card-rating {
  font-size: 13px;
  color: #f59e0b;
  font-weight: 600;
}
.card-address {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Drag hint */
.card-drag-hint {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  pointer-events: none;
  letter-spacing: 0.1em;
}

/* Swipe overlay */
.swipe-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}
.swipe-overlay span {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: 0.1em;
  border: 4px solid;
  border-radius: 12px;
  padding: 8px 20px;
}
.overlay-like {
  opacity: 1;
  background: rgba(34, 197, 94, 0.25);
}
.overlay-like span { color: #22c55e; border-color: #22c55e; }
.overlay-pass {
  opacity: 1;
  background: rgba(239, 68, 68, 0.25);
}
.overlay-pass span { color: #ef4444; border-color: #ef4444; }

/* ── Swipe Actions ── */
.swipe-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 12px 24px calc(16px + env(safe-area-inset-bottom));
  flex-shrink: 0;
}

.action-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.action-btn {
  width: 62px; height: 62px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.action-btn:active { transform: scale(0.9); }

.action-pass {
  background: #1e1e1e;
  color: var(--pass);
  border: 2px solid #ef4444;
}
.action-pass:hover {
  background: rgba(239,68,68,0.15);
  box-shadow: 0 0 0 4px rgba(239,68,68,0.25), 0 4px 20px rgba(0,0,0,0.4);
}

.action-save {
  background: #1e1e1e;
  color: #f97316;
  border: 2px solid #f97316;
}
.action-save:hover {
  background: rgba(249,115,22,0.12);
  box-shadow: 0 0 0 4px rgba(249,115,22,0.2), 0 4px 20px rgba(0,0,0,0.4);
}

.action-like {
  background: #22c55e;
  color: white;
  box-shadow: 0 4px 20px rgba(34,197,94,0.35);
}
.action-like:hover {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.25), 0 4px 20px rgba(34,197,94,0.4);
}

.action-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Mutual Craving Banner ── */
.mutual-banner {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 420px);
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1.5px solid rgba(232,93,47,0.4);
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(232,93,47,0.1);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.mutual-banner.banner-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.mutual-banner-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.mutual-banner-text {
  flex: 1;
}
.mutual-banner-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: #e85d2f;
  margin-bottom: 2px;
}
.mutual-banner-sub {
  font-size: 13px;
  color: #aaa;
}
.mutual-banner-close {
  background: none;
  border: none;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.mutual-banner-close:hover { color: #f5f5f5; }

/* ── Loading / Empty State ── */
.loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid #333;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 40px;
}
.empty-icon { font-size: 48px; }
.empty-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
}
.empty-sub { font-size: 14px; color: var(--text-muted); }

/* ── Match Banner ── */
.match-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #e85d2f, #c94e24);
  padding: 16px 20px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(232,93,47,0.4);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.match-banner.banner-show { transform: translateY(0); }

.match-hearts { font-size: 28px; flex-shrink: 0; }

.match-text { flex: 1; }
.match-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  color: white;
}
.match-restaurant { font-size: 13px; color: rgba(255,255,255,0.8); margin-top: 2px; }

.match-dismiss {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  background: transparent;
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Location Overlays ── */
.loc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 24px;
  backdrop-filter: blur(8px);
}

.loc-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 32px 24px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.loc-icon { font-size: 48px; }

.loc-card h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
}

.loc-card p { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

.loc-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1.5px solid #333;
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  box-sizing: border-box;
}
.loc-input:focus { border-color: var(--accent); }

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 8px;
}
.btn-ghost:hover { color: var(--text); }

/* ── Scrollbar ── */
::-webkit-scrollbar { display: none; }

/* ═══════════════════════════════════════
   BOTTOM NAVIGATION
═══════════════════════════════════════ */

.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid #222;
  flex-shrink: 0;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 2px;
  border-radius: 12px;
  transition: color 0.2s;
  /* Six tabs share the width equally so all fit on a 320px iPhone SE. */
  flex: 1 1 0;
  min-width: 0;
}

.nav-item span { letter-spacing: 0.02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 340px) { .nav-item { font-size: 10px; } }

.nav-item.nav-active,
.nav-item:hover { color: var(--accent); }

.nav-item:active { transform: scale(0.9); }

/* ═══════════════════════════════════════
   PAGES (Cravings + Mutual)
═══════════════════════════════════════ */

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 20px;
  -webkit-overflow-scrolling: touch;
}

.header-spacer { width: 36px; }

/* ── Cravings Grid ── */
.cravings-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 80px;
}

.craving-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #1e1e1e;
  cursor: pointer;
  transition: background 0.15s;
}
.craving-card:hover { background: var(--surface); }
.craving-card:active { background: var(--surface-2); }

.craving-img-wrap {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
}

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

.craving-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.craving-info { flex: 1; min-width: 0; }

.craving-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.craving-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.craving-address {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.craving-detail-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  flex-shrink: 0;
}
.craving-detail-btn:hover { background: var(--surface-2); color: var(--text); }

/* ── Detail Modal ── */
.detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 400;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.detail-modal.modal-open { display: flex; }

.detail-sheet {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.detail-header {
  display: flex;
  justify-content: flex-end;
  padding: 16px 16px 0;
}

.detail-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.detail-img-wrap {
  padding: 0 20px 16px;
}

.detail-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 16px;
}

.detail-img-placeholder {
  width: 100%;
  height: 200px;
  border-radius: 16px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.detail-body { padding: 0 20px 24px; }

.detail-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 8px;
}

.detail-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.detail-address {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-btn {
  flex: 1;
  min-width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s;
}
.detail-btn:active { transform: scale(0.96); }

.detail-btn-map { background: var(--accent); color: white; }
.detail-btn-call { background: var(--surface-2); color: var(--text); border: 1.5px solid #333; }
.detail-btn-remove { background: var(--surface-2); color: var(--text-muted); border: 1.5px solid #333; }

/* ═══════════════════════════════════════
   MUTUAL PAGE
═══════════════════════════════════════ */

.mutual-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 24px 80px;
  text-align: center;
}

.mutual-hero-icon { font-size: 56px; }

.mutual-idle h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 28px;
  color: var(--text);
}

.mutual-idle p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.mutual-options {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mutual-option-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  text-align: left;
}

.option-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}

.mutual-option-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }

.mutual-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
}
.mutual-divider::before,
.mutual-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #2a2a2a;
}

.code-input-row {
  display: flex;
  gap: 10px;
}

.code-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1.5px solid #333;
  border-radius: 14px;
  color: var(--text);
  font-size: 20px;
  font-family: var(--font-head);
  letter-spacing: 0.15em;
  text-align: center;
  outline: none;
  box-sizing: border-box;
}
.code-input:focus { border-color: var(--accent); }
.code-input::placeholder { font-size: 14px; letter-spacing: 0; font-family: var(--font-body); }

.join-error {
  margin-top: 8px;
  font-size: 13px;
  color: var(--pass);
}

/* Session active */
.mutual-session {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 80px;
}

.session-code-section {
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(232,93,47,0.12), rgba(201,78,36,0.06));
  border-bottom: 1px solid #1e1e1e;
}

.session-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}

.code-display {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 52px;
  letter-spacing: 0.25em;
  color: var(--accent);
  line-height: 1;
}

.code-hint { font-size: 12px; color: var(--text-muted); text-align: center; }

.code-actions { display: flex; gap: 12px; }

.code-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1.5px solid #333;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}
.code-btn:hover { border-color: var(--accent); color: var(--accent); }

.leave-btn {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px;
}

/* Members */
.session-members {
  padding: 16px 24px;
  border-bottom: 1px solid #1e1e1e;
}

.members-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.members-list { display: flex; flex-wrap: wrap; gap: 10px; }

.member-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: 100px;
  padding: 6px 12px 6px 6px;
  font-size: 13px;
  color: var(--text);
}

.member-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.creator-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  background: rgba(232,93,47,0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

/* No matches */
.no-matches {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 24px;
  text-align: center;
}
.no-matches-icon { font-size: 40px; }
.no-matches p { font-size: 14px; color: var(--text-muted); }

/* Matches section */
.matches-section {
  padding: 20px 24px;
}

.matches-header {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 14px;
}

.match-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}

.match-img-wrap {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
}

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

.match-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.match-info { flex: 1; min-width: 0; }

.match-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.match-actions { display: flex; gap: 6px; flex-shrink: 0; }

.match-action-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1.5px solid #333;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.match-action-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Mutual swipe CTA */
.mutual-swipe-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  display: block;
  width: calc(100% - 48px);
  margin: 8px 24px 0;
}

/* ── Match Celebration Overlay ── */
.match-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.match-overlay.overlay-show .match-celebration {
  animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop-in {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.match-celebration {
  background: var(--surface);
  border-radius: 28px;
  padding: 32px 24px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.celebration-hearts {
  font-size: 48px;
  animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

.match-celebration h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  color: var(--text);
}

.celebration-restaurant {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
}

.celebration-img-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
}

.celebration-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.celebration-img-placeholder {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.celebration-address {
  font-size: 13px;
  color: var(--text-muted);
}

.celebration-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}

.celebration-btn {
  flex: 1;
  min-width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s;
  background: var(--accent);
  color: white;
}
.celebration-btn:active { transform: scale(0.96); }

.celebration-sms { background: var(--surface-2); color: var(--text); border: 1.5px solid #333; }

.match-dismiss-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 8px 16px;
}
/* ── "Did you go?" feedback prompt ─────────────────────────────────────── */
.feedback-prompt {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  animation: fadeIn 0.25s ease;
}

.feedback-prompt-label {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-body);
  flex-shrink: 0;
}

.feedback-prompt-buttons {
  display: flex;
  gap: 6px;
}

.feedback-btn {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--text);
  transition: all 0.15s;
  white-space: nowrap;
}

.feedback-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
}

.feedback-btn:active { transform: scale(0.95); }

/* Rating row (shown after "Yes") */
.feedback-rating-row {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  animation: fadeIn 0.2s ease;
}

.feedback-rating-row.open { display: flex; }

.feedback-rating-label {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-body);
  text-align: center;
}

.feedback-rating-btns {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.rating-btn {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  transition: all 0.15s;
  min-width: 72px;
}

.rating-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); }
.rating-btn:active { transform: scale(0.95); }
.rating-btn.selected { border-color: var(--accent); background: rgba(255,107,107,0.15); }

/* Subtle dismiss X on the prompt card */
.feedback-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  line-height: 1;
  flex-shrink: 0;
}
.feedback-dismiss:hover { color: var(--text); }

/* Header user button */
.header-user-btn {
  font-size: 13px;
  font-weight: 600;
  color: #e85d2f;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 100px;
  background: #1a1a1a;
  border: 1.5px solid #333;
  transition: all 0.2s;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-user-btn:hover { border-color: #e85d2f; }
.header-user-btn.signed-in { color: #f5f5f5; border-color: #444; }
.modal-close:hover { color: #f5f5f5; }

/* ── Pref Filter Bar (Diet + Cuisine) ── */
.pref-filter-bar {
  padding: 0 16px 10px;
  flex-shrink: 0;
  position: relative;
}
.pref-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1.5px solid #333;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.pref-filter-toggle:hover { border-color: #555; }
.pref-active-count {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 100px;
  margin-left: 4px;
}
.nearme-pill {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  flex-shrink: 0;
}
.nearme-loc {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 1;
  min-width: 0;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pref-panel {
  margin-top: 10px;
  background: var(--surface);
  border: 1.5px solid #333;
  border-radius: 16px;
  padding: 14px 14px 12px;
  max-height: 60vh;
  overflow-y: auto;
}
.pref-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pref-panel-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.3px;
}
.pref-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}
.pref-panel-close:hover { color: var(--text); }

.pref-section { margin-bottom: 12px; }
.pref-section:last-of-type { margin-bottom: 8px; }
.pref-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.pref-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pref-toggle {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1.5px solid #333;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.pref-toggle:hover { border-color: #555; }
.pref-toggle.checked {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.pref-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.pref-save, .pref-clear {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s;
}
.pref-save {
  background: var(--accent);
  color: white;
}
.pref-save:hover { background: var(--accent-hover); }
.pref-clear {
  background: transparent;
  border-color: #333;
  color: var(--text-muted);
}
.pref-clear:hover { color: var(--text); border-color: #555; }

.distance-slider { min-width: 0; }

/* iOS "Add to Home Screen" tip */
.install-hint {
  position: fixed; left: 12px; right: 12px; top: calc(64px + env(safe-area-inset-top));
  max-width: 456px; margin: 0 auto; z-index: 900;
  display: flex; align-items: center; gap: 12px;
  background: #1c1c1c; border: 1.5px solid #333; border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); color: #f5f5f5; font-size: 13px;
}
.install-hint img { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.install-hint div { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.install-hint span { color: #aaa; }
.install-hint button { background: none; border: 0; color: #888; font-size: 16px; padding: 6px; cursor: pointer; }
