/*
  1.3 の見た目「ちいさな相棒と暮らす」の Web 版。アプリの色・文字（ios/FoodLogWidgetShared/DesignSystem.swift の
  Brand・BrandFont）をそのまま写し、生成時の editorial テーマ（theme.css）の値を上書きする。theme.css は :where で
  詳細度 0 なので、この :root が勝つ。色の組は文字が 4.5:1、入力の枠と焦点の輪が 3:1 以上（ライトとダークの両方）。
*/

/* 文字は Zen Maru Gothic（OFL、public/fonts/ZenMaruGothic-OFL.txt）。画面の文字だけに絞ってある（scripts/web-fonts.ts）。
   アプリと同じく、ふつうの文字は Medium、太字は Bold、いちばん太い字は Black で描く。 */
@font-face {
  font-display: swap;
  font-family: "Zen Maru Gothic";
  font-style: normal;
  font-weight: 100 500;
  src: url("/fonts/ZenMaruGothic-Medium.woff2") format("woff2");
}
@font-face {
  font-display: swap;
  font-family: "Zen Maru Gothic";
  font-style: normal;
  font-weight: 600 700;
  src: url("/fonts/ZenMaruGothic-Bold.woff2") format("woff2");
}
@font-face {
  font-display: swap;
  font-family: "Zen Maru Gothic";
  font-style: normal;
  font-weight: 800 900;
  src: url("/fonts/ZenMaruGothic-Black.woff2") format("woff2");
}

:root {
  /* 生成りの地・白いカード・こげ茶の文字・柿色のアクセント。 */
  --background: #fbf3e9;
  --foreground: #3d2b1f;
  --card: #ffffff;
  --card-foreground: #3d2b1f;
  --popover: #ffffff;
  --popover-foreground: #3d2b1f;
  --primary: #bf4517;
  --primary-foreground: #ffffff;
  /* Brand.track: 控えめなボタンの地。 */
  --secondary: #f3e7db;
  --secondary-foreground: #3d2b1f;
  --muted: #f3e7db;
  /* Brand.secondaryText: 補足の文字。地・カード・track の上で 5.3:1 以上。 */
  --muted-foreground: #6f5a4c;
  --accent: #bf4517;
  --accent-foreground: #ffffff;
  --destructive: #b8203f;
  --destructive-foreground: #ffffff;
  --border: #eadccd;
  /* 入力の枠（同意のチェックボックス）は線画のこげ茶。 */
  --input: #6b4a36;
  --ring: #bf4517;
  /* カードとボタンの下の縁（Brand.line の 8%・18%）と、主ボタンの濃い縁（Brand.accentRim）。 */
  --card-edge: rgb(107 74 54 / 0.08);
  --button-edge: rgb(107 74 54 / 0.18);
  --primary-edge: #9e3e13;
  /* 押せない主ボタンの地（薄い柿色、アプリも同じ値）。補足の文字 --muted-foreground との比は 4.74:1。下の縁も同じ色。 */
  --primary-disabled: #f7d6c4;
  --radius: 8px;
  --padding-px: 20px;
  --font-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --font-text: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
}

/* 夜の部屋: 濃い茶の地とカード、明るい柿色。food-log は data-theme を使わないので、OS の設定だけで切り替える。 */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #1b1612;
    --foreground: #f3e9df;
    --card: #2a221c;
    --card-foreground: #f3e9df;
    --popover: #2a221c;
    --popover-foreground: #f3e9df;
    --primary: #ff8c5a;
    --primary-foreground: #1c0d06;
    --secondary: #3b312a;
    --secondary-foreground: #f3e9df;
    --muted: #3b312a;
    --muted-foreground: #c9b8aa;
    --accent: #ff8c5a;
    --accent-foreground: #1c0d06;
    --destructive: #ff7591;
    --destructive-foreground: #1c0d06;
    --border: #3b312a;
    --input: #c9a98f;
    --ring: #ff8c5a;
    --card-edge: rgb(201 169 143 / 0.08);
    --button-edge: rgb(201 169 143 / 0.18);
    --primary-edge: #c9663a;
    /* 補足の文字 --muted-foreground との比は 6.44:1。 */
    --primary-disabled: #4d2c1e;
  }
}
