:root {
  --background: 42 45% 96%;
  --foreground: 222 43% 12%;
  --primary: 167 78% 32%;
  --primary-foreground: 0 0% 100%;
  --secondary: 28 86% 54%;
  --secondary-foreground: 0 0% 100%;
  --muted: 210 18% 88%;
  --muted-foreground: 218 15% 42%;
  --destructive: 0 73% 50%;
  --destructive-foreground: 0 0% 100%;
  --border: 215 18% 78%;
  --card: 0 0% 100%;
  --shadow-sm: 0 2px 10px hsl(222 43% 12% / 0.07);
  --shadow-md: 0 12px 34px hsl(222 43% 12% / 0.11);
  --shadow-lg: 0 24px 70px hsl(222 43% 12% / 0.18);
  --transition-fast: 160ms ease;
  --transition-smooth: 260ms cubic-bezier(.2,.8,.2,1);
  --radius-sm: 0.65rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
}
.dark {
  --background: 222 43% 8%;
  --foreground: 42 45% 96%;
  --primary: 166 72% 44%;
  --primary-foreground: 222 43% 8%;
  --secondary: 31 90% 60%;
  --secondary-foreground: 222 43% 8%;
  --muted: 222 28% 18%;
  --muted-foreground: 220 14% 72%;
  --destructive: 0 76% 58%;
  --destructive-foreground: 0 0% 100%;
  --border: 222 20% 27%;
  --card: 222 36% 12%;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, hsl(var(--primary) / 0.16), transparent 34%),
    radial-gradient(circle at 85% 5%, hsl(var(--secondary) / 0.16), transparent 30%),
    hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
input, select, textarea { font-size: max(16px, 1rem); }
.card {
  background: hsl(var(--card) / 0.9);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}
.codebox {
  background: hsl(222 43% 9%);
  color: hsl(154 80% 78%);
  border-radius: var(--radius-md);
  overflow: auto;
  font-size: 0.83rem;
  line-height: 1.55;
}
.safe-bottom { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.focus-ring:focus-visible { outline: 3px solid hsl(var(--primary) / 0.35); outline-offset: 3px; }
