/* 诊室到家 design tokens (DESIGN.md). Two sides, one structure: staff screens use 飞书 neutrals, patient screens use the
   wine mini-program's warm paper; both use the brand deep green as the only accent. Every colour in the product comes from a
   token here. Raw values live only in the primitive block; components use the semantic names (--c-*, --r-*, --font-*).
   Colour means state: green is the accent and what a person confirms or does; red is urgent, recording and unread; AI work is
   marked with words ("AI 草稿"), never with a colour. Set <html data-side="patient"> for patient screens; staff is the default. */
:root{
 color-scheme:light;
 /* Primitives: 飞书 neutrals */
 --feishu-bg:#F2F3F5;--feishu-surface:#FFFFFF;--feishu-fill:#F2F3F5;--feishu-fill-2:#EBECEE;--feishu-line:#DEE0E3;--feishu-line-strong:#C9CDD4;
 --feishu-ink:#1F2329;--feishu-ink-2:#4E5560;--feishu-muted:#646A73;--feishu-placeholder:#8F959E;
 --feishu-scrim:rgba(31,35,41,.25);--feishu-shadow:rgba(31,35,41,.12);--feishu-shadow-near:rgba(31,35,41,.06);
 --feishu-thumb-a:rgba(0,0,0,.03);--feishu-thumb-b:rgba(0,0,0,.02);
 /* Primitives: wine mini-program paper (ganbei-mp theme/tokens.wxss --tn-bg, --tn-bg-card, --tn-text*, --tn-border*) */
 --wine-bg:#F3ECE0;--wine-surface:#FBF8F2;--wine-fill:#EFE7D8;--wine-fill-2:#E7DDCA;--wine-line:#E7DDCA;--wine-line-strong:#D8CDB8;
 --wine-ink:#1C1814;--wine-ink-2:#3B332B;--wine-muted:#6E6256;--wine-placeholder:#8A7D6A;
 --wine-human:#7A4E2A;--wine-human-wash:#EFE3D3;
 --wine-scrim:rgba(28,24,20,.25);--wine-shadow:rgba(28,24,20,.12);--wine-shadow-near:rgba(28,24,20,.06);
 /* Primitives: brand and state */
 --brand-green:#2F5D4E;--brand-green-strong:#1F4337;--brand-green-wash:#E3ECE5;--brand-green-focus:rgba(47,93,78,.35);
 --red-urgent:#B3412B;--red-urgent-wash:#F7E3DD;--red-urgent-glow:rgba(179,65,43,.35);--red-badge:#D6372C;
 --pure-white:#FFFFFF;--on-dark-track:rgba(255,255,255,.3);

 /* Semantic surfaces (staff default) */
 --c-ground:var(--feishu-bg);          /* page background */
 --c-paper:var(--feishu-surface);      /* cards, cells, bubbles, inputs */
 --c-nav:var(--feishu-surface);        /* header, tab bar, composer bar */
 --c-sunken:var(--feishu-fill);        /* chips, neutral fills, pressed rows */
 --c-sunken-2:var(--feishu-fill-2);
 /* Lines and secondary text are the side's own ink at set opacities (workerhub structure, 2026-11-20): one hue per side.
    Muted stays at 64% so 12px meta keeps 4.5:1 on both paper colours. */
 --c-line:color-mix(in srgb,var(--c-ink) 10%,transparent);--c-line-strong:color-mix(in srgb,var(--c-ink) 18%,transparent);
 /* Semantic text */
 --c-ink:var(--feishu-ink);--c-ink-2:color-mix(in srgb,var(--c-ink) 80%,transparent);--c-muted:color-mix(in srgb,var(--c-ink) 64%,transparent);--c-placeholder:color-mix(in srgb,var(--c-ink) 50%,transparent);
 /* Accent: the brand green on both sides */
 --c-green:var(--brand-green);--c-green-strong:var(--brand-green-strong);--c-green-wash:var(--brand-green-wash);
 --c-accent:var(--c-green);--c-on-accent:var(--pure-white);--c-on-ink:var(--pure-white);--c-on-dark-track:var(--on-dark-track);
 /* State: urgent, recording, unread */
 --c-cinnabar:var(--red-urgent);--c-cinnabar-wash:var(--red-urgent-wash);--c-rec-glow:var(--red-urgent-glow);
 --c-badge:var(--red-badge);--c-on-badge:var(--pure-white);
 /* What 小助手 says sits on a light green wash, so it never reads as a person (owner 2026-11-21); no AI tag beside its
    name (owner 2026-11-22: a paying patient should not feel handed to a robot). Cards it sends a patient stay paper; the
    care team's 「AI 助手」 cards take the wash too. */
 --c-ai:var(--c-green-wash);--c-ai-line:color-mix(in srgb,var(--c-green) 18%,transparent);--c-on-ai:var(--c-green-strong);--c-ai-dot:color-mix(in srgb,var(--c-green) 40%,var(--c-ai));
 /* The former amber names resolve to neutrals so old rules stay quiet */
 --c-amber:var(--c-ink-2);--c-amber-mid:var(--c-muted);--c-amber-line:var(--c-line-strong);--c-amber-wash:var(--c-sunken);
 /* A person who took over: neutral on staff screens */
 --c-human:var(--c-ink-2);--c-human-wash:var(--c-sunken-2);
 --pebble:var(--c-green);
 --scrim:var(--feishu-scrim);--focus:0 0 0 3px var(--brand-green-focus);

 /* Type: the system face only. --font-serif is a deprecated alias kept so older rules render in the sans. */
 --font-sans:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",sans-serif;
 --font-serif:var(--font-sans);
 /* Four steps, each on a fixed line height (workerhub structure): 20/24 titles, 15/24 names and body, 14/22 secondary,
    12/16 meta; the nav keeps 17. */
 --fs-title:20px;--fs-nav:17px;--fs-body:15px;--fs-sub:14px;--fs-meta:12px;--lh-body:1.6;
 --lh-title:24px;--lh-nav:22px;--lh-row:24px;--lh-sub:22px;--lh-meta:16px;
 --fw-regular:400;--fw-medium:500;--fw-strong:600;

 /* Shape: small radii, pills only for badges and counts */
 /* Shape: controls 10, cards 12, sheets 24, people round (workerhub structure) */
 --r-pill:999px;--r-ctl:10px;--r-field:10px;--r-card:12px;--r-sheet:24px;--r-bubble:12px;--r-tail:4px;--r-avatar:50%;
 /* Depth: none on cards; only dialogs, drawers and sheets float */
 --shadow-1:none;--shadow-2:none;--shadow-3:0 2px 2px var(--feishu-shadow-near),0 6px 12px var(--feishu-shadow);
 /* The selected thumb of a segmented control (Ant Design Segmented): a hairline lift, not a card shadow */
 --shadow-thumb:0 1px 2px var(--feishu-thumb-a),0 1px 6px -1px var(--feishu-thumb-b),0 2px 4px var(--feishu-thumb-b);

 --s-1:4px;--s-2:8px;--s-3:12px;--s-4:16px;--s-5:20px;--s-6:24px;--s-8:32px;
 --t-breath:2.4s;--t-ring:6s;--t-fade:.2s;
 /* Motion: an iOS-like settle for sheets, a quick press; a blurred scrim behind floating layers */
 --ease-out:cubic-bezier(.32,.72,0,1);--t-press:.12s;--scrim-blur:4px;
}
/* Patient screens: the wine paper, the same accent and states */
:root[data-side="patient"]{
 --c-ground:var(--wine-bg);--c-paper:var(--wine-surface);--c-nav:var(--wine-surface);
 --c-sunken:var(--wine-fill);--c-sunken-2:var(--wine-fill-2);
 --c-ink:var(--wine-ink);
 --c-human:var(--wine-human);--c-human-wash:var(--wine-human-wash);
 --scrim:var(--wine-scrim);--shadow-3:0 2px 2px var(--wine-shadow-near),0 6px 12px var(--wine-shadow);
}
