/* HA7CH 网页设计变量（取自"HA7CH 项目树"页面）。组件只引用变量，不写死颜色。 */
:root {
  --bg: #f6f7f5;
  --panel: #ffffff;
  --fg: #1d2420;
  --muted: #5f6b64;
  --line: #dde2dd;
  --accent: #1f5c4a;
  --accent-soft: #e2eee8;
  --warn: #9a5b00;
  --warn-soft: #fbefd9;
  --ok: #2e7d4f;
  --off: #8a948e;
  --pause: #b07a12;
  --danger: #b23b3b;
  /* 有 CSP 不能加载网络字体时，会自动回退到苹方 / 系统字体。 */
  --sans:
    "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC",
    "Microsoft YaHei", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 8px;
  --radius-sm: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121614;
    --panel: #1a1f1c;
    --fg: #e4e9e5;
    --muted: #98a39c;
    --line: #2c342f;
    --accent: #7cc4a8;
    --accent-soft: #1f3129;
    --warn: #f0b85c;
    --warn-soft: #3a2c14;
    --ok: #6ccf95;
    --off: #6d7771;
    --pause: #e0aa45;
    --danger: #f08a8a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121614;
  --panel: #1a1f1c;
  --fg: #e4e9e5;
  --muted: #98a39c;
  --line: #2c342f;
  --accent: #7cc4a8;
  --accent-soft: #1f3129;
  --warn: #f0b85c;
  --warn-soft: #3a2c14;
  --ok: #6ccf95;
  --off: #6d7771;
  --pause: #e0aa45;
  --danger: #f08a8a;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    15px/1.6 var(--sans);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
