/* ══════════════════════════════════════════════
   ChuGuru — Live Well, Chew Wisely — REDESIGN
   Green organic palette: forest greens, fresh lime,
   lettuce hero background, warm earth accents.
   ══════════════════════════════════════════════ */

:root {
  --bg: #f4f7f2;
  --bg-card: #ffffff;
  --bg-warm: #eef3eb;
  --bg-dark: #1a2518;
  --border: #d4ddd0;
  --border-focus: #a3b89c;

  --flame: #4a8c3f;
  --flame-soft: #e8f2e6;
  --flame-deep: #367a2e;

  --teal: #3a7d34;
  --teal-soft: #e8f2e6;
  --teal-deep: #2d5a27;

  --sage: #6b8f3a;
  --sage-soft: #f0f5e8;
  --ocean: #5a9e50;
  --ocean-soft: #edf5eb;
  --gold: #8b9a2a;
  --gold-soft: #f5f7ea;
  --earth: #6d5e4b;

  --grade-a: #2e9e5a;
  --grade-b: #6db644;
  --grade-c: #e8a817;
  --grade-d: #e07a2f;
  --grade-e: #d43d2f;

  --text: #1a2518;
  --text-sec: #4a5c46;
  --text-mut: #8a9a86;
  --text-inv: #fafdf8;

  --font-d: 'Playfair Display', Georgia, serif;
  --font-b: 'DM Sans', system-ui, sans-serif;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-full: 9999px;

  --sh-sm: 0 1px 4px rgba(26,37,24,0.06);
  --sh-md: 0 4px 16px rgba(26,37,24,0.08);
  --sh-lg: 0 8px 32px rgba(26,37,24,0.12);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── App shell ─────────────────────────── */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

.screen {
  flex: 1;
  display: none;
  flex-direction: column;
  animation: fadeUp 0.45s var(--ease);
}
.screen.active { display: flex; }

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

/* ══════════════════════════════════════════════
   HOME SCREEN
   ══════════════════════════════════════════════ */

/* ── Hero banner — full-bleed lettuce photo ───── */
.hero-banner {
  position: relative;
  padding: 18px 22px 0;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
}

/* Search area inside hero */
.hero-search {
  position: relative;
  z-index: 2;
  padding: 0 0 20px;
}
.hero-search .search-card {
  margin-top: 8px;
}
.hero-search .search-hint {
  text-align: center;
  font-size: 0.68rem; color: rgba(255,255,255,0.6);
  margin-bottom: 0; font-weight: 400;
  padding-top: 6px;
}
.hero-search .search-hint i { color: rgba(255,255,255,0.7); font-size: 0.6rem; margin-right: 3px; }

/* Lettuce background image */
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('lettuce.jpg');
  background-size: cover;
  background-position: center 30%;
  z-index: 0;
}

/* Gradient overlay — clear lettuce on top, solid green at the bottom like the reference */
.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(45, 80, 38, 0.18) 0%,
    rgba(40, 75, 35, 0.08) 25%,
    rgba(40, 75, 35, 0.10) 45%,
    rgba(50, 82, 40, 0.55) 65%,
    rgba(55, 85, 42, 0.82) 78%,
    rgba(58, 88, 44, 0.94) 88%,
    rgb(60, 90, 45) 100%
  );
  z-index: 1;
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  position: relative; z-index: 2;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 42px; height: 42px; flex-shrink: 0;
  background: #d4622a;
  border-radius: 50%;
  display: grid; place-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.25);
}
.logo-mark svg { width: 38px; height: 38px; }
.logo-word {
  font-family: var(--font-d);
  font-size: 2.9rem; font-weight: 600;
  color: var(--text-inv);
  letter-spacing: -0.02em;
}
.logo-word span { color: #ffffff; font-weight: 800; }


.hdr-pill {
  font-size: 0.55rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 12px; border-radius: var(--r-full);
  border: 1px solid rgba(255,255,255,0.2);
}

/* Headline — large, pushed to bottom of hero */
.hero-content {
  position: relative; z-index: 2;
  margin-top: auto;
  padding-bottom: 28px;
}
.hero-content h1 {
  font-family: var(--font-d);
  font-size: 3.5rem; font-weight: 700;
  line-height: 1.06; color: var(--text-inv);
  letter-spacing: -0.03em;
  margin-bottom: 0;
}
.hero-sub {
  font-size: 2.6rem;
  font-weight: 500;
}
.hero-content h1 em {
  font-style: italic;
  color: #c5e1a5;
  font-weight: 500;
}
.hero-content p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.55; max-width: 300px;
  font-weight: 400;
  margin-top: 8px;
}

/* Food circles — hidden in redesign */
.hero-food-circles {
  display: none;
}
.food-circ {
  display: none;
}
.food-circ:hover { transform: scale(1.08); }
.food-circ + .food-circ { margin-left: -12px; }
.food-circ:nth-child(2) { z-index: 1; }
.food-circ:nth-child(3) { z-index: 2; }
.food-circ:nth-child(4) { z-index: 3; }

/* Food images */
.fc-1 { background-image: url('dishpics/salmon-asparagus.jpg'); }
.fc-2 { background-image: url('dishpics/peking-duck.jpg'); }
.fc-3 { background-image: url('dishpics/hainanese-chicken-rice.jpg'); }

/* Large showcase dish — hidden in redesign */
.hero-dish-showcase {
  display: none;
}

.food-circ-label {
  display: none;
}

/* ── Home body ─────────────────────────── */
.home-body {
  flex: 1;
  padding: 0 18px 100px;
  margin-top: 0;
  position: relative; z-index: 5;
  padding-top: 18px;
}

/* ── Search zone — solid green band below hero with rounded bottom ── */
.search-zone {
  background: rgb(60, 90, 45);
  padding: 0 20px 22px;
  border-radius: 0 0 28px 28px;
  position: relative;
  z-index: 4;
}
.search-zone .search-card {
  margin-top: 0;
}
.search-zone .search-hint {
  text-align: center;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0;
  font-weight: 400;
  padding-top: 8px;
}
.search-zone .search-hint i {
  color: rgba(255,255,255,0.6);
  font-size: 0.6rem;
  margin-right: 3px;
}

/* ── Search card (floating) — two separate boxes ───────────── */
.search-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
  margin-bottom: 6px;
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.search-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--r-full);
  padding: 4px 18px;
  transition: box-shadow 0.25s;
  box-shadow: 0 4px 20px rgba(30,60,25,0.14);
  border: 1px solid rgba(255,255,255,0.6);
}
.search-icon-left {
  color: var(--text-mut);
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-right: 12px;
}
.search-input {
  flex: 1;
  border: none; outline: none;
  background: transparent;
  font-family: var(--font-b);
  font-size: 0.9rem; color: var(--text);
  padding: 14px 0;
  font-weight: 400;
  width: 100%;
}
.search-input::placeholder { color: var(--text-mut); font-weight: 300; }
.search-actions {
  flex-shrink: 0;
}
.s-btn {
  width: 50px; height: 50px;
  border: none; border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer; font-size: 1.5rem;
  transition: all 0.2s var(--ease);
}
.s-cam { background: var(--teal-soft); color: var(--teal); }
.s-cam:hover { background: var(--teal); color: white; }
.s-go {
  background: var(--teal); color: white;
  box-shadow: 0 4px 16px rgba(58,125,52,0.3);
}
.s-go:hover { background: var(--teal-deep); }
.s-go:active { transform: scale(0.94); }

.search-hint {
  text-align: center;
  font-size: 0.68rem; color: var(--text-mut);
  margin-bottom: 22px; font-weight: 400;
  padding-top: 6px;
}
.search-hint i { color: var(--sage); font-size: 0.6rem; margin-right: 3px; }

/* ── Return-to-results pill ────────────── */
.return-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-soft);
  border: 1.5px solid var(--teal);
  border-radius: var(--r-full);
  padding: 9px 16px 9px 14px;
  margin-bottom: 18px;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s;
  box-shadow: var(--sh-sm);
  user-select: none;
}
.return-pill:active { background: #d0e8ce; }
.return-pill-arrow {
  color: var(--teal);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.return-pill-label {
  flex: 1;
  font-family: var(--font-b);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.return-pill-chevron {
  color: var(--teal);
  font-size: 0.65rem;
  flex-shrink: 0;
  opacity: 0.7;
}

/* ── Section label ─────────────────────── */
.section-label {
  font-size: 0.8rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--text-mut);
  margin-bottom: 12px; padding-left: 2px;
}

/* ── Quick actions — 3-column row ──────── */
.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 26px;
}
.action-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 18px 12px 16px;
  box-shadow: var(--sh-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.action-card:hover {
  box-shadow: var(--sh-lg);
  transform: translateY(-2px);
  border-color: transparent;
}
.action-card:active { transform: scale(0.96); }

.action-card-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 1rem;
  margin-bottom: 10px;
}
.ac-scan .action-card-icon { background: var(--teal-soft); color: var(--teal); }
.ac-explore .action-card-icon { background: var(--sage-soft); color: var(--sage); }
.ac-fave .action-card-icon { background: var(--gold-soft); color: var(--gold); }

.action-card-title {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text); margin-bottom: 3px;
  line-height: 1.2;
}
.action-card-sub {
  font-size: 0.62rem; color: var(--text-mut);
  font-weight: 400; line-height: 1.35;
}

/* Accent dot */
.action-card::after {
  content: '';
  position: absolute;
  top: 10px; right: 10px;
  width: 5px; height: 5px;
  border-radius: 50%; opacity: 0.35;
}
.ac-scan::after    { background: var(--teal); }
.ac-explore::after { background: var(--sage); }
.ac-fave::after    { background: var(--gold); }

/* ══════════════════════════════════════════════
   AI PERSONALIZED PICKS — horizontal scroll
   ══════════════════════════════════════════════ */
.picks-section {
  margin-bottom: 26px;
}
.picks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 2px;
}
.picks-title {
  font-family: var(--font-d);
font-size: 0.82rem;
font-weight: 800;
color: var(--text-mut);

letter-spacing: 0.12em;
}
.picks-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}
.picks-link:hover { color: var(--teal-deep); }

.picks-scroll {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
  margin: 0 -18px;
  padding-left: 18px;
  padding-right: 18px;
}
.picks-scroll::-webkit-scrollbar { display: none; }

.pick-card {
  flex-shrink: 0;
  width: 148px;
  height: 190px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  border: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-align: left;
  font-family: var(--font-b);
  color: var(--text);
  padding: 0;
  position: relative;
}
.pick-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.pick-card:active { transform: scale(0.96); }

.pick-img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.pick-img {
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-warm);
  transition: transform 0.3s var(--ease);
}
.pick-card:hover .pick-img { transform: scale(1.06); }

/* Gradient overlay — solid at bottom fading to transparent at top */
.pick-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
 background: linear-gradient(
    180deg,
    transparent 25%,
    rgba(100, 145, 70, 0.15) 42%,
    rgba(100, 145, 70, 0.50) 58%,
    rgba(95, 140, 65, 0.78) 70%,
    rgba(90, 135, 60, 0.92) 80%,
    rgba(85, 130, 55, 0.98) 90%,
    rgb(80, 125, 50) 100%
);
  z-index: 1;
  pointer-events: none;
}

.pick-add-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,0.3);
  display: grid; place-items: center;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
  transition: all 0.2s;
  z-index: 3;
}
.pick-add-btn:hover {
  background: rgba(255,255,255,0.35);
  color: #fff;
}

.pick-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 12px 14px;
  z-index: 2;
}
.pick-name {
  font-size: 0.78rem; font-weight: 600;
  color: #fff; line-height: 1.25;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ── Example cards — horizontal scroll ── */
.examples-section { margin-bottom: 26px; }
.examples-scroll {
  display: flex; gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
  margin: 0 -18px;
  padding-left: 18px;
  padding-right: 18px;
}
.examples-scroll::-webkit-scrollbar { display: none; }

.example-card {
  flex-shrink: 0;
  width: 132px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-align: left;
  font-family: var(--font-b);
  color: var(--text);
  padding: 0;
}
.example-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.example-card:active { transform: scale(0.96); }

.example-img-wrap {
  width: 100%; height: 88px;
  overflow: hidden;
}
.example-img {
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s var(--ease);
}
.example-card:hover .example-img { transform: scale(1.06); }

.example-info { padding: 10px 12px 12px; }
.example-name {
  font-size: 0.74rem; font-weight: 600;
  color: var(--text); line-height: 1.25;
  margin-bottom: 5px;
}
.example-tags { display: flex; gap: 4px; }
.etag {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: inline-grid; place-items: center;
  font-size: 0.55rem;
}
.etag-nutri { background: var(--flame-soft); color: var(--flame); }
.etag-eco { background: var(--teal-soft); color: var(--teal); }

/* ── How it works card ─────────────────── */
.how-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 22px 20px;
  margin-bottom: 24px;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--border);
}
.how-title {
  font-family: var(--font-d);
  font-size: 1.05rem; font-weight: 600;
  margin-bottom: 18px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.how-title i { color: var(--teal); font-size: 0.85rem; }

.how-steps { display: flex; flex-direction: column; gap: 16px; }
.how-step { display: flex; align-items: flex-start; gap: 14px; }
.how-num {
  width: 32px; height: 32px;
  border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700;
}
.step-1 .how-num { background: var(--teal-soft); color: var(--teal); }
.step-2 .how-num { background: var(--sage-soft); color: var(--sage); }
.step-3 .how-num { background: var(--gold-soft); color: var(--gold); }

.how-text { flex: 1; padding-top: 3px; }
.how-text strong {
  font-size: 0.8rem; font-weight: 600;
  display: block; margin-bottom: 1px; color: var(--text);
}
.how-text span {
  font-size: 0.72rem; color: var(--text-mut);
  font-weight: 400; line-height: 1.4;
}

/* ── Photo preview ─────────────────────── */
.photo-preview {
  display: none; margin-top: 16px;
  position: relative; border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--sh-md);
}
.photo-preview img { width: 100%; max-height: 200px; object-fit: cover; }
.photo-remove {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.92);
  border: none; border-radius: 50%;
  color: var(--text); cursor: pointer;
  display: grid; place-items: center;
  box-shadow: var(--sh-sm); font-size: 0.75rem;
}

/* ── Status ─────────────────────────────── */
.status {
  text-align: center; padding: 12px 16px;
  font-size: 0.82rem; font-weight: 500;
  display: none; border-radius: var(--r-md); margin-top: 12px;
}
.status.info { display: block; background: var(--teal-soft); color: var(--teal-deep); border: 1px solid rgba(58,125,52,0.2); }
.status.error { display: block; background: #FFF0EE; color: #C0392B; border: 1px solid rgba(192,57,43,0.2); }

/* ── Menu picker — replaces action cards after scan ── */
.menu-picker {
  display: none;
  animation: fadeUp 0.35s var(--ease);
}
.menu-picker-header { text-align: center; margin-bottom: 14px; }
.menu-picker-title {
  font-family: var(--font-d); font-size: 1rem; font-weight: 400;
}
.menu-picker-title span { color: var(--teal); }
.menu-picker-sub { font-size: 0.72rem; color: var(--text-mut); margin-top: 4px; }
.menu-dish-scroll {
  max-height: 400px; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.menu-dish-scroll::-webkit-scrollbar { width: 4px; }
.menu-dish-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.menu-dish-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.menu-category-header {
  grid-column: 1 / -1;
  font-family: var(--font-b);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 10px 2px 5px;
  border-bottom: 1.5px solid var(--teal-soft);
  margin-top: 4px;
}
.menu-category-header:first-child { padding-top: 2px; margin-top: 0; }
.menu-dish-option {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 10px 10px;
  color: var(--text); font-family: var(--font-b);
  font-size: 0.8rem; cursor: pointer;
  transition: all 0.2s; text-align: left;
  display: flex; align-items: flex-start; gap: 8px;
  box-shadow: var(--sh-sm); line-height: 1.3;
}
.menu-dish-option:hover { border-color: var(--teal); box-shadow: var(--sh-md); }
.menu-dish-option .dish-num {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-warm); color: var(--text-mut);
  font-size: 0.58rem; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
  margin-top: 1px;
}
.menu-picker-actions { margin-top: 10px; text-align: center; }
.menu-scan-another {
  background: none; border: 1.5px dashed var(--border);
  border-radius: var(--r-md); padding: 12px 20px;
  color: var(--text-sec); font-family: var(--font-b);
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  transition: all 0.2s; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.menu-scan-another:hover { border-color: var(--teal); color: var(--teal); }

/* ── Bottom tab bar — floating pill with circular icons ── */
.tab-bar {
  position: fixed;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  width: auto; max-width: 380px;
  height: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(220, 232, 210, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(180, 210, 170, 0.5);
  border-top: none;
  border-radius: var(--r-full);
  padding: 9px 12px;
  padding-bottom: calc(9px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  box-shadow: 0 4px 24px rgba(26,37,24,0.12);
}
.tab {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0;
  color: var(--teal-deep);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  padding: 0;
  position: relative;
  background: rgba(180, 210, 165, 0.45);
  border: 1.5px solid rgba(120, 160, 100, 0.25);
  flex-shrink: 0;
}
.tab span { display: none; }
.tab i { font-size: 1.15rem; }
.tab.active {
  color: #fff;
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  box-shadow: 0 2px 12px rgba(45,90,39,0.35);
}
.tab.active::before { display: none; }
.tab:hover:not(.active) {
  background: rgba(160, 195, 145, 0.6);
  color: var(--teal-deep);
}

/* Center scan button — large, prominent, white border ring */
.tab-scan-btn {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  border: 4px solid #fff;
  color: white;
  display: grid; place-items: center;
  font-size: 1.35rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(45,90,39,0.35), 0 0 0 1px rgba(45,90,39,0.08);
  transition: all 0.25s var(--ease);
  margin-top: -18px;
  flex-shrink: 0;
  animation: pulse 3s ease-in-out infinite;
}
.tab-scan-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(45,90,39,0.45), 0 0 0 1px rgba(45,90,39,0.08);
}
.tab-scan-btn:active { transform: scale(0.94); animation: none; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(45,90,39,0.35), 0 0 0 1px rgba(45,90,39,0.08); }
  50% { box-shadow: 0 4px 32px rgba(45,90,39,0.55), 0 0 0 1px rgba(45,90,39,0.08); }
}

/* ── Brand footer ──────────────────────── */
.brand-footer {
  padding: 20px 0;
  text-align: center; font-size: 0.64rem;
  color: var(--text-mut); font-weight: 400;
  line-height: 1.6;
}
.brand-footer a { color: var(--teal); text-decoration: none; font-weight: 500; }


/* ══════════════════════════════════════════════
   LOADING
   ══════════════════════════════════════════════ */
.loading-screen {
  align-items: center; justify-content: center;
  text-align: center; padding-top: 140px !important;
}
.loader-wrap { position: relative; width: 190px; height: 190px; margin: 0 auto 28px; }
.loader-ring {
  width: 190px; height: 190px;
  border: 3px solid var(--border);
  border-top-color: var(--teal);
  border-right-color: var(--teal);
  border-radius: 50%;
  animation: spin 1.4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-guru {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 120px;
  object-fit: contain;
  animation: breathe 2.2s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { transform: translate(-50%,-50%) scale(1); }
  50% { transform: translate(-50%,-50%) scale(1.06); }
}
.loader-title { font-family: var(--font-d); font-size: 1.15rem; font-weight: 400; margin-bottom: 6px; }
.loader-sub { font-size: 0.82rem; color: var(--text-mut); font-weight: 400; }


/* ══════════════════════════════════════════════
   RESULTS SCREEN — Mobile app card layout
   ══════════════════════════════════════════════ */

.results-screen {
  background: var(--bg);
}
.results-body {
  flex: 1;
  padding: 0 16px 88px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.res-section-label {
  margin-top: 20px;
}

/* ── Dish switcher ─────────────────────── */
.dish-switcher { margin-bottom: 10px; }
.dish-switcher-scroll {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 2px 0 6px;
  max-height: 126px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.dish-switcher-scroll::-webkit-scrollbar { width: 4px; }
.dish-switcher-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.ds-chip {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  padding: 8px 16px;
  font-family: var(--font-b);
  font-size: 0.74rem; font-weight: 500;
  color: var(--text-sec);
  cursor: pointer; transition: all 0.2s;
  box-shadow: var(--sh-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.ds-chip:hover { border-color: var(--teal); color: var(--teal); }
.ds-chip:active { transform: scale(0.96); }
.ds-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 2px 8px rgba(58,125,52,0.25);
}
.ds-active:hover { color: #fff; }
.ds-in-meal {
  border-color: var(--teal);
  color: var(--teal);
}
.ds-in-meal:hover { border-color: var(--teal-deep); color: var(--teal-deep); }
.ds-meal-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  vertical-align: middle;
  margin-right: 5px;
  position: relative; top: -1px;
}
.ds-placeholder {
  border-style: dashed;
  border-color: var(--teal);
  color: var(--teal);
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
  font-size: 0.7rem;
}

/* ── Results top bar ───────────────────── */
.top-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 8px rgba(26,37,24,0.06);
}
.back-btn {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 50%; color: var(--text-sec);
  width: 38px; height: 38px; min-width: 38px;
  display: grid; place-items: center;
  font-size: 0.82rem; cursor: pointer;
  transition: all 0.2s; box-shadow: var(--sh-sm);
}
.back-btn:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }
.dish-name {
  font-family: var(--font-d); font-size: 1.15rem; font-weight: 600;
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.est-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--gold-soft); color: #5a6a1c;
  font-size: 0.55rem; font-weight: 700;
  padding: 4px 9px; border-radius: var(--r-full);
  letter-spacing: 0.02em; white-space: nowrap;
  text-transform: uppercase; flex-shrink: 0;
  border: 1px solid rgba(139,154,42,0.2);
}
.est-badge i { font-size: 0.52rem; }

/* ── DUAL VERDICT — two columns, stats beneath each card ── */
.dual-verdict {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 10px;
}
.dv-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dv-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 0 0 14px;
  box-shadow: var(--sh-md);
  position: relative; overflow: hidden;
  animation: fadeUp 0.5s var(--ease);
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.25s;
  border: 1px solid var(--border);
  flex: 1;
}
.dv-card:hover { box-shadow: var(--sh-lg); transform: translateY(-2px); }
.dv-card:active { transform: scale(0.97); }

/* Top accent bar */
.dv-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--border);
  transition: background 0.4s;
}
.dv-card[data-grade="A"]::before { background: var(--grade-a); }
.dv-card[data-grade="B"]::before { background: var(--grade-b); }
.dv-card[data-grade="C"]::before { background: var(--grade-c); }
.dv-card[data-grade="D"]::before { background: var(--grade-d); }
.dv-card[data-grade="E"]::before { background: var(--grade-e); }

/* Watermark grade */
.dv-card::after {
  content: attr(data-grade);
  position: absolute;
  bottom: 0; right: 8px;
  font-family: var(--font-d);
  font-size: 5rem; font-weight: 700;
  line-height: 1; opacity: 0.04;
  pointer-events: none; color: var(--text);
}

.dv-header {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 14px 10px;
}
.dv-icon-wrap {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.dv-icon-nutri { background: var(--flame-soft); }
.dv-icon-nutri .dv-icon { color: var(--flame); font-size: 0.72rem; }
.dv-icon-planet { background: var(--teal-soft); }
.dv-icon-planet .dv-icon { color: var(--teal); font-size: 0.72rem; }
.dv-icon { font-size: 0.72rem; }

.dv-label {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-sec);
}

.dv-grade-bar { display: flex; gap: 3px; margin: 0 12px 10px; }
.dv-g {
  flex: 1; text-align: center;
  padding: 6px 0; border-radius: 8px;
  font-size: 0.7rem; font-weight: 800;
  transition: all 0.4s var(--ease);
  border: 2px solid transparent;
}
.dv-g-active {
  transform: scale(1.25);
  box-shadow: 0 3px 14px rgba(0,0,0,0.22);
  z-index: 1; position: relative;
}

.dv-alert {
  font-size: 0.64rem; font-weight: 600;
  line-height: 1.35; min-height: 1.35em;
  padding: 2px 14px 0;
}
.dv-alert-warn { color: var(--grade-e); }
.dv-alert-mid  { color: #A67B0A; }
.dv-alert-good { color: var(--grade-a); }
.dv-alert-eco  { color: var(--teal); }
.dv-alert-label { color: var(--text); font-weight: 700; }
.dv-alert-issues { color: var(--grade-e); }

/* ── Stats row beneath each verdict card ── */
.dv-stats-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 8px;
  display: flex;
  align-items: center;
  box-shadow: var(--sh-sm);
}
.dv-stat {
  flex: 1;
  text-align: center;
}
.dv-stat-val {
  font-family: var(--font-d);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
}
.dv-stat-label {
  font-size: 0.55rem;
  color: var(--text-mut);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.dv-stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Add to Meal ─────────────────────────── */
.add-to-meal-wrap {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}
.add-to-meal-btn {
  flex: 1;
  background: #d4622a;
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  padding: 12px 18px;
  font-family: var(--font-b);
  font-size: 0.84rem; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s;
  box-shadow: 0 2px 10px rgba(180,80,31,0.25);
}
.add-to-meal-btn:hover { background: #b8501f; }
.remove-dish-btn {
  background: var(--bg-warm);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  color: var(--text-mut); font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.remove-dish-btn:hover { border-color: var(--grade-e); color: var(--grade-e); }

/* ── Meal breakdown ─────────────────────── */
.meal-break-wrap { margin: 10px 0; }
.meal-break-label {
  font-size: 0.68rem; color: var(--text-mut); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px;
}

/* ── Meal size badge ───────────────────── */
.meal-badge {
  display: inline-block;
  font-size: 0.62rem; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
  margin-right: 4px; vertical-align: middle;
  letter-spacing: 0.02em;
}
.meal-light      { background: #E8F5E9; color: #2E7D32; }
.meal-moderate   { background: #E3F2FD; color: #1565C0; }
.meal-substantial{ background: #FFF3E0; color: #E65100; }
.meal-large      { background: #FCE4EC; color: #B71C1C; }

/* ── Detail tabs ───────────────────────── */
.detail-tabs-wrap {
  margin-top: 8px;
}
.dtab-strip {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  position: relative;
}
.dtab {
  flex: 1;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: var(--r-md) var(--r-md) 0 0;
  padding: 10px 8px;
  font-family: var(--font-b);
  font-size: 0.72rem; font-weight: 600;
  color: var(--text-sec);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: all 0.2s;
}
.dtab.dtab-active {
  background: var(--bg-card);
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 -2px 8px rgba(58,125,52,0.08);
}
.dtab:hover:not(.dtab-active) { color: var(--teal); }
.dtab-badge {
  background: var(--bg-warm);
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-size: 0.6rem;
}
.dtab-close-btn {
  width: 34px;
  background: var(--bg-warm); border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: var(--r-md) var(--r-md) 0 0;
  color: var(--text-mut); font-size: 0.7rem;
  cursor: pointer; display: grid; place-items: center;
  transition: all 0.2s;
}
.dtab-close-btn:hover { color: var(--text); background: var(--border); }
.dtab-panel {
  display: none;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  padding: 14px 14px;
  box-shadow: var(--sh-sm);
}
.dtab-panel-active { display: block; }
.tp-meta {
  font-size: 0.65rem; color: var(--text-mut); font-weight: 500;
  margin-bottom: 10px;
}

/* ── Detail cards (collapsible) ────────── */
.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-sm);
  margin-top: 8px; overflow: hidden;
  transition: box-shadow 0.2s;
}
.detail-card:hover { box-shadow: var(--sh-md); }

.detail-toggle {
  width: 100%; background: var(--bg-card); border: none;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-family: var(--font-b);
  font-size: 0.84rem; font-weight: 600; cursor: pointer;
  transition: background 0.25s;
}
.detail-toggle:hover { background: var(--bg-warm); }
#nutriToggle.open  { background: linear-gradient(to right, var(--flame-soft), var(--bg-card)); }
#planetToggle.open { background: linear-gradient(to right, var(--teal-soft),  var(--bg-card)); }
.detail-toggle span:first-child {
  flex: 1; text-align: left;
  display: flex; align-items: center; gap: 10px;
}

.dt-icon-wrap {
  width: 30px; height: 30px;
  border-radius: 10px;
  display: inline-grid; place-items: center;
  font-size: 0.7rem; flex-shrink: 0;
  transition: background 0.25s, color 0.25s;
}
.dt-icon-nutri  { background: var(--flame-soft); color: var(--flame); }
.dt-icon-planet { background: var(--teal-soft); color: var(--teal); }
.dt-icon-ing    { background: var(--bg-warm); color: var(--earth); }

.detail-meta {
  font-size: 0.62rem; color: var(--text-mut);
  font-weight: 500; margin-right: 4px;
}
.detail-arrow {
  color: var(--text-mut); font-size: 0.68rem;
  transition: transform 0.35s var(--ease);
}
.detail-toggle.open .detail-arrow { transform: rotate(180deg); }
.detail-body {
  display: none; padding: 0 16px 16px;
  animation: slideDown 0.35s var(--ease);
}
.detail-body.open { display: block; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Nutrition rows ────────────────────── */
.n-rows { display: flex; flex-direction: column; gap: 0; }

.ns-bar-label {
  font-size: 0.65rem; font-weight: 600;
  color: var(--text-sec); margin-bottom: 4px;
}
.ns-bar { display: flex; gap: 3px; margin-bottom: 16px; }
.ns-item {
  flex: 1; text-align: center;
  padding: 6px 0; border-radius: 8px;
  font-size: 0.72rem; font-weight: 700;
  transition: all 0.3s var(--ease);
}
.ns-active {
  transform: scaleY(1.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nutri-section { margin-bottom: 6px; }
.nutri-section:last-of-type { margin-bottom: 0; }
.nutri-section-hdr {
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 8px 0 6px; display: flex; align-items: center; gap: 6px;
}
.nutri-section-hdr i { font-size: 0.62rem; }
.nutri-section-warn { color: var(--grade-e); }
.nutri-section-good { color: var(--grade-a); }

.nutri-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.nutri-item:last-child { border-bottom: none; }
.nutri-icon-wrap {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 0.72rem; flex-shrink: 0;
}
.nutri-alert .nutri-icon-wrap,
.nutri-high .nutri-icon-wrap   { background: #FDE8E6; color: var(--grade-e); }
.nutri-med .nutri-icon-wrap    { background: #FFF5DD; color: #A67B0A; }
.nutri-low .nutri-icon-wrap    { background: #E2F5E9; color: var(--grade-a); }
.nutri-great .nutri-icon-wrap,
.nutri-good .nutri-icon-wrap   { background: #E2F5E9; color: var(--grade-a); }
.nutri-some .nutri-icon-wrap   { background: var(--bg-warm); color: var(--text-mut); }

.nutri-detail { flex: 1; min-width: 0; }
.nutri-name { font-size: 0.82rem; font-weight: 600; color: var(--text); line-height: 1.2; }
.nutri-verdict { font-size: 0.7rem; font-weight: 500; line-height: 1.3; margin-top: 1px; }
.nutri-alert .nutri-verdict  { color: var(--grade-e); font-weight: 700; }
.nutri-high .nutri-verdict   { color: var(--grade-e); }
.nutri-med .nutri-verdict    { color: #A67B0A; }
.nutri-low .nutri-verdict    { color: var(--grade-a); }
.nutri-great .nutri-verdict  { color: var(--grade-a); }
.nutri-good .nutri-verdict   { color: var(--grade-a); }
.nutri-some .nutri-verdict   { color: var(--text-mut); }

.nutri-alert-icon { color: var(--grade-e); font-size: 0.6rem; }

.nutri-value { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nutri-val-num {
  font-size: 0.82rem; font-weight: 700; color: var(--text);
  text-align: right; min-width: 48px;
}
.nutri-val-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.dot-red    { background: var(--grade-e); }
.dot-amber  { background: var(--grade-c); }
.dot-green  { background: var(--grade-a); }
.dot-neutral { background: var(--border); }

.n-legend { margin-top: 12px; font-size: 0.58rem; color: var(--text-mut); font-weight: 400; line-height: 1.6; }

/* ── Planet metrics ────────────────────── */
.planet-grid { display: flex; flex-direction: column; }
.planet-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.planet-item:last-of-type { border-bottom: none; }
.planet-icon-wrap {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 0.72rem; flex-shrink: 0;
}
.planet-low .planet-icon-wrap  { background: var(--teal-soft); color: var(--teal); }
.planet-med .planet-icon-wrap  { background: #FFF5DD; color: #A67B0A; }
.planet-high .planet-icon-wrap { background: #FDE8E6; color: var(--grade-e); }

.planet-detail { flex: 1; min-width: 0; }
.planet-name { font-size: 0.82rem; font-weight: 600; color: var(--text); line-height: 1.2; }
.planet-measure {
  font-size: 0.68rem; font-weight: 500; line-height: 1.3;
  margin-top: 1px; color: var(--text-mut);
}
.planet-rating { font-size: 0.78rem; font-weight: 700; text-align: right; min-width: 48px; }
.planet-low .planet-rating  { color: var(--teal); }
.planet-med .planet-rating  { color: #A67B0A; }
.planet-high .planet-rating { color: var(--grade-e); }
.planet-explain {
  margin-top: 10px; font-size: 0.58rem; color: var(--text-mut);
  font-weight: 400; line-height: 1.55; text-align: center;
}

/* ── Ingredients list ──────────────────── */
.ing-list { display: flex; flex-direction: column; }
.ing-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid rgba(0,0,0,0.04);
  font-size: 0.8rem;
}
.ing-item:last-child { border-bottom: none; }
.ing-nm { color: var(--text-sec); flex: 1; min-width: 0; }
.ing-match {
  display: block; font-size: 0.68rem; color: var(--text-mut);
  font-style: italic; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ing-nomatch {
  display: inline-block; font-size: 0.55rem; font-weight: 700;
  color: var(--grade-e); background: #FDE8E6;
  padding: 2px 7px; border-radius: var(--r-full);
  margin-left: 6px; text-transform: uppercase; letter-spacing: 0.04em;
}
.ing-wt { color: var(--text-mut); font-weight: 600; font-size: 0.75rem; }

/* ── Compare — card-based ──────────────── */
.cmp-section { margin-top: 0; }

.cmp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px 16px;
  box-shadow: var(--sh-sm);
}
.cmp-card-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.cmp-card-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--sage-soft);
  color: var(--sage);
  display: grid; place-items: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.cmp-card-title {
  font-size: 0.86rem; font-weight: 600;
  color: var(--text); line-height: 1.2;
}
.cmp-card-sub {
  font-size: 0.68rem; color: var(--text-mut);
  font-weight: 400; margin-top: 1px;
}

.menu-alts { margin-bottom: 12px; }
.menu-alts-label {
  font-size: 0.68rem; color: var(--text-mut); font-weight: 600;
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em;
}
.menu-alts-cat-header {
  grid-column: 1 / -1;
  font-family: var(--font-d);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mut);
  padding: 8px 2px 2px;
}
.menu-alts-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.menu-alts-chip {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--r-full); padding: 8px 12px;
  font-family: var(--font-b); font-size: 0.74rem;
  color: var(--text-sec); cursor: pointer;
  transition: all 0.2s; text-align: center;
  box-shadow: var(--sh-sm);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.menu-alts-chip:hover { border-color: var(--teal); color: var(--teal); }
.menu-alts-chip:active { transform: scale(0.96); }
.menu-alts-chip.viewed {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-deep);
}
.menu-alts-chip.ordered {
  border-color: var(--teal-deep);
  background: var(--teal);
  color: #fff;
  font-weight: 600;
}

.cmp-row {
  display: flex; gap: 8px;
}
.cmp-input {
  flex: 1; border: 1.5px solid var(--border);
  border-radius: var(--r-full); padding: 10px 16px;
  font-family: var(--font-b); font-size: 0.82rem;
  color: var(--text); background: var(--bg);
  outline: none;
  transition: border-color 0.25s;
}
.cmp-input:focus { border-color: var(--teal); }
.cmp-input::placeholder { color: var(--text-mut); }
.cmp-go {
  background: var(--teal); color: #fff; border: none;
  border-radius: var(--r-full); padding: 10px 18px;
  font-family: var(--font-b); font-size: 0.82rem;
  font-weight: 600; cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.cmp-go:hover { background: var(--teal-deep); }

.cmp-result { margin-top: 12px; }
.cmp-hdr {
  font-family: var(--font-d); font-size: 0.95rem;
  font-weight: 400; margin-bottom: 10px;
}
.cmp-body { font-size: 0.82rem; line-height: 1.5; }

/* Extra bottom padding when pill is visible */
.results-body.has-meal-pill { padding-bottom: 148px; }

.meal-pill {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: #d4622a;
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  padding: 11px 22px;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-b); font-size: 0.84rem; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(180,80,31,0.45);
  z-index: 50;
  white-space: nowrap;
  transition: box-shadow 0.2s;
}
.meal-pill:hover { box-shadow: 0 6px 22px rgba(180,80,31,0.55); }
.meal-pill:active { transform: translateX(-50%) scale(0.97); }
.meal-pill-chevron { font-size: 0.7rem; opacity: 0.8; }

.meal-sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.38);
  z-index: 98;
  opacity: 0;
  transition: opacity 0.28s;
}
.meal-sheet-overlay.open { opacity: 1; }

.meal-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--bg-card);
  border-radius: 22px 22px 0 0;
  padding: 12px 20px calc(32px + env(safe-area-inset-bottom, 0px));
  z-index: 99;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 65vh;
  overflow-y: auto;
}
.meal-sheet.open { transform: translateY(0); }

.meal-sheet-handle {
  width: 38px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 18px;
}
.meal-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.meal-sheet-title {
  font-family: var(--font-d);
  font-size: 1.1rem; font-weight: 700;
  color: var(--text);
}
.meal-sheet-close {
  background: var(--bg-warm); border: none;
  border-radius: 50%; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sec); cursor: pointer; transition: background 0.15s;
}
.meal-sheet-close:hover { background: var(--border); }

.meal-sheet-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
  min-height: 36px;
}
.meal-sheet-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--teal-soft);
  border: 1.5px solid var(--teal);
  border-radius: var(--r-full);
  padding: 6px 10px 6px 14px;
  font-family: var(--font-b);
  font-size: 0.8rem; color: var(--teal-deep); font-weight: 500;
}
.meal-sheet-chip-remove {
  background: none; border: none;
  color: var(--teal); font-size: 1rem; line-height: 1;
  cursor: pointer; padding: 0 2px;
  opacity: 0.6; transition: opacity 0.15s, color 0.15s;
  display: flex; align-items: center;
}
.meal-sheet-chip-remove:hover { opacity: 1; color: var(--grade-e); }

/* Meal sheet auto-totals */
.ms-totals {
  border-top: 1.5px solid var(--border);
  padding-top: 16px;
  margin-top: 4px;
}
.ms-grades {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.ms-grade-item {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-b); font-size: 0.8rem; color: var(--text-sec);
}
.ms-grade-badge {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem; font-weight: 800; color: #fff;
}
.ms-ga { background: var(--grade-a); }
.ms-gb { background: var(--grade-b); }
.ms-gc { background: var(--grade-c); }
.ms-gd { background: var(--grade-d); }
.ms-ge { background: var(--grade-e); }
.ms-grade-div {
  width: 1px; height: 24px;
  background: var(--border);
  margin: 0 4px;
}
.ms-stats {
  font-family: var(--font-b);
  font-size: 0.82rem; color: var(--text-sec);
  margin-bottom: 14px;
  line-height: 1.5;
}
.ms-full-link {
  background: none; border: none;
  color: var(--teal); font-family: var(--font-b);
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
}
.ms-full-link:hover { color: var(--teal-deep); }

/* ── Responsive ────────────────────────── */
@media (max-width: 380px) {
  .hero-content h1 { font-size: 2.2rem; }
  .food-circ { width: 48px; height: 48px; }
  .action-card { padding: 14px 10px 12px; }
  .action-card-icon { width: 38px; height: 38px; }
  .action-card-title { font-size: 0.72rem; }
  .example-card { width: 115px; }
  .dv-stat-val { font-size: 0.9rem; }
  .dv-stats-row { padding: 10px 6px; }
  .dv-grade-bar { margin: 0 8px 8px; }
  .dv-header { padding: 12px 10px 8px; }
  .cmp-card { padding: 14px 12px; }
}

/* ══════════════════════════════════════════════
   EXPLORE DISHES SCREEN
   ══════════════════════════════════════════════ */

.explore-header {
  background: linear-gradient(155deg, var(--teal) 0%, var(--teal-deep) 100%);
  padding: 52px 22px 24px;
  position: relative;
  flex-shrink: 0;
}
.explore-back {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(255,255,255,0.15); border: none;
  border-radius: 50%; width: 36px; height: 36px;
  color: #fff; cursor: pointer; font-size: 0.9rem;
  display: grid; place-items: center;
  transition: background 0.2s;
}
.explore-back:hover { background: rgba(255,255,255,0.25); }
.explore-title {
  font-family: var(--font-d); font-size: 1.5rem;
  color: #fff; text-align: center;
}
.explore-sub {
  font-size: 0.72rem; color: rgba(255,255,255,0.7);
  text-align: center; margin-top: 4px;
}

.explore-body {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
}

.explore-filters {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.explore-filter-chip {
  background: var(--bg-warm); border: 1.5px solid var(--border);
  border-radius: var(--r-full); padding: 5px 12px;
  font-family: var(--font-b); font-size: 0.73rem;
  font-weight: 500; color: var(--text-sec);
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.explore-filter-chip.active {
  background: var(--teal); border-color: var(--teal); color: #fff;
}
.explore-filter-chip:hover:not(.active) { border-color: var(--teal); color: var(--teal); }

.explore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 14px 14px 160px;
}
.explore-card {
  background: var(--bg-card); border: none;
  border-radius: var(--r-md); overflow: hidden;
  cursor: pointer; text-align: left;
  box-shadow: var(--sh-sm);
  transition: transform 0.18s, box-shadow 0.18s;
}
.explore-card:active { transform: scale(0.97); box-shadow: none; }
.explore-card-img {
  width: 100%; aspect-ratio: 4 / 3;
  background-size: cover; background-position: center;
  background-color: var(--bg-warm);
  position: relative;
}
.explore-viewed-badge {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal); color: #fff;
  font-size: 0.6rem;
  display: grid; place-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.explore-card-body { padding: 8px 10px 10px; }
.explore-card-name {
  font-family: var(--font-b); font-size: 0.78rem;
  font-weight: 600; color: var(--text); line-height: 1.3;
}
.explore-card.explored .explore-card-name { color: var(--teal); }

/* ── Explore: select circle on cards ────── */
.explore-sel-circle {
  position: absolute; top: 7px; right: 7px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: 2px solid rgba(255,255,255,0.6);
  color: transparent;
  font-size: 0.65rem;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 0.18s;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.explore-sel-circle.sel-on {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.explore-card.sel {
  outline: 2.5px solid var(--teal);
  outline-offset: -2px;
}
.explore-card.sel .explore-card-name { color: var(--teal); }

/* ── Explore: analyse bar ────────────────── */
.explore-analyse-bar {
  position: fixed;
  bottom: 76px;
  left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 444px;
  display: flex; align-items: center; justify-content: space-between;
  background: #d4622a;
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: var(--sh-lg);
  z-index: 300;
  animation: fadeUp 0.25s var(--ease);
}
.explore-analyse-label {
  font-family: var(--font-b); font-size: 0.85rem;
  font-weight: 600; color: #fff;
}
.explore-analyse-btn {
  background: #fff; border: none;
  border-radius: var(--r-full);
  padding: 8px 18px;
  font-family: var(--font-b); font-size: 0.82rem;
  font-weight: 700; color: #d4622a;
  cursor: pointer; display: flex; align-items: center; gap: 7px;
  transition: opacity 0.2s;
}
.explore-analyse-btn:active { opacity: 0.8; }