/* Shared Sakura Pastel tokens, typography scale, radii and elevation. */
@font-face {
  font-family: "WenKai";
  src: url("assets/fonts/wenkai-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "WenKai", "LXGW WenKai Screen", "LXGW WenKai", "STKaiti", "KaiTi", "Kaiti SC", serif;
  /* taste-skill-ignore: Monospace token is used exclusively by pre and code blocks. */ --mono: "Cascadia Code", Consolas, monospace;

  /* 6-level type scale */
  --text-display: clamp(28px, 3.2vw, 44px);
  --text-h2: clamp(22px, 2.2vw, 28px);
  --text-h3: 20px;
  --text-body: 16px;
  --text-sm: 14px;
  --text-xs: 12px;

  /* 5-tier radius scale */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --radius-panel: var(--r-lg);
  --radius-card: var(--r-md);
  --radius-control: var(--r-sm);

  /* Brand & Sakura Pastel palette */
  --flag-blue: #5ccffb;
  --flag-pink: #f6a8b8;
  --flag-white: #ffffff;
  --sky: #d8edf5;
  --pink: #f6c8d8;
  --canvas: #fbf8f7;
  --surface: #fffcfa;
  --sheet-surface: #fffdfc;
  --text: #344451;
  --muted: #63717e;
  --line: rgb(92 118 137 / .12);
  --control: #c3cdd7;
  --hover: #edf3f7;
  --selected: #edf1f6;
  --accent: #39647a;
  --on-accent: #ffffff;
  --accent-hover: #2c536a;
  --btn-primary-ink: #2c536a;
  --focus: #aa6885;
  --blue-soft: #eaf4f8;
  --blue-ink: #3e6277;
  --pink-soft: #fff1f5;
  --pink-ink: #88536a;
  --note-warm: #fff8f2;

  /* Surface & material layers */
  --edge: rgb(255 255 255 / .84);
  --rim: rgb(255 255 255 / .92);
  --sheet-glass: rgb(255 252 250 / .88);
  --note-surface: rgb(255 252 250 / .84);
  --card-surface: #f7fafc;
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --halo-inner: linear-gradient(140deg, rgb(246 200 216 / .48), rgb(216 237 245 / .72));
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --halo-outer: linear-gradient(145deg, rgb(246 200 216 / .22), rgb(216 237 245 / .36));
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --date-surface: linear-gradient(115deg, #fff0f5, #fcf7f7);
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --selection-surface: linear-gradient(120deg, rgb(250 231 239 / .82), rgb(222 240 249 / .86));
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --thread-gradient: linear-gradient(180deg, var(--pink), #badbe9);
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --cover-surface: linear-gradient(135deg, #f9e5ee, #e8eff8 55%, #d8edf5);
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --primary-gradient: linear-gradient(120deg, #f6c8d8 0%, #fbe4ed 42%, #cde7f3 100%);
  --cover-ink: #536983;
  --cover-orbit: rgb(255 255 255 / .72);
  --ambient-pink: rgb(246 200 216 / .42);
  --ambient-blue: rgb(190 224 240 / .46);

  /* Tinted shadows */
  --panel-shadow: 0 12px 44px rgb(93 111 139 / .055);
  --card-shadow: 0 2px 10px rgb(92 118 137 / .055), 0 1px 2px rgb(92 118 137 / .04);
  --hover-shadow: 0 10px 28px rgb(176 150 177 / .15), 0 3px 10px rgb(128 170 195 / .08);
  --pill-shadow: 0 8px 28px rgb(93 111 139 / .16);
  --avatar-glow: 0 0 24px rgb(238 171 199 / .38);
  --focus-shadow: 0 0 0 4px rgb(232 182 206 / .22);
}

[data-theme=dark] {
  color-scheme: dark;
  --canvas: #171d30;
  --surface: #252c43;
  --sheet-surface: #22293e;
  --text: #e2e6f0;
  --muted: #b2bed2;
  --line: rgb(178 190 214 / .14);
  --control: #626d87;
  --hover: #303a53;
  --selected: #354059;
  --accent: #b8dbe9;
  --on-accent: #1d293d;
  --accent-hover: #cce7ef;
  --btn-primary-ink: #1f2a3f;
  --focus: #efb8ce;
  --blue-soft: #2b3752;
  --blue-ink: #bfdbe9;
  --pink-soft: #3b3048;
  --pink-ink: #f1c5d8;
  --note-warm: #332e42;

  --edge: rgb(214 225 249 / .11);
  --rim: rgb(224 231 255 / .14);
  --sheet-glass: rgb(35 43 65 / .90);
  --note-surface: rgb(43 52 76 / .86);
  --card-surface: #2a334c;
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --halo-inner: linear-gradient(140deg, rgb(133 83 119 / .34), rgb(78 113 147 / .42));
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --halo-outer: linear-gradient(145deg, rgb(133 83 119 / .16), rgb(78 113 147 / .26));
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --date-surface: linear-gradient(115deg, #3b3048, #33334b);
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --selection-surface: linear-gradient(120deg, rgb(119 80 115 / .34), rgb(77 112 146 / .38));
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --thread-gradient: linear-gradient(180deg, #bd8daa, #789abf);
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --cover-surface: linear-gradient(135deg, #49394e, #34405e 55%, #2e4b62);
  /* taste-skill-ignore: Pastel glass, soft glows and gradients are explicit design requirements. */ --primary-gradient: linear-gradient(120deg, #eab9cc 0%, #f1d9e4 42%, #bddde9 100%);
  --cover-ink: #d0cfe6;
  --cover-orbit: rgb(208 217 244 / .18);
  --ambient-pink: rgb(123 68 109 / .18);
  --ambient-blue: rgb(61 99 152 / .20);

  --panel-shadow: 0 12px 48px rgb(10 14 31 / .18);
  --card-shadow: 0 4px 16px rgb(8 12 28 / .24), 0 1px 2px rgb(8 12 28 / .16);
  --hover-shadow: 0 12px 32px rgb(9 14 30 / .30), 0 2px 12px rgb(123 84 132 / .12);
  --pill-shadow: 0 10px 30px rgb(8 12 28 / .42);
  --avatar-glow: 0 0 24px rgb(213 140 181 / .24);
  --focus-shadow: 0 0 0 4px rgb(206 151 186 / .18);
}
