:root,
[data-theme="dark"] {
  --bg: #0f1419;
  --sf: #1a2332;
  --sf-h: #1e2a3a;
  --bd: #2a3a4e;
  --pr: #3b82f6;
  --pr-d: #1e3a5f;
  --ok: #22c55e;
  --ok-d: #0a3d1f;
  --wn: #f59e0b;
  --wn-d: #3d2a06;
  --ng: #ef4444;
  --ng-d: #3d1111;
  --ng-b: #ff6b6b;
  --tx: #e2e8f0;
  --tx-d: #94a3b8;
  --tx-m: #64748b;
  --ac: #06b6d4;
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --sf: #ffffff;
  --sf-h: #f8fafc;
  --bd: #e2e8f0;
  --pr: #2563eb;
  --pr-d: #dbeafe;
  --ok: #16a34a;
  --ok-d: #dcfce7;
  --wn: #d97706;
  --wn-d: #fef3c7;
  --ng: #dc2626;
  --ng-d: #fee2e2;
  --ng-b: #dc2626;
  --tx: #1e293b;
  --tx-d: #475569;
  --tx-m: #94a3b8;
  --ac: #0891b2;
}

html {
  height: 100%;
}

html,
body {
  max-width: 100vw;
}

body {
  min-height: 100%;
  color: var(--tx);
  background: var(--bg);
  /* 欧文は Geist、日本語は各OS標準の日本語フォントへ明示的にフォールバックさせる。
     Geist は日本語グリフを持たないため、日本語フォントを列挙しないと sans-serif に落ち、
     閲覧環境に中国語フォントがある場合に漢字が中華字形で表示される。 */
  font-family: var(--font-geist-sans), "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  /* ★行の高さを数値で固定する★（2026-10-01 ユーザー指摘「言語切り替え時に表などの位置も動く」）。
     既定の `normal` はフォントごとに高さが違い、日本語（Yu Gothic 等）と英語（Geist）で
     同じ文字サイズでも行が高くなったり低くなったりして、★言語を切り替えると画面全体が上下に動いていた★
     （実測: システム管理 10px / レポート 7px / ダッシュボード 5px）。数値にすれば文字サイズだけで決まる */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
  /* ★フォーム部品は行の高さを親から受け継がない★ので明示する（`body` の line-height を参照） */
  line-height: inherit;
}

html {
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
}
