/* ============================================================
   yunikaliu.com · Lila · design tokens
   唯一权威见 BRAND.md。改这里, 再改站。
   主题层与内容层解耦: 换心情 = 只改本文件 (BRAND.md §7.4)
   ============================================================ */

/* ---------- self-hosted fonts (BRAND.md §3, 禁 CDN) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- WORLD 1-1 · Sunlit Fairway (default: day) ---------- */
:root,
:root[data-theme="day"] {
  color-scheme: light;

  --bg: #F6EEDF;             /* 白沙米 正文底 */
  --bg-soft: #EFE5D2;
  --ink: #2E3833;            /* 正文字 */
  --ink-soft: #5c5546;
  --ink-faint: #8a8172;

  --accent: #55A860;         /* 球场绿 主强调 */
  --accent-deep: #35804A;    /* 主按钮 */
  --accent-btn-shadow: #245a33;
  --link: #5296BE;           /* 海天蓝 链接/次按钮 */
  --hi: #F2C14E;             /* 暖阳 高亮/荧光笔 */
  --hi-wash: rgba(242, 193, 78, 0.55);
  --stamp: #EA7FA5;          /* 砧木花 印章专用 */

  --sky: #8FD0EF;
  --sky-deep: #5CB6E4;
  --dirt: #D98A3F;
  --dirt-deep: #B06A2A;

  --card: rgba(255, 255, 255, 0.55);
  --hud-bg: rgba(255, 255, 255, 0.42);
  --hud-ink: #35804A;
  --rule: rgba(46, 56, 51, 0.14);

  --btn-primary-bg: var(--accent-deep);
  --btn-primary-ink: #F6FBF4;
  --btn-ghost-ink: var(--link);
  --chip-bg: rgba(85, 168, 96, 0.16);
  --chip-ink: #35804A;
  --chip-alt-bg: rgba(82, 150, 190, 0.15);
  --chip-alt-ink: #3E7E96;

  --em-ink: inherit;
  --em-shadow: none;
  --em-bg: linear-gradient(transparent 62%, var(--hi-wash) 62%);
}

/* ---------- WORLD 1-2 · Camper in the Rain ---------- */
:root[data-theme="night"] {
  color-scheme: dark;

  --bg: #131A2E;             /* 夜雨 */
  --bg-soft: #0D1322;
  --ink: #EDEBE4;            /* 瓷白 */
  --ink-soft: #B9B6AC;
  --ink-faint: #7E7F8D;

  --accent: #5BC8DF;         /* 霓虹青 强调/交互态 */
  --accent-deep: #E9A65A;    /* 车窗灯 主按钮 */
  --accent-btn-shadow: #96601f;
  --link: #5BC8DF;
  --hi: #5BC8DF;
  --hi-wash: rgba(91, 200, 223, 0.28);
  --stamp: #C86BC9;          /* 霓虹粉 次强调 */

  --sky: #0D1322;
  --sky-deep: #1A2038;
  --dirt: #232B45;
  --dirt-deep: #1A2038;

  --card: rgba(13, 19, 34, 0.55);
  --hud-bg: rgba(13, 19, 34, 0.55);
  --hud-ink: #5BC8DF;
  --rule: rgba(237, 235, 228, 0.16);

  --btn-primary-bg: #E9A65A;
  --btn-primary-ink: #241703;
  --btn-ghost-ink: #5BC8DF;
  --chip-bg: rgba(200, 107, 201, 0.16);
  --chip-ink: #E4B7E5;
  --chip-alt-bg: rgba(91, 200, 223, 0.14);
  --chip-alt-ink: #5BC8DF;

  --em-ink: #5BC8DF;
  --em-shadow: 0 0 14px rgba(91, 200, 223, 0.45);
  --em-bg: none;
}
