:root {
  --background: 326 100% 98%;
  --foreground: 292 42% 16%;
  --primary: 323 92% 56%;
  --primary-foreground: 0 0% 100%;
  --secondary: 188 86% 58%;
  --secondary-foreground: 286 45% 14%;
  --muted: 317 50% 92%;
  --muted-foreground: 294 20% 42%;
  --destructive: 352 84% 56%;
  --destructive-foreground: 0 0% 100%;
  --border: 318 48% 84%;
  --card: 0 0% 100%;
  --card-foreground: 292 42% 16%;
  --gold: 42 96% 62%;
  --lavender: 265 94% 82%;
  --shadow-sm: 0 6px 18px hsl(323 92% 56% / 0.12);
  --shadow-md: 0 16px 38px hsl(292 42% 16% / 0.16);
  --shadow-lg: 0 28px 70px hsl(323 92% 56% / 0.24);
  --transition-fast: 160ms ease;
  --transition-smooth: 280ms cubic-bezier(.2,.8,.2,1);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
}

.dark {
  --background: 282 42% 8%;
  --foreground: 318 70% 96%;
  --primary: 323 94% 66%;
  --primary-foreground: 282 42% 8%;
  --secondary: 188 80% 62%;
  --secondary-foreground: 282 42% 8%;
  --muted: 282 30% 18%;
  --muted-foreground: 318 26% 76%;
  --destructive: 352 86% 66%;
  --destructive-foreground: 282 42% 8%;
  --border: 284 28% 26%;
  --card: 284 38% 13%;
  --card-foreground: 318 70% 96%;
  --gold: 42 96% 68%;
  --lavender: 265 82% 72%;
  --shadow-sm: 0 6px 18px hsl(0 0% 0% / 0.22);
  --shadow-md: 0 16px 38px hsl(0 0% 0% / 0.34);
  --shadow-lg: 0 28px 70px hsl(0 0% 0% / 0.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: hsl(var(--foreground));
  background:
    radial-gradient(circle at 12% 8%, hsl(var(--secondary) / 0.28), transparent 26rem),
    radial-gradient(circle at 90% 12%, hsl(var(--primary) / 0.20), transparent 24rem),
    linear-gradient(135deg, hsl(var(--background)), hsl(var(--muted)));
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.sparkle-bg {
  position: relative;
  overflow: hidden;
}
.sparkle-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background-image:
    radial-gradient(circle, hsl(var(--primary) / .38) 0 1px, transparent 1.5px),
    radial-gradient(circle, hsl(var(--secondary) / .38) 0 1px, transparent 1.5px);
  background-size: 32px 32px, 46px 46px;
  background-position: 0 0, 18px 12px;
}

.glass-card {
  background: hsl(var(--card) / 0.78);
  border: 1px solid hsl(var(--border) / 0.78);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.doll-stage {
  background:
    radial-gradient(circle at 50% 18%, hsl(var(--gold) / .35), transparent 9rem),
    linear-gradient(180deg, hsl(var(--secondary) / .18), hsl(var(--primary) / .14));
}

.floaty { animation: floaty 4.5s ease-in-out infinite; }
.pulse-spark { animation: pulseSpark 2.2s ease-in-out infinite; }
.twirl { animation: twirl 650ms cubic-bezier(.2,.8,.2,1); }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes pulseSpark {
  0%, 100% { transform: scale(1); opacity: .78; }
  50% { transform: scale(1.16); opacity: 1; }
}
@keyframes twirl {
  0% { transform: rotate(-2deg) scale(.96); filter: saturate(.8); }
  55% { transform: rotate(2deg) scale(1.035); filter: saturate(1.3); }
  100% { transform: rotate(0) scale(1); filter: saturate(1); }
}

.focus-ring:focus-visible {
  outline: 3px solid hsl(var(--secondary) / .7);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
