:root {
  color-scheme: light;
  --ink: #101114;
  --paper: #ffffff;
  --muted: #5a606b;
  --line: #d8dbe3;
  --surface: #f3f5f8;
  --surface-raised: #ffffff;
  --accent-solid: #204cfc;
  --accent-text: #204cfc;
  --palette-cobalt: #204cfc;
  --palette-forest: #087451;
  --palette-coral: #b93d20;
  --on-accent: #ffffff;
  --blue: var(--accent-text);
  --about-surface: var(--accent-solid);
  --about-ink: #ffffff;
  --about-muted: #dce3ff;
  --inverse-surface: #101114;
  --inverse-ink: #ffffff;
  --radius-card: 0px;
  --radius-control: 2px;
  --space-factor: 1;
  --font-sans: 'DM Sans', 'Noto Sans KR', sans-serif;
  --gutter: clamp(22px, 4.1vw, 72px);
  --control-min-size: 44px;
  --text-control: 12px;
  --control-border: #858d9a;
  --focus-ring: var(--accent-text);
  --disabled-ink: #727987;
  --disabled-surface: #e9ecf1;
  --success-text: #176b4e;
  --success-surface: #edf8f2;
  --success-line: #3c8668;
  --warning-text: #80520c;
  --warning-surface: #fff7e3;
  --warning-line: #ab751f;
  --danger-text: #b42332;
  --danger-surface: #fff1f2;
  --danger-line: #c64a59;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 20px;
  --leading-body: 1.6;
  --duration-fast: 140ms;
  --overlay-scrim: rgba(0, 0, 0, .48);
  --shadow-popover: 0 8px 28px rgba(0, 0, 0, .16);
  --shadow-dialog: 0 24px 72px rgba(0, 0, 0, .24);
}

@media (max-width: 700px) {
  :root { --gutter: 22px; }
}

:root[data-accent='forest'] { --accent-solid: #087451; --accent-text: #087451; --about-muted: #d4f5e8; }
:root[data-accent='coral'] { --accent-solid: #b93d20; --accent-text: #b93d20; --about-muted: #ffe1d9; }
:root[data-density='compact'] { --space-factor: .8; }
:root[data-corners='soft'] { --radius-card: 20px; --radius-control: 12px; }

:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #f2f4f8;
  --paper: #111318;
  --muted: #b2b8c4;
  --line: #444a56;
  --surface: #1c2028;
  --surface-raised: #282d37;
  --accent-text: #9aafff;
  --about-surface: #1b2540;
  --about-ink: #f5f7ff;
  --about-muted: #c1c9de;
  --inverse-surface: #f2f4f8;
  --inverse-ink: #101114;
  --control-border: #737e90;
  --disabled-ink: #99a2b2;
  --disabled-surface: #202631;
  --success-text: #8cdeb7;
  --success-surface: #142b23;
  --success-line: #4e9a78;
  --warning-text: #f3cc83;
  --warning-surface: #302719;
  --warning-line: #b28d46;
  --danger-text: #ff9ba5;
  --danger-surface: #351f25;
  --danger-line: #c26b77;
}

:root[data-theme='dark'][data-accent='forest'] { --accent-text: #68dfb1; --about-surface: #173029; --about-muted: #b7e1d1; }
:root[data-theme='dark'][data-accent='coral'] { --accent-text: #ffa58e; --about-surface: #35231f; --about-muted: #e7c1b8; }

/* CSS alone follows the OS when scripting is disabled and no resolved theme is set. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --ink: #f2f4f8;
    --paper: #111318;
    --muted: #b2b8c4;
    --line: #444a56;
    --surface: #1c2028;
    --surface-raised: #282d37;
    --accent-text: #9aafff;
    --about-surface: #1b2540;
    --about-ink: #f5f7ff;
    --about-muted: #c1c9de;
    --inverse-surface: #f2f4f8;
    --inverse-ink: #101114;
    --control-border: #737e90;
    --disabled-ink: #99a2b2;
    --disabled-surface: #202631;
    --success-text: #8cdeb7;
    --success-surface: #142b23;
    --success-line: #4e9a78;
    --warning-text: #f3cc83;
    --warning-surface: #302719;
    --warning-line: #b28d46;
    --danger-text: #ff9ba5;
    --danger-surface: #351f25;
    --danger-line: #c26b77;
  }
  :root:not([data-theme])[data-accent='forest'] { --accent-text: #68dfb1; --about-surface: #173029; --about-muted: #b7e1d1; }
  :root:not([data-theme])[data-accent='coral'] { --accent-text: #ffa58e; --about-surface: #35231f; --about-muted: #e7c1b8; }
}
