/* 本機智作簿: shared product tokens. Layouts live beside each application. */
:root {
  color-scheme: light;
  --ui-font: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  --ui-mono: "SFMono-Regular", Menlo, Consolas, monospace;
  --ui-bg: #edf1f5;
  --ui-surface: #fcfdff;
  --ui-soft: #f1f5fa;
  --ui-ink: #20354e;
  --ui-muted: #52647b;
  --ui-line: #cbd6e4;
  --ui-accent: #285fb4;
  --ui-accent-hover: #1d478a;
  --ui-accent-soft: #e5eefb;
  --ui-on-accent: #fcfdff;
  --ui-rail: #112b49;
  --ui-rail-ink: #ecf3ff;
  --ui-rail-muted: #bbcee6;
  --ui-danger: #a53236;
  --ui-danger-soft: #fbecef;
  --ui-radius: 6px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ui-bg: #0e1b2c;
  --ui-surface: #15263b;
  --ui-soft: #1b3048;
  --ui-ink: #edf3fc;
  --ui-muted: #b4c5da;
  --ui-line: #405773;
  --ui-accent: #91baff;
  --ui-accent-hover: #bad3ff;
  --ui-accent-soft: #233e61;
  --ui-on-accent: #12243c;
  --ui-danger: #ffb6bf;
  --ui-danger-soft: #422833;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ui-bg: #0e1b2c; --ui-surface: #15263b; --ui-soft: #1b3048;
    --ui-ink: #edf3fc; --ui-muted: #b4c5da; --ui-line: #405773;
    --ui-accent: #91baff; --ui-accent-hover: #bad3ff;
    --ui-accent-soft: #233e61; --ui-on-accent: #12243c;
    --ui-danger: #ffb6bf; --ui-danger-soft: #422833;
  }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--ui-font); background: var(--ui-bg); color: var(--ui-ink); line-height: 1.65; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, input, select { min-height: 44px; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:is(button,a,input,select,textarea,summary):focus-visible { outline: 3px solid var(--ui-accent); outline-offset: 3px; }
input, textarea, select { color: var(--ui-ink); background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); }
::placeholder { color: var(--ui-muted); opacity: 1; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 100; padding: 10px 16px; color: var(--ui-on-accent); background: var(--ui-accent); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
[data-theme-toggle] { padding: 7px 12px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); color: var(--ui-ink); background: var(--ui-surface); white-space: nowrap; font-size: .85rem; }
button[data-theme-toggle]:hover { background: var(--ui-soft); color: var(--ui-ink); }
button[data-theme-toggle]:hover { background: var(--ui-soft); color: var(--ui-ink); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
