:root {
  color-scheme: light dark;

  --hue-brand: 250;        
  --chroma-brand: 0.16;    
  --hue-accent: calc(var(--hue-brand) + 150); 

  --background: oklch(99% 0.004 var(--hue-brand));
  --foreground: oklch(20% 0.02 var(--hue-brand));
  --surface-1: var(--background);                          
  --surface-2: oklch(96.5% 0.008 var(--hue-brand));        
  --surface-3: oklch(93% 0.012 var(--hue-brand));          
  --card: oklch(100% 0 0);
  --card-foreground: var(--foreground);
  --popover: oklch(100% 0 0);
  --popover-foreground: var(--foreground);
  --muted: var(--surface-2);
  --muted-foreground: oklch(50% 0.02 var(--hue-brand));   
  --border: oklch(90% 0.01 var(--hue-brand));
  --input: var(--border);
  --ring: oklch(60% var(--chroma-brand) var(--hue-brand));

  --primary: oklch(48% var(--chroma-brand) var(--hue-brand));
  --primary-foreground: oklch(98% 0.01 var(--hue-brand));
  --primary-hover: oklch(42% var(--chroma-brand) var(--hue-brand));
  --secondary: var(--surface-2);
  --secondary-foreground: var(--foreground);
  --accent: oklch(70% 0.14 var(--hue-accent));
  --accent-foreground: oklch(20% 0.03 var(--hue-accent));
  --destructive: oklch(58% 0.22 27);
  --destructive-foreground: oklch(98% 0.01 27);
  --info: oklch(62% 0.14 230);     --info-foreground: oklch(98% 0.01 230);
  --success: oklch(62% 0.16 150);  --success-foreground: oklch(98% 0.01 150);
  --warning: oklch(80% 0.16 80);   --warning-foreground: oklch(22% 0.05 80);
  --error: var(--destructive);     --error-foreground: var(--destructive-foreground);

  --font-sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: var(--font-sans);           
  --text-xs:   clamp(0.75rem, 0.2vw + 0.7rem, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.25vw + 0.82rem, 1rem);
  --text-base: clamp(1rem, 0.3vw + 0.91rem, 1.125rem);
  --text-lg:   clamp(1.125rem, 0.5vw + 1rem, 1.375rem);
  --text-xl:   clamp(1.375rem, 0.8vw + 1.2rem, 1.75rem);
  --text-2xl:  clamp(1.75rem, 1.2vw + 1.45rem, 2.25rem);
  --text-3xl:  clamp(2.125rem, 2vw + 1.6rem, 3rem);
  --text-4xl:  clamp(2.5rem, 3.2vw + 1.7rem, 4.25rem);   
  --leading-body: 1.75;      
  --leading-tight: 1.3;      
  --leading-hero: 1.15;
  --tracking-body: 0.04em;   
  --tracking-heading: 0.02em;
  --tracking-hero: -0.01em;
  --tracking-caps: 0.08em;   
  --measure: 40em;           

  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;  --space-4: 1rem;
  --space-5: 1.25rem;  --space-6: 1.5rem;   --space-8: 2rem;     --space-10: 2.5rem;
  --space-12: 3rem;    --space-16: 4rem;    --space-20: 5rem;    --space-24: 6rem;
  --section-y: clamp(3rem, 8vw, 6rem);       
  --container: 1120px;
  --container-narrow: 720px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --tap-min: 44px;                           
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --radius-selector: 999px;  
  --radius-field: 10px;      
  --radius-box: 16px;        
  --radius: var(--radius-field);

  --shadow-color: color-mix(in oklch, var(--foreground) 12%, transparent);
  --shadow-sm: 0 1px 2px var(--shadow-color);
  --shadow-md: 0 4px 12px -2px var(--shadow-color), 0 1px 2px var(--shadow-color);
  --shadow-lg: 0 12px 32px -8px color-mix(in oklch, var(--foreground) 18%, transparent), 0 4px 8px -2px var(--shadow-color);
  --shadow-float: 0 24px 60px -16px color-mix(in oklch, var(--foreground) 24%, transparent);

  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);        
  --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);   
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);         
  --ease-out-back: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-in: cubic-bezier(0.55, 0.085, 0.68, 0.53);        
  --ease-in-out: cubic-bezier(0.455, 0.03, 0.515, 0.955);  
  --ease-editorial: cubic-bezier(0.7, 0, 0.2, 1);          
  --dur-fast: 150ms;    
  --dur-base: 250ms;    
  --dur-slow: 400ms;    
  --dur-enter: 600ms;   
  --dur-cross: 1400ms;  
  --dur-kenburns: 8000ms; 
  --stagger: 80ms;

  --z-header: 100; --z-drawer: 200; --z-modal: 300; --z-toast: 400;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: oklch(16% 0.012 var(--hue-brand));
    --foreground: oklch(94% 0.01 var(--hue-brand));
    --surface-2: oklch(20% 0.014 var(--hue-brand));
    --surface-3: oklch(25% 0.016 var(--hue-brand));
    --card: oklch(20% 0.014 var(--hue-brand));
    --popover: oklch(22% 0.014 var(--hue-brand));
    --muted-foreground: oklch(68% 0.02 var(--hue-brand));
    --border: oklch(30% 0.02 var(--hue-brand));
    --primary: oklch(72% calc(var(--chroma-brand) * 0.9) var(--hue-brand));
    --primary-foreground: oklch(16% 0.03 var(--hue-brand));
    --primary-hover: oklch(78% calc(var(--chroma-brand) * 0.9) var(--hue-brand));
    --ring: oklch(72% var(--chroma-brand) var(--hue-brand));
    --shadow-color: color-mix(in oklch, black 40%, transparent);
  }
}
:root[data-theme="dark"] {
  --background: oklch(16% 0.012 var(--hue-brand));
  --foreground: oklch(94% 0.01 var(--hue-brand));
  --surface-2: oklch(20% 0.014 var(--hue-brand));
  --surface-3: oklch(25% 0.016 var(--hue-brand));
  --card: oklch(20% 0.014 var(--hue-brand));
  --popover: oklch(22% 0.014 var(--hue-brand));
  --muted-foreground: oklch(68% 0.02 var(--hue-brand));
  --border: oklch(30% 0.02 var(--hue-brand));
  --primary: oklch(72% calc(var(--chroma-brand) * 0.9) var(--hue-brand));
  --primary-foreground: oklch(16% 0.03 var(--hue-brand));
  --primary-hover: oklch(78% calc(var(--chroma-brand) * 0.9) var(--hue-brand));
  --ring: oklch(72% var(--chroma-brand) var(--hue-brand));
  --shadow-color: color-mix(in oklch, black 40%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; --dur-enter: 0ms; --stagger: 0ms; --dur-cross: 0ms; --dur-kenburns: 0ms; }
}
