/* Free Chat design tokens + fonts ("Gallery", same family as insta-editor.com, Nov 2026).
   Shared contract between site.css (all site pages) and the chat page (assets/pages/chat.php): both use only --fc-*.
   Theme: light by default, dark from prefers-color-scheme until the visitor chooses; the choice is stored in
   localStorage "fc-theme" (dark|light) and applied as html[data-theme] before the first paint (assets/elements/head.php).
   --fc-accent is ink: primary pill buttons, selected states; --fc-accent-text is the text on it.
   --fc-accent-2 (terracotta) is the one warm accent: numerals, focus ring, links on hover, small labels.
   Fonts: Inter and Noto Serif Display, SIL Open Font License 1.1 (fonts/OFL-*.txt). */

@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-greek-wght-normal.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-vietnamese-wght-normal.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

@font-face { font-family: 'FC Display'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/noto-serif-display-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'FC Display'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/noto-serif-display-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-017F, U+0218-021B, U+1E9E; }
@font-face { font-family: 'FC Display'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/noto-serif-display-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'FC Display'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/noto-serif-display-greek-wght-normal.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'FC Display'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/noto-serif-display-vietnamese-wght-normal.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'FC Display'; font-style: italic; font-display: swap; font-weight: 100 900;
  src: url(../fonts/noto-serif-display-latin-wght-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  color-scheme: light;
  --fc-bg: #f5f2ec;          /* paper */
  --fc-surface: #fffdf9;     /* cards, composer, AI message */
  --fc-surface-2: #ece8e0;   /* wells, footer, hover, user bubble */
  --fc-border: #d9d2c6;      /* hairlines */
  --fc-border-strong: #c4bbad;
  --fc-text: #16140f;        /* ink */
  --fc-text-muted: #5c574e;  /* 6.4:1 on paper */
  --fc-accent: #16140f;
  --fc-accent-text: #fffdf9;
  --fc-accent-soft: #e6e0d5;
  --fc-accent-2: #a8431e;    /* terracotta, 5.4:1 on paper */
  --fc-warn: #8a5a00;
  --fc-danger: #b42318;
  --fc-success: #2f6b3a;
  --fc-code-bg: #1b1916;
  --fc-code-text: #ece6da;
  --fc-band: #1b1916;        /* the one dark band */
  --fc-band-text: #f3efe7;
  --fc-band-muted: #b8b1a4;
  --fc-band-rule: #3a362f;
  --fc-band-accent: #e8956b;
  --fc-ad: #e9e4db;
  --fc-header: rgba(245, 242, 236, .88);
  --fc-radius: 14px;
  --fc-radius-sm: 8px;
  --fc-radius-lg: 22px;
  --fc-shadow: 0 1px 0 rgba(22, 20, 15, .04), 0 18px 40px -20px rgba(22, 20, 15, .32);
  --fc-float: 0 1px 0 rgba(22, 20, 15, .05), 0 30px 60px -24px rgba(22, 20, 15, .45);
  --fc-font: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fc-display: 'FC Display', 'Noto Serif Display', Georgia, 'Times New Roman', serif;
  --fc-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  --fc-wrap: 1240px;
  --fc-pad: clamp(16px, 4vw, 48px);
  --fc-ease: cubic-bezier(.2, .7, .1, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fc-bg: #141311;
    --fc-surface: #1c1a17;
    --fc-surface-2: #24221e;
    --fc-border: #36332d;
    --fc-border-strong: #4a463e;
    --fc-text: #f1ece3;
    --fc-text-muted: #a8a196;
    --fc-accent: #f1ece3;
    --fc-accent-text: #141311;
    --fc-accent-soft: #2c2925;
    --fc-accent-2: #e8956b;
    --fc-warn: #e9b65c;
    --fc-danger: #ff8f80;
    --fc-success: #7fcf8e;
    --fc-code-bg: #0d0c0b;
    --fc-code-text: #ece6da;
    --fc-band: #0d0c0b;
    --fc-band-rule: #2f2c27;
    --fc-ad: #211f1b;
    --fc-header: rgba(20, 19, 17, .86);
    --fc-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -20px rgba(0, 0, 0, .8);
    --fc-float: 0 1px 0 rgba(0, 0, 0, .3), 0 30px 60px -24px rgba(0, 0, 0, .9);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fc-bg: #141311;
  --fc-surface: #1c1a17;
  --fc-surface-2: #24221e;
  --fc-border: #36332d;
  --fc-border-strong: #4a463e;
  --fc-text: #f1ece3;
  --fc-text-muted: #a8a196;
  --fc-accent: #f1ece3;
  --fc-accent-text: #141311;
  --fc-accent-soft: #2c2925;
  --fc-accent-2: #e8956b;
  --fc-warn: #e9b65c;
  --fc-danger: #ff8f80;
  --fc-success: #7fcf8e;
  --fc-code-bg: #0d0c0b;
  --fc-code-text: #ece6da;
  --fc-band: #0d0c0b;
  --fc-band-rule: #2f2c27;
  --fc-ad: #211f1b;
  --fc-header: rgba(20, 19, 17, .86);
  --fc-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -20px rgba(0, 0, 0, .8);
  --fc-float: 0 1px 0 rgba(0, 0, 0, .3), 0 30px 60px -24px rgba(0, 0, 0, .9);
}

/* Thai, Japanese, Korean, Chinese: system fonts (Inter and Noto Serif Display have no glyphs for them) */
:root:lang(th) { --fc-font: system-ui, -apple-system, 'Segoe UI', 'Leelawadee UI', Tahoma, 'Noto Sans Thai', sans-serif; --fc-display: var(--fc-font); }
:root:lang(ja) { --fc-font: system-ui, -apple-system, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', Meiryo, 'Noto Sans JP', sans-serif; --fc-display: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif; }
:root:lang(ko) { --fc-font: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif; --fc-display: 'Noto Serif KR', 'Batang', serif; }
:root:lang(zh) { --fc-font: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', sans-serif; --fc-display: 'Songti SC', 'SimSun', 'Noto Serif SC', serif; }
