/* ===== Is It Vegan — lush green design (mobile-first) ===== */
:root {
  --green-50:  #ecfdf5;
  --green-100: #d1fae5;
  --green-200: #a7f3d0;
  --green-300: #6ee7b7;
  --green-400: #34d399;
  --green-500: #10b981;
  --green-600: #059669;
  --green-700: #047857;
  --green-800: #065f46;
  --green-900: #064e3b;

  --leaf:      #22c55e;
  --lime:      #84cc16;
  --mint:      #6ee7b7;
  --moss:      #4d7c0f;

  --ink:       #0b1f17;
  --ink-soft:  #1e3a30;
  --muted:     #4b6358;
  --line:      #d1fae5;
  --bg:        #f6fef9;
  --bg-soft:   #ecfdf5;
  --bg-tint:   #e6fbf0;

  --warn:      #f59e0b;
  --danger:    #ef4444;

  --shadow-sm: 0 1px 2px rgba(6,95,70,.08), 0 1px 3px rgba(6,95,70,.05);
  --shadow:    0 4px 14px rgba(6,95,70,.10), 0 2px 6px rgba(6,95,70,.06);
  --shadow-lg: 0 25px 50px -12px rgba(6,95,70,.25);
  --shadow-glow: 0 0 0 6px rgba(16,185,129,.18);

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --grad-green: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  --grad-leaf:  linear-gradient(135deg, #34d399 0%, #10b981 50%, #84cc16 100%);
  --grad-soft:  linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  --grad-deep:  linear-gradient(160deg, #064e3b 0%, #047857 60%, #10b981 100%);

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* App is light-themed only — never inherit the OS dark scheme on
     form controls (which renders typed text white-on-white). */
  color-scheme: light;
}

/* Force inputs to use our dark ink colour and a light field background
   so the text is always readable, even when the OS is in dark mode. */
input, textarea, select {
  color: var(--ink);
  background-color: white;
  caret-color: var(--ink);
}

body {
  min-height: 100vh; min-height: 100dvh;
  background-image:
    radial-gradient(circle at 0% 0%, rgba(16,185,129,.08), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(132,204,22,.06), transparent 60%);
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, button, textarea { font-family: inherit; font-size: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.grad {
  background: var(--grad-leaf);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== Lang switcher (floating) ===== */
.lang-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.lang-pick {
  padding: 10px 18px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: white;
  font-weight: 600;
  transition: all .2s;
}
.lang-pick.active {
  background: var(--grad-soft);
  border-color: var(--green-500);
  color: var(--green-800);
}

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-weight: 600;
  transition: all .2s ease;
  white-space: nowrap;
  text-decoration: none;
  min-height: 44px;
}
.btn-primary {
  background: var(--grad-green);
  color: white;
  box-shadow: 0 6px 20px -6px rgba(16,185,129,.6);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -6px rgba(16,185,129,.7); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  background: white;
  color: var(--green-700);
  border: 2px solid var(--green-500);
}
.btn-outline:hover { background: var(--green-50); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--green-50); color: var(--green-700); }
.btn-lg { padding: 14px 26px; font-size: 17px; min-height: 52px; }
.btn-sm { padding: 6px 12px; font-size: 13px; min-height: 36px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* === Brand === */
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 22px;
}
.brand-sm { font-size: 18px; }
.logo {
  font-size: 28px;
  filter: drop-shadow(0 2px 8px rgba(16,185,129,.5));
  display: inline-block;
  animation: leafSway 4s ease-in-out infinite;
}
@keyframes leafSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
.brand-sm .logo { font-size: 22px; }
.brand-text { letter-spacing: -0.02em; color: var(--ink); }
.brand-dot { color: var(--green-500); }

/* === Toasts === */
#toast-container {
  position: fixed; top: max(60px, env(safe-area-inset-top)); right: 12px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  max-width: calc(100vw - 24px);
}
.toast {
  background: white;
  border-left: 4px solid var(--green-500);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  animation: slideIn .25s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.error { border-color: var(--danger); }
.toast.warn { border-color: var(--warn); }
@keyframes slideIn { from { transform: translateX(110%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================================
   LANDING PAGE
   ============================================ */
.hero-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(16px, 5vw, 60px);
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,254,249,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--green-100);
}
.hero-links {
  display: flex; align-items: center; gap: 22px;
}
.hero-links a {
  color: var(--ink-soft); text-decoration: none; font-weight: 500;
  transition: color .2s;
}
.hero-links a:hover { color: var(--green-700); }

.hero {
  padding: clamp(36px, 6vw, 80px) clamp(20px, 5vw, 60px);
  background: var(--grad-soft);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 75%, rgba(16,185,129,.32), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(132,204,22,.28), transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(110,231,183,.18), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '🌿'; position: absolute;
  top: 20%; right: 5%; font-size: 80px;
  opacity: .12;
  transform: rotate(15deg);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px;
  align-items: center; position: relative;
  max-width: 1280px; margin: 0 auto;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: white; border: 1px solid var(--green-300);
  color: var(--green-800); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.hero-copy h1 {
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 18px 0 18px;
  color: var(--ink);
}
.hero-sub {
  font-size: clamp(15px, 1.4vw, 19px);
  color: var(--ink-soft); line-height: 1.6;
  max-width: 560px;
  margin: 0 0 32px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  margin-top: 44px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: 520px;
}
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats strong {
  font-size: clamp(22px, 2.5vw, 32px); font-weight: 800;
  background: var(--grad-leaf);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stats span { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Phone mockup */
.hero-visual {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  min-height: 580px;
}
.phone-mock {
  width: 280px; height: 560px;
  background: var(--grad-deep);
  border-radius: 44px;
  padding: 14px;
  box-shadow: var(--shadow-lg), 0 0 0 4px var(--green-800), 0 0 60px rgba(16,185,129,.4);
  position: relative;
  transform: rotate(-3deg);
}
.phone-notch {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px;
  background: var(--green-900); border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone-screen {
  height: 100%; border-radius: 32px;
  background: var(--grad-soft);
  padding: 36px 16px 16px;
  display: flex; flex-direction: column; gap: 12px;
  overflow: hidden;
}
.phone-status {
  display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 600; color: var(--ink);
}
.phone-card {
  background: white;
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--green-100);
}
.phone-card-result { text-align: center; padding: 20px 16px; }
.phone-emoji { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.phone-card h3 { margin: 6px 0 2px; font-size: 16px; }
.phone-brand { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.phone-macros {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 10px;
}
.phone-macros > div {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 11px; color: var(--muted);
  background: var(--green-50); border-radius: 8px; padding: 6px;
}
.phone-macros strong { color: var(--green-700); font-size: 14px; }
.phone-card-mini {
  font-size: 13px; font-weight: 600; color: var(--green-700);
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
}

.verdict-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .05em;
}
.verdict-badge.yes { background: var(--green-100); color: var(--green-800); }
.verdict-badge.no { background: #fee2e2; color: #991b1b; }
.verdict-badge.maybe { background: #fef3c7; color: #92400e; }
.verdict-badge.unknown { background: #d1fae5; color: var(--green-800); }

.floating-card {
  position: absolute; background: white;
  padding: 10px 16px; border-radius: 14px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg); border: 1px solid var(--green-200);
  animation: float 3s ease-in-out infinite;
}
.floating-card.f1 { top: 60px; left: 0; animation-delay: 0s; }
.floating-card.f2 { bottom: 100px; left: 20px; animation-delay: 1s; color: var(--green-700); }
.floating-card.f3 { top: 200px; right: 0; animation-delay: 2s; color: var(--green-700); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Sections */
.features-section, .pricing-section, .community-section {
  padding: clamp(60px, 8vw, 120px) clamp(20px, 5vw, 60px);
  max-width: 1280px; margin: 0 auto;
}
.features-section h2, .pricing-section h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800; letter-spacing: -0.02em;
  text-align: center; margin: 0 0 12px;
}
.section-sub {
  text-align: center; color: var(--muted);
  max-width: 600px; margin: 0 auto 60px;
  font-size: 17px; line-height: 1.6;
}
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: white;
  border: 1px solid var(--green-100);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  transition: all .3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--green-400);
  box-shadow: var(--shadow);
}
.feat-icon {
  font-size: 40px; margin-bottom: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  background: var(--grad-soft);
  border-radius: 18px;
  border: 1px solid var(--green-200);
}
.feature-card h3 { margin: 12px 0 8px; font-size: 20px; font-weight: 700; }
.feature-card p { color: var(--ink-soft); line-height: 1.6; margin: 0; }
.premium-feature .premium-tag {
  position: absolute; top: 16px; right: 16px;
  background: var(--grad-green);
  color: white;
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  padding: 3px 10px; border-radius: 999px;
}

/* Pricing */
.pricing-section {
  background: linear-gradient(180deg, var(--bg-tint), var(--bg-soft));
  border-radius: var(--radius-xl);
  margin-top: 40px;
}
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; max-width: 800px; margin: 0 auto;
}
.price-card {
  background: white; border-radius: var(--radius-lg);
  padding: 36px 32px;
  border: 2px solid var(--green-100);
  position: relative;
  transition: all .3s ease;
}
.price-card:hover { transform: translateY(-2px); }
.price-card-popular {
  border-color: var(--green-500);
  box-shadow: 0 20px 60px -20px rgba(16,185,129,.5);
  transform: scale(1.02);
}
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad-green); color: white;
  font-size: 11px; font-weight: 800; letter-spacing: .1em;
  padding: 6px 16px; border-radius: 999px;
}
.price-header { margin-bottom: 24px; }
.price-header h3 { margin: 0 0 8px; font-size: 22px; }
.price {
  font-size: 48px; font-weight: 800;
  background: var(--grad-leaf);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.price span { font-size: 16px; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 0 0 24px; }
.price-card li {
  padding: 8px 0; color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px;
  font-size: 15px;
}
.price-card li:has(.muted) { color: var(--muted); }

/* Community */
.cta-banner {
  background: var(--grad-deep);
  border-radius: var(--radius-xl);
  padding: 48px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  color: white;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '🌿🌱🍃'; position: absolute;
  top: -10px; right: -10px; font-size: 100px;
  opacity: .08;
  letter-spacing: 20px;
  pointer-events: none;
}
.cta-banner h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 32px); font-weight: 800; }
.cta-banner p { margin: 0; opacity: .92; font-size: 17px; }
.cta-banner .btn-primary { background: white; color: var(--green-700); }
.cta-banner .btn-primary:hover { background: var(--green-50); }

.footer {
  margin-top: 60px; padding-top: 32px;
  border-top: 1px solid var(--green-100);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}

/* ============================================
   AUTH
   ============================================ */
#auth {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-soft);
  padding: 24px;
  position: relative;
}
#auth::before {
  content: '🌱'; position: absolute;
  top: 10%; left: 10%; font-size: 120px;
  opacity: .08;
  pointer-events: none;
}
#auth::after {
  content: '🌿'; position: absolute;
  bottom: 10%; right: 10%; font-size: 100px;
  opacity: .08;
  pointer-events: none;
}
.auth-wrap {
  width: 100%; max-width: 460px;
  position: relative;
  z-index: 1;
}
.auth-back {
  position: absolute; top: -50px; left: 0;
  color: var(--ink-soft); font-weight: 500;
}
.auth-back:hover { color: var(--green-700); }
.auth-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--green-200);
}
.auth-brand { justify-content: center; margin-bottom: 20px; }
.tabs {
  display: flex; background: var(--bg-soft);
  border-radius: 12px; padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--green-100);
}
.tab {
  flex: 1; padding: 10px; border-radius: 8px;
  font-weight: 600; color: var(--muted);
  transition: all .2s;
  min-height: 40px;
}
.tab.active { background: white; color: var(--green-800); box-shadow: var(--shadow-sm); }
.auth-form h2 {
  font-size: 24px; margin: 0 0 24px;
  text-align: center;
}
.auth-form label {
  display: block; margin-bottom: 14px;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
}
.auth-form input {
  width: 100%; margin-top: 6px;
  padding: 12px 14px;
  border: 2px solid var(--green-100);
  border-radius: 12px;
  font-size: 16px;
  transition: all .2s;
  background: white;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--green-500);
  background: var(--green-50);
}
.auth-form .btn { margin-top: 8px; }
.auth-error {
  color: var(--danger); font-size: 14px;
  margin: 12px 0 0; text-align: center; min-height: 20px;
}
.auth-meta {
  text-align: center; color: var(--muted);
  font-size: 12px; margin: 20px 0 0;
}

/* ============================================
   APP
   ============================================ */
#app {
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg);
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246,254,249,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--green-100);
  padding: 12px clamp(14px, 4vw, 32px);
  display: flex; justify-content: space-between; align-items: center;
  padding-top: max(12px, env(safe-area-inset-top));
}
.header-right {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px;
}
.plan-badge {
  background: var(--green-100); color: var(--green-800);
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  padding: 4px 10px; border-radius: 999px;
  white-space: nowrap;
}
.plan-badge.premium {
  background: var(--grad-green); color: white;
}

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--green-200);
  display: flex; justify-content: space-around;
  padding: 6px 4px max(8px, env(safe-area-inset-bottom)) 4px;
  z-index: 40;
  box-shadow: 0 -4px 20px rgba(6,95,70,.06);
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; color: var(--muted);
  font-weight: 600; font-size: 11px;
  transition: color .2s;
  max-width: 80px;
  min-height: 50px;
}
.nav-btn span { font-size: 22px; transition: transform .2s; }
.nav-btn label { font-size: 10px; cursor: pointer; }
.nav-btn.active { color: var(--green-700); }
.nav-btn.active span { transform: scale(1.18); filter: drop-shadow(0 2px 6px rgba(16,185,129,.5)); }

.tab-content {
  display: none;
  padding: 20px clamp(14px, 4vw, 32px);
  max-width: 900px; margin: 0 auto;
}
.tab-content.active { display: block; animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-h { font-size: clamp(24px, 5vw, 32px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.page-sub { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.section-h {
  font-size: 18px; font-weight: 700;
  margin: 28px 0 14px;
  color: var(--ink);
}

/* === Dashboard === */
.dash-hero h1 { font-size: clamp(22px, 4.5vw, 28px); margin: 0 0 4px; font-weight: 800; }
.dash-sub { color: var(--muted); margin: 0 0 20px; }

.ring-card {
  background: linear-gradient(180deg, white, var(--bg-soft));
  border-radius: var(--radius-xl);
  padding: 28px; text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--green-200);
  position: relative;
  margin-bottom: 16px;
}
.cal-ring { width: 200px; height: 200px; transform: rotate(-90deg); max-width: 100%; }
.ring-bg, .ring-fg {
  fill: none; stroke-width: 14;
  stroke-linecap: round;
}
.ring-bg { stroke: var(--green-100); }
.ring-fg {
  stroke: var(--green-500);
  stroke-dasharray: 534;
  stroke-dashoffset: 534;
  transition: stroke-dashoffset .8s ease;
  filter: drop-shadow(0 2px 6px rgba(16,185,129,.4));
}
.ring-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
}
.ring-center strong {
  font-size: 42px; font-weight: 800;
  background: var(--grad-leaf);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ring-center span { color: var(--muted); font-size: 13px; }

.macro-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.macro-card {
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  border: 1px solid var(--green-100);
}
.macro-card span { color: var(--muted); font-size: 12px; display: block; margin-bottom: 4px; }
.macro-card strong { font-size: clamp(18px, 4.5vw, 22px); color: var(--green-700); font-weight: 800; }

/* === Steps card === */
.steps-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 12px;
  border: 1px solid var(--green-200);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
}
.steps-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; flex-wrap: wrap;
}
.steps-title { display: flex; align-items: center; gap: 12px; }
.steps-emoji {
  font-size: 26px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--green-100);
}
.steps-title strong { display: block; font-weight: 700; color: var(--green-800, #166534); }
.steps-title small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.steps-count { text-align: right; }
.steps-count strong {
  display: block;
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 800;
  background: var(--grad-leaf);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.steps-count span { color: var(--muted); font-size: 12px; }
.steps-bar {
  height: 10px;
  background: var(--green-100);
  border-radius: 999px;
  overflow: hidden;
}
.steps-bar-fg {
  height: 100%;
  width: 0%;
  background: var(--grad-leaf, linear-gradient(90deg, #34d399, #10b981));
  border-radius: 999px;
  transition: width .6s ease;
}
.steps-actions {
  display: flex; gap: 8px;
}
.steps-actions input {
  flex: 1;
  border: 1px solid var(--green-200);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 15px;
  background: var(--bg-soft);
  outline: none;
  transition: border-color .2s;
}
.steps-actions input:focus { border-color: var(--green-500); background: white; }
.steps-actions .btn { white-space: nowrap; }

/* === GPS auto-tracking tab (compact) === */
.gps-tab {
  background: rgba(16,185,129,.05);
  border: 1px solid var(--green-100, #d1fae5);
  border-radius: 999px;
  padding: 0;
  margin-top: 4px;
  overflow: hidden;
  transition: border-radius .15s, background .15s;
}
.gps-tab[open] {
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(16,185,129,.08), rgba(52,211,153,.04));
}
.gps-tab.is-active {
  border-color: var(--green-200, #a7f3d0);
}
.gps-tab-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted);
}
.gps-tab-summary::-webkit-details-marker { display: none; }
.gps-tab-title {
  font-weight: 600;
  color: var(--green-800, #166534);
  letter-spacing: .02em;
}
.gps-tab-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 12px;
  color: var(--green-800, #166534);
}
.gps-tab-meta strong {
  font-weight: 700;
  font-size: 13px;
}
.gps-tab-sep { opacity: .5; }
.gps-tab-caret {
  font-size: 10px;
  opacity: .55;
  transition: transform .2s;
  margin-left: 2px;
}
.gps-tab[open] .gps-tab-caret { transform: rotate(180deg); }

.gps-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  display: inline-block;
  flex-shrink: 0;
  transition: background .2s;
}
.gps-tab.is-active .gps-dot {
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16,185,129,.55);
  animation: gpsPulse 1.6s infinite;
}
@keyframes gpsPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.gps-tab-body {
  padding: 0 12px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.gps-status {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}
.gps-status.is-error { color: #b91c1c; }
.gps-status.is-active { color: var(--green-700, #15803d); }
.gps-toggle-btn {
  background: transparent;
  border: 1px solid var(--green-200, #a7f3d0);
  color: var(--green-700, #15803d);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.gps-toggle-btn:hover {
  background: var(--green-100, #d1fae5);
}
.gps-tab.is-active .gps-toggle-btn {
  border-color: #fecaca;
  color: #b91c1c;
}
.gps-tab.is-active .gps-toggle-btn:hover {
  background: #fee2e2;
}

.steps-manual {
  border-top: 1px solid var(--green-100, #d1fae5);
  padding-top: 10px;
}

/* On desktop the steps card is read-only — no GPS, no manual input. */
html.is-desktop .gps-tab,
html.is-desktop .steps-manual { display: none; }
.steps-manual > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  list-style: none;
  user-select: none;
  padding: 4px 0;
}
.steps-manual > summary::-webkit-details-marker { display: none; }
.steps-manual > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 6px;
  transition: transform .2s;
}
.steps-manual[open] > summary::before { transform: rotate(90deg); }
.steps-manual[open] > summary { margin-bottom: 8px; }
@media (max-width: 480px) {
  .gps-tab-summary { font-size: 11.5px; padding: 6px 10px; }
  .gps-tab-meta strong { font-size: 12px; }
  .gps-tab-body { padding: 0 10px 10px; }
  .gps-toggle-btn { width: 100%; text-align: center; }
}

.log-list {
  display: flex; flex-direction: column; gap: 10px;
}
.log-item {
  background: white;
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--green-100);
  transition: all .2s;
}
.log-item:hover { border-color: var(--green-400); transform: translateX(2px); }
.log-info strong { display: block; font-weight: 700; }
.log-info span { color: var(--muted); font-size: 12px; }
.log-cal {
  font-weight: 700; color: var(--green-700);
}
.log-delete {
  margin-left: 12px; color: var(--danger); font-size: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.log-delete:hover { background: #fee2e2; }
.log-empty {
  text-align: center; padding: 32px;
  color: var(--muted); font-size: 14px;
  background: white; border-radius: var(--radius);
  border: 2px dashed var(--green-300);
}

.impact-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (min-width: 640px) {
  .impact-grid { grid-template-columns: repeat(4, 1fr); }
}
.impact-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px 12px; text-align: center;
  border: 1px solid var(--green-100);
}
.impact-emoji { font-size: 28px; margin-bottom: 6px; }
.impact-card strong {
  display: block; font-size: clamp(18px, 4.5vw, 22px); font-weight: 800;
  color: var(--green-700); margin-bottom: 2px;
}
.impact-card span { color: var(--muted); font-size: 12px; }

/* === Scan === */
.scan-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--green-200);
  margin-bottom: 20px;
}
.scan-tabs {
  display: flex; background: var(--bg-soft);
  border-radius: 10px; padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--green-100);
}
.scan-tab {
  flex: 1; padding: 10px 6px; border-radius: 8px;
  font-weight: 600; color: var(--muted);
  transition: all .2s;
  min-height: 40px;
  font-size: 14px;
}
.scan-tab.active { background: white; color: var(--green-800); box-shadow: var(--shadow-sm); }

.scan-input-wrap {
  display: flex; gap: 8px; margin-bottom: 12px;
  flex-wrap: wrap;
}
.scan-input-wrap input {
  flex: 1; min-width: 0;
  padding: 14px 16px;
  border: 2px solid var(--green-100);
  border-radius: 12px;
  font-size: 16px;
  transition: all .2s;
  background: var(--bg-soft);
}
.scan-input-wrap input:focus {
  outline: none; border-color: var(--green-500);
  background: white;
}
.scan-tips {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 13px; color: var(--muted);
}
.chip {
  background: var(--green-50);
  color: var(--green-800);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--green-200);
  transition: all .2s;
  min-height: 32px;
}
.chip:hover { background: var(--green-100); }

/* Camera scan */
.camera-panel { flex-direction: column; gap: 12px; }
.camera-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--green-900);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--green-200);
}
.camera-stage video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.camera-stage:not(.active) video { display: none; }
.camera-stage:not(.active)::after {
  content: '📷'; font-size: 64px;
  filter: grayscale(.4);
  opacity: .4;
}
.camera-frame {
  position: absolute;
  inset: 20% 12%;
  border: 3px solid rgba(16,185,129,.9);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.35);
  pointer-events: none;
  display: none;
}
.camera-stage.active .camera-frame { display: block; animation: pulseFrame 1.6s ease-in-out infinite; }
@keyframes pulseFrame {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(0,0,0,.35), 0 0 0 0 rgba(16,185,129,.6); }
  50% { box-shadow: 0 0 0 9999px rgba(0,0,0,.35), 0 0 0 8px rgba(16,185,129,0); }
}
.camera-hint {
  position: absolute;
  bottom: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.65);
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  display: none;
}
.camera-stage.active .camera-hint { display: block; }
.camera-actions {
  display: flex; gap: 8px;
  width: 100%;
}
.camera-actions .btn { flex: 1; }
.camera-note {
  font-size: 12px;
  text-align: center;
  margin: 4px 0 0;
}

.scan-result-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--green-100);
  box-shadow: var(--shadow);
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 20px;
  animation: fadeIn .3s;
}
.scan-result-card.yes { border-left: 6px solid var(--green-500); }
.scan-result-card.no { border-left: 6px solid var(--danger); }
.scan-result-card.maybe { border-left: 6px solid var(--warn); }
.scan-result-card.unknown { border-left: 6px solid var(--muted); }
.scan-product-image {
  width: 100px; height: 100px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--green-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  flex-shrink: 0;
}
.scan-result-info h3 { margin: 0 0 4px; font-size: clamp(18px, 4.5vw, 22px); }
.scan-result-info .brand { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.scan-reason { color: var(--ink-soft); margin: 8px 0 14px; font-size: 14px; line-height: 1.5; }
.scan-macros {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin: 14px 0;
}
.scan-macros > div {
  background: var(--green-50);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
}
.scan-macros strong { display: block; color: var(--green-800); font-weight: 800; font-size: 16px; }
.scan-macros span { color: var(--muted); font-size: 10px; }
.scan-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.scan-actions .btn { flex: 1; min-width: 140px; }

/* ---------- Quantity input on scan result ---------- */
.scan-qty {
  margin-top: 14px;
  padding: 14px;
  background: var(--green-50);
  border: 1px dashed var(--green-200, #bbf7d0);
  border-radius: 12px;
}
.scan-qty-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--green-800);
}
.scan-qty-hint {
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
}
.scan-qty-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.scan-qty-row .qty-step {
  width: 38px;
  border-radius: 10px;
  border: 1px solid var(--green-200, #bbf7d0);
  background: white;
  color: var(--green-800);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.scan-qty-row .qty-step:hover { background: var(--green-100); }
.scan-qty-row .qty-step:active { transform: scale(.96); }
.scan-qty-row #qty-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--green-200, #bbf7d0);
  background: white;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #14532d);
  text-align: center;
  -moz-appearance: textfield;
}
.scan-qty-row #qty-input::-webkit-outer-spin-button,
.scan-qty-row #qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.scan-qty-row .qty-unit {
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-weight: 700;
  color: var(--green-800);
}
.qty-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.qty-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--green-200, #bbf7d0);
  background: white;
  color: var(--green-800);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.qty-chip:hover { background: var(--green-100); }
.qty-chip.active {
  background: var(--green-500);
  border-color: var(--green-500);
  color: white;
}
.scan-qty-total {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
}
.scan-qty-total strong { color: var(--green-800); font-weight: 800; }
.scan-qty-total .qty-total-label { color: var(--muted); }

.search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.search-card {
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--green-100);
  cursor: pointer;
  transition: all .2s;
}
.search-card:hover { transform: translateY(-2px); border-color: var(--green-400); box-shadow: var(--shadow); }
.search-card-title { font-weight: 700; margin: 4px 0; }
.search-card-brand { color: var(--muted); font-size: 12px; margin-bottom: 8px; }

/* === Recipes === */
.recipe-toolbar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.recipe-toolbar .btn { width: 100%; }
@media (min-width: 640px) {
  .recipe-toolbar .btn { flex: 1 1 240px; width: auto; }
}

/* Goal categories */
.goal-tabs {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 6px; margin-bottom: 12px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.goal-tab {
  display: inline-flex; align-items: center; gap: 8px;
  background: white;
  border: 1.5px solid var(--green-200);
  color: var(--ink-soft);
  font-weight: 600; font-size: 14px;
  padding: 10px 16px; border-radius: 999px;
  white-space: nowrap;
  transition: all .2s;
  min-height: 40px;
  flex-shrink: 0;
}
.goal-tab .goal-emoji { font-size: 18px; line-height: 1; }
.goal-tab.active {
  background: var(--grad-green); color: white;
  border-color: transparent;
  box-shadow: 0 6px 16px -6px rgba(16,185,129,.65);
}
.goal-tab:hover:not(.active) {
  background: var(--green-50); border-color: var(--green-400);
}

/* Search */
.recipe-search {
  position: relative;
  margin-bottom: 14px;
}
.recipe-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 16px; opacity: .6; pointer-events: none;
}
.recipe-search input {
  width: 100%;
  padding: 14px 44px 14px 42px;
  border: 2px solid var(--green-100);
  border-radius: 14px;
  font-size: 15px;
  background: white;
  color: var(--ink);
  transition: all .2s;
}
.recipe-search input:focus {
  outline: none; border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(16,185,129,.12);
}
.recipe-search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green-800);
  font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--green-200);
}
.recipe-search-clear:hover { background: var(--green-100); }

/* Goal badge on recipe cards */
.goal-badge {
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px;
  text-transform: uppercase;
}
.goal-badge.goal-lose {
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  color: #78350f;
}
.goal-badge.goal-maintain {
  background: var(--green-100);
  color: var(--green-800);
  border: 1px solid var(--green-200);
}
.goal-badge.goal-gain {
  background: linear-gradient(135deg, #c4b5fd, #7c3aed);
  color: white;
}

.ai-badge {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  padding: 4px 10px; border-radius: 999px;
  z-index: 2;
  box-shadow: 0 4px 10px -4px rgba(99,102,241,.6);
}

/* Gemini panels */
.gemini-panel {
  background: linear-gradient(180deg, #fafdff 0%, #eef2ff 100%);
  border: 1.5px solid #c7d2fe;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  position: relative;
  box-shadow: 0 8px 24px -12px rgba(99,102,241,.25);
}
.gemini-header {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 14px;
}
.gemini-icon {
  font-size: 26px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gemini-header > div { flex: 1; min-width: 0; }
.gemini-header strong { display: block; font-size: 15px; color: #1e1b4b; }
.gemini-header small { display: block; color: #4338ca; font-size: 12px; margin-top: 2px; }
.gemini-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: white; border: 1px solid #c7d2fe;
  color: #4338ca; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gemini-close:hover { background: #eef2ff; }

.gemini-row, .ing-row {
  display: flex; gap: 8px; align-items: stretch;
  margin-bottom: 10px;
}
.gemini-row input, .ing-row input {
  flex: 1; min-width: 0;
  padding: 12px 14px;
  border: 2px solid #c7d2fe;
  border-radius: 12px;
  font-size: 15px;
  background: white; color: var(--ink);
}
.gemini-row input:focus, .ing-row input:focus {
  outline: none; border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99,102,241,.15);
}
.gemini-row .btn, .ing-row .btn { flex-shrink: 0; }

.gemini-hint { font-size: 12px; margin: 6px 0 10px; }

.gemini-results { margin-top: 10px; }
.gemini-results-meta {
  background: white; border: 1px solid #c7d2fe;
  color: #4338ca; font-weight: 600; font-size: 13px;
  padding: 8px 12px; border-radius: 10px;
}
.gemini-error {
  background: #fef2f2; border: 1px solid #fecaca;
  color: #991b1b; padding: 10px 12px; border-radius: 10px;
  font-size: 13px;
}
.gemini-loading {
  background: white; border: 1px solid #c7d2fe;
  color: #4338ca; padding: 10px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
}

/* Ingredient pills */
.ing-list {
  display: flex; flex-wrap: wrap; gap: 6px;
  min-height: 36px;
  padding: 8px;
  background: white;
  border: 1.5px dashed #c7d2fe;
  border-radius: 12px;
  margin-bottom: 10px;
}
.ing-list:empty::before {
  content: '🥕 + 🥦 + 🍅 …';
  color: #94a3b8; font-size: 13px;
  padding: 4px 6px;
}
.ing-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-800);
  font-weight: 600; font-size: 13px;
  padding: 4px 4px 4px 12px;
  border-radius: 999px;
}
.ing-remove {
  width: 22px; height: 22px; border-radius: 50%;
  background: white; color: var(--green-800);
  border: 1px solid var(--green-200);
  font-size: 14px; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.ing-remove:hover { background: var(--green-100); }

.builder-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.builder-actions .btn { flex: 1 1 auto; min-width: 140px; }
.builder-status { margin-top: 10px; }

.ai-banner {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border: 1px solid #c7d2fe;
  color: #4338ca;
  font-weight: 600; font-size: 13px;
  padding: 8px 12px; border-radius: 10px;
  margin: 10px 0 14px;
}

.recipe-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 540px) {
  .recipe-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
.recipe-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--green-100);
  cursor: pointer;
  transition: all .3s ease;
  position: relative;
}
.recipe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-300); }
.recipe-img {
  height: 160px;
  background: var(--grad-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px;
}
.recipe-img-real {
  width: 100%; height: 180px;
  object-fit: cover;
  display: block;
}
.recipe-body { padding: 16px; }
.recipe-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 8px;
}
.recipe-tag {
  background: var(--green-50);
  color: var(--green-800);
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--green-200);
}
.recipe-card h3 { margin: 6px 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.recipe-card .desc { color: var(--ink-soft); font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
.recipe-meta {
  display: flex; gap: 12px; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--green-100); padding-top: 10px;
  flex-wrap: wrap;
}
.recipe-meta span strong { color: var(--green-700); }
.recipe-card.locked { position: relative; }
.recipe-card.locked::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.recipe-card .lock-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--grad-green);
  color: white;
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  padding: 4px 10px; border-radius: 999px;
  z-index: 2;
  box-shadow: var(--shadow);
}
.recipe-card .ext-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.65);
  color: white;
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  padding: 4px 10px; border-radius: 999px;
  z-index: 2;
}
.modal-img {
  width: 100%; height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

/* === Restaurants & Places === */
.places-toolbar {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 12px;
}
/* Only the standalone "Use my location" button (a direct child of the
   toolbar) should stretch full-width — NOT the Search button nested
   inside .places-city-row, otherwise its flex-basis of 100% steals
   all the row width from the city input. */
.places-toolbar > .btn { width: 100%; }
.places-city-row {
  display: flex; gap: 8px;
  align-items: stretch;
}
.places-city-row input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--green-100);
  border-radius: 12px;
  font-size: 16px;
  background: var(--bg-soft);
  color: var(--ink);
}
.places-city-row .btn {
  flex: 0 0 auto;
  width: auto;
}
.places-city-row input:focus {
  outline: none; border-color: var(--green-500);
  background: white;
}
.places-status {
  margin: 8px 0;
  min-height: 0;
}
.places-status:empty { margin: 0; }
.places-loading {
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-800);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
}
.places-success {
  background: var(--green-100);
  border: 1px solid var(--green-300);
  color: var(--green-800);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
}
.places-error {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
}

.places-list {
  display: grid; gap: 10px;
  margin-bottom: 24px;
}
.place-card {
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--green-100);
  display: flex; gap: 12px;
  transition: all .2s;
}
.place-card:hover { border-color: var(--green-400); transform: translateX(2px); box-shadow: var(--shadow-sm); }
.place-icon {
  width: 42px; height: 42px;
  background: var(--grad-soft);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1px solid var(--green-200);
}
.place-body { flex: 1; min-width: 0; }
.place-body h3 { margin: 0 0 4px; font-size: 16px; }
.place-diet {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  margin-right: 4px;
}
.place-diet.diet-vegan {
  background: var(--green-100); color: var(--green-800);
}
.place-diet.diet-options {
  background: #fef3c7; color: #92400e;
}
.place-cuisine { color: var(--muted); font-size: 12px; }
.place-addr, .place-hours {
  color: var(--muted); font-size: 12px; margin: 4px 0 0;
}
.place-actions {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  flex-wrap: wrap;
}
.place-distance {
  background: var(--green-50);
  color: var(--green-800);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--green-200);
}

.city-tabs {
  display: flex; gap: 6px; overflow-x: auto;
  padding-bottom: 4px; margin-bottom: 14px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.city-tab {
  background: white;
  border: 1px solid var(--green-200);
  color: var(--ink-soft);
  font-weight: 600; font-size: 14px;
  padding: 8px 16px; border-radius: 999px;
  white-space: nowrap;
  transition: all .2s;
  min-height: 36px;
}
.city-tab.active { background: var(--grad-green); color: white; border-color: transparent; box-shadow: 0 4px 12px -4px rgba(16,185,129,.6); }
.city-tab:hover:not(.active):not(:disabled) { background: var(--green-50); border-color: var(--green-400); }
.city-tab:disabled { opacity: .4; cursor: not-allowed; }

.restaurant-grid { display: grid; gap: 10px; }
.rest-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--green-100);
  display: flex; justify-content: space-between; align-items: center;
  transition: all .2s;
  gap: 12px;
}
.rest-card:hover { border-color: var(--green-400); transform: translateX(2px); box-shadow: var(--shadow-sm); }
.rest-info { flex: 1; min-width: 0; }
.rest-info h3 { margin: 0 0 4px; font-size: 16px; }
.rest-info .specialty { color: var(--ink-soft); font-size: 13px; margin: 0 0 4px; }
.rest-info .address { color: var(--muted); font-size: 12px; margin: 0; }
.rest-meta { text-align: right; flex-shrink: 0; }
.rest-meta .rating { color: var(--green-700); font-weight: 800; font-size: 15px; }
.rest-meta .price { color: var(--muted); font-size: 13px; }
.rest-meta .type {
  display: inline-block; background: var(--green-50);
  color: var(--green-800); font-size: 11px; font-weight: 600;
  padding: 2px 10px; border-radius: 999px; margin-top: 4px;
  border: 1px solid var(--green-200);
}

/* === Challenges === */
.challenge-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 540px) {
  .challenge-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
.challenge-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--green-200);
  position: relative;
  transition: all .3s ease;
  overflow: hidden;
}
.challenge-card::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 110px; height: 110px;
  background: radial-gradient(circle, rgba(16,185,129,.18), transparent 70%);
  pointer-events: none;
}
.challenge-card.joined { border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(16,185,129,.14); }
.challenge-card.completed { background: var(--green-50); }
.chal-icon {
  font-size: 40px; margin-bottom: 8px;
  display: inline-block;
  filter: drop-shadow(0 2px 6px rgba(16,185,129,.4));
}
.chal-difficulty {
  display: inline-block;
  padding: 2px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.chal-difficulty.Easy, .chal-difficulty.Einfach { background: var(--green-100); color: var(--green-800); }
.chal-difficulty.Medium, .chal-difficulty.Mittel { background: #fef3c7; color: #92400e; }
.chal-difficulty.Hard, .chal-difficulty.Schwer { background: #fee2e2; color: #991b1b; }
.challenge-card h3 { margin: 8px 0; font-size: 17px; font-weight: 700; }
.challenge-card p { color: var(--ink-soft); font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.chal-meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.chal-meta strong { color: var(--green-700); }
.progress-bar {
  height: 8px; background: var(--green-100);
  border-radius: 999px; overflow: hidden;
  margin-bottom: 14px;
}
.progress-fill {
  height: 100%; background: var(--grad-green);
  transition: width .5s ease;
}
.chal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chal-actions .btn { flex: 1; min-width: 0; }

/* === Profile === */
.profile-card {
  background: linear-gradient(180deg, white, var(--bg-soft));
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  border: 1px solid var(--green-200);
  margin-bottom: 20px;
}
.profile-avatar {
  width: 80px; height: 80px;
  background: var(--grad-soft);
  border: 3px solid var(--green-300);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  margin: 0 auto 14px;
  box-shadow: 0 4px 12px rgba(16,185,129,.2);
}
.profile-card h2 { margin: 0 0 4px; font-size: 22px; }
.profile-card p { margin: 0 0 12px; color: var(--muted); }
.profile-plan {
  display: inline-block; padding: 4px 14px;
  border-radius: 999px;
  background: var(--green-100); color: var(--green-800);
  font-size: 12px; font-weight: 800; letter-spacing: .1em;
}
.profile-plan.premium {
  background: var(--grad-green); color: white;
}

.goal-row {
  display: flex; gap: 8px;
}
.goal-row input {
  flex: 1; min-width: 0;
  padding: 12px 14px;
  border: 2px solid var(--green-100);
  border-radius: 12px; font-size: 16px;
  background: var(--bg-soft);
}
.goal-row input:focus { outline: none; border-color: var(--green-500); background: white; }

.subscription-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--green-200);
}
.subscription-card.premium {
  background: var(--grad-deep);
  color: white;
  border-color: transparent;
}
.subscription-card h3 { margin: 0 0 8px; font-size: 18px; }
.subscription-card p { margin: 0 0 14px; opacity: .9; line-height: 1.5; font-size: 14px; }
.subscription-card.premium .btn { background: white; color: var(--green-700); }

.gemini-key-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--green-200);
}
.gemini-key-help { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.gemini-key-help a { color: var(--green-700); text-decoration: none; font-weight: 600; }
.gemini-key-help a:hover { text-decoration: underline; }
.gemini-key-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px;
}
.gemini-key-row input {
  flex: 1 1 220px; min-width: 0;
  border: 1px solid var(--green-200);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg-soft);
  outline: none;
  transition: border-color .2s;
}
.gemini-key-row input:focus { border-color: var(--green-500); background: white; }
.gemini-key-row .btn { white-space: nowrap; }
.gemini-key-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}
.gemini-key-status.is-active { color: var(--green-700); font-weight: 600; }
.gemini-key-status.is-error { color: #b91c1c; }

.week-chart {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px 18px 14px;
  border: 1px solid var(--green-200);
  display: flex; gap: 6px; align-items: flex-end;
  height: 220px;
}
.week-bar {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.week-bar-fill {
  width: 100%; background: var(--grad-green);
  border-radius: 8px 8px 0 0;
  min-height: 4px;
  transition: height .8s ease;
  position: relative;
}
.week-bar-fill::after {
  content: attr(data-cal);
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; color: var(--green-700);
  white-space: nowrap;
}
.week-bar-label { font-size: 11px; color: var(--muted); font-weight: 600; }

/* === Modal === */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(6,78,59,.6);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
  animation: fadeIn .2s;
}
.modal {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 640px; width: 100%;
  max-height: 90vh; max-height: 90dvh; overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: scaleIn .2s ease;
  -webkit-overflow-scrolling: touch;
}
@keyframes scaleIn { from { transform: scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  font-size: 22px; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  border: 1px solid var(--green-200);
}
.modal-close:hover { background: var(--green-100); color: var(--green-800); }
.modal-body { padding: 24px 20px; }
.modal h2 { margin: 0 0 8px; font-size: clamp(20px, 5vw, 26px); font-weight: 800; }
.modal-meta {
  display: flex; gap: 12px; font-size: 13px; color: var(--muted);
  margin-bottom: 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--green-100);
  flex-wrap: wrap;
}
.modal-meta strong { color: var(--green-700); font-size: 16px; }
.modal h3 { margin: 16px 0 10px; font-size: 16px; }
.modal ul, .modal ol { padding-left: 24px; line-height: 1.7; }
.modal-actions { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; min-width: 140px; }

/* === Onboarding popup (height / weight / gender / age / activity / goal) === */
.onboarding {
  padding: 28px 24px 24px;
}
.onb-step-pill {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
  letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 12px;
}
.onboarding h2 {
  margin: 0 0 6px;
  font-size: clamp(20px, 4.6vw, 26px);
  font-weight: 800;
  line-height: 1.2;
}
.onb-sub {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
}
.onb-field { margin-bottom: 18px; }
.onb-field > label {
  display: block;
  font-size: 13px; font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.onb-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.onb-pill {
  background: white;
  border: 1.5px solid var(--green-200);
  border-radius: var(--radius-md, 12px);
  padding: 12px 8px;
  font-size: 14px; font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}
.onb-pill:hover { border-color: var(--green-400); background: var(--green-50, #f0fdf4); }
.onb-pill.active {
  background: var(--green-700);
  color: white;
  border-color: var(--green-700);
  box-shadow: 0 4px 12px rgba(21,128,61,.25);
}
.onb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.onb-input-row {
  display: flex; align-items: center;
  background: white;
  border: 1.5px solid var(--green-200);
  border-radius: var(--radius-md, 12px);
  padding: 4px 10px 4px 12px;
  transition: border-color .15s;
}
.onb-input-row:focus-within {
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
.onb-input-row input {
  flex: 1;
  border: 0; outline: 0;
  background: transparent;
  font-size: 17px; font-weight: 700;
  padding: 10px 0;
  color: var(--ink);
  min-width: 0;
}
.onb-unit {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-left: 6px;
}
.onb-rows {
  display: flex; flex-direction: column;
  gap: 8px;
}
.onb-row {
  display: flex; align-items: center; gap: 12px;
  background: white;
  border: 1.5px solid var(--green-200);
  border-radius: var(--radius-md, 12px);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: all .15s ease;
}
.onb-row:hover { border-color: var(--green-400); background: var(--green-50, #f0fdf4); }
.onb-row.active {
  border-color: var(--green-700);
  background: var(--green-50, #f0fdf4);
  box-shadow: 0 2px 8px rgba(21,128,61,.12);
}
.onb-row-main {
  flex: 1;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.onb-row-main strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.onb-row-main small  { font-size: 12px; color: var(--muted); line-height: 1.3; }
.onb-row-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--green-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: transparent;
  transition: all .15s;
  flex-shrink: 0;
}
.onb-row.active .onb-row-check {
  background: var(--green-700);
  border-color: var(--green-700);
  color: white;
}
.onb-goal-emoji { font-size: 28px; flex-shrink: 0; }
.onb-error {
  color: #dc2626;
  font-size: 13px;
  margin: 8px 0 0;
  min-height: 18px;
}
.onb-actions {
  display: flex; gap: 8px;
  margin-top: 18px;
}
.onb-actions .btn { flex: 1; }
.onb-actions .btn.btn-full { flex: 1; }

/* Result step */
.onboarding-result { text-align: center; padding: 36px 24px 28px; }
.onb-result-icon {
  font-size: 56px;
  margin-bottom: 8px;
}
.onb-result-number {
  margin: 18px auto 12px;
  display: inline-flex; flex-direction: column; align-items: center;
  background: var(--grad-leaf);
  color: white;
  padding: 22px 36px;
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 10px 30px rgba(21,128,61,.3);
}
.onb-result-number strong {
  font-size: clamp(40px, 9vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}
.onb-result-number span {
  font-size: 13px; font-weight: 600;
  opacity: .9;
  margin-top: 4px;
  letter-spacing: .04em; text-transform: uppercase;
}
.onb-result-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 18px 0 8px;
}
.onb-result-meta > div {
  background: var(--bg-soft);
  border-radius: var(--radius-md, 12px);
  padding: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.onb-result-meta span {
  font-size: 11px; color: var(--muted);
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.onb-result-meta strong {
  font-size: 16px; font-weight: 700; color: var(--green-800);
}
.onb-adjust {
  font-size: 12px;
  margin: 12px 0 0;
}

@media (max-width: 480px) {
  .onb-grid { grid-template-columns: 1fr; gap: 10px; }
  .onb-pills { grid-template-columns: repeat(3, 1fr); }
  .onboarding { padding: 24px 18px 18px; }
}

/* Premium upsell modal */
.upsell {
  text-align: center; padding: 36px 24px;
}
.upsell-icon { font-size: 64px; margin-bottom: 12px; }
.upsell h2 {
  background: var(--grad-leaf);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.upsell ul {
  display: inline-block; text-align: left; padding-left: 24px;
  margin: 16px 0;
  color: var(--ink-soft); line-height: 2;
}

/* ============================================
   COMMUNITY
   ============================================ */
.community-hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  margin-bottom: 16px;
}
.community-hero h1 { margin: 0; flex: 1 1 100%; }
.community-hero p  { margin: 0; flex: 1 1 60%; }
.community-hero .btn { margin-left: auto; }

.community-search {
  position: relative;
  margin: 16px 0 12px;
}
.community-search input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: white;
  font-size: 15px;
  outline: none;
}
.community-search input:focus { border-color: var(--green-400); }

.community-filters {
  display: flex; gap: 8px; overflow-x: auto;
  margin-bottom: 14px; padding-bottom: 4px;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.community-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.community-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.community-cover {
  height: 110px;
  background-color: var(--green-100);
  background-size: cover; background-position: center;
}
.community-cover-placeholder {
  background: var(--grad-leaf);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 48px;
}
.community-cover-placeholder span { filter: drop-shadow(0 4px 12px rgba(0,0,0,.15)); }

.community-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.community-card-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px;
}
.community-card-head .community-emoji { font-size: 20px; }
.community-card-head strong { color: var(--ink); }
.community-desc {
  margin: 0; color: var(--muted); font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.community-meta {
  display: flex; gap: 6px; flex-wrap: wrap;
  color: var(--muted); font-size: 12px; margin-top: 4px;
}
.community-tags-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.community-tag {
  display: inline-block;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  background: var(--green-100); color: var(--green-800);
}
.community-tag-creator { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #78350f; }
.community-tag-joined  { background: var(--green-200); color: var(--green-900); }

/* ----- Community detail ----- */
#community-back { margin-bottom: 8px; }

.community-detail-cover {
  height: 160px;
  background-color: var(--green-100);
  background-size: cover; background-position: center;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.community-detail-head {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start;
  margin-bottom: 14px;
}
.community-detail-head > div:first-child { flex: 1; min-width: 0; }
.community-title {
  display: flex; align-items: center; gap: 10px;
  font-size: clamp(22px, 5vw, 30px); margin: 0 0 6px;
  font-weight: 800; letter-spacing: -0.02em;
}
.community-desc-full { color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.community-actions-row { display: flex; gap: 8px; flex-wrap: wrap; }

.community-tabs {
  display: flex; gap: 4px;
  padding: 4px; background: var(--bg-soft);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow-x: auto;
}
.community-tab {
  flex: 1; min-width: 90px;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700; font-size: 14px;
  color: var(--muted);
  transition: all .2s;
  white-space: nowrap;
}
.community-tab.active { background: white; color: var(--green-700); box-shadow: var(--shadow-sm); }

.community-join-cta {
  background: var(--bg-soft); border: 2px dashed var(--green-200);
  padding: 28px 16px; text-align: center; border-radius: var(--radius);
  color: var(--muted); font-weight: 600;
}

/* ----- Composer ----- */
.composer {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.composer-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.composer-tab {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 13px; font-weight: 600;
  color: var(--ink-soft);
  transition: all .2s;
}
.composer-tab.active { background: var(--grad-leaf); color: white; box-shadow: var(--shadow-sm); }

.composer-body { display: flex; flex-direction: column; gap: 10px; }
.composer-body textarea,
.composer-body input[type="text"],
.composer-body input[type="url"],
.composer-body input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: white;
  font-size: 14px;
  resize: vertical;
}
.composer-body textarea:focus,
.composer-body input:focus { border-color: var(--green-400); outline: none; }
.composer-attach {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  font-size: 13px;
}
.composer-preview {
  width: 100%; max-height: 320px; object-fit: contain;
  border-radius: 12px; background: var(--bg-soft);
}
.composer-recipe-grid { display: flex; flex-direction: column; gap: 8px; }
.composer-recipe-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.composer-actions { margin-top: 12px; display: flex; justify-content: flex-end; }

/* ----- Posts ----- */
#community-feed { display: flex; flex-direction: column; gap: 14px; }

.post-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-leaf); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.post-author { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.post-author strong { font-size: 14px; }
.post-author span { font-size: 12px; color: var(--muted); }
.post-mine {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--green-100); color: var(--green-800); font-weight: 700;
}
.post-delete {
  position: absolute; top: 12px; right: 12px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.post-delete:hover { background: var(--danger); color: white; }

.post-text { margin: 4px 0 10px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.post-media {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 12px;
  background: black;
  margin: 4px 0 10px;
}
.post-audio {
  width: 100%;
  margin: 4px 0 10px;
}
.post-link {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none; color: inherit;
  margin: 4px 0 10px;
  transition: all .2s;
}
.post-link:hover { background: var(--green-100); border-color: var(--green-300); }
.post-link-icon { font-size: 24px; }
.post-link-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.post-link-body strong { font-size: 14px; word-break: break-word; }
.post-link-body span { font-size: 12px; color: var(--muted); }

.post-recipe {
  background: var(--bg-soft);
  border: 1px solid var(--green-200);
  border-radius: 14px;
  padding: 14px;
  margin: 4px 0 10px;
}
.post-recipe-head { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.post-recipe-emoji { font-size: 26px; }
.post-recipe-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 600;
}
.post-recipe-details { margin-top: 10px; }
.post-recipe-details summary {
  cursor: pointer;
  color: var(--green-700); font-weight: 600;
  padding: 6px 0;
}
.post-recipe-details h4 { margin: 12px 0 6px; font-size: 14px; }
.post-recipe-details ul,
.post-recipe-details ol { margin: 0 0 0 20px; padding: 0; line-height: 1.6; font-size: 14px; }

.post-foot {
  display: flex; gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 4px;
}
.post-action {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 10px;
  background: transparent;
  color: var(--muted); font-weight: 600; font-size: 14px;
  transition: all .15s;
}
.post-action:hover { background: var(--bg-soft); color: var(--ink); }
.post-action.liked { color: #e11d48; }
.post-action-label { font-size: 13px; }

/* ----- Comments ----- */
.post-comments {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.comment-list { display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 10px; }
.comment-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--green-200); color: var(--green-900);
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.comment-body {
  flex: 1; min-width: 0;
  background: var(--bg-soft);
  padding: 8px 12px;
  border-radius: 12px;
}
.comment-body strong { font-size: 13px; }
.comment-body p { margin: 4px 0 0; font-size: 14px; word-break: break-word; }
.comment-form {
  display: flex; gap: 8px; margin-top: 12px;
}
.comment-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  font-size: 14px;
}
.comment-form input:focus { border-color: var(--green-400); outline: none; }

/* ----- Chat ----- */
.chat-wrap {
  display: flex; flex-direction: column;
  /* Cap to a "messenger column" width on desktop so bubbles don't get
     scattered to the far edges of the wider tab content. */
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  height: min(72vh, 720px);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg-soft);
}
/* When no messages yet, center the empty-state instead of pinning it to the top. */
.chat-list.is-empty,
.chat-list:has(> .log-empty:only-child) {
  justify-content: center; align-items: center;
}
.chat-list > .log-empty {
  background: transparent; border: 0; box-shadow: none;
  color: var(--muted); font-size: 14px; text-align: center; padding: 24px 16px;
}
.chat-msg { display: flex; gap: 8px; max-width: 85%; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
@media (min-width: 720px) {
  .chat-msg { max-width: 75%; }
}
.chat-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--green-300); color: var(--green-900);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.chat-bubble {
  background: white;
  padding: 8px 12px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}
.chat-msg.mine .chat-bubble {
  background: var(--grad-leaf); color: white;
}
.chat-bubble strong { font-size: 12px; display: block; opacity: .85; margin-bottom: 2px; }
.chat-bubble p { margin: 0; }
.chat-bubble .chat-time { font-size: 10px; opacity: .7; display: block; margin-top: 2px; }
.chat-form {
  display: flex; gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: white;
}
.chat-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  font-size: 14px;
}
.chat-form input:focus { border-color: var(--green-400); outline: none; }

/* ----- Members ----- */
.members-list { display: flex; flex-direction: column; gap: 8px; }
.member-row {
  display: flex; gap: 12px; align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}
.member-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-leaf); color: white;
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.member-info { display: flex; flex-direction: column; line-height: 1.2; }

/* ----- About ----- */
.about-block {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 22px;
  box-shadow: var(--shadow-sm);
}
.about-block h3 { margin: 0 0 8px; font-size: 22px; }
.about-block h4 { margin: 16px 0 6px; font-size: 14px; color: var(--green-800); }
.about-grid {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 10px;
}
.about-grid > div {
  background: var(--bg-soft);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.about-rules { white-space: pre-wrap; line-height: 1.6; color: var(--ink-soft); }

/* ----- Form (create / edit) ----- */
.community-form { padding: 20px; max-width: 520px; }
.community-form h2 { margin: 0 0 14px; font-size: 22px; }
.community-form label {
  display: block; margin-bottom: 12px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.community-form label > span { display: block; margin-bottom: 4px; }
.community-form input[type="text"],
.community-form input[type="url"],
.community-form textarea,
.community-form select,
.community-form input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: white;
  font-size: 14px;
}
.community-form textarea { resize: vertical; }
.cf-cover-preview {
  height: 100px; border-radius: 12px;
  background-size: cover; background-position: center;
  margin-bottom: 12px;
  position: relative;
}
.cf-cover-preview .btn {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(255,255,255,.9);
}
.cf-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .community-grid { grid-template-columns: 1fr; }
  .composer-recipe-row { grid-template-columns: repeat(2, 1fr); }
  .community-detail-cover { height: 130px; }
  .chat-msg { max-width: 88%; }
  .community-tab { font-size: 13px; padding: 8px 10px; min-width: auto; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { min-height: 460px; }
  .phone-mock { transform: rotate(0deg) scale(.85); }
  .floating-card.f1 { left: 50%; transform: translateX(-180px); }
  .floating-card.f2 { left: 50%; transform: translateX(120px); }
  .floating-card.f3 { right: auto; left: 50%; transform: translateX(-100px); top: auto; bottom: 0; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (max-width: 640px) {
  .hero-nav { padding: 12px 14px; }
  .hero-links a, .hero-links .btn-ghost { display: none; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .hero-stats strong { font-size: 22px; }
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card-popular { transform: none; }
  .cta-banner { padding: 28px 20px; flex-direction: column; align-items: stretch; text-align: center; }
  .cta-banner .btn { width: 100%; }

  .header-right span:not(.plan-badge) { display: none; }
  .nav-btn span { font-size: 20px; }
  .scan-result-card { flex-direction: column; }
  .scan-product-image { width: 100%; height: 120px; }
  .scan-macros { grid-template-columns: repeat(2, 1fr); }
  .modal-body { padding: 22px 18px; }
  .auth-card { padding: 28px 20px; }
  .ring-card { padding: 22px 14px; }
  .cal-ring { width: 180px; height: 180px; }
  .ring-center strong { font-size: 36px; }
  .recipe-img-real, .recipe-img { height: 150px; }
  .modal-img { height: 180px; }
  .scan-actions .btn, .modal-actions .btn { min-width: 0; }
  .scan-qty { padding: 12px; }
  .scan-qty-label { flex-direction: column; align-items: flex-start; gap: 2px; }
  .scan-qty-row .qty-step { width: 34px; }
  .qty-chip { padding: 5px 10px; font-size: 12px; }
}

@media (max-width: 420px) {
  .hero-stats { grid-template-columns: 1fr; }
  .nav-btn label { display: none; }
  .nav-btn { min-height: 44px; }
  .floating-card { font-size: 11px; padding: 8px 12px; }
  .scan-tab { font-size: 13px; }
  .auth-card { padding: 24px 18px; }
  .feature-card { padding: 24px 20px; }
  .price-card { padding: 28px 22px; }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid var(--green-400);
  outline-offset: 2px;
}

/* ============================================
   FORM FIELD POLISH
   - Browser autofill (Chrome/Safari/Android) used to render text
     in white-on-white over our light input backgrounds. Force the
     readable ink colour and re-paint the inset background so it
     matches the host field.
   - Give every input a visible placeholder colour, too.
   ============================================ */
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: .75;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px white inset;
          box-shadow: 0 0 0 1000px white inset;
  /* Chrome animates the autofill background; stall it so our
     inset shadow stays visible. */
  transition: background-color 5000s ease-in-out 0s,
              color 5000s ease-in-out 0s;
}

/* When the auth-form input is focused it switches to a green-tinted
   background, so match the autofill inset to that. */
.auth-form input:focus:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--green-50) inset;
          box-shadow: 0 0 0 1000px var(--green-50) inset;
}

/* Scan / places fields use bg-soft as their resting background. */
.scan-input-wrap input:-webkit-autofill,
.places-city-row input:-webkit-autofill,
.goal-row input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-soft) inset;
          box-shadow: 0 0 0 1000px var(--bg-soft) inset;
}
.scan-input-wrap input:focus:-webkit-autofill,
.places-city-row input:focus:-webkit-autofill,
.goal-row input:focus:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px white inset;
          box-shadow: 0 0 0 1000px white inset;
}

/* ============================================
   PWA / mobile webapp polish
   ============================================ */

/* Respect iOS safe areas everywhere it matters */
:root {
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);
}

body {
  /* Disable iOS pull-to-refresh quirks while still allowing scroll */
  overscroll-behavior-y: contain;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

/* When launched as installed PWA, paint the status bar safe-area
   in the brand color so it blends into the hero */
@media (display-mode: standalone) {
  body {
    padding-top:    var(--safe-top);
    padding-bottom: var(--safe-bottom);
    padding-left:   var(--safe-left);
    padding-right:  var(--safe-right);
    background: #0b1220;
  }
}

/* Install banner */
.pwa-install {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 1200;

  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;

  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(74, 222, 128, 0.35);
  box-shadow: 0 12px 40px rgba(0,0,0,.45),
              0 0 0 1px rgba(255,255,255,.04) inset;

  animation: pwaSlideUp .4s cubic-bezier(.2,.9,.3,1.2) both;
}
.pwa-install.hidden { display: none; }

.pwa-install img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: 0 0 auto;
  background: #052e16;
  box-shadow: 0 4px 14px rgba(34,197,94,.45);
}

.pwa-install-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pwa-install-text strong {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}
.pwa-install-text span {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.35;
}

.pwa-install .btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.pwa-install-close {
  appearance: none;
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  flex: 0 0 auto;
}
.pwa-install-close:hover { color: #f8fafc; background: rgba(255,255,255,.06); }

@keyframes pwaSlideUp {
  from { transform: translateY(120%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Phone-first tweaks: keep things tappable & legible on small screens */
@media (max-width: 480px) {
  html { font-size: 15.5px; }

  .pwa-install {
    left: 8px;
    right: 8px;
    bottom: calc(8px + var(--safe-bottom));
    padding: 10px 12px;
    border-radius: 16px;
  }

  .pwa-install-text strong { font-size: 13px; }
  .pwa-install-text span   { font-size: 11.5px; }

  /* All primary tap targets at least 44px tall (Apple HIG) */
  .btn, button {
    min-height: 44px;
  }
}

/* ===== Log portion (gram) dialog ===== */
.log-portion-row {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 6px;
}
.log-portion-row span { font-weight: 600; min-width: 70px; }
.log-portion-row input {
  flex: 1; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 16px;
}
.log-portion-preview {
  margin-bottom: 8px; font-size: 14px;
  background: var(--bg-soft);
  border-radius: 10px; padding: 8px 12px;
}

/* ===== Create-recipe dialog ===== */
.create-recipe-modal input[type=text],
.create-recipe-modal input[type=number],
.create-recipe-modal textarea,
.create-recipe-modal select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: inherit;
  background: white;
}
.create-recipe-modal textarea { resize: vertical; }

.cr-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.cr-section:first-of-type { border-top: 0; padding-top: 0; }
.cr-section-h {
  font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); margin: 0 0 10px;
}
.cr-hint { margin: 0 0 10px; font-size: 13px; }

.cr-row-emoji {
  display: grid; grid-template-columns: 64px 1fr; gap: 8px; margin-bottom: 8px;
}
.cr-row-emoji input[type=text]:first-child {
  text-align: center; font-size: 22px;
}
.create-recipe-modal #cr-desc { margin-bottom: 10px; }

.cr-field-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px;
}
.cr-field { display: flex; flex-direction: column; gap: 4px; }
.cr-field > span {
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.cr-input-unit {
  position: relative;
}
.cr-input-unit input { padding-right: 44px; }
.cr-input-unit em {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 13px; color: var(--muted); pointer-events: none;
}

.cr-goal-row {
  display: grid; grid-template-columns: 70px 1fr; align-items: center;
  gap: 10px; margin-bottom: 10px;
}
.cr-goal-row > span { font-weight: 600; }

.cr-ing-search {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px;
}
.cr-ing-results {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 200px; overflow-y: auto;
  margin-bottom: 8px;
}
.cr-ing-results:empty { margin: 0; }
.cr-ing-result {
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: left; gap: 2px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer;
  font: inherit;
}
.cr-ing-result:hover { background: var(--line); }
.cr-ing-result strong { font-size: 14px; }
.cr-ing-result small { font-size: 12px; color: var(--muted); }

.cr-ing-manual {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 10px;
}

.cr-ing-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.cr-ing-empty {
  font-size: 13px; padding: 6px 0;
  flex: 1 0 100%;
}
.cr-ing-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 10px 5px 12px;
  font-size: 14px;
}
.cr-pill-x {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 0; background: rgba(0,0,0,0.08);
  cursor: pointer; font-size: 14px; line-height: 1;
}
.cr-pill-x:hover { background: rgba(0,0,0,0.18); }

.cr-step-list {
  list-style: none; padding: 0; margin: 0 0 10px;
  display: flex; flex-direction: column; gap: 8px;
  counter-reset: step;
}
.cr-step-row {
  display: grid; grid-template-columns: 32px 1fr 32px;
  gap: 8px; align-items: start;
}
.cr-step-num {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--grad-leaf, #34c97a); color: white;
  font-weight: 700; font-size: 14px;
  margin-top: 4px;
}
.cr-step-input { min-height: 60px; }
.cr-step-x {
  width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 8px;
  background: white; cursor: pointer;
  font-size: 16px; margin-top: 4px;
}
.cr-step-x:hover { background: var(--bg-soft); }
.cr-step-empty { padding: 6px 0; font-size: 13px; }
.cr-step-add-btn { width: 100%; }
