:root {
  --background: 36 28% 97%;
  --foreground: 220 20% 17%;
  --primary: 220 37% 24%;
  --secondary: 13 33% 34%;
  --muted: 36 16% 90%;
  --destructive: 0 65% 47%;
  --border: 30 18% 84%;
  --card: 0 0% 100%;
  --accent-gold: 42 62% 56%;
  --shadow-sm: 0 1px 2px hsla(220, 30%, 10%, 0.06);
  --shadow-md: 0 6px 18px hsla(220, 30%, 10%, 0.08);
  --shadow-lg: 0 14px 40px hsla(220, 30%, 10%, 0.16);
  --transition-fast: 140ms ease;
  --transition-smooth: 260ms ease;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
}

.dark {
  --background: 220 20% 10%;
  --foreground: 35 22% 92%;
  --primary: 42 42% 66%;
  --secondary: 356 38% 54%;
  --muted: 220 15% 18%;
  --destructive: 0 68% 58%;
  --border: 220 14% 24%;
  --card: 220 18% 14%;
  --accent-gold: 42 50% 62%;
  --shadow-sm: 0 1px 2px hsla(0, 0%, 0%, 0.3);
  --shadow-md: 0 8px 20px hsla(0, 0%, 0%, 0.35);
  --shadow-lg: 0 16px 42px hsla(0, 0%, 0%, 0.42);
}

* {
  box-sizing: border-box;
}

html, body, #root {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, a {
  transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast), box-shadow var(--transition-fast);
}

button:active {
  transform: scale(0.98);
}

.app-shell {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100dvh;
  background: hsl(var(--background));
}

.safe-top {
  padding-top: calc(env(safe-area-inset-top) + 8px);
}

.safe-bottom {
  padding-bottom: calc(env(safe-area-inset-bottom) + 72px);
}

.gradient-hero {
  background: linear-gradient(135deg, hsla(36, 40%, 95%, 1) 0%, hsla(40, 30%, 92%, 1) 46%, hsla(220, 26%, 93%, 1) 100%);
}

.dark .gradient-hero {
  background: linear-gradient(135deg, hsla(220, 18%, 14%, 1) 0%, hsla(220, 18%, 12%, 1) 50%, hsla(356, 18%, 18%, 1) 100%);
}

.recipe-art {
  position: relative;
  overflow: hidden;
}

.recipe-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, hsla(220, 20%, 10%, 0.12) 100%);
}

.thin-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.thin-scrollbar::-webkit-scrollbar-thumb {
  background: hsla(220, 20%, 30%, 0.2);
  border-radius: 999px;
}

.keep-awake-indicator {
  box-shadow: inset 0 0 0 1px hsla(42, 60%, 40%, 0.18);
}

.skeleton {
  background: linear-gradient(90deg, hsla(30, 20%, 88%, 0.6) 25%, hsla(30, 20%, 96%, 0.95) 50%, hsla(30, 20%, 88%, 0.6) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

.dark .skeleton {
  background: linear-gradient(90deg, hsla(220, 15%, 18%, 0.8) 25%, hsla(220, 15%, 24%, 0.95) 50%, hsla(220, 15%, 18%, 0.8) 75%);
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}