/*
 * デジタル庁デザインシステム（DADS β版 v2.18.2）— 共通の変数（--dg-*）
 *
 * 値の出どころ：@digital-go-jp/design-tokens v2.1.0（MIT・© 2023 デジタル庁）
 *   全トークンは同じフォルダの 公式トークン/tokens.css（そのまま写した原本）
 *   ボタンの色・角丸・フォーカスは公式の React 見本（design-system-example-components-react の Button.tsx）
 * 出典：デジタル庁デザインシステムウェブサイト https://design.digital.go.jp/dads/ をもとに作成
 *
 * 書体の読み込み（HTML の <head> に置く）：
 *   <link rel="preconnect" href="https://fonts.googleapis.com">
 *   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 *   <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&family=Noto+Sans+Mono&display=swap" rel="stylesheet">
 *
 * 「仮置き」と書いた値は、公式で1つに決められていないもの。条件（コントラスト比）を満たす値を選んだ。
 */
:root,
[data-dg="digital-go-jp"] {
  --dg-bg: #ffffff;
  --dg-surface: #ffffff;
  --dg-surface-2: #f2f2f2;          /* Solid Gray-50 */
  --dg-text: #1a1a1a;               /* 仮置き：Solid Gray-900（本文は白地で 4.5:1 以上が条件） */
  --dg-text-muted: #666666;         /* 仮置き：Solid Gray-600（白地で 4.5:1 以上。Gray-536 #767676 が下限） */
  --dg-primary: #0017c1;            /* Key-900 = Blue-900（塗りボタンの通常時） */
  --dg-primary-hover: #00118f;      /* Key-1000（ホバー） */
  --dg-primary-active: #000060;     /* Key-1200（押したとき） */
  --dg-on-primary: #ffffff;
  --dg-primary-soft: #e8f1fe;       /* Blue-50 */
  --dg-border: #949494;             /* 仮置き：Solid Gray-420（白地で 3:1 を確保できる下限の灰色） */
  --dg-focus: #ffd43d;              /* Yellow-300。黒の外枠と二重にして使う（変えてはいけない） */
  --dg-focus-outer: #000000;
  --dg-success: #259d63;            /* Success-1 = Green-600 */
  --dg-warning: #b78f00;            /* Warning-Yellow-1 = Yellow-700（オレンジ系は Orange-600 #fb5b01） */
  --dg-danger: #ec0000;             /* Error-1 = Red-800 */
  --dg-link: #0017c1;               /* 仮置き：キーカラーの濃い青。訪問済みは紫・マゼンタ系（カラーページのスタイル例） */

  --dg-font-sans: "Noto Sans JP", sans-serif;
  --dg-font-heading: "Noto Sans JP", sans-serif;
  --dg-font-mono: "Noto Sans Mono", monospace;
  --dg-text-base: 1rem;             /* 16px。本文と UI は 16px 以上が基準 */
  --dg-line-height: 1.7;            /* Std-16N-170。本文の行間は 150% が最低限 */
  --dg-letter-spacing: 0.02em;      /* Std の 16〜26px は 2% */

  --dg-radius-s: 0.375rem;          /* 6px（Small ボタン） */
  --dg-radius-m: 0.5rem;            /* 8px（Large / Medium ボタン） */
  --dg-radius-l: 1rem;              /* 16px */
  --dg-radius-pill: 624.9375rem;    /* border-radius-full */

  /* 余白：公式は「8px を基準単位にするのが一般的」とし、決まった段は定めていない → 8 の倍数で仮置き */
  --dg-space-1: 0.25rem;
  --dg-space-2: 0.5rem;
  --dg-space-3: 1rem;
  --dg-space-4: 1.5rem;
  --dg-space-5: 2rem;
  --dg-space-6: 3rem;

  --dg-shadow-1: 0 2px 8px 1px rgba(0,0,0,0.1), 0 1px 5px 0 rgba(0,0,0,0.3);    /* elevation-1 */
  --dg-shadow-2: 0 6px 20px 4px rgba(0,0,0,0.1), 0 2px 6px 0 rgba(0,0,0,0.3);   /* elevation-4 */
  --dg-blur: none;
  --dg-glass: var(--dg-surface);

  /* 動き：公式の指定なし。控えめな値で仮置き */
  --dg-motion-fast: 120ms;
  --dg-motion-std: 200ms;
  --dg-ease: ease-out;

  --dg-tap-min: 44px;               /* ボタンのターゲット領域は 44 CSS px 以上 */
}

/*
 * 公式トークンとの対応（主なもの）
 *   --dg-primary        ← --color-key-900（= --color-primitive-blue-900）
 *   --dg-surface-2      ← --color-neutral-solid-gray-50
 *   --dg-success        ← --color-semantic-success-1
 *   --dg-warning        ← --color-semantic-warning-yellow-1
 *   --dg-danger         ← --color-semantic-error-1
 *   --dg-shadow-1 / -2  ← --elevation-1 / --elevation-4
 *   --dg-radius-m       ← --border-radius-8
 * 夜間の表示（ダーク）：公式のトークンにダークの値はない（v2.1.0 時点）
 */
