/* 陽光沙灘 visual system — design tokens (v1, 2026-11-30).
   One source for www, the sign-in pages, the chat app and mail. Two schemes:
   dark  = 「深海夜」 canonical brand night (homepage identity: deep sea + #00d2ff tide + #ffb703 sun);
   light = 「白晝沙灘」 sand and noon sky.
   No external fonts: local stacks only (CSP / no CDN). */
:root {
  color-scheme: light dark;

  /* ---- raw palette (scheme-independent) ---- */
  --c-abyss: #04070e;  --c-deep: #060911;  --c-night: #0b1220;  --c-reef: #111a2e;  --c-shelf: #1a2742;  --c-shoal: #263656;
  --c-tide: #00d2ff;   --c-tide-2: #38bdf8; --c-tide-ink: #0b6e8a; --c-lagoon: #0284c7;
  --c-sun: #ffb703;    --c-sun-2: #ffd166; --c-sun-ink: #8a5a00; --c-ember: #ff8a3d;
  --c-moon: #eef0ff;   --c-foam: #f5f8fc;  --c-sand: #f6f1e7;   --c-sand-2: #efe5d2; --c-dune: #e2d6bf; --c-shell: #fffdf8;
  --c-coral: #ff8a80;  --c-coral-ink: #b3261e; --c-kelp: #5ee0a0; --c-kelp-ink: #1d6b45; --c-dusk: #c48fb4;

  /* ---- type ---- */
  --font-display: "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
  --font-sans: "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "Noto Sans Mono CJK TC", SFMono-Regular, Menlo, Consolas, monospace;
  /* scale 1.2 (minor third) from 16px; helper text never below 13px (QA: mobile hint ~10px) */
  --fs-2xs: .8125rem; --fs-xs: .8125rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.2rem; --fs-xl: 1.44rem;
  --fs-2xl: 1.728rem; --fs-3xl: 2.488rem; --fs-hero: clamp(2.4rem, 5.2vw, 4rem);
  --lh-body: 1.7; --lh-tight: 1.25;

  /* ---- space / radius / motion ---- */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1); --t-fast: .15s; --t-med: .3s;
  --tap: 44px;

  /* ---- semantic: light 「白晝沙灘」 ---- */
  --bg: var(--c-sand); --bg-2: var(--c-sand-2); --surface: var(--c-shell); --surface-2: #f3ecdf; --glass: rgba(255, 253, 248, .86);
  --line: var(--c-dune); --line-strong: #9c8c6c;
  --text: #10213a; --text-2: #2c3e5a; --muted: #56657c; --placeholder: #6b7a90;
  --accent: var(--c-tide-ink); --accent-hover: #085a71; --on-accent: #ffffff; --accent-soft: #dcf0f5; --accent-ink: #0a5a70;
  --sun: var(--c-sun); --on-sun: #231a00; --sun-soft: #fdf0cc; --sun-ink: var(--c-sun-ink); --sun-line: #ecc969;
  --ok: var(--c-kelp-ink); --ok-bg: #e1f3e9; --ok-line: #a9d8bd;
  --err: var(--c-coral-ink); --err-bg: #fbe7e5; --err-line: #efb3ae;
  --info: var(--accent-ink); --info-bg: var(--accent-soft); --info-line: #a9d6e2;
  --focus: #1f5fd1; --scrim: rgba(16, 33, 58, .45);
  --shadow-1: 0 1px 2px rgba(16, 33, 58, .07);
  --shadow-2: 0 12px 32px rgba(16, 33, 58, .12), 0 2px 6px rgba(16, 33, 58, .06);
  --shadow-3: 0 28px 70px rgba(16, 33, 58, .25);
  --sky: linear-gradient(180deg, #9fd3ea 0%, #cde9f2 55%, #f7e3c4 100%);
  --sea: linear-gradient(180deg, #3b9fbf 0%, #1f7d9f 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* ---- semantic: dark 「深海夜」 (canonical) ---- */
    --bg: var(--c-deep); --bg-2: var(--c-night); --surface: var(--c-reef); --surface-2: var(--c-shelf); --glass: rgba(9, 15, 28, .80);
    --line: rgba(148, 197, 255, .16); --line-strong: #5f7aa3;
    --text: var(--c-foam); --text-2: #c9d4e3; --muted: #9db0c9; --placeholder: #8396b1;
    --accent: var(--c-tide); --accent-hover: #5ee3ff; --on-accent: #03121a; --accent-soft: rgba(0, 210, 255, .13); --accent-ink: #7fe6ff;
    --sun: var(--c-sun); --on-sun: #231a00; --sun-soft: rgba(255, 183, 3, .13); --sun-ink: var(--c-sun-2); --sun-line: rgba(255, 209, 102, .45);
    --ok: var(--c-kelp); --ok-bg: rgba(94, 224, 160, .12); --ok-line: rgba(94, 224, 160, .35);
    --err: var(--c-coral); --err-bg: rgba(255, 138, 128, .12); --err-line: rgba(255, 138, 128, .38);
    --info-line: rgba(0, 210, 255, .35);
    --focus: #ffd166; --scrim: rgba(2, 4, 10, .66);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 14px 36px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 210, 255, .05);
    --shadow-3: 0 28px 80px rgba(0, 0, 0, .7);
    --sky: linear-gradient(180deg, #050913 0%, #0b1631 55%, #1c2b4d 100%);
    --sea: linear-gradient(180deg, #0c2a3c 0%, #04101c 100%);
  }
}
