:root {
  color-scheme: dark;
  --background: #0f1319;
  --surface-1: #171c24;
  --surface-2: #1f2630;
  --text-primary: #e6e9ee;
  --text-muted: #8b95a5;
  --border: #617194;
  --chart-grid: #232b36;
  --accent: #e94560;
  --accent-hover: #f25c75;
  --green: #2d6a4f;
  --blue: #0f3460;
  --feedback-correct: #7c6bd8;
  --feedback-incorrect: #d9873b;
  --candle-jp-up: #ef5350;
  --candle-jp-down: #42a5f5;
  --candle-global-up: #4caf50;
  --candle-global-down: #ef5350;
  --focus-ring: #5b9bd5;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-num: "Inter", "SF Mono", "Menlo", monospace;
  --font-size-body: 17px;
  --font-size-ui: 15px;
  --font-size-small: 13px;
  --line-height-body: 1.85;
  --line-height-prose-loose: 2;
  --line-height-ui: 1.6;
  --line-height-heading: 1.35;
  --letter-spacing-body: 0.02em;
  --letter-spacing-heading: -0.01em;
  --letter-spacing-note: 0.03em;
  --letter-spacing-num: 0;
  --measure: 38em;
  --progress-track: #232b36;
  --progress-fill: #66bb6a;
  --progress-fill-strong: #4caf50;
  --radius: 8px;
}
html[data-theme="light"] {
  color-scheme: light;
  --background: #F3F0E8;
  --surface-1: #FFFFFF;
  --surface-2: #EEF4F2;
  --text-primary: #4A4F57;
  --text-heading: #2F3540;
  --text-muted: #5B6675;
  --border: #8C7F68;
  --chart-grid: #dde1e8;
  --accent: #2E6BD8;
  --accent-hover: #2559BC;
  --accent-bg: #EAF1FD;
  --accent-border: #B9D0F5;
  --feedback-correct: #5F4DBF;
  --feedback-correct-bg: #F0EDFB;
  --feedback-incorrect: #B8661E;
  --feedback-incorrect-bg: #FCF1E5;
  --focus-ring: #2E6BD8;
  --progress-track: #d1d5db;
}
html[data-candle="global"] {
  --candle-jp-up: #4caf50;
  --candle-jp-down: #ef5350;
}
@media (max-width: 640px) { :root { --font-size-body: 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
*:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; letter-spacing: var(--letter-spacing-num); text-align: right; }
.prose { max-width: var(--measure); }
