:root {
  --background: 42 44% 94%;
  --foreground: 146 18% 18%;
  --primary: 139 24% 42%;
  --primary-foreground: 42 50% 97%;
  --secondary: 35 65% 76%;
  --secondary-foreground: 146 18% 18%;
  --muted: 43 28% 86%;
  --muted-foreground: 143 12% 42%;
  --destructive: 7 63% 48%;
  --destructive-foreground: 42 50% 97%;
  --border: 42 24% 78%;
  --card: 42 48% 98%;
  --accent: 31 75% 58%;
  --shadow-sm: 0 4px 14px hsl(146 20% 18% / 0.08);
  --shadow-md: 0 14px 36px hsl(146 20% 18% / 0.12);
  --shadow-lg: 0 24px 60px hsl(146 20% 18% / 0.16);
  --transition-fast: 160ms ease;
  --transition-smooth: 280ms cubic-bezier(.2,.8,.2,1);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
}

.dark {
  --background: 145 20% 10%;
  --foreground: 42 48% 94%;
  --primary: 139 26% 58%;
  --primary-foreground: 145 20% 10%;
  --secondary: 31 44% 32%;
  --secondary-foreground: 42 48% 94%;
  --muted: 145 16% 18%;
  --muted-foreground: 43 20% 72%;
  --destructive: 7 70% 60%;
  --destructive-foreground: 42 48% 96%;
  --border: 145 14% 28%;
  --card: 145 18% 14%;
  --accent: 31 72% 62%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: hsl(var(--foreground));
  background:
    radial-gradient(circle at top left, hsl(var(--secondary) / 0.38), transparent 36rem),
    linear-gradient(180deg, hsl(var(--background)), hsl(var(--muted) / 0.65));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
input, select, textarea { font-size: max(16px, 1rem); }
button { min-height: 44px; }
.bg-1 { background: hsl(var(--background)); }
.bg-2 { background: hsl(var(--card)); }
.bg-3 { background: hsl(var(--muted)); }
.bg-4 { background: hsl(var(--secondary)); }
.text-primary { color: hsl(var(--foreground)); }
.text-secondary { color: hsl(var(--muted-foreground)); }
.text-tertiary { color: hsl(var(--foreground) / 0.66); }
.accent { color: hsl(var(--accent)); }
.card-shadow { box-shadow: var(--shadow-md); }
.soft-shadow { box-shadow: var(--shadow-sm); }
.food-photo {
  background-image:
    linear-gradient(135deg, hsl(var(--primary) / 0.78), hsl(var(--accent) / 0.72)),
    radial-gradient(circle at 20% 20%, hsl(var(--secondary)), transparent 34%),
    radial-gradient(circle at 80% 70%, hsl(var(--card)), transparent 28%);
}
.bottom-safe { padding-bottom: calc(0.8rem + env(safe-area-inset-bottom)); }
.top-safe { padding-top: env(safe-area-inset-top); }
.chart-bar { transition: height var(--transition-smooth), transform var(--transition-fast); }
.chart-bar:hover { transform: translateY(-3px); }
.focus-ring:focus-visible { outline: 3px solid hsl(var(--primary) / 0.35); outline-offset: 3px; }
