/* 共通のスタイル定義（ここが唯一の置き場）：配色・字体・余白・角丸・ボタン・入力欄・状態表示のトークン。
   他のCSS・JSでは色や寸法を直書きせず、この変数だけを使う（設計書136 §16-1 ①）。 */
:root {
  /* 配色：紙のような中間色の背景＋深い藍の強調色 */
  --c-bg: #f5f4ef;
  --c-surface: #ffffff;
  --c-surface-alt: #eeede6;
  --c-border: #d6d3c8;
  --c-border-strong: #a9a597;
  --c-text: #1d2230;
  --c-text-muted: #545a6b;
  --c-accent: #2b44c7;
  --c-accent-strong: #1f33a0;
  --c-accent-soft: #e4e8fb;
  --c-on-accent: #ffffff;
  --c-focus: #b35900;     /* 背景(#f5f4ef)に4.39:1・白に4.83:1（非テキスト3:1以上）。旧 #e08a00 は 2.44:1 で不足 */

  /* 状態の色（色だけに頼らず、記号・文字でも区別する：status 部品を使う） */
  --c-ok: #136c40;
  --c-ok-bg: #e2f3ea;
  --c-ng: #a8261e;
  --c-ng-bg: #fbe7e4;
  --c-hint: #7a4f00;
  --c-hint-bg: #fff1cf;
  --c-err: #8a1f5c;
  --c-err-bg: #f8e6f0;
  --c-info: #1b5a9c;
  --c-info-bg: #e3eefa;
  --c-assist: #5a4a00;
  --c-assist-bg: #f6f0c9;

  /* コード表示 */
  --c-code-bg: #1e2233;
  --c-code-text: #eef0f8;
  --c-code-gutter: #8d94b3;
  --c-code-gutter-bg: #181b2a;
  --c-code-mark: #4a3a10;
  --c-editor-bg: #ffffff;
  --c-editor-text: #1d2230;
  --c-editor-gutter: #6a7086;
  --c-editor-gutter-bg: #eeede6;

  /* 字体 */
  --font-ui: "Yu Gothic UI", "Meiryo UI", "Hiragino Sans", "Segoe UI", system-ui, sans-serif;
  --font-code: "Cascadia Mono", "Consolas", "BIZ UDGothic", "MS Gothic", ui-monospace, monospace;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 26px;
  --fs-2xl: 32px;
  --fs-code: 15px;       /* コード14px以上（暫定基準） */
  --lh-body: 1.7;
  --lh-code: 1.65;       /* 行間1.5以上（暫定基準） */

  /* 余白（4pxの倍数） */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* 角丸・影・寸法 */
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgb(29 34 48 / 8%), 0 4px 14px rgb(29 34 48 / 6%);
  --content-max: 1180px;
  --control-h: 40px;
  --border-w: 1px;
  --focus-w: 3px;
  --icon-size: 1.1em;

  /* 動き：100〜300ms。prefers-reduced-motion のときは app.css 側で無効にする */
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 300ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

  /* 主役（ホームのヒーロー等）の配色：強調色の面。文字は --c-on-accent */
  --c-hero-bg: #243aa8;
  --c-hero-sub: #dfe4ff;
  --c-celebrate-bg: #e9f6ef;
}
