/*
 * Design tokens — "Cinnabar & Ink" (朱墨).
 * Mirrors the Android theme (docs/design-guidelines.md in the app repo).
 * Cinnabar is the only accent: action and brand, never error.
 */
:root {
  color-scheme: light dark;

  /* Light palette */
  --bg: #f4efe4;            /* RicePaper */
  --surface: #fffdf8;       /* PaperWhite */
  --surface-variant: #ece4d5; /* PaperSand */
  --text: #1e1c1a;          /* Ink */
  --text-muted: #6a6258;    /* InkGrey */
  --line: #e3dacb;          /* PaperLine */
  --accent: #b3312a;        /* Cinnabar */
  --on-accent: #fffdf8;
  --accent-soft: #f5dcd3;   /* CinnabarSoft */
  --success: #2b6a5a;       /* Jade */
  --success-soft: #dcece5;
  --on-success-soft: #163e34;
  --attention: #c88a1a;     /* Amber */
  --attention-soft: #faedd2;
  --on-attention-soft: #5c3e00;
  --inverse: #1e1c1a;
  --on-inverse: #f4efe4;

  /* Type */
  --font-ui: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-han: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", sans-serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-xl: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);
  --fs-hero: clamp(2.25rem, 1.5rem + 3.4vw, 4.25rem);

  /* Shape and space */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --space-section: clamp(4rem, 3rem + 5vw, 7.5rem);
  --content-width: 72rem;
  --reading-width: 44rem;

  --shadow-card: 0 1px 2px rgb(30 28 26 / 6%), 0 8px 24px rgb(30 28 26 / 6%);
  --shadow-phone: 0 2px 6px rgb(30 28 26 / 10%), 0 30px 60px -20px rgb(30 28 26 / 28%);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1816;
    --surface: #24211e;
    --surface-variant: #2e2a26;
    --text: #f2ede4;
    --text-muted: #b8afa3;
    --line: #3f3a34;
    --accent: #ee8e7e;
    --on-accent: #4a0f09;
    --accent-soft: #5c231d;
    --success: #7fc4ae;
    --success-soft: #1d3a33;
    --on-success-soft: #cbebdf;
    --attention: #e2b65c;
    --attention-soft: #4a3a14;
    --on-attention-soft: #f6e3b4;
    --inverse: #f2ede4;
    --on-inverse: #1a1816;

    --shadow-card: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    --shadow-phone: 0 2px 6px rgb(0 0 0 / 35%), 0 30px 60px -20px rgb(0 0 0 / 60%);
  }
}
