:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --app-bg: #000;
  --bg: #030507;
  --bar: #070b0e;
  --panel: #0a1014;
  --panel-2: #0f171c;
  --panel-3: #16222a;
  --dock-bg: #10212b;
  --dock-card: #182f3c;
  --dock-card-2: #1f3846;
  --scrim: rgba(0, 0, 0, .45);
  --sheet-bg: #0d151a;
  --record-bg: #05090b;
  --input-bg: #000;
  --tile-a: #0b1216;
  --tile-b: #070b0e;
  --key-a: #1a252c;
  --key-b: #10181d;
  --key-line: #2c3d47;
  --key-drop: #000;
  --softkeys-bg: #06090b;
  --pv-bg: #1b2329;
  --lock-a: #0d1a21;
  --lock-b: #030607;
  --line: #1b2830;
  --line-2: #2a3b45;
  --text: #e6eef2;
  --muted: #7d8f99;
  --dim: #4b5b64;
  --chip-num: #8e9ca5;
  --hr: #39ff7f;
  --spo2: #2fe0ff;
  --nibp: #f2f5f7;
  --co2: #ffd43b;
  --rr: #fff3b0;
  --temp: #ff9de2;
  --o2: #8fb8ff;
  --bis: #c8a2ff;
  --sed: #b9f3d6;
  --fluid: #7fd1c7;
  --io-blood: #ff7a7a;
  --io-out: #e0b36a;
  --low: #ff5b5b;
  --accent: #00a9e8;
  --on-accent: #001018;
  --red: #ff3b3b;
  --orange: #ff8a1f;
  --yellow: #ffd21f;
  --warn: #ffd21f;
  --fav: #ffe58a;
  --ok: #18c98b;
  --danger-text: #ff8a8a;
  --ai-text: #9fe3ff;
  --ai: #a48cff;
  --ai-a: #b9a4ff;
  --ai-b: #7a52f0;
  --banner-base: #000;
  --banner-sub: #c9d4da;
  --banner-btn: rgba(0, 0, 0, .35);
  --alarm-off: #1a0606;
  --scrim: rgba(0, 0, 0, .6);
  --shadow: rgba(0, 0, 0, .6);
  --toast-bg: #e6eef2;
  --toast-fg: #061016;
  --c-sedative: #ffd21f;
  --c-benzo: #ff9f1c;
  --c-opioid: #4aa3ff;
  --c-vaso: #c48bff;
  --c-anticho: #3fdc8a;
  --c-local: #b0bec5;
  --c-other: #ff9f7a;
  --c-nmb: #ff6680;
  --vent: #6fd3ff;
  --cv-grid-a: #1c2a32;
  --cv-grid-b: #10191e;
  --cv-time-a: #22333c;
  --cv-time-b: #131d23;
  --cv-row: #16222a;
  --cv-axis: #5d6f79;
  --cv-label: #6f818b;
  --num: "DIN Alternate", "Bahnschrift", "Roboto Mono", ui-monospace, "SF Mono", monospace;
  --ui: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --app-bg: #d5d9dd;
  --bg: #e8ebee;
  --bar: #ffffff;
  --panel: #ffffff;
  --panel-2: #f4f6f8;
  --panel-3: #e6eaee;
  --dock-bg: #dce5ec;
  --dock-card: #ffffff;
  --dock-card-2: #f3f6f8;
  --scrim: rgba(15, 23, 28, .16);
  --sheet-bg: #ffffff;
  --record-bg: #ffffff;
  --input-bg: #ffffff;
  --tile-a: #ffffff;
  --tile-b: #f4f6f8;
  --key-a: #ffffff;
  --key-b: #eef1f3;
  --key-line: #c8ced2;
  --key-drop: rgba(15, 23, 28, .14);
  --softkeys-bg: #f4f5f6;
  --pv-bg: #c9d0d4;
  --lock-a: #ffffff;
  --lock-b: #d9dfe3;
  --line: #d6dce0;
  --line-2: #c0c8ce;
  --text: #1e2428;
  --muted: #5d6a71;
  --dim: #8e9aa1;
  --chip-num: #4c585f;
  --hr: #0b8f3e;
  --spo2: #0a7fa8;
  --nibp: #1e2428;
  --co2: #9a6d00;
  --rr: #7a6200;
  --temp: #b8337f;
  --o2: #2f5bbf;
  --bis: #7446c9;
  --sed: #137a52;
  --fluid: #11857a;
  --io-blood: #c62f2f;
  --io-out: #9a6410;
  --low: #d92b20;
  --accent: #1a7eb0;
  --on-accent: #ffffff;
  --red: #e02a2a;
  --orange: #f07c10;
  --yellow: #f2bd00;
  --warn: #8a6508;
  --fav: #8a6508;
  --ok: #1a8a6a;
  --danger-text: #b4232c;
  --ai-text: #0b5f7a;
  --ai: #6a4cf0;
  --ai-a: #9475ff;
  --ai-b: #5a32d6;
  --banner-base: #fff;
  --banner-sub: #3a4348;
  --banner-btn: rgba(255, 255, 255, .7);
  --alarm-off: #fde4e4;
  --scrim: rgba(15, 23, 28, .35);
  --shadow: rgba(15, 23, 28, .18);
  --toast-bg: #1e2428;
  --toast-fg: #f4f6f8;
  --c-sedative: #a88400;
  --c-benzo: #c96a00;
  --c-opioid: #1f6fd1;
  --c-vaso: #8a4fd6;
  --c-anticho: #138a4e;
  --cv-grid-a: #cfd6db;
  --cv-grid-b: #e8ecef;
  --cv-time-a: #c3cbd1;
  --cv-time-b: #eaeef1;
  --cv-row: #e1e6e9;
  --cv-axis: #6f7c84;
  --cv-label: #5d6a71;
  --c-local: #66757d;
  --c-other: #c4552c;
  --c-nmb: #d6304f;
  --vent: #1574a8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
html, body { margin: 0; height: 100%; background: var(--app-bg); color: var(--text); font-family: var(--ui); overflow: hidden; }
body { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 固定贴满四边：iPad Safari 在 viewport-fit=cover 下 100dvh 可能小于实际可视高度，底部露出背景 */
.pad {
  position: fixed;
  inset: 0;
  min-height: 720px;
  display: grid;
  grid-template-rows: 56px auto 1fr calc(58px + max(8px, calc(env(safe-area-inset-bottom) - 12px)));
  background: var(--bg);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.topbar { grid-row: 1; }
.risk-banner { grid-row: 2; }
.body { grid-row: 3; }
.softkeys { grid-row: 4; }
/* 术中页多一行“正在查看别的房间”提示条；新框架共用 .pad 但行数不同，只作用于术中页 */
#app.pad { grid-template-rows: 56px auto auto 1fr calc(58px + max(8px, calc(env(safe-area-inset-bottom) - 12px))); }
#app.pad > .away-bar { grid-row: 2; }
#app.pad > .risk-banner { grid-row: 3; }
#app.pad > .body { grid-row: 4; }
#app.pad > .softkeys { grid-row: 5; }
.away-bar { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: 13px; }
.away-bar[hidden] { display: none; }
.away-tag { flex: none; padding: 1px 8px; border-radius: 4px; border: 1px solid var(--accent); color: var(--accent); font-size: 12px; font-weight: 600; }
.away-tag.is-ro { border-color: var(--line-2); color: var(--muted); }
.away-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.away-txt b { color: var(--text); }
.away-bar .btn { flex: none; height: 32px; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: grid;
  grid-template-columns: auto auto 164px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}
.tb-loc { display: grid; grid-template-rows: 21px 18px; row-gap: 1px; align-items: center; justify-items: start; line-height: 1.2; white-space: nowrap; padding: 2px 6px; margin: -2px -6px; border-radius: 6px; color: inherit; text-align: left; }
.tb-loc:active { background: var(--panel-3); }
.tb-logo { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 -6px 0 -4px; border-radius: 8px; }
.tb-logo:active { background: var(--panel-3); }
.tb-logo img { width: 28px; height: 28px; }
.tb-scene { height: 44px; padding: 0 4px; margin-left: -2px; border-radius: 8px; color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.tb-scene:active { background: var(--panel-3); }
.tb-logo:focus-visible, .tb-scene:focus-visible { outline: none; }
.mm-scrim { position: fixed; inset: 0; z-index: 18; }
.mm { position: fixed; top: 52px; left: 8px; z-index: 19; bottom: 8px; width: 392px; max-width: calc(100% - 16px); overflow-y: auto; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 12px 36px var(--shadow); animation: fldIn .16s ease-out; }
@keyframes fldIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.mm > * { flex: none; }
.mm[hidden], .mm-scrim[hidden], .lock[hidden] { display: none; }
.mm-head { display: flex; align-items: center; gap: 8px; padding: 10px 18px 4px; }
.mm-head img { width: 22px; height: 22px; }
.mm-head strong { font-size: 13px; font-weight: 600; letter-spacing: .5px; color: var(--muted); }
.mm-head strong { white-space: nowrap; }
.mm-ops { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.mm-x { flex: none; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 16px; }
.mm-x:active { background: var(--panel-3); }
.mm-ver { margin: 4px 0 0; padding: 8px 20px 12px; border-top: 1px solid var(--line); color: var(--dim); font-size: 11px; }
.mm-user { display: flex; align-items: center; gap: 12px; margin: 10px 12px 2px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); }
.mm-user i { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; font: 600 17px var(--ui); font-style: normal; }
.mm-user > div { flex: 1; min-width: 0; }
.mm-user strong { display: block; font-size: 16px; line-height: 1.3; }
.mm-user span { display: block; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.mm-role-btn { flex: none; display: flex; align-items: center; gap: 2px; height: 28px; padding: 0 6px 0 10px; border: 1px solid var(--line-2); border-radius: 14px; color: var(--muted); font-size: 12px; }
.mm-role-btn svg { width: 14px; height: 14px; transition: transform .15s; }
.mm-role-btn.is-on { color: var(--accent); border-color: var(--accent); }
.mm-role-btn.is-on svg { transform: rotate(180deg); }
.mm-roles { margin: 4px 12px; padding: 10px; border-radius: 12px; background: var(--panel-2); }
.mm-roles small { display: block; margin: 0 2px 8px; color: var(--muted); font-size: 11px; }
.mm-roles div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mm-roles button { height: 32px; border-radius: 8px; background: var(--panel); font-size: 12px; }
.mm-roles button.is-on { background: var(--accent); color: #fff; }
.mm-set { margin: 4px 12px; padding: 10px 6px 0; border-radius: 12px; background: var(--panel-2); }
.mm-set small { display: block; margin: 0 6px 6px; color: var(--muted); font-size: 11px; }
.mm-set .mm-proto i { background: var(--panel); }
.mm-group h4 { margin: 0; padding: 8px 20px 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.mm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 4px 10px; }
.mm-grid button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 2px 5px; border-radius: 10px; }
.mm-grid button:active { background: var(--panel-3); }
.mm-grid i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.mm-grid i svg { width: 23px; height: 23px; }
.mm-grid span { font-size: 12.5px; line-height: 1.2; white-space: nowrap; }
.mm-grid .is-cur i { background: var(--accent); color: #fff; }
.mm-grid .is-cur span { color: var(--accent); font-weight: 600; }
.mm-grid .mm-proto i { background: var(--panel-2); color: var(--muted); }
.mm-grid .mm-proto span { color: var(--muted); }
/* 主菜单：围术期用大图标；其余分组折叠，展开后是两列文字行（触控行高 44px，PC 上有悬停） */
.mm-search { display: flex; align-items: center; gap: 8px; margin: 6px 12px 2px; padding: 0 12px; height: 40px; border-radius: 10px; background: var(--panel-2); color: var(--muted); }
.mm-search svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.mm-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font-size: 14px; }
.mm-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 12px 0; }
.mm-recent small { color: var(--dim); font-size: 11px; }
.mm-recent button { height: 30px; padding: 0 12px; border-radius: 15px; background: var(--panel-2); font-size: 12.5px; }
.mm-fold { margin: 2px 8px 0; }
.mm-gh { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-align: left; }
.mm-gh small { color: var(--dim); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.mm-gh svg { margin-left: auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: transform .15s; }
.mm-gh[aria-expanded="true"] svg { transform: rotate(180deg); }
.mm-gh:active { background: var(--panel-3); }
.mm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 0 0 6px; }
.mm-list button { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px; border-radius: 10px; font-size: 13.5px; text-align: left; }
.mm-list button:active { background: var(--panel-3); }
.mm-list i { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.mm-list i svg { width: 18px; height: 18px; }
.mm-list span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mm-list span small { display: block; color: var(--dim); font-size: 10.5px; }
.mm-list .is-cur i { background: var(--accent); color: #fff; }
.mm-list .is-cur span { color: var(--accent); font-weight: 600; }
.mm-list .mm-proto i, .mm-list .mm-proto span { background: var(--panel-2); color: var(--muted); }
.mm-empty { margin: 14px 20px; color: var(--muted); font-size: 13px; }
.mm-res { margin: 4px 8px; }
.mm-res[hidden], .mm-body[hidden], .mm-recent[hidden], .mm-list[hidden] { display: none; }
.ws { position: fixed; inset: 0; z-index: 30; background: var(--bg); }
.ws iframe { display: block; width: 100%; height: 100%; border: 0; }
body.is-training::after { content: "培训模式 · 模拟数据 · 不入库"; position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 45; padding: 5px 14px; border-radius: 20px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.sw-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sw-list button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); text-align: left; }
.sw-list button.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.sw-list i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-weight: 600; }
.sw-list span { display: block; color: var(--muted); font-size: 12px; }
.lock { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: radial-gradient(circle at 50% 40%, var(--lock-a), var(--lock-b) 70%); text-align: center; }
.lock img { width: 84px; height: 84px; margin-bottom: 6px; }
.lock strong { font-size: 24px; letter-spacing: 2px; }
.lock span { color: var(--muted); font-size: 14px; }
.lock .lock-clock { margin: 18px 0 4px; font: 600 56px var(--num); letter-spacing: 1px; }
.lock em { color: var(--accent); font-style: normal; font-size: 14px; }
.lock small { position: absolute; bottom: 20px; color: var(--dim); font-size: 12px; }
.tb-loc .tb-loc-dev { margin-left: 8px; font-style: normal; color: var(--ok); }
.tb-loc .tb-loc-more { margin-left: 8px; font-style: normal; color: var(--accent); }
.tb-loc strong { font-size: 15px; }
.tb-loc span { font-size: 12px; color: var(--muted); }
.tb-patient { min-width: 0; display: grid; grid-template-rows: 21px 18px; row-gap: 1px; align-items: center; padding-left: 14px; border-left: 1px solid var(--line); }
.tb-patient-line { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; font-size: 13px; }
.tb-patient-line::-webkit-scrollbar { display: none; }
.tb-patient-line.is-more { mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); }
.tb-patient-line strong { font-size: 17px; line-height: 21px; letter-spacing: 1px; }
.tb-patient-line--sub { color: var(--muted); font-size: 12px; }
.tb-patient-line .sep { color: var(--dim); }
.pt-id { color: var(--muted); font-size: 12px; }
.pt-id b { color: var(--text); font: 600 13px var(--num); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.chip { padding: 1px 7px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 12px; color: var(--muted); }
.chip--asa { color: var(--spo2); border-color: color-mix(in srgb, var(--spo2) 40%, transparent); }
.chip--danger { color: var(--text); background: color-mix(in srgb, var(--red) 25%, transparent); border-color: var(--red); }
.tb-timers { display: flex; align-items: center; height: 40px; padding: 0 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.timer { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 0 7px; }
.timer + .timer { border-left: 1px solid var(--line); }
.timer span { font-size: 10px; line-height: 12px; color: var(--muted); }
.timer b { font: 600 18px/1 var(--num); font-variant-numeric: tabular-nums; }
.tm-bar { position: absolute; left: 7px; right: 7px; bottom: -4px; height: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.tm-bar i { display: block; width: 0; height: 100%; background: var(--accent); }
.tm-bar.is-late i { background: var(--warn); }
.timer.is-over b { color: var(--warn); }
.tb-sys { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.dot--ok { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.tb-clock { margin-left: 2px; color: var(--text); font: 600 16px var(--num); font-variant-numeric: tabular-nums; }
.op-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); }
.op-btn svg { width: 18px; height: 18px; }
.op-btn--danger { color: var(--danger-text); }
.op-btn.is-on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }

/* ---------- 风险横幅 ---------- */
.risk-banner {
  --lv: var(--orange);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-auto-columns: auto;
  grid-auto-flow: column;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: color-mix(in srgb, var(--lv) 16%, var(--banner-base));
  border-bottom: 2px solid var(--lv);
}
.risk-banner[hidden] { display: none; }
.risk-banner.lv-yellow { --lv: var(--yellow); }
.risk-banner.lv-red { --lv: var(--red); }
.risk-banner:not(.is-acked) .risk-level { animation: blink 1s steps(2) infinite; }
.risk-level { padding: 6px 12px; border-radius: 4px; background: var(--lv); color: #000; font-weight: 700; font-size: 14px; }
.risk-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.risk-main strong { font-size: 16px; }
.risk-main span { font-size: 12px; color: var(--banner-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.risk-actions { display: flex; flex-wrap: nowrap; gap: 6px; }
.risk-actions button, .risk-ack, .risk-ai, .risk-ding { min-height: 40px; padding: 0 10px; white-space: nowrap; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--lv) 60%, transparent); background: var(--banner-btn); font-size: 13px; }
.risk-ack { background: var(--lv); color: #000; font-weight: 700; border: 0; }
.risk-ding { color: var(--text); font-weight: 600; }
.risk-ai { color: var(--ai-text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.risk-banner.is-acked .risk-ack { background: transparent; color: var(--muted); border: 1px solid var(--line-2); }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- 主体 ---------- */
.body { position: relative; min-height: 0; display: grid; grid-template-columns: 1fr 392px; gap: 8px; padding: 8px; }
.monitor { min-height: 0; min-width: 0; display: flex; gap: 6px; }
.vitals-col { flex: 0 0 172px; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.vitals, .vitals-sub { min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.vitals { flex: 4 1 0; }
.vitals-sub { flex: 1.65 1 0; }
.vitals > .param, .vitals-sub > .param { flex: 1 1 0; }
.vitals .param-val { font-size: clamp(38px, 6.2vh, 52px); }
.vitals .param-val--split .rr { font-size: 22px; }
.vitals .nibp-val { gap: 3px; }
.vitals .nibp-val b { font-size: clamp(30px, 4.6vh, 38px); }
.vitals .nibp-val span { font-size: 13px; }
.param.param--compact { flex-direction: row; align-items: center; padding: 4px 10px; }
.param.param--compact .param-head { flex-direction: column; align-items: flex-start; gap: 0; }
.param.param--compact .param-head small { margin-left: 0; }
.param.param--compact .param-val { font-size: 28px; }
.param.param--compact .param-val--txt { font-size: 14px; text-align: right; }
.param-head em.age { font-size: 11px; line-height: 1; opacity: .6; }
.param.is-stale .param-val, .param.is-stale .param-val b { color: var(--dim); }
.param.is-stale em.age { color: var(--warn); opacity: 1; }

.param {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px 10px 6px;
  text-align: left;
  background: linear-gradient(180deg, var(--tile-a), var(--tile-b));
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--pc, var(--text));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  min-height: 0;
  overflow: hidden;
}
button.param:active { transform: translateY(1px); background: var(--panel-3); }
.param-head { display: flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 600; }
.param-head small { font-size: 10px; opacity: .7; font-weight: 400; }
.param-head em { margin-left: auto; font: 10px/1.05 var(--num); font-style: normal; opacity: .65; text-align: right; }
.param-val { font: 600 clamp(38px, 5.8vh, 50px)/0.95 var(--num); font-variant-numeric: tabular-nums; text-align: right; letter-spacing: -1px; }
.param-val--txt { font: 600 18px/1.2 var(--ui); letter-spacing: 0; }
.param-val--split { display: flex; align-items: flex-end; justify-content: space-between; }
.param-val--split .rr { display: flex; flex-direction: column; align-items: flex-end; font-size: 26px; color: var(--rr); }
.param-val--split .rr small { font: 600 10px var(--ui); opacity: .7; }
.param-foot { font: 11px var(--num); opacity: .75; }
.param-foot b { font-weight: 600; }
.param--hr { --pc: var(--hr); }
.param--spo2 { --pc: var(--spo2); }
.param--co2 { --pc: var(--co2); }
.param--nibp { --pc: var(--nibp); }
.param--temp { --pc: var(--temp); }
.param--o2 { --pc: var(--o2); }
.param--sed { --pc: var(--sed); }
.param--sed[hidden] { display: none; }
.param--o2.is-vent { --pc: var(--vent); }
.param--sed.is-due, .param--temp.is-due { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); background: color-mix(in srgb, var(--orange) 10%, var(--panel)); }
.param--sed.is-due .param-head small, .param--temp.is-due .param-head small { color: var(--orange); opacity: 1; font-weight: 600; }

.param.alarm-high { animation: alarmHigh .8s steps(2) infinite; }
.param.alarm-mid .param-val { color: var(--warn); }
.param.alarm-high .param-head em { opacity: 1; }
@keyframes alarmHigh { 0% { background: var(--red); color: #fff; } 50% { background: var(--alarm-off); color: var(--red); } }
html[data-theme="light"] .param.alarm-high { animation-name: alarmHighLight; animation-timing-function: linear; }
@keyframes alarmHighLight { 0%, 49.9% { background: var(--red); color: #fff; } 50%, 100% { background: var(--alarm-off); color: var(--red); } }
.pad.is-silenced .param.alarm-high { animation-duration: 1.6s; }

.nibp-val { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; font-family: var(--num); font-variant-numeric: tabular-nums; }
.nibp-val b { font-size: clamp(38px, 5.6vh, 46px); font-weight: 600; line-height: 1; }
.nibp-val span { font-size: 18px; opacity: .8; }
.param--nibp.is-measuring .nibp-val b { color: var(--muted); animation: blink 1s infinite; }
.param--nibp.alarm-high { animation: alarmHigh .8s steps(2) infinite; }
/* 血压偏离基线（黄色预警）：比 SBP<90 的红色快闪低一级 */
.param--nibp.alarm-dev { animation: alarmDev 1.6s steps(2) infinite; }
@keyframes alarmDev { 0% { background: var(--yellow); color: #000; } 50% { background: color-mix(in srgb, var(--yellow) 12%, var(--panel)); color: var(--warn); } }
.pad.is-silenced .param--nibp.alarm-dev { animation-duration: 3.2s; }

.record { flex: 1 1 auto; min-height: 200px; display: flex; flex-direction: column; background: var(--record-bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.record-head { display: flex; align-items: center; gap: 14px; white-space: nowrap; padding: 5px 10px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.record-head strong { color: var(--text); font-size: 13px; }
.rec-pv { flex: 0 0 auto; margin-left: auto; height: 30px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-3); color: var(--text); font-size: 12px; }

/* ---------- 记录单预览 ---------- */
.pv { position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; background: var(--pv-bg); }
.pv[hidden] { display: none; }
.pv-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; background: var(--sheet-bg); border-bottom: 1px solid var(--line-2); }
.pv-bar strong { font-size: 16px; }
.pv-bar .pv-state { margin-right: auto; padding: 3px 8px; border-radius: 4px; font-size: 12px; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); }
.pv-bar .pv-state.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.pv-bar .x { margin-left: 4px; }
.pv-frame { flex: 1; width: 100%; border: 0; background: #eee; }
.legend { display: flex; align-items: center; gap: 4px; }
.rec-page { display: flex; align-items: center; gap: 2px; color: var(--text); font-variant-numeric: tabular-nums; }
.rec-page button { min-width: 32px; height: 30px; border-radius: 6px; color: var(--text); font-size: 18px; line-height: 1; }
.rec-page button:disabled { color: var(--dim); }
.rec-page button:active:not(:disabled) { background: var(--panel-3); }
.rec-page .rec-live { margin-left: 6px; padding: 0 10px; border: 1px solid var(--accent); color: var(--accent); font-size: 12px; }
.rec-page[hidden], .rec-page .rec-live[hidden] { display: none; }
.lg { font-style: normal; font-weight: 700; margin-left: 6px; }
.lg--sys, .lg--dia { color: var(--nibp); }
.lg--hr { color: var(--hr); }
.lg--live { color: var(--text); }
.lg--map { color: var(--nibp); }
.lg--temp { color: var(--temp); }
.record-canvas { position: relative; flex: 1; }
.record-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.rec-pv + .rec-pv { margin-left: 0; }
.rec-pv.is-on { border-color: var(--accent); color: var(--accent); }
.record-canvas.is-vedit canvas { touch-action: none; cursor: crosshair; }
.ve-bar { display: flex; flex-direction: column; gap: 5px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--panel-2); font-size: 12px; }
.ve-bar[hidden] { display: none; }
.ve-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.ve-bar button { height: 28px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-size: 12px; }
.ve-bar button.is-on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.ve-bar button:disabled { opacity: .4; }
.ve-bar .ve-done { margin-left: auto; padding: 0 16px; border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.ve-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line-2); }
.ve-st { color: var(--muted); }
.ai-sec { margin-top: 12px; }
.ai-sec h4, .ai-box h4 { margin: 0 0 6px; font-size: 14px; }
.ai-sec h4 small, .ai-box h4 small { margin-left: 6px; color: var(--muted); font-weight: 400; font-size: 12px; }
.ai-sec ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.ai-sec p { color: var(--muted); font-size: 13px; }
.ai-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-note { margin-top: 14px; color: var(--dim); font-size: 12px; }
.xp-rule { margin: 0 0 4px; font-size: 14px; }
.xp-rule b { margin-right: 8px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; font-weight: 600; color: var(--accent); }
.ai-sec p.xp-src { margin-top: 4px; font-size: 12px; color: var(--dim); }
.xp-cite { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 0 6px 6px 0; background: color-mix(in srgb, var(--accent) 6%, transparent); font-size: 13px; line-height: 1.65; }
.xp-cite cite { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-style: normal; }
.ai-box { margin-top: 12px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.ai-box ul { list-style: none; margin: 0; padding: 0; }
.ai-box li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ai-box li:first-child { border-top: 0; }
.ai-box li span { flex: 1; }
.ai-box li.is-info { color: var(--muted); }
.ai-box li .btn { min-height: 34px; }

/* ---------- 右侧操作台 ---------- */
.console { position: relative; min-height: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.milestones { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 8px 46px 8px 8px; border-bottom: 1px solid var(--line); }
.ms { position: relative; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--dim); font-size: 12px; white-space: nowrap; }
.ms b { font: 600 15px var(--num); font-variant-numeric: tabular-nums; }
.ms.is-done { color: var(--text); border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.ms.is-done b { color: var(--ok); }
.ms.is-next { color: var(--text); }
.ms.is-next b { color: var(--accent); font: 700 13px var(--ui); }
.ms:not(.is-done):not(.is-next) { pointer-events: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); } }

/* 事件列表：旧的在上、新的在下 */
.stream { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.stream .log-filter { position: static; align-items: center; min-height: 38px; gap: 4px; margin: 0; padding: 4px 8px 4px 10px; border-bottom: 0; background: var(--panel-3); }
.stream .log-filter button { position: relative; align-self: center; min-height: 24px; padding: 0 8px; border-radius: 12px; color: color-mix(in srgb, var(--muted) 50%, var(--text)); }
.stream .log-filter button::after { content: ''; position: absolute; inset: -7px -2px; }
.stream .log-filter button.is-on { color: var(--accent); }
.stream .lf-kind { color: color-mix(in srgb, var(--muted) 50%, var(--text)); }
.stream .lf-kind select { min-height: 38px; margin: -7px 0; }
#logList > li[data-le]:not(.is-run) { grid-template-columns: 40px 44px minmax(0, 1fr) auto; }
#logList > li[data-le] > span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stream .log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px; }
.stream-new { position: absolute; right: 12px; bottom: 10px; z-index: 2; min-height: 32px; padding: 0 12px; border-radius: 16px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.stream-new[hidden] { display: none; }

/* 底部：输入框在最下，其上是智能推荐 / ＋ 选中的内容，高度随内容 / 可拖动 */
.dock { flex: none; display: flex; flex-direction: column; border-top: 1px solid var(--line); background: var(--panel); box-shadow: 0 -4px 14px rgba(0,0,0,.14); }
.dock-grip { position: relative; flex: none; height: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: ns-resize; touch-action: none; }
.dock-grip i { width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); }
.dock-grip:active i, .dock.is-drag .dock-grip i { background: var(--accent); }
/* 打开时是一张独立的面板：冷色底圆角顶（含底部分类条）+ 上阴影，上方列表压暗但仍可点；顶行 = 把手 + 分类名 + 展开 / 关闭（可拖动）；面板内卡片换成白底 */
.dock-title, .dock-btn { display: none; }
.dock.is-open { border-top-color: transparent; border-radius: 14px 14px 0 0; background: var(--dock-bg); box-shadow: 0 -10px 28px var(--shadow); }
.dock.is-open .cat-strip { border-top-color: color-mix(in srgb, var(--line) 60%, transparent); }
.dock.is-open .cat-strip button:not(.is-on) { background: var(--dock-card); }
.stream::after { content: ''; position: absolute; inset: 0; z-index: 3; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.stream:has(.log.is-docked)::after { opacity: 1; }
.dock.is-open .dock-grip { height: 42px; justify-content: flex-start; padding: 8px 8px 0 12px; }
.dock.is-open .dock-grip i { position: absolute; top: 5px; left: calc(50% - 18px); }
.dock.is-open .dock-title { display: block; flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--text); }
.dock.is-open .dock-btn { display: block; flex: none; height: 28px; padding: 0 12px; border-radius: 14px; background: var(--dock-card); color: var(--muted); font-size: 12px; }
.dock.is-open #dockClose { width: 28px; padding: 0; }
.dock-body { --panel: var(--dock-bg); --panel-2: var(--dock-card); --panel-3: var(--dock-card-2); background: var(--panel); }
.dock .panel.fade-t { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20px); mask-image: linear-gradient(to bottom, transparent, #000 20px); }
.dock .panel.fade-b { -webkit-mask-image: linear-gradient(to top, transparent, #000 20px); mask-image: linear-gradient(to top, transparent, #000 20px); }
.dock .panel.fade-t.fade-b { -webkit-mask-image: linear-gradient(transparent, #000 20px, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(transparent, #000 20px, #000 calc(100% - 20px), transparent); }
/* 面板打开时事件列表只留已录区（到点 / 已过的方案项仍吸附可见），推荐、常用让出高度 */
.log.is-docked li:is(.lg-head, .lg-rec, .lg-more, .lg-common), .log.is-docked li.lg-plan:not(.is-due) { display: none; }
.cat-strip { flex: none; display: flex; gap: 3px; padding: 6px 6px; border-top: 1px solid var(--line); }
.cat-strip button { position: relative; flex: 1 1 0; min-width: 0; height: 36px; padding: 0; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); font-size: 15px; white-space: nowrap; }
.cat-strip button.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 700; }
/* 进行中：持续性处置常驻操作台顶部，按分类着色，超时的变橙 */
.run-bar { flex: none; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); border-bottom: 1px solid var(--line); }
.run-bar[hidden] { display: none; }
.run-bar .rb-h { flex: none; display: inline; font-size: 11px; font-weight: 700; color: var(--accent); }
.run-bar .rb-h em { display: none; }
.rb-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-size: 12px; }
.rb-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: lr-pulse 1.6s ease-in-out infinite; }
.rb-chip.is-line::before { animation: none; }
.rb-chip em { font: 11px var(--num); font-style: normal; color: var(--muted); }
.rb-chip.is-stale { border-color: var(--orange); color: var(--orange); }
.pad.is-collapsed .rb-chip { display: none; }
.pad.is-collapsed .run-bar { height: auto; background: none; }

/* 已录（灰底、✓）与「现在」线以下的计划（白卡片）分开；往前的阶段折成一行 */
#logList > li[data-le], #logList > li.log-void, #logList > li.log-skip, #logList > li.lg-ph { background: var(--panel-3); border-bottom-color: color-mix(in srgb, var(--line) 60%, transparent); color: color-mix(in srgb, var(--muted) 45%, var(--text)); }
#logList > li[data-le] { grid-template-columns: 40px 44px minmax(0, 1fr) auto; }
#logList > li[data-le]::after { content: '✓'; color: var(--ok); font-size: 12px; }
#logList > li[data-le] > span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log li.lg-ph { display: flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 4px; font-size: 12px; cursor: pointer; }
.log li.lg-ph b { color: var(--text); font-weight: 600; }
.log li.lg-ph small { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted); }
.log li.lg-ph:not([data-ph]) { cursor: default; }
.log li.lg-phs { display: flex; gap: 4px; padding: 3px 0; overflow-x: auto; scrollbar-width: none; background: var(--panel-3); }
.lg-phs button { flex: none; height: 22px; padding: 0 8px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); font-size: 12px; color: var(--text); }
.lg-phs em { font: 11px var(--num); font-style: normal; color: var(--muted); }
.log li.lg-now { height: 0; padding: 0; border: 0; overflow: hidden; }
.log li.lg-plan { margin-top: 3px; padding-top: 4px; padding-bottom: 4px; background: var(--panel); border-style: solid; border-left-width: 4px; box-shadow: 0 1px 3px var(--shadow); }
.log li.lg-plan time { font-weight: 700; color: var(--text); }

/* 推荐区：AI（情境处置）/ 方案备用 / 本台常用，4 列，最多 3 行，其余区内滚动；录入面板打开时让出高度 */
.reco { flex: none; padding: 4px 8px 6px; border-top: 1px solid var(--line); background: var(--panel); }
.reco[hidden], .console:has(.dock.is-open) .reco, .pad.is-collapsed .reco { display: none; }
.rc-h { display: flex; align-items: center; gap: 8px; height: 20px; font-size: 11px; color: var(--muted); }
.rc-h b { font-size: 12px; color: var(--text); }
.rc-h span::before { content: '■ '; color: var(--sc); }
.rc-h small { margin-left: auto; font-size: 10px; }
.rc-g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; max-height: 88px; overflow-y: auto; }
.rc-t { display: flex; flex-direction: column; justify-content: center; min-width: 0; height: 42px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2); border-left: 3px solid var(--sc); background: var(--panel-2); text-align: left; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.rc-t:disabled { opacity: .45; }
.rc-t b, .rc-t small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-t b { font-size: 13px; font-weight: 600; }
.rc-t small { font-size: 10px; color: var(--muted); }
.rc-t em { font-style: normal; font-weight: 700; color: var(--sc); margin-right: 3px; }
.rc-ai { --sc: var(--ai); } .rc-fav { --sc: var(--accent); }
.run-row i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--rc, var(--muted)); }

/* 事件流里进行中的记录：不分类别统一强调色，整行浅底、最左沟槽实色竖条 + 计时胶囊；滚出视野时吸附在列表上下边缘（偏移由脚本按行高叠加），
   吸附区与下方滚动内容之间用阴影分层 */
.log li.is-run > span:nth-child(3)::before { content: '● '; color: var(--accent); font-size: 9px; }
/* 标题带左右各伸出 8px，吸附行用底色盖住两侧沟槽，免得标题带滚到下面时从两边露出来 */
.log li:is(.is-run, .lg-plan.is-due) { --gut: -8px 0 0 var(--panel), 8px 0 0 var(--panel); box-shadow: var(--gut); }
.log li.is-run[data-rc] { --rc: var(--accent); --gut: -8px 0 0 var(--accent), 8px 0 0 var(--run-bg); }
.log li.is-stuck-t { box-shadow: var(--gut, 0 0 transparent), 0 6px 8px -6px var(--shadow); }
.log li.is-stuck-b { box-shadow: var(--gut, 0 0 transparent), 0 -6px 8px -6px var(--shadow); }
.lr-run { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: 600 11px var(--ui); white-space: nowrap; }
.lr-run::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--rc); animation: lr-pulse 1.6s ease-in-out infinite; }
.lr-run.is-line::before { animation: none; }
.lr-run.is-stale { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange); }
.lr-run.is-stale::before { background: currentColor; }
@keyframes lr-pulse { 50% { opacity: .25; } }
.log.is-runonly li:not(.is-run):not(.is-due):not(.has-sug):not(.lg-rec), .log.no-rec li.lg-rec { display: none; }

/* 事件流末尾的待办：虚线 = 还没发生；到点实线蓝、已过橙；情境处置挂在触发它的预警记录下；末尾推荐方案与常用 */
.log li.lg-sug { grid-template-columns: 40px 44px minmax(0, 1fr) auto; align-items: center; margin-top: 4px; padding: 6px 6px 6px 4px; border: 1px dashed var(--line-2); border-radius: 8px; }
.log li.lg-sug time { font-weight: 500; }
.log .tag--sug { background: color-mix(in srgb, var(--ai) 14%, transparent); color: var(--ai); }
.log li.lg-plan { cursor: pointer; }
.log li.lg-plan > span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log li.lg-plan small { font-size: 11px; color: var(--muted); }
.log li.lg-plan.is-next { color: var(--muted); }
.lg-side { display: inline-flex; align-items: center; gap: 6px; }
.lg-side em { font: 600 11px var(--num); font-style: normal; color: var(--muted); white-space: nowrap; }
.lg-side button { height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; }
.log li.lg-plan.is-due { border-style: solid; border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.log li.lg-plan.is-due .lg-side em { color: var(--accent); }
.log li.lg-plan.is-due .lg-side button { background: var(--accent); color: var(--on-accent); }
.log li.lg-plan.is-late { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 9%, var(--panel)); }
.log li.lg-plan.is-late .lg-side em { color: var(--orange); }
.log li.lg-plan.is-late .lg-side button { border-color: var(--orange); background: var(--orange); color: #000; }
.log li.lg-ctx { margin: 2px 0 4px; border-color: var(--orange); }
.log li.lg-ctx.lv-yellow { border-color: var(--yellow); }
.log li.lg-ctx.lv-red { border-color: var(--red); }
.log li.lg-ctx time { color: var(--orange); }
.lg-acts { grid-column: 3 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.lg-acts button { display: inline-flex; align-items: baseline; gap: 4px; min-height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 12px; }
.lg-acts button small { font-size: 11px; color: var(--muted); }
.lg-acts button.is-plan { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.lg-acts button:disabled { opacity: .45; }
.log li.lg-rec { display: block; padding: 0; }
/* 事件区三段（已录 / 推荐 / 常用）的区标题行：通栏底色带 + 粗体标题 */
.lg-sec-t { flex: none; align-self: center; font-size: 13px; font-weight: 700; line-height: 16px; color: var(--text); }
.log li.lg-head, .lg-common > .lg-sec-t { min-height: 38px; background: var(--panel-3); }
.log li:not(.lg-sug):has(+ li.lg-head), .log li:not(.lg-sug):has(+ li.lg-common) { border-bottom-color: transparent; }
.log li.lg-head { display: flex; align-items: center; gap: 6px; margin: 14px -8px 0; padding: 4px 8px 4px 10px; border: 0; }
.lg-hd-main b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--accent); }
.lg-head small { flex: none; font: 600 11px var(--num); color: color-mix(in srgb, var(--muted) 50%, var(--text)); }
.lg-head button { flex: none; min-height: 28px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); font-size: 12px; white-space: nowrap; }
.lg-head button.lg-hd-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0 4px; border-color: transparent; background: none; }
.lg-head button.is-confirm { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.log li.lg-more { display: block; padding: 4px 0 0; border-bottom: 0; }
.log li.lg-common { display: block; margin-top: 14px; padding: 0 0 4px; border: 0; }
.lg-common > .lg-sec-t { display: flex; align-items: center; margin: 0 -8px 8px; padding: 0 10px; }
.lg-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lg-cards button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; min-height: 46px; padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); text-align: left; }
.lg-cards button:active { filter: brightness(1.08); }
.lg-cards b, .lg-cards small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-cards b { font-size: 13px; }
.lg-cards small { font-size: 11px; color: var(--muted); }
.log.is-runonly li.lg-plan.is-due { position: static; }
.log.is-runonly li.is-run { position: static; padding-top: 5px; padding-bottom: 5px; }
/* 空间不够、只列进行中时，筛选条如实显示「进行中」；点「全部」收起录入面板 */
.log-filter.is-tight button[data-lf="all"] { background: none; color: color-mix(in srgb, var(--muted) 50%, var(--text)); font-weight: 400; }
.log-filter.is-tight button[data-lf="open"] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; }
[data-rc="呼吸"] { --rc: var(--vent); }
[data-rc="氧气"] { --rc: var(--o2); }
[data-rc="麻药"] { --rc: var(--c-sedative); }
[data-rc="用药"] { --rc: var(--c-vaso); }
[data-rc="输液"] { --rc: var(--fluid); }
[data-rc="管路"] { --rc: var(--c-local); }
.run-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.run-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); }
.run-row span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.run-row small { font-size: 12px; color: var(--muted); }
.run-row.is-done { opacity: .5; }
.dock-body { position: relative; height: 0; overflow: hidden; transition: height .2s ease; }
.dock.is-drag .dock-body { transition: none; }
.dock .panel { position: absolute; inset: 0; padding-top: 4px; }
/* 语音助手识别结果：浮在操作台底部，右缘、底缘与操作台对齐；点选或点别处即收起 */
.ai-pop { position: absolute; right: 8px; bottom: calc(100% + 8px); z-index: 15; width: 392px; max-height: 50vh; overflow-y: auto; padding: 10px; border: 1px solid color-mix(in srgb, var(--ai) 55%, var(--line-2)); border-radius: 12px; background: var(--sheet-bg); box-shadow: 0 -12px 36px var(--shadow); }
.ai-pop[hidden] { display: none; }
.ai-q { display: flex; align-items: baseline; gap: 8px; padding: 0 2px 8px; }
.ai-q em { flex: none; font: 600 12px var(--ui); font-style: normal; color: var(--ai); }
.ai-q b { font-size: 15px; }
.ai-q span { font-size: 13px; color: var(--muted); }
.ai-q .ai-q-r { flex: none; margin-left: auto; display: flex; gap: 4px; }
.ai-q-r button { padding: 3px 10px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--ai) 45%, var(--line-2)); font-size: 12px; color: var(--ai); }
.ai-btn { width: 52px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--ai-a), var(--ai-b)); color: #fff; box-shadow: 0 3px 0 color-mix(in srgb, var(--ai-b) 55%, #000); }
.ai-btn svg { width: 24px; height: 24px; stroke-width: 1.7; }
.ai-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--ai-b) 55%, #000); }
.ai-btn.is-on { animation: aiPulse 1.2s ease-in-out infinite; }
@keyframes aiPulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ai) 30%, transparent); } }

.ai-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-c { display: grid; grid-template-columns: auto 1fr; column-gap: 6px; align-items: baseline; max-width: 100%; min-height: 44px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); text-align: left; }
.ai-c em { grid-row: span 2; align-self: center; padding: 1px 5px; border-radius: 3px; background: var(--panel-3); color: var(--muted); font: 400 10px/16px var(--ui); font-style: normal; }
.ai-c b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-c small { grid-column: 2; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-c:active { background: var(--panel-3); }
.ai-c.is-due, .ai-c.is-hit { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ai-c.is-due em, .ai-c.is-hit em { background: var(--accent); color: var(--on-accent); }
.ai-c.is-late, .ai-c.is-warn { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 12%, transparent); }
.ai-c.is-late em, .ai-c.is-warn em { background: var(--orange); color: #000; }
.plus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px 0; }
.plus-grid button { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-width: 0; min-height: 50px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-3); text-align: left; }
.plus-grid button:active { border-color: var(--line-2); filter: brightness(1.08); }
.plus-grid b { font-size: 14px; white-space: nowrap; }
.plus-grid small { max-width: 100%; font-size: 11px; line-height: 1.35; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 收起/展开：固定在操作台右上角（右缘两种状态都不动） */
.console-handle { position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 16%, transparent); border: 1.5px solid var(--accent); color: var(--accent); font-size: 11px; font-weight: 600; line-height: 1.1; }
.console-handle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.console-handle span { writing-mode: vertical-rl; letter-spacing: 1px; }
.console-handle:active { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.pad.is-collapsed .console-handle { top: 6px; right: 6px; width: auto; left: 6px; height: 40px; flex-direction: row; gap: 2px; }
.pad.is-collapsed .console-handle span { writing-mode: horizontal-tb; letter-spacing: 0; font-size: 12px; }
.pad.is-collapsed .console-handle svg { transform: rotate(180deg); }
.seg--iv { grid-template-columns: repeat(3, 1fr); }

/* 输血 / 出液：分开的选项，而不是连成一条的分段按钮 */
.sheet--side.is-io > .io-form { flex: 1 0 auto; display: flex; flex-direction: column; gap: 18px; }
.sheet.is-io h3 .x { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--panel-2); font-size: 16px; }
.sheet.is-io h3 .x:active { background: var(--panel-3); }
.sheet.is-io .sub { margin-bottom: 16px; line-height: 1.45; color: var(--dim); }
.sheet.is-io .sheet-foot { padding: 12px 20px; }
.sheet.is-io .sheet-foot .btn { border-radius: 10px; }
.sheet.is-io #ioNone { background: transparent; color: var(--muted); font-weight: 500; }
.sheet.is-io #ioNone:active { background: var(--panel-2); color: var(--text); }
.sheet.is-io #ioOk { min-width: 104px; padding: 0 22px; }
#ioBlood { display: flex; flex-direction: column; gap: 18px; }
#ioBlood[hidden] { display: none !important; }
.io-form .group-title { margin: 0 0 8px; font-weight: 600; }
.io-type { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 8px; }
.pick { display: grid; gap: 8px; }
.pick--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pick--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pick--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pick button { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 6px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); font-size: 14px; line-height: 1.3; text-align: center; }
.pick button.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.pick button:active:not(.is-on) { background: var(--panel-3); }
#ioProd button { min-height: 58px; padding: 8px; font-size: 13px; }
.pick--vol button { flex-direction: column; gap: 3px; min-height: 64px; }
.pick--vol b { font: 600 22px/1 var(--num); }
.pick--vol small { font-size: 11px; font-weight: 500; color: var(--muted); }
.pick--vol button.is-on small { color: color-mix(in srgb, var(--on-accent) 78%, transparent); }
.io-sum { margin-top: auto; padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--panel-2)); }
.io-sum span { display: block; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.io-sum b { display: block; font-size: 16px; font-weight: 600; line-height: 1.4; }
.io-sum.is-empty { border-color: var(--line); background: var(--panel-2); }
.io-sum.is-empty b { color: var(--dim); font-weight: 500; }
.cases-rooms { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cases-rooms button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 18px; color: var(--muted); font-size: 13px; }
.cases-rooms button.is-on { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cases { list-style: none; margin: 8px 0 0; padding: 0; }
.cases li { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 12px; min-height: 64px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.cases li.is-cur { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cases-room { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.cases-room b { font: 600 14px var(--num); color: var(--text); }
.cases-main { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: baseline; min-width: 0; }
.cases-main strong { font-size: 16px; }
.cases-main span { color: var(--muted); font-size: 12px; }
.cases-main em { grid-column: 1 / -1; font-style: normal; font-size: 13px; }
.cases-main small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.cases-tag { padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 12px; color: var(--dim); font-size: 12px; }
.cases-tag.is-cur { border-color: var(--accent); color: var(--accent); }
/* 患者列表：左侧一栏，与"全部功能"同位置同宽 */
.sheet.cases-pane { position: absolute; top: 8px; left: 8px; bottom: 8px; z-index: 7; width: 300px; max-height: none; padding: 12px 12px 16px; border-radius: 10px; animation: none; }
.cases-pane[hidden] { display: none; }
.cases-pane .cases-rooms button { min-height: 34px; padding: 0 10px; font-size: 12px; }
.cases-pane .cases li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; min-height: 0; padding: 8px 4px; }
.cases-pane .cases-room { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 8px; }
.cases-pane .cases-main { grid-template-columns: auto minmax(0, 1fr); }
.cases-empty { display: block !important; color: var(--dim); text-align: center; padding: 30px 0 !important; }
.panel { display: none; flex: 1; min-height: 0; overflow-y: auto; padding: 8px; -webkit-overflow-scrolling: touch; }
.panel.is-active { display: flex; flex-direction: column; gap: 8px; }
.panel.is-active > * { flex-shrink: 0; }
.tab-short { display: none; }

/* 操作台收起：右侧变为窄栏，保留时间节点与分区入口 */
.pad.is-collapsed .body { grid-template-columns: 1fr 76px; }
.pad.is-collapsed .milestones { grid-template-columns: 1fr; gap: 4px; padding: 50px 6px 6px; }
.pad.is-collapsed .ms { min-height: 50px; gap: 1px; font-size: 12px; }
.pad.is-collapsed .ms b { font-size: 14px; }
.pad.is-collapsed .ms.is-next b { font-size: 11px; }
.pad.is-collapsed .stream, .pad.is-collapsed .dock-grip, .pad.is-collapsed .cat-strip, .pad.is-collapsed .dock-body { display: none; }
.pad.is-collapsed .run-bar { flex: none; display: flex; padding: 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pad.is-collapsed .run-bar[hidden] { display: none; }
.pad.is-collapsed .rb-h { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-weight: 600; color: var(--muted); border-radius: 8px; background: var(--panel-2); font-size: 11px; text-align: center; }
.pad.is-collapsed .rb-h em { display: block; font: 700 16px var(--num); font-style: normal; color: var(--text); }
.pad.is-collapsed .run-bar.is-stale .rb-h { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.pad.is-collapsed .dock { display: none; }

.drug-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.drug {
  --dc: var(--c-other);
  position: relative;
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 6px;
  padding: 6px 10px 6px 14px;
  text-align: left;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 2px 0 var(--key-drop);
  overflow: hidden;
}
.drug::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--dc); }
.drug:not(.drug--add)::before { width: 2px; opacity: .5; }
.drug--add:active { transform: translateY(2px); background: var(--panel-3); }
.drug.is-flash { animation: drugFlash .5s ease-out; }
@keyframes drugFlash { 0% { background: color-mix(in srgb, var(--dc) 45%, var(--panel-2)); } }
.drug:not(.drug--add) { display: flex; flex-direction: column; gap: 5px; padding: 5px 4px 6px 12px; cursor: pointer; }
.drug-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.drug-head .drug-total { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drug-more { flex: 0 0 auto; width: 34px; height: 28px; margin: -2px 0; border-radius: 5px; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.drug-more:active { background: var(--line-2); color: var(--text); }
.drug-chips { display: flex; gap: 4px; }
.drug-chips button { flex: 1 1 0; min-width: 0; height: 38px; padding: 0 2px; border-radius: 5px; border: 0; background: transparent; font: 400 14px var(--num); color: var(--chip-num); white-space: nowrap; overflow: hidden; }
.drug-chips button.is-def { color: color-mix(in srgb, var(--dc) 35%, var(--chip-num)); }
.drug-chips button small { font: 10px var(--ui); color: var(--muted); margin-left: 1px; }
.drug-chips button:active { transform: translateY(1px); background: color-mix(in srgb, var(--dc) 35%, var(--panel)); }
.drug-name { font-size: 15px; font-weight: 600; white-space: nowrap; }
.drug-total { font-size: 11px; color: var(--muted); }
.drug-total b { font-family: var(--num); color: var(--text); }
.drug--sedative { --dc: var(--c-sedative); }
.drug--opioid { --dc: var(--c-opioid); }
.drug--vaso { --dc: var(--c-vaso); }
.drug--anticho { --dc: var(--c-anticho); }
.drug--benzo { --dc: var(--c-benzo); }
.drug--local { --dc: var(--c-local); }
.drug--nmb { --dc: var(--c-nmb); }
.drug--add { --dc: transparent; border-style: dashed; background: transparent; box-shadow: none; grid-template-columns: 1fr; }
.drug:not(.drug--add) .drug-name { color: var(--dc); }
.drug--add .drug-name { color: var(--accent); }

.inf-list { display: flex; flex-direction: column; gap: 6px; }
.inf-list[hidden] { display: none; }
.inf {
  --dc: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 8px 10px 8px 14px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--dc) 8%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--dc) 45%, var(--line-2));
  overflow: hidden;
}
.inf::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--dc); }
.inf-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inf-name b { font-size: 15px; color: var(--dc); }
.inf-name small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inf-rate { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 4px; justify-items: end; }
.inf-rate b { font: 600 26px/1 var(--num); color: var(--dc); }
.inf-rate small { font-size: 11px; color: var(--muted); }
.inf-rate em { grid-column: 1 / -1; font: 11px var(--num); font-style: normal; color: var(--muted); }
.inf.is-pending .inf-rate b { animation: blink .8s infinite; }
.inf.is-paused .inf-rate b { color: var(--muted); font-size: 18px; }
.inf-meta { align-self: center; font: 12px var(--num); color: var(--muted); }
.inf-btns { display: grid; grid-template-columns: 44px 44px auto auto; gap: 4px; }
.inf-btns button { min-height: 40px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-3); font-size: 13px; }
.inf-btns button:first-child, .inf-btns button:nth-child(2) { font-size: 20px; padding: 0; }
.inf-btns button:disabled { opacity: .35; }
.inf-btns .is-stop { color: var(--danger-text); }
.inf-btns .is-confirm { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }

.fluid { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: 6px; font-size: 13px; }
.fluid .fluid-info { flex: 1; display: flex; flex-direction: column; }
.fluid .fluid-info small { color: var(--muted); font-size: 11px; }
.fluid .fluid-vol { font: 600 20px var(--num); color: var(--o2); }
.btn { min-height: 44px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-3); font-size: 14px; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn--danger { background: color-mix(in srgb, var(--red) 18%, transparent); border-color: var(--red); color: var(--danger-text); }
.btn:disabled { opacity: .35; pointer-events: none; }
.hint { margin: 0; font-size: 11px; color: var(--dim); text-align: center; }

.group-title { font-size: 12px; color: var(--muted); margin-top: 4px; }
.group-title small { color: var(--dim); margin-left: 6px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.seg button { min-height: 46px; font-size: 14px; border-right: 1px solid var(--line-2); }
.seg button:last-child { border-right: 0; }
.seg button.is-on { background: var(--o2); color: var(--on-accent); font-weight: 700; }
.flow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel-2); border-radius: 6px; font-size: 13px; color: var(--muted); }
.flow b { font: 600 32px var(--num); color: var(--o2); min-width: 46px; text-align: center; }
.flow span { flex: 1; }
.step { width: 56px; height: 48px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-3); font-size: 24px; }
.step:active { background: var(--line-2); }
.airway-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.aw { min-height: 44px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); text-align: left; font-size: 14px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.aw small { font: 11px var(--num); color: var(--muted); }
.aw.is-on { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.aw.is-on small { color: var(--orange); }

/* 各分类页顶部的本类方案项 */
.pane-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pane-plan:empty { display: none; }
.pp-lbl { font-size: 11px; font-weight: 700; color: var(--accent); }
.rec-chip { display: grid; gap: 1px; min-height: 40px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); text-align: left; }
.rec-chip b { font-size: 13px; font-weight: 600; }
.rec-chip small { font-size: 11px; color: var(--muted); }
.rec-chip.is-due, .rec-chip.is-late { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rec-chip.is-late { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 12%, transparent); }
.rec-chip.is-standby { border-style: dashed; }
.rec-chip.is-confirm-run { border-style: dashed; border-color: var(--accent); }
.lg-side button.is-confirm-run,
.plan-row button.is-confirm-run {
  background: transparent !important; border: 1px solid var(--accent); color: var(--accent) !important;
}
.lg-plan.is-confirm-item .tag--sug,
.plan-row.is-confirm-item .tag--plan { border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); }
.lg-acts button.is-confirm-run { border-style: dashed; }
.drug.is-plan-due { outline: 2px solid var(--accent); outline-offset: -1px; animation: pulse 1.8s ease-in-out infinite; }
.ev-scope { grid-template-columns: 1fr 1fr; margin-bottom: 8px; }
.ev-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: min(46vh, 360px); overflow: auto; }
.ev-chips button { min-height: 42px; padding: 4px 6px; display: grid; align-content: center; gap: 1px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 14px; }
.ev-chips button:active { background: var(--panel-3); }
.ev-chips button.has-pre { border-color: var(--accent); }
.ev-chips button.has-pre small { font-size: 10px; color: var(--accent); }
.ev-group { grid-column: 1 / -1; margin: 6px 0 2px; font-size: 12px; color: var(--muted); font-weight: 600; }
.ev-ae { grid-template-columns: 1fr 1fr; margin-top: 8px; }

/* 分类页只显示本类：麻药 / 用药共用药品面板，输液 / 输血 / 出液 / 管路共用出入量面板，氧气 / 呼吸共用气道面板 */
#dockBody[data-cat="麻药"] [data-grp="other"], #dockBody[data-cat="用药"] [data-grp="anes"],
#dockBody[data-cat="输液"] :is(#lineRow, #ioBloodGrp, #ioOutGrp),
#dockBody[data-cat="输血"] :is(#lineRow, #fluidList, #ioOutGrp),
#dockBody[data-cat="出液"] :is(#lineRow, #fluidList, #ioBloodGrp),
#dockBody[data-cat="管路"] :is(#fluidList, #ioRow, #ioTotals),
#dockBody[data-cat="氧气"] #paneResp, #dockBody[data-cat="呼吸"] #paneO2 { display: none; }
.pane-sub, .io-grp, .inf-grp { display: flex; flex-direction: column; gap: 8px; }
#ioRow { display: flex; flex-direction: column; gap: 8px; }
.io-pair--3 { grid-template-columns: repeat(3, 1fr); }
.io-pair--4 { grid-template-columns: 1fr 1fr; }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.log li { display: grid; grid-template-columns: 40px 44px 1fr; align-items: baseline; gap: 6px; padding: 5px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.log time { font: 600 13px var(--num); color: var(--muted); }
/* 分类标签统一灰字；只有预警 / 不良事件按级别着色 */
.log .tag { font-size: 11px; padding: 1px 6px; border-radius: 3px; color: var(--muted); text-align: center; }
.log .tag--risk { background: var(--orange); color: #000; }
.log .tag--risk-yellow { background: var(--yellow); color: #000; }
.log .tag--risk-clear { color: var(--ok); }
.log .tag--ae { background: var(--red); color: #fff; }
.log-empty { color: var(--dim); text-align: center; padding: 30px 0; font-size: 13px; }
.log li.log-skip { color: var(--muted); }
.log-skip s { color: var(--muted); }
.log-filter { position: sticky; top: -8px; z-index: 1; display: flex; gap: 6px; margin: -8px -8px 0; padding: 8px; overflow-x: auto; background: var(--panel); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.log-filter[hidden] { display: none; }
.log-filter button { flex: 0 0 auto; min-height: 34px; padding: 0 10px; border-radius: 17px; border: 0; background: none; font-size: 12px; color: var(--muted); }
.log-filter button b { font: 600 11px var(--num); }
.log-filter button.is-on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; }
.lf-kind { position: sticky; right: 0; margin-left: auto; box-shadow: -8px 0 8px var(--panel-3); flex: 0 0 auto; display: flex; align-items: center; align-self: center; border-radius: 12px; background: var(--panel-3); color: var(--muted); }
.lf-kind::after { content: ''; position: absolute; right: 11px; top: calc(50% - 4px); width: 5px; height: 5px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.lf-kind select { appearance: none; -webkit-appearance: none; min-height: 24px; padding: 0 26px 0 10px; border: 0; background: transparent; color: inherit; font-size: 12px; cursor: pointer; }
.lf-kind select:focus { outline: none; }
.lf-kind.is-on { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--accent); }
.log-src { margin-left: 6px; padding: 0 5px; border-radius: 3px; font: 400 10px/16px var(--ui); font-style: normal; white-space: nowrap; }
.log-src--plan { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.log-src--out { border: 1px dashed var(--line-2); color: var(--muted); }

/* ---------- 风险 / 知识 / 工具 / 协同 / 消息（界面原型） ---------- */
.orbit { display: flex; align-items: center; }
.ob { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 40px; padding: 0 7px; border-radius: 6px; color: var(--muted); font-size: 11px; line-height: 1; }
.ob svg { width: 17px; height: 17px; }
.ob:active { background: var(--panel-3); }
.ob.is-active { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ob b { position: absolute; top: 1px; left: calc(50% + 3px); min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font: 600 10px/15px var(--num); text-align: center; }
.ob--risk b { background: var(--orange); color: #000; }
.ob-div { width: 1px; height: 20px; margin: 0 2px; background: var(--line-2); }
.od { position: absolute; top: 8px; bottom: 8px; right: 8px; z-index: 6; width: 392px; display: flex; flex-direction: column; background: var(--sheet-bg); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 12px 36px var(--shadow); overflow: hidden; animation: odIn .16s ease-out; }
.od[hidden] { display: none; }
@keyframes odIn { from { transform: translateX(16px); opacity: 0; } }
.od-head { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 6px 0 14px; border-bottom: 1px solid var(--line); }
.od-head strong { font-size: 16px; }
.od-head small { color: var(--ok); font-size: 12px; }
.od-head em { padding: 1px 8px; border-radius: 10px; font-style: normal; font-size: 12px; color: var(--warn); background: color-mix(in srgb, var(--yellow) 16%, transparent); }
.od-head .x { margin-left: auto; width: 44px; height: 44px; font-size: 18px; color: var(--muted); }
.od-back { width: 32px; height: 40px; margin-left: -8px; font-size: 26px; color: var(--muted); }
.od-ctx { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.od-seg { margin-left: auto; grid-template-columns: 1fr 1fr; }
.od-seg button { min-height: 28px; padding: 0 10px; font-size: 12px; }
.od-tabs { margin-left: 12px; grid-template-columns: 1fr 1fr; }
.od-tabs--3 { grid-template-columns: repeat(3, 1fr); }
.od-tabs button { min-height: 34px; padding: 0 14px; font-size: 13px; }
.od-tabs--3 button { padding: 0 8px; }
.od-tabs b { display: inline-block; min-width: 16px; margin-left: 2px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font: 600 10px/16px var(--num); }
.od-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.od-sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
.od-sub small { margin-left: 6px; color: var(--dim); }
.od-risk { --lv: var(--orange); display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--lv) 55%, transparent); border-left-width: 4px; background: color-mix(in srgb, var(--lv) 10%, var(--panel)); }
.od-risk.lv-yellow { --lv: var(--yellow); }
.od-risk.lv-red { --lv: var(--red); }
.od-risk.is-closed { opacity: .55; }
.od-risk-top { display: flex; align-items: center; gap: 8px; }
.od-risk-top i { padding: 1px 6px; border-radius: 3px; background: var(--lv); color: #000; font: 700 12px var(--ui); font-style: normal; }
.od-risk-top strong { font-size: 15px; }
.od-risk-top time { margin-left: auto; font: 12px var(--num); color: var(--muted); }
.od-risk small { color: var(--muted); font-size: 12px; }
.od-risk .od-due { color: var(--warn); }
.od-acts { display: flex; gap: 6px; margin-top: 2px; }
.od-acts .btn { min-height: 34px; padding: 0 10px; font-size: 12px; }
.od-acts .od-report { border-color: var(--lv); }
.od-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.od-grid button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 62px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); text-align: left; }
.od-grid b { font-size: 14px; }
.od-grid small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.od-grid .od-link { display: flex; flex-direction: column; gap: 3px; min-height: 62px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); color: inherit; text-decoration: none; }
.od-rescue { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.od-em { min-height: 46px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--red) 55%, transparent); background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--danger-text); font-size: 14px; font-weight: 600; }
.od-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.od-list li { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; min-height: 52px; padding: 6px 10px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; }
.od-list li b { font-size: 14px; }
.od-list li small { grid-column: 1; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-list li em, .od-list li time { grid-column: 2; grid-row: 1 / 3; }
.od-tasks em { padding: 2px 8px; border-radius: 10px; font-style: normal; font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); }
.od-tasks em.st-doing { color: var(--warn); border-color: var(--warn); }
.od-tasks em.st-sent { color: var(--accent); border-color: var(--accent); }
.od-chats time { align-self: start; margin-top: 4px; font: 11px var(--num); color: var(--muted); }
.od-chats i { position: absolute; right: 10px; bottom: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font: 600 11px/18px var(--num); font-style: normal; text-align: center; }
.od-thread { gap: 10px; }
.msg { align-self: flex-start; max-width: 86%; display: flex; flex-direction: column; gap: 3px; }
.msg small { color: var(--dim); font-size: 11px; }
.msg p { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--panel-3); font-size: 14px; }
.msg.is-me { align-self: flex-end; align-items: flex-end; }
.msg.is-me p { background: var(--accent); color: var(--on-accent); }
.msg-card { display: flex; flex-direction: column; gap: 4px; min-width: 240px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 13px; }
.msg-card span { display: flex; justify-content: space-between; color: var(--muted); }
.msg-card em { font-style: normal; color: var(--text); }
.msg-card .btn { margin-top: 4px; min-height: 36px; font-size: 13px; }
.od-tpl { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; border-top: 1px solid var(--line); }
.od-chip { min-height: 32px; padding: 0 10px; border-radius: 16px; border: 1px solid var(--line-2); color: var(--muted); font-size: 12px; }
.od-compose { display: flex; gap: 8px; padding: 8px 12px 12px; }
.od-compose input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--input-bg); color: var(--text); font-size: 14px; }

/* ---------- 功能键 ---------- */
.softkeys { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 6px; padding: 6px 8px max(8px, calc(env(safe-area-inset-bottom) - 12px)); background: var(--softkeys-bg); border-top: 1px solid var(--line); }
.sk-keys { grid-column: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.key {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-size: 15px;
  background: linear-gradient(180deg, var(--key-a), var(--key-b));
  border: 1px solid var(--key-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 3px 0 var(--key-drop);
}
.key:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 1px 0 var(--key-drop); }
.key--primary { background: linear-gradient(180deg, #0aa6df, #0583b2); border-color: #26b9ee; color: #fff; font-weight: 700; }
.demo-bar { display: flex; align-items: center; gap: 4px; padding: 0 4px 0 10px; border: 1px dashed var(--warn); border-radius: 8px; color: var(--warn); white-space: nowrap; }
.demo-bar[hidden] { display: none; }
.dm-st { display: grid; line-height: 1.2; font-size: 13px; font-weight: 600; margin-right: 4px; }
.dm-st small { font: 500 11px var(--num); opacity: .8; }
.demo-bar button { height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--warn); background: transparent; color: var(--warn); font-size: 13px; font-weight: 600; }
.demo-bar .dm-next { background: var(--warn); color: var(--bg); }
.softkeys .key--more { width: 44px; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--line-2); box-shadow: none; }
.key--more svg { width: 20px; height: 20px; }
.softkeys .key--more.is-on { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
/* 更多：浮在操作台底部，盖住分类条；右缘、底缘与操作台对齐 */
.more-pop { position: absolute; top: 8px; right: 8px; bottom: 8px; z-index: 15; width: 300px; overflow-y: auto; padding: 12px 12px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--sheet-bg); box-shadow: 0 12px 36px var(--shadow); }
.more-pop .plus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.more-pop[hidden] { display: none; }
.more-h { display: block; padding: 0 2px 8px; font-size: 14px; }
.more-scrim { position: fixed; top: 0; left: 0; right: 0; bottom: calc(58px + max(8px, calc(env(safe-area-inset-bottom) - 12px))); z-index: 14; background: var(--scrim); }
.more-scrim[hidden] { display: none; }
.demo-list { display: grid; gap: 8px; }
.demo-item { display: grid; gap: 3px; padding: 10px 14px; text-align: left; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-3); }
.demo-item b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.demo-item span { color: var(--muted); font-size: 12px; }
.demo-item:disabled { opacity: .45; }
.demo-item:active:not(:disabled) { border-color: var(--accent); }
.demo-item--all { border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.demo-item--all b { color: var(--accent); }
.demo-lv { padding: 0 6px; border-radius: 4px; font: 600 11px/18px var(--ui); font-style: normal; }
.demo-lv--orange { background: color-mix(in srgb, var(--orange) 22%, transparent); color: var(--orange); }
.demo-lv--yellow { background: color-mix(in srgb, var(--yellow) 22%, transparent); color: var(--yellow); }
.key.is-on { color: var(--warn); border-color: var(--warn); }

/* ---------- 居中对话框 ---------- */
.sheet-mask { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--scrim); }
.sheet-mask[hidden] { display: none; }
.sheet { scroll-padding-bottom: 80px; width: min(880px, 100%); max-height: 88vh; overflow-y: auto; padding: 16px 20px 20px; background: var(--sheet-bg); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 12px 36px var(--shadow); animation: rise .18s ease-out; }
@keyframes rise { from { transform: translateY(12px) scale(.98); opacity: 0; } }
/* 高频术中录入：盖住右侧操作台，左侧记录单与体征保持可见 */
.sheet--side { position: absolute; top: 8px; right: 8px; bottom: 8px; z-index: 7; display: flex; flex-direction: column; width: 392px; max-height: none; border-bottom: 1px solid var(--line-2); animation: odIn .16s ease-out; }
.sheet--side[hidden] { display: none; }
.sheet--side > * { flex-shrink: 0; }
.sheet--side .field-label { margin: 8px 0 5px; }
.sheet--side .sub, .sheet--side .ds-quick, .sheet--side .seg--mode { margin-bottom: 6px; }
.sheet--side .kp-conv { margin-top: 2px; }
.sheet--side .chips button { min-height: 40px; padding: 0 10px; }
.sheet--side .ds-quick { align-items: flex-start; }
.sheet--side .ds-quick .field-label { margin-top: 10px; }
.sheet--side .ds-quick .chips { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sheet--side .ds-quick .chips button { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 3px 22px 3px 10px; border-radius: 8px; line-height: 1.25; text-align: left; }
.sheet--side .ds-quick .chips button b { font-weight: 600; white-space: nowrap; }
.sheet--side .ds-quick .chips button small { max-width: 100%; margin-left: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet--side .ds-quick .chips .hint { grid-column: 1 / -1; margin: 10px 0 0; }
.sheet--side .ds-quick .unfav { position: absolute; top: 50%; right: 4px; margin: 0; transform: translateY(-50%); }
.sheet--side .kp-display { font-size: 38px; padding: 2px 12px; }
.sheet--side .kp-unit { min-height: 34px; }
.sheet--side .keypad { gap: 6px; margin-top: 8px; }
.sheet--side .keypad button { height: 42px; }
.sheet--side .sheet-foot { margin-top: auto; }
@media (max-height: 800px) and (pointer: fine) { .sheet--side .keypad button { height: 36px; } }
/* 用药录入：比其他右侧录入更紧凑 */
.sheet--side:has(#dsKeys) .field-label { margin: 6px 0 4px; }
.sheet--side:has(#dsKeys) .chips { gap: 6px; }
.sheet--side:has(#dsKeys) .chips button { min-height: 36px; }
.sheet--side:has(#dsKeys) .seg--mode button { min-height: 38px; }
.sheet--side:has(#dsKeys) .kp-display { font-size: 32px; }
.sheet--side:has(#dsKeys) .keypad { gap: 5px; margin-top: 6px; }
.sheet--side:has(#dsKeys) .ds-time > button { height: 38px; }
.sheet--side:has(#dsKeys) .ds-track input { height: 34px; }
.sheet--side:has(#dsKeys) [data-only]:not([hidden]):has(> #dsRoute) { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.sheet--side:has(#dsKeys) [data-only]:has(> #dsRoute) > .field-label { margin: 0; }
.sheet h3 { margin: 0 0 4px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.sheet h3 .x { margin-left: auto; width: 44px; height: 44px; font-size: 22px; color: var(--muted); }
.sheet .sub { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.sheet-foot { position: sticky; bottom: -20px; display: flex; justify-content: flex-end; gap: 10px; margin: 14px -20px -20px; padding: 10px 20px; background: var(--sheet-bg); border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 44px; min-width: 64px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 14px; }
.chips button.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }

.kp-display { font: 600 54px var(--num); text-align: right; padding: 8px 14px; background: var(--input-bg); border: 1px solid var(--line-2); border-radius: 8px; color: var(--c-sedative); }
.kp-display small { font-size: 18px; color: var(--muted); margin-left: 6px; }
.kp-display { display: flex; align-items: baseline; justify-content: flex-end; gap: 10px; }
.kp-unit { min-height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-3); font: 600 15px var(--ui); color: var(--muted); }
.kp-conv { margin-top: 6px; text-align: right; font: 13px var(--num); color: var(--muted); }
.sheet h3 .cls-dot { width: 12px; height: 12px; border-radius: 3px; }
.sheet h3 .cls-name { font-size: 12px; font-weight: 400; color: var(--muted); }
.sheet h3 .btn--sm { margin-left: auto; min-height: 36px; font-size: 12px; font-weight: 400; }
.sheet h3 .btn--sm + .x { margin-left: 0; }
.ds-quick { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ds-quick .field-label { margin: 0; flex: 0 0 auto; }
.chips button.is-fav { border-color: var(--warn); color: var(--fav); }
.chips button small { color: var(--muted); margin-left: 4px; font-family: var(--num); }
.chips button.is-on small { color: color-mix(in srgb, var(--on-accent) 75%, transparent); }
.chips button:disabled { opacity: .4; }
.unfav { margin-left: 8px; padding: 0 4px; color: var(--muted); }
.seg--mode { grid-template-columns: 1fr 1fr; margin-bottom: 10px; }
.seg--mode button.is-on { background: var(--accent); color: var(--on-accent); }
.seg--mode button:disabled { color: var(--muted); opacity: .6; }
.seg--mode button small { font-size: 11px; margin-left: 4px; }
.field-label b { margin-left: 8px; font: 600 14px var(--num); color: var(--text); }
.ds-time { display: flex; align-items: center; gap: 6px; }
.ds-time > button { flex: 0 0 auto; min-width: 48px; height: 44px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); font: 600 14px var(--num); }
.ds-track { position: relative; flex: 1; min-width: 0; padding-bottom: 14px; }
.ds-track input { width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; }
.ds-track input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--line-2); }
.ds-track input::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -12px; border-radius: 50%; background: var(--accent); border: 3px solid var(--sheet-bg); box-shadow: 0 0 0 1px var(--accent); }
.ds-track input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line-2); }
.ds-track input::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); border: 3px solid var(--sheet-bg); }
.ds-ticks { position: absolute; left: 15px; right: 15px; bottom: 0; height: 14px; pointer-events: none; }
.ds-ticks span { position: absolute; transform: translateX(-50%); font-size: 10px; line-height: 14px; color: var(--muted); }
.ds-warn { margin: 8px 0 0; font-size: 12px; color: var(--warn); }
.btn.is-on { border-color: var(--warn); color: var(--warn); }
.search { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--input-bg); color: var(--text); font: 18px var(--ui); outline: none; }
.search:focus { border-color: var(--accent); }
.drug-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; max-height: 50vh; overflow-y: auto; }
.drug-list button { --dc: var(--accent); position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-height: 54px; padding: 6px 12px; text-align: left; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); overflow: hidden; }
.drug-list i { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--dc); opacity: .5; }
.drug-list b { font-size: 15px; color: var(--dc); }
.drug-list small { grid-column: 1; font-size: 11px; color: var(--muted); }
.drug-list em { grid-row: 1 / 3; grid-column: 2; font-style: normal; font-size: 11px; color: var(--ok); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.keypad button { height: 56px; border-radius: 8px; background: var(--panel-3); border: 1px solid var(--line-2); font: 600 24px var(--num); }
.keypad button:active { background: var(--line-2); }
.field-label { font-size: 12px; color: var(--muted); margin: 12px 0 6px; }

.score-item { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.score-item > span { font-size: 14px; }
.score-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.score-opts button { min-height: 48px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 12px; line-height: 1.3; text-align: left; }
.score-opts button b { font: 600 16px var(--num); margin-right: 4px; }
.score-opts button.is-on { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.score-total { font: 600 40px var(--num); }
.score-total.ok { color: var(--ok); }
.score-total.no { color: var(--warn); }

.sed-list { display: flex; flex-direction: column; gap: 6px; }
.sed-list button { display: grid; grid-template-columns: 48px 1fr; align-items: center; min-height: 52px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); text-align: left; font-size: 14px; }
.sed-list button b { font: 600 26px var(--num); color: var(--sed); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checklist li i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 700; }
.checklist li.ok i { background: var(--ok); color: #001; }
.checklist li.no i { background: var(--yellow); color: #000; }
.checklist li span { flex: 1; }
.checklist li em { font-style: normal; font: 13px var(--num); color: var(--muted); }

.toast { position: fixed; left: 50%; top: 64px; z-index: 30; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: 8px; background: var(--toast-bg); color: var(--toast-fg); font-size: 14px; box-shadow: 0 6px 24px var(--shadow); }
.toast[hidden] { display: none; }
.toast button { min-height: 36px; padding: 0 12px; border-radius: 6px; background: var(--toast-fg); color: var(--toast-bg); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}

/* 推荐方案卡 / 方案进度（事件流推荐模板区） */
.nr-rec { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; }
.nr-rec-txt { flex: 1 1 0; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.nr-rec-txt b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--text); }
.nr-rec-txt small { flex: none; font: 500 11px var(--num); color: var(--muted); }
.nr-rec button { flex: none; height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; }
.nr-rec .is-primary { background: var(--accent); color: var(--on-accent); }
.nr-rec .nr-ghost { border-color: transparent; }
.nr-rec .nr-x { width: 28px; padding: 0; border-color: transparent; color: var(--dim); }
.log button.nr-reopen { min-height: 30px; padding: 0 10px; border: 1px dashed var(--line-2); border-radius: 8px; background: none; color: var(--accent); font-size: 12px; }
.nr-prog { flex: 1 1 40px; min-width: 30px; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.nr-prog i { display: block; height: 100%; background: var(--accent); }
.nr-now { display: grid; gap: 6px; }
.nr-next { display: flex; align-items: center; gap: 6px; padding: 1px; }
.nr-lbl { flex: 0 0 auto; font-size: 11px; color: var(--muted); }
.nr-none { font-size: 12px; color: var(--dim); }
.pl-body .plan-row { cursor: pointer; }
.tpl-diff { margin: 0 0 6px; padding: 6px 8px; border-radius: 6px; background: var(--panel-2); font-size: 12px; line-height: 1.45; color: var(--text); }
.tag--plan { display: inline-block; padding: 0 5px; border-radius: 3px; background: var(--panel-3); color: var(--muted); font: 400 11px/18px var(--ui); }
.plan-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.plan-row .tag--plan { flex: 0 0 auto; min-width: 34px; text-align: center; }
.pr-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.pr-main b { font-size: 14px; }
.pr-main span { font-size: 12px; }
.pr-main small { font-size: 11px; color: var(--muted); }
.plan-row.is-due .pr-main small { color: var(--accent); }
.plan-row.is-late .pr-main small { color: var(--orange); }
.plan-row.is-skip .pr-main b { text-decoration: line-through; color: var(--muted); }
.plan-row button { flex: 0 0 auto; min-height: 38px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--accent); color: var(--accent); background: transparent; font-size: 13px; font-weight: 600; }
.pr-ok { font-style: normal; font-size: 12px; color: var(--ok); }
.pr-skip { font-style: normal; font-size: 12px; color: var(--muted); }
.pi-body { max-height: 52vh; overflow-y: auto; }
.pi-body .field-label { margin-top: 10px; }
.pi-body .chips button { min-height: 40px; }
.pi-line { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pi-line span { flex: 1; }
.pi-line b { font-family: var(--num); color: var(--accent); }
.pi-note { margin-right: auto; font-size: 12px; color: var(--muted); }
.pi-adj {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; padding: 8px 10px;
  border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line);
}
.pi-adj .step {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-3); font: 600 22px var(--num); color: var(--text);
}
.pi-adj .step:active { background: var(--line-2); }
.pi-adj-val { flex: 1; text-align: center; font: 600 28px/1.1 var(--num); color: var(--accent); }
.pi-adj-val small { font: 500 13px var(--ui); color: var(--muted); margin-left: 4px; }
.pi-adj .btn--sm { flex: 0 0 auto; min-height: 44px; min-width: 72px; padding: 0 12px; }
.pi-adj .btn--sm.is-on { border-color: var(--accent); color: var(--accent); }
.pi-keys { margin: 6px 0 10px; }
.pi-kp-display { font-size: 36px !important; padding: 6px 12px !important; margin-bottom: 6px; }
.pi-keys .keypad button { height: 48px; }
.tpl-dot { display: inline-block; width: 6px; height: 6px; margin-left: 4px; vertical-align: middle; border-radius: 50%; background: var(--accent); }
.tpl-sel-wrap { display: grid; gap: 4px; margin-bottom: 8px; }
.tpl-sel-lbl { font-size: 12px; color: var(--muted); }
.tpl-sel {
  width: 100%; box-sizing: border-box; min-height: 40px; padding: 8px 10px;
  border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  font: inherit; font-size: 14px;
}
.tpl-meta { margin: 0 0 6px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.tpl-meta b { color: var(--text); }
.tpl-meta em { font-style: normal; color: var(--accent); }
.tpl-body { max-height: 52vh; overflow: auto; -webkit-overflow-scrolling: touch; }
.tpl-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.tpl-table th {
  position: sticky; top: 0; z-index: 1; padding: 6px 8px; text-align: left; font-weight: 600; font-size: 11px;
  color: var(--muted); background: var(--panel); border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.tpl-table td {
  padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tpl-table tbody tr:hover td { background: var(--panel-2); }
.tpl-c-st { width: 3.2em; color: var(--muted); font-size: 12px; }
.tpl-c-name { width: 22%; }
.tpl-c-name b { font-size: 13px; font-weight: 600; }
.tpl-c-dose { width: 30%; }
.tpl-c-when { width: 28%; color: var(--muted); font-size: 12px; }
.tpl-c-use { width: 3.6em; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.src { padding: 0 6px; border-radius: 4px; font: 600 11px/18px var(--ui); font-style: normal; }
.src--tpl { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.src--hist { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tpl-other { margin: 4px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.7; color: var(--muted); }

/* ---------- V4：动态功能键 ---------- */
.key { position: relative; min-width: 0; padding: 0 8px; }
.key svg { flex: 0 0 auto; }
.key-t { min-width: 0; display: grid; justify-items: start; line-height: 1.15; }
.key-l { font-size: 15px; white-space: nowrap; }
.key-v { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 11px var(--num); color: var(--muted); }
.key--primary .key-v { color: rgba(255, 255, 255, .85); }
.key-r { position: absolute; top: -7px; right: 4px; padding: 0 6px; border-radius: 9px; background: var(--orange); color: #000; font: 600 11px/18px var(--ui); font-style: normal; white-space: nowrap; }
.key-r[hidden] { display: none; }
.key.is-due { border-color: var(--orange); }
.key.is-on .key-v { color: var(--warn); }

/* ---------- V4：顶栏提醒数字 ---------- */
.ob b[hidden] { display: none; }
.ob--flow b, .ob--qc b { background: var(--orange); color: #000; }
.ob--risk b.lv-red { background: var(--red); color: #fff; }
.ob--risk b.lv-yellow { background: var(--yellow); color: #000; }
.ob[data-orbit="kit"] b { background: var(--accent); color: var(--on-accent); }

/* ---------- V4：预警弹窗内就地确认质控 ---------- */
.risk-qc { min-height: 40px; padding: 0 10px; white-space: nowrap; border-radius: 6px; border: 1.5px dashed var(--orange); background: color-mix(in srgb, var(--orange) 12%, transparent); color: var(--text); font-size: 13px; font-weight: 600; }
.risk-qc[hidden] { display: none; }
.risk-qc.is-done { border-style: solid; border-color: var(--ok); background: transparent; color: var(--ok); font-weight: 400; }
.od-risk .risk-qc { align-self: flex-start; min-height: 34px; margin-top: 2px; font-size: 12px; }

/* ---------- V4：本台质控（一行一项） ---------- */
.od-body--qc { gap: 0; padding-top: 4px; }
.qcl { list-style: none; margin: 0; padding: 0; }
.qg { margin: 8px 0 2px; font-size: 11px; color: var(--muted); }
.qi { display: grid; grid-template-columns: 22px 1fr auto; align-items: start; gap: 8px; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.qb { width: 20px; height: 20px; margin-top: 1px; display: grid; place-items: center; border-radius: 4px; border: 1.5px solid var(--line-2); font: 700 13px var(--ui); font-style: normal; }
.qb.is-tap { cursor: pointer; }
.qb.is-pre { border: 1.5px dashed var(--orange); color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.qb.is-yes { border-color: var(--red); background: var(--red); color: #fff; }
.qb.is-fact { border-color: var(--ok); color: var(--ok); }
.qb.is-wait { border-style: dotted; opacity: .6; }
.qm { min-width: 0; }
.qm b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qn { display: inline-block; min-width: 20px; margin-right: 6px; color: var(--dim); font: 11px var(--num); }
.qm small { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.qa { display: flex; gap: 6px; margin-top: 6px; }
.qa .btn { min-height: 32px; padding: 0 10px; font-size: 12px; }
.qt { padding: 1px 6px; border-radius: 9px; border: 1px solid var(--line-2); color: var(--muted); font-style: normal; font-size: 11px; white-space: nowrap; }
.qt.t-pre { border-color: var(--orange); color: var(--orange); }
.qt.t-yes { border-color: var(--red); color: var(--danger-text); }
.qt.t-ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); color: var(--ok); }
.qt.t-live { border-color: var(--accent); color: var(--accent); }
.qi.s-pre { background: color-mix(in srgb, var(--orange) 7%, transparent); }
.qi.s-hand, .qi.s-wait { opacity: .7; }
.qc-note { margin: 10px 0 0; color: var(--dim); font-size: 11px; line-height: 1.5; }
.od-foot { padding: 8px 12px 12px; border-top: 1px solid var(--line); }
.od-foot .btn { width: 100%; }
.qc-locked { display: block; padding: 10px; border-radius: 6px; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); font-size: 13px; text-align: center; }

/* ---------- V4：流程提醒 ---------- */
.fr { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--orange); border-left-width: 3px; background: color-mix(in srgb, var(--orange) 7%, var(--panel-2)); }
.fr--tpl { border-color: var(--line-2); border-left-color: var(--accent); background: var(--panel-2); }
.fr > div { flex: 1; min-width: 0; }
.fr b { display: block; font-size: 14px; }
.fr small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr .btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
.fr-empty { padding: 10px; border-radius: 6px; background: var(--panel-2); color: var(--muted); font-size: 12px; text-align: center; }
.fr-ms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.fr-ms li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); color: var(--dim); font-size: 12px; }
.fr-ms time { font: 600 14px var(--num); }
.fr-ms li.is-done { color: var(--text); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.fr-ms li.is-done time { color: var(--ok); }
.fr-ms li > button { align-self: stretch; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.fr-ms li.is-next em { font: 700 13px var(--ui); font-style: normal; color: var(--accent); }
.fr-ms li.is-next button:active { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.fr-ms li.is-undo { position: relative; }
.fr-ms li.is-undo::after, .ms.is-undo::after { content: '↶'; position: absolute; top: 2px; right: 6px; font-size: 14px; line-height: 1; color: var(--muted); pointer-events: none; }
.fr-log { list-style: none; margin: 0; padding: 0; }
.fr-log li { display: flex; align-items: baseline; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.fr-log time { flex: 0 0 auto; font-family: var(--num); }
.fr-log .lv-orange { color: var(--orange); }
.fr-log .lv-red { color: var(--danger-text); }
.fr-log .lv-yellow { color: var(--warn); }
.fr-log .lv-clear { color: var(--ok); }
.fr-log .tag { flex: 0 0 auto; padding: 0 5px; border-radius: 3px; background: var(--panel-3); font-size: 10px; line-height: 16px; }
.fr-log .tag--qc { color: var(--orange); }

/* ---------- V4：麻醉前安全核查 ---------- */
.sc-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 2px; }
.sc-tab { min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 14px; }
.sc-tab small { font-size: 11px; color: var(--muted); }
.sc-tab.is-done small { color: var(--ok); }
.sc-tab.is-lock { color: var(--dim); }
.sc-tab.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 700; }
.sc-host { margin: 10px 0 8px; font-size: 13px; color: var(--muted); }
.sc-lock { padding: 24px; border-radius: 6px; background: var(--panel-2); text-align: center; }
.sc-items { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.sc-item { min-width: 0; min-height: 52px; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border-radius: 6px; background: var(--panel-2); }
.sc-item > div:first-child { flex: 1; min-width: 0; }
.sc-item b { display: block; font-size: 14px; font-weight: 500; }
.sc-item b small { margin-left: 6px; font-size: 11px; color: var(--muted); }
.sc-item > div > small, .sc-item > small { display: block; overflow: hidden; font-size: 12px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.sc-item.is-wide { grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px; }
.sc-item.is-wide .pa-no { margin-top: 0; }
.sc-item.is-bad { background: color-mix(in srgb, var(--warn) 10%, var(--panel-2)); box-shadow: inset 3px 0 0 var(--warn); }
.sc-item .chips button { min-height: 40px; }
.sc-yn { flex-shrink: 0; display: flex; gap: 4px; }
.sc-yn button { min-width: 50px; height: 40px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); font-size: 14px; }
.sc-yn button.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.sc-yn button.is-no.is-on { background: var(--warn); border-color: var(--warn); }
.sc-yn button:disabled:not(.is-on), .sc-item .chips button:disabled:not(.is-on) { opacity: .35; }
.sc-yn button:disabled.is-on, .sc-item .chips button:disabled.is-on { opacity: 1; }
.sc-risk { display: flex; align-items: center; gap: 10px; }
.sc-risk > span { flex: 0 0 96px; font-size: 13px; color: var(--muted); }
.sc-txt { font-size: 14px; }
.sc-signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sc-sign { min-height: 92px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 10px; border-radius: 6px; border: 1px dashed var(--line-2); }
.sc-sign.is-ok { border-style: solid; border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.sc-sign span { font-size: 12px; color: var(--muted); }
.sc-sign b { font-size: 15px; }
.sc-sign img { height: 36px; max-width: 100%; border-radius: 4px; background: #fff; }
.sc-sign em { font-style: normal; font-size: 12px; color: var(--ok); }
.sc-sign small { font-size: 11px; color: var(--muted); }
.sc-sign .btn { min-height: 36px; margin-top: auto; padding: 0 16px; }
.sc-sigbox { width: min(520px, 100%); }
.sc-sigbox .seg { margin-bottom: 12px; }
.sc-ca { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.sc-ca p { margin: 0; }
.sc-qr { flex-shrink: 0; width: 96px; height: 96px; border: 6px solid #fff; border-radius: 4px; background: repeating-conic-gradient(#111 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.sc-id { margin: 0; font-size: 14px; }
.sc-pad { position: relative; }
.sc-pad canvas { display: block; width: 100%; height: 160px; border: 1px dashed var(--line-2); border-radius: 6px; background: #fff; touch-action: none; }
.sc-pad .btn { position: absolute; top: 6px; right: 6px; min-height: 30px; padding: 0 10px; font-size: 12px; }
.sc-tip { font-size: 11px; color: var(--dim); }
.sc-face { position: relative; height: 200px; border-radius: 6px; overflow: hidden; background: #111; }
.sc-face video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.sc-face i { position: absolute; top: 50%; left: 50%; width: 120px; height: 156px; transform: translate(-50%, -50%); border: 2px dashed rgba(255, 255, 255, .7); border-radius: 50%; pointer-events: none; }
#scHint { margin-right: auto; margin-left: 10px; }

/* ===== V5：给药分组 / 出入量 / 呼吸参数 / 全部记录 ===== */
.dg-title { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: 2px; scroll-margin-top: 8px; }
.dg-title:first-child { margin-top: 0; }
#dockBody[data-cat] .dg-title { display: none; }
.dg-title small { color: var(--dim); margin-left: 6px; font-size: 11px; }

.ln-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ln { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 44px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line-2); border-left: 3px solid var(--lc, var(--accent)); background: var(--panel-2); text-align: left; }
.ln b { font-size: 13px; font-weight: 600; }
.ln small { font: 11px var(--num); color: var(--muted); }
.ln--vac, .ln--inf { --lc: var(--fluid); }
.ln--art { --lc: var(--red); }
.ln--uri, .ln--drn, .ln--git { --lc: var(--io-out); }
.ln--oth { --lc: var(--c-local); }
.ln.is-abn { border-color: var(--orange); }
.ln-ws { float: right; min-height: 28px; padding: 0 4px; color: var(--accent); font-size: 12px; }
.chips button.is-warn { border-color: var(--orange); }
.bind-warn { flex-basis: 100%; text-align: left; color: var(--muted); }
.bind-warn.is-bad { color: var(--orange); }
.ln--add { border: 1px dashed var(--line-2); border-left-width: 1px; background: transparent; }
.ln--add b { color: var(--accent); }

.fl-list { display: flex; flex-direction: column; gap: 6px; }
.fl-list .fluid { border-style: solid; border-left: 3px solid var(--fluid); }
.fl-list .fluid .fluid-vol { color: var(--fluid); }
.fl-done { font-size: 11px; color: var(--dim); line-height: 1.5; }
.btn--add { align-self: flex-start; border-style: dashed; color: var(--accent); }
.io-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.io-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); text-align: left; font-size: 14px; }
.io-card small { font-size: 11px; color: var(--muted); }
.io-totals { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 8px 10px; border-radius: 6px; background: var(--panel-2); font-size: 13px; color: var(--muted); }
.io-totals b { font: 600 20px var(--num); color: var(--text); margin: 0 2px; }
.io-totals small { flex-basis: 100%; font-size: 11px; color: var(--dim); }

.seg--wrap { display: flex; flex-wrap: wrap; border: 0; gap: 6px; overflow: visible; }
.seg--wrap button { flex: 0 0 auto; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 6px; }
.seg--wrap button:last-child { border-right: 1px solid var(--line-2); }

.vent-off { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px dashed var(--line-2); border-radius: 6px; font-size: 13px; }
.vent-off span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vent-off small { font-size: 11px; color: var(--dim); }
#ventBox { display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 8px; }
.seg--vent button { min-height: 40px; font-size: 13px; }
.seg--vent button.is-on { background: var(--vent); }
.vf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vf { display: grid; grid-template-columns: 1fr 40px auto 40px; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 6px; background: var(--panel-2); }
.vf span { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; color: var(--vent); }
.vf span small { font-size: 10px; font-weight: 400; color: var(--dim); }
.vf b { min-width: 40px; text-align: center; font: 600 20px var(--num); }
.vf b small { font-size: 11px; color: var(--muted); }
.vf-b { width: 40px; height: 40px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-3); font-size: 20px; }
.vf-b:active { background: var(--line-2); }
.vf--sm { grid-template-columns: 40px auto 40px; padding: 4px; }
.vent-row { display: flex; align-items: center; gap: 8px; }
.vent-row > span { width: 44px; flex: none; font-size: 12px; color: var(--muted); }
.vent-row > .seg { flex: 1; }
.vent-mon { font-size: 11px; color: var(--muted); }
.vent-mon b { font: 600 13px var(--num); color: var(--text); }

/* ===== V5：本台计费 ===== */
.ob--fee span { font: 600 11px/1 var(--num); color: var(--text); }
.fe-ctl { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--c-opioid); color: var(--c-opioid); font: 600 10px/16px var(--ui); font-style: normal; vertical-align: 1px; }
.checklist li .btn { min-height: 30px; padding: 0 10px; font-size: 12px; }

/* ===== V5：处方单 ===== */
.od-sub--act { display: flex; align-items: center; justify-content: space-between; }
.od-sub--act .btn { min-height: 30px; padding: 0 10px; font-size: 12px; }
.rx-tabs { grid-template-columns: repeat(3, 1fr); margin-bottom: 10px; }
.rx-tabs button.is-on { background: var(--accent); }
.rxp { --rxl: #222; position: relative; display: flex; flex-direction: column; width: min(100%, 480px); aspect-ratio: 148 / 210; margin: 0 auto; padding: 22px 26px 16px; border: 3px solid #c8373a; border-radius: 2px; background: #fff; color: #222; font: 12px/1.5 "Songti SC", "STSong", "SimSun", serif; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.rxp--red { --rxl: #c8373a; background: #fdeeee; }
.rxp--normal { border-color: #999; }
.rxp-tag { position: absolute; top: 16px; right: 18px; padding: 2px 8px; border: 1.5px solid #c8373a; color: #c8373a; font-style: normal; font-size: 15px; }
.rxp-head { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rxp-head span { font-size: 15px; }
.rxp-head b { font-size: 26px; letter-spacing: 14px; text-indent: 14px; }
.rxp-no { display: flex; justify-content: space-between; margin-top: 10px; padding: 5px 0; border-top: 1.5px solid var(--rxl); border-bottom: 1.5px solid #222; }
.rxp-no b { font-weight: 400; letter-spacing: .3px; }
.rxp-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; padding: 8px 0; border-bottom: 1.5px solid #222; }
.rxp-wide { grid-column: 1 / -1; }
.rxp-span2 { grid-column: span 2; }
.rxp-rp { margin-top: 10px; font: italic 20px Georgia, serif; }
.rxp-body { flex: 1; min-height: 0; overflow: auto; }
.rxp-drug { padding: 6px 4px 8px; }
.rxp-drug > div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.rxp-drug > div:first-child b { font-weight: 700; }
.rxp-drug p { margin: 6px 0 0; padding-top: 6px; border-top: 1px dashed #999; font-size: 12px; }
.rxp-empty { margin: 12px 0; color: #777; }
.rxp-note { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #aaa; font-size: 11px; color: #444; }
.rxp-note div { font-weight: 600; margin-bottom: 2px; }
.rxp-note p { margin: 2px 0; }
.rxp-dsig { display: flex; gap: 16px; }
.rxp-dsig span { display: flex; align-items: center; gap: 4px; }
.rxp-dsig img { height: 26px; max-width: 110px; }
.rxp-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 8px; border-top: 1.5px solid #222; }
.rxp-sign > span { display: flex; align-items: baseline; gap: 6px; padding: 8px 0 3px; border-bottom: 1px solid #555; }
.rxp-sign b { flex: 1; font-weight: 400; }
.rxp-sign i { font-style: normal; font-size: 10px; }
.rx-state { margin-right: auto; font-size: 12px; color: var(--muted); }
.rx-state.is-ok { color: var(--ok); }
.rx-state.is-stale { color: var(--orange); font-weight: 600; }

/* ===== V5：更正 / 伪差 / 交接 / 麻醉方式 / 检验 / 阻滞 / 有创与神经监测 ===== */
.log li[data-le] { cursor: pointer; }
.log-ed { margin-left: 6px; padding: 0 5px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--warn); font: 400 10px/16px var(--ui); font-style: normal; }
.log li.log-void { color: var(--dim); }
.fr-log .tag--edit { color: var(--warn); }
.le-cur { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 6px; background: var(--panel-2); }
.le-cur .tag { flex: 0 0 auto; font-size: 11px; padding: 1px 6px; border-radius: 3px; background: var(--panel-3); color: var(--muted); }
.le-cur b { font-weight: 600; }
.le-modes { margin-top: 12px; }
.le-modes button.is-on { background: var(--accent); }
.le-step { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.le-step b { min-width: 96px; text-align: center; font: 600 24px var(--num); }
.le-step small { margin-left: 6px; color: var(--muted); font-size: 12px; }
.le-step + .chips { margin-top: 8px; }
.le-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.le-hint { margin-right: auto; align-self: center; font-size: 12px; color: var(--muted); }
.le-hint.is-warn { color: var(--orange); font-weight: 600; }
.vf-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.vf-cell { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); }
.vf-cell span { font-size: 12px; color: var(--muted); }
.vf-cell span small { font-size: 10px; color: var(--dim); }
.vf-cell input { width: 100%; height: 32px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: 600 15px var(--num); }
.vf-cell em { font-style: normal; font-size: 11px; color: var(--dim); }
.vf-cell.is-fix { border-color: var(--orange); }
.vf-cell.is-fix em { color: var(--orange); }
.vf-cell.is-bad input { border-color: var(--warn); }
.vm-wrap { max-height: min(56vh, 520px); overflow: auto; border: 1px solid var(--line-2); border-radius: 6px; }
.vm { width: 100%; border-collapse: collapse; font: 13px var(--num); }
.vm th, .vm td { padding: 0; border-bottom: 1px solid var(--line); text-align: center; }
.vm thead th { position: sticky; top: 0; z-index: 1; padding: 6px 4px; background: var(--panel-3); font: 600 12px var(--ui); color: var(--muted); }
.vm thead th small { display: block; font-weight: 400; font-size: 10px; color: var(--dim); }
.vm tbody th { padding: 0 10px; color: var(--muted); white-space: nowrap; }
.vm input { width: 100%; min-width: 52px; height: 34px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: center; }
.vm input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.vm td.is-fix input { color: var(--orange); font-weight: 700; }
.vm td.is-dirty { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.vm td.is-bad { background: color-mix(in srgb, var(--warn) 22%, transparent); }
.art-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.art-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 58px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); text-align: left; }
.art-list span { font-size: 12px; color: var(--muted); }
.art-list b { font: 600 15px var(--num); }
.art-list em { font-style: normal; font-size: 11px; color: var(--ok); }
.art-list button.is-art { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--panel-2)); }
.art-list button.is-art b { text-decoration: line-through; color: var(--muted); }
.art-list button.is-art em { color: var(--warn); font-weight: 700; }
.art-recs { margin-top: 2px; }
.risk-art { min-height: 40px; padding: 0 10px; white-space: nowrap; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--lv) 60%, transparent); background: var(--banner-btn); color: var(--text); font-size: 13px; }
.risk-art[hidden] { display: none; }
.pt-method, .pt-staff { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.hs { display: grid; grid-template-columns: 84px 1fr; gap: 4px 10px; margin: 0; padding: 10px 12px; border-radius: 6px; background: var(--panel-2); font-size: 13px; }
.hs dt { color: var(--muted); }
.hs dd { margin: 0; }
.ho-txt { width: 100%; margin-top: 10px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 14px var(--ui); resize: vertical; }
.auth-mask { position: fixed; inset: 0; z-index: 21; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--scrim); }
.auth-mask[hidden] { display: none; }
.auth-box { width: min(420px, 100%); padding: 18px 20px 16px; background: var(--sheet-bg); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 12px 36px var(--shadow); animation: rise .18s ease-out; }
.auth-box h4 { margin: 0 0 12px; font-size: 17px; }
.auth-who { margin: 0; font-size: 16px; }
.auth-who small { margin-left: 8px; font-size: 13px; color: var(--muted); }
.auth-sum { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.auth-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.lb-bar { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.lb-bar small { color: var(--muted); font: 12px var(--num); }
.lb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lb { display: grid; grid-template-columns: 1fr 90px; align-items: center; gap: 2px 8px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); }
.lb span { font-size: 13px; font-weight: 600; }
.lb span small { margin-left: 4px; font-weight: 400; color: var(--muted); font-size: 10px; }
.lb input { grid-row: span 2; width: 100%; min-height: 40px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: 600 16px var(--num); text-align: right; }
.lb em { font-style: normal; font: 10px var(--num); color: var(--dim); }
.lb.is-lo input, .lb.is-hi input { border-color: var(--warn); color: var(--warn); }
.lb.is-crit { border-color: var(--red); }
.lb.is-crit input { border-color: var(--red); color: var(--danger-text); }
#labBox { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.lb-card { display: flex; flex-direction: column; gap: 4px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line-2); border-left: 3px solid var(--co2); background: var(--panel-2); }
.lb-card.is-crit { border-left-color: var(--red); }
.lb-card b { font-size: 12px; }
.lb-card span { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.lb-card i { font-style: normal; font-size: 11px; color: var(--muted); }
.lb-card i em { font: 600 12px var(--num); font-style: normal; color: var(--text); }
.lb-card i.is-lo em, .lb-card i.is-hi em { color: var(--warn); }
.lb-card i.is-crit em { color: var(--danger-text); }
.bk-list { display: flex; flex-direction: column; gap: 6px; }
.bk-list[hidden] { display: none; }
.bk { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line-2); border-left: 3px solid var(--c-local); background: var(--panel-2); }
.bk-name b { display: block; font-size: 13px; }
.bk-name small { font: 11px var(--num); color: var(--muted); }
.bk > em { font: 600 13px var(--num); font-style: normal; color: var(--c-local); }
.bk-btns { grid-column: 1 / -1; display: flex; gap: 6px; }
.bk-btns button { min-height: 36px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-3); font-size: 13px; }
.param--ext { --pc: var(--red); }
.param--ext[hidden] { display: none; }
.vitals-sub > .param--ext { flex-grow: 1.6; }
.vitals-col:has(.param--ext:not([hidden])) .vitals-sub { flex-grow: 2.1; }
.ext-vals { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 11px; color: var(--muted); }
.ext-vals b { font: 600 15px var(--num); color: var(--text); }
.ext-vals i { font-style: normal; color: var(--warn); }

/* PACU 预约 */
.pc-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pc-bed { display: flex; flex-direction: column; gap: 2px; min-height: 60px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13px; }
.pc-bed b { font-size: 13px; }
.pc-bed b i { margin-left: 4px; padding: 0 5px; border-radius: 3px; border: 1px solid var(--warn); color: var(--warn); font: 11px/16px var(--ui); font-style: normal; }
.pc-bed span { color: var(--muted); }
.pc-bed small { color: var(--dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-bed.is-free { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.pc-bed.is-free span { color: var(--ok); }
.pc-bed.is-booked { border-style: dashed; }
.pc-bed.is-mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); }
.pc-bed.is-mine span { color: var(--accent); font-weight: 600; }
.pc-sum { margin-top: 6px; font-size: 12px; color: var(--muted); }
.pc-stat { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--panel-2)); }
.pc-stat.is-ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--panel-2)); }
.pc-stat b { font-size: 16px; }
.pc-stat small { color: var(--muted); font-size: 12px; }
#puWhyBox[hidden] { display: none; }
.le-sed { display: grid; grid-template-columns: 1fr 1fr; margin-top: 10px; }
.le-sed button { min-height: 46px; font-size: 13px; }
.le-sed button b { font-size: 20px; }
.le-sed button.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--panel-2)); }

/* 底部固定 */
/* 残余药液双人签名 */
.rd-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.rd-sig { display: flex; flex-direction: column; gap: 4px; }
.rd-sig-h { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.rd-sig-h b { color: var(--text); }
.rd-sig-h .btn { min-height: 30px; padding: 0 10px; font-size: 12px; }
.rd-sig canvas { width: 100%; height: 120px; border: 1px dashed var(--line-2); border-radius: 6px; background: #fff; touch-action: none; }
.rd-sig small { font-size: 11px; color: var(--dim); }
.flow--qty b { color: var(--text); }
.fa-other { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.fa-other[hidden] { display: none; }
.fa-other input { min-width: 0; height: 44px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 14px var(--ui); }
#hoPadss .field-label b.is-ok { color: var(--ok); }
#hoPadss .field-label b.is-no { color: var(--warn); }

/* 术后镇痛 */
#paMode button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
#paMode small { font-size: 11px; font-weight: 400; opacity: .8; }
.pa-drug { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pa-drug > span { flex: 0 0 96px; font-size: 14px; }
.pa-drug em { margin-left: 4px; padding: 0 4px; border-radius: 3px; font: 600 10px var(--ui); font-style: normal; color: var(--warn); border: 1px solid currentColor; }
.pa-params { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.pa-params .flow b { font-size: 24px; }
.pa-no { width: 100%; height: 40px; margin-top: 10px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 14px var(--ui); }
.pa-calc { margin-top: 10px; }
/* ---------- 鼠标设备（PC）：悬停反馈、可复制字段、快捷键角标；触屏不生效 ---------- */
.key-kbd { display: none; }
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover { filter: brightness(1.15); }
  html[data-theme="light"] button:not(:disabled):hover { filter: brightness(.95); }
  .tb-loc:hover, .tb-logo:hover, .ob:hover, .op-btn:hover, .mm-grid button:hover, .mm-list button:hover, .mm-gh:hover, .drug--add:hover { background: var(--panel-3); }
  .drug:not(.drug--add):hover { border-color: color-mix(in srgb, var(--dc) 60%, var(--line-2)); }
  .drug-chips button:hover { background: color-mix(in srgb, var(--dc) 18%, transparent); }
  .drug-more:hover { background: var(--line-2); color: var(--text); }
  #ptName, #ptBasic, #ptMrn, #ptProc, #ptAllergy { -webkit-user-select: text; user-select: text; cursor: text; }
  .key-kbd { display: block; position: absolute; top: 3px; left: 5px; font: 600 10px/1 var(--num); color: var(--dim); }
  .key--primary .key-kbd { color: rgba(255, 255, 255, .7); }
}

/* 用药防错：医嘱、注射器、核对结果（med-safety.js） */
.ds-med { display: grid; gap: 4px; margin-top: 8px; padding: 6px 8px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-2); }
.ds-med[hidden], .ds-chk[hidden] { display: none; }
.dm-row { display: flex; align-items: flex-start; gap: 10px; }
.dm-row > .field-label { flex: 0 0 auto; width: 44px; margin: 6px 0 0; }
.dm-row .chips { flex: 1; min-width: 0; }
.dm-ord { display: grid; gap: 1px; padding-top: 4px; }
.dm-ord b { font-size: 15px; }
.dm-ord small { color: var(--muted); font-size: 12px; }
.dm-scan { border-style: dashed !important; }
.dm-scanlist { display: grid; gap: 4px; margin-left: 54px; }
.dm-scanlist > small { color: var(--muted); font-size: 11px; }
.dm-scanlist button { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-3); text-align: left; font-size: 13px; }
.dm-scanlist button small { color: var(--muted); }
.ds-multi { color: var(--orange); font-weight: 600; }
.ds-chk { position: sticky; bottom: 44px; z-index: 1; max-height: 45vh; overflow-y: auto; display: grid; gap: 4px; margin-top: 8px; padding: 6px 8px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--red) 45%, transparent); background: linear-gradient(color-mix(in srgb, var(--red) 7%, transparent), color-mix(in srgb, var(--red) 7%, transparent)), var(--sheet-bg); }
.dc-h { font-weight: 700; font-size: 13px; }
.dc-h small { margin-left: 6px; color: var(--muted); font-weight: 400; }
.dc { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.dc > i { flex: 0 0 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 700 11px/1 var(--ui); font-style: normal; color: #fff; background: var(--red); margin-top: 1px; }
.dc--confirm > i { background: var(--orange); }
.dc--ok > i { background: var(--ok); }
.dc > div { display: grid; gap: 5px; min-width: 0; flex: 1; }
.dc b { font-weight: 600; line-height: 1.4; }
.dc--ok b { color: var(--muted); font-weight: 400; }
.dc em { font-style: normal; color: var(--ok); font-size: 12px; }
.dc .btn { justify-self: start; }
.dc-lbl { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-lbl button { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-3); font-size: 12px; }
.dc-lbl button.is-on { border-color: var(--ok); color: var(--ok); }
.dc-auth { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border-radius: 6px; background: var(--panel-2); }
.dc-auth > span { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.dc-auth .chips { flex: 0 1 100%; }
.dc-auth .pa-no { flex: 1 1 90px; min-width: 0; }

/* 麻精对账 */
.rb { margin-bottom: 10px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); }
.rb.is-ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.rb-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rb-h small { color: var(--muted); font-size: 12px; }
.rb-h em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--orange); }
.rb.is-ok .rb-h em { color: var(--ok); }
.rb-eq { display: grid; gap: 4px; margin: 8px 0; padding: 0; list-style: none; }
.rb-eq li { display: grid; grid-template-columns: 18px 170px 1fr; gap: 8px; align-items: baseline; font-size: 13px; }
.rb-eq li i { font-style: normal; font-weight: 700; color: var(--red); }
.rb-eq li.ok i { color: var(--ok); }
.rb-eq li small { color: var(--muted); font-size: 12px; }
.rb-act { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-empty { color: var(--muted); }
.demo-item--med { border: 1px solid var(--orange); background: color-mix(in srgb, var(--orange) 10%, transparent); }
.demo-item--med b { color: var(--orange); }
.dm-row > .btn--sm { flex: 0 0 auto; margin-left: auto; }
.dm-none { color: var(--muted); font-weight: 600; }
.ds-med > .dc-auth { margin-left: 54px; }
.ds-chk.is-clear { border-color: var(--line-2); background: var(--sheet-bg); }
.dc--info > i { background: var(--accent); font-style: italic; font-family: Georgia, serif; }
.dc--info b { font-weight: 400; }
/* 注射器标签：左侧色条按药物类别着色（ISO 26825 思路） */
.syr-label { display: flex; align-items: center; gap: 12px; padding: 4px 10px 4px 14px; border-radius: 6px; border: 1px solid var(--line-2); border-left: 8px solid var(--sl); background: var(--panel-3); }
.syr-label > div { display: grid; gap: 1px; min-width: 0; }
.syr-label > div:first-child { flex: 0 0 auto; }
.syr-label b { font-size: 15px; }
.syr-label span { font: 700 14px/1.2 var(--num); }
.syr-label small { color: var(--muted); font-size: 11px; }
.syr-label > div:nth-child(2) { flex: 1; }
.syr-label .btn { flex: 0 0 auto; white-space: nowrap; }
.syr-label.is-bad { border-color: var(--red); background: color-mix(in srgb, var(--red) 10%, var(--panel-3)); }
.syr-label.is-bad small:first-child { color: var(--red); font-weight: 700; }
/* 用药核对记录 */
.me-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.me-list li { display: grid; grid-template-columns: 44px 52px 1fr auto; gap: 8px; align-items: baseline; padding: 6px 8px; border-radius: 6px; background: var(--panel-2); font-size: 13px; }
.me-list time { color: var(--muted); font: 12px var(--num); }
.me-list i { font-style: normal; font-size: 12px; font-weight: 700; text-align: center; border-radius: 4px; padding: 1px 0; color: #fff; background: var(--muted); }
.me-list .me--block i { background: var(--red); }
.me-list .me--confirm i { background: var(--orange); }
.me-list .me--order i { background: var(--accent); }
.me-list span small { color: var(--muted); font: 11px var(--num); }
.me-list em { font-style: normal; color: var(--muted); font-size: 12px; }
.me-list .me-empty { display: block; color: var(--muted); }
#riskMeta.has-drug { color: var(--text); font-weight: 600; }

/* ---------- 协同呼叫支援（主叫） ---------- */
.cc-me { display: grid; grid-template-columns: auto 120px 1fr; align-items: center; column-gap: 10px; margin: 10px 14px 0; font-size: 13px; color: var(--muted); }
.cc-me input { height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--input-bg); color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.cc-me input.is-bad { border-color: var(--danger, #d33); }
.cc-me small { font-size: 12px; }
.cc-tabs { margin: 10px 14px 0; grid-template-columns: 1fr 1fr 1fr; }
.cc-tabs button:disabled { opacity: .45; }
.cc-body { padding: 10px 14px 8px; display: flex; flex-direction: column; gap: 10px; min-height: 180px; }
.cc-hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.cc-hint strong { color: var(--text); font-weight: 600; }
.cc-rooms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cc-rooms li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center; min-height: 52px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; }
.cc-rooms li.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); }
.cc-rooms li.is-off { opacity: .65; }
.cc-rooms b { font-size: 14px; }
.cc-rooms small { grid-column: 1; color: var(--muted); font-size: 12px; }
.cc-rooms em { grid-column: 2; grid-row: 1 / 4; font-style: normal; font-size: 11px; color: var(--ok); }
.cc-rooms li.is-off em { color: var(--muted); }
.cc-rooms small.cc-ch { color: var(--text); opacity: .8; }
.cc-rooms li.cc-phone { grid-template-columns: auto 1fr; column-gap: 12px; }
.cc-rooms li.cc-phone input { height: 36px; min-width: 0; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--input-bg); color: var(--text); font-size: 15px; }
.cc-reason { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.cc-reason input { height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--input-bg); color: var(--text); font-size: 14px; }
.cc-layer { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: #05090b; }
/* 缩小时不能 display:none，否则 iframe 里的通话会被浏览器挂起 */
.cc-layer.is-min { inset: auto; left: -200vw; top: 0; width: 640px; height: 480px; pointer-events: none; }
.cc-pill { position: fixed; z-index: 91; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 5px 0 14px; border-radius: 20px; background: linear-gradient(135deg, #1f8f73, #167a62); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 4px 16px rgba(35, 195, 160, .35); cursor: pointer; white-space: nowrap; }
.cc-pill[hidden] { display: none; }
.cc-pill i { width: 8px; height: 8px; border-radius: 50%; background: #b8ffe9; animation: cc-blink 1.2s infinite; }
.cc-pill button { height: 30px; padding: 0 12px; border-radius: 15px; background: #e5534b; color: #fff; font-size: 13px; }
@keyframes cc-blink { 50% { opacity: .35; } }
.cc-ring { position: fixed; z-index: 95; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(520px, calc(100vw - 24px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: rgba(26, 39, 48, .96); color: #e9f0f3; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.cc-ring[hidden] { display: none; }
.cc-ring > i { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font: 600 20px/1 inherit; font-style: normal; background: linear-gradient(135deg, #f0a35b, #d9644a); animation: cc-pulse 1.4s infinite; }
@keyframes cc-pulse { 0% { box-shadow: 0 0 0 0 rgba(35, 195, 160, .55); } 70% { box-shadow: 0 0 0 12px rgba(35, 195, 160, 0); } }
.cc-ring > div { flex: 1; min-width: 0; }
.cc-ring b { display: block; font-size: 16px; }
.cc-ring small { color: #8a9ba3; font-size: 13px; }
.cc-ring button { height: 44px; padding: 0 18px; border-radius: 22px; color: #fff; font-size: 15px; font-weight: 600; }
.cc-ring .is-no { background: #e5534b; }
.cc-ring .is-yes { background: #1a9c80; }
.cc-layer[hidden] { display: none; }
.cc-layer-head { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 16px; background: #121a20; color: #e8eef2; border-bottom: 1px solid #243038; }
.cc-layer-head strong { display: block; font-size: 16px; }
.cc-layer-head small { color: #9aabb0; font-size: 12px; }
.cc-layer-head > div { flex: 1; min-width: 0; }
.cc-layer-head .btn { min-height: 36px; padding: 0 12px; background: #1d2a32; border-color: #33434d; color: #e8eef2; }
.cc-layer-head .btn--danger { background: #d9363e; border-color: #d9363e; color: #fff; }
#collabCallFrame { flex: 1; width: 100%; border: 0; background: #000; }

.tb-comms { height: 28px; margin-right: 4px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 14px; color: var(--text); font-size: 13px; font-weight: 650; }
.tb-comms.is-on, .tb-comms:active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.od-comms { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.comms { position: fixed; top: 60px; right: 12px; bottom: 12px; z-index: 70; width: min(400px, calc(100vw - 24px)); display: flex; flex-direction: column; background: var(--sheet-bg); color: var(--text); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 16px 48px var(--shadow); overflow: hidden; }
.comms--in { position: relative; top: auto; right: auto; bottom: auto; z-index: auto; width: auto; height: 100%; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.comms[hidden] { display: none; }
.comms-head { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.comms-head strong { font-size: 17px; }
.comms-sp { flex: 1; }
.comms-reg { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel-2); color: var(--text); font-size: 13px; white-space: nowrap; }
.comms-reg i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.comms-reg em { font-style: normal; font-size: 10px; opacity: .6; }
.comms-reg.is-on i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.comms-reg.is-ing i { background: var(--orange); animation: cc-blink 1s infinite; }
.comms-reg.is-off { background: var(--orange); border-color: var(--orange); color: #2a1d02; font-weight: 700; animation: comms-glow 1.6s infinite; }
.comms-reg.is-off i { background: #2a1d02; }
@keyframes comms-glow { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--orange) 25%, transparent); } }
.comms-regbox { margin: 8px 12px 0; padding: 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); }
.comms-regbox[hidden] { display: none; }
.comms-regbox .comms-note { margin-top: 6px; }
.comms-reg-picks { display: flex; gap: 6px; margin-bottom: 8px; }
.comms-reg-picks button { padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); font: 600 15px var(--num); }
.comms-reg-row { display: flex; align-items: center; gap: 8px; }
.comms-reg-row > span { flex: 1; color: var(--muted); }
.comms-reg-row b { color: var(--text); font: 700 17px var(--num); letter-spacing: 1px; }
.comms-reg-row input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--input-bg); color: var(--text); font: 16px var(--num); }
.comms-reg-row .btn { min-width: 80px; }
.comms-list--acts li { cursor: default; }
.comms-acts { grid-column: 3; grid-row: 1 / span 2; display: flex; gap: 6px; }
.comms-acts button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--panel-3); color: var(--ok); }
.comms-acts button:disabled { color: var(--dim); }
.comms-acts svg, .comms-direct svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.comms-direct { padding: 12px; border: 1px dashed color-mix(in srgb, var(--ok) 50%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--ok) 6%, transparent); }
.comms-direct p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.comms-direct p b { margin-right: 6px; color: var(--text); font: 700 17px var(--num); letter-spacing: 1px; }
.comms-direct > div { display: flex; gap: 8px; }
.comms-body > * { flex: none; }
.comms-lbl { margin-top: 4px; color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.comms-tos { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--input-bg); }
.comms-tos input { flex: 1; min-width: 160px; height: 32px; border: 0; outline: 0; background: none; color: var(--text); font-size: 15px; }
.comms-to { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 2px 0 12px; border-radius: 16px; background: var(--panel-3); font-size: 14px; }
.comms-to.is-tel { background: color-mix(in srgb, var(--accent) 16%, var(--panel-2)); font-family: var(--num); }
.comms-to button { width: 26px; height: 26px; border-radius: 13px; color: var(--muted); font-size: 16px; }
.comms-tpl { display: flex; flex-wrap: wrap; gap: 6px; }
.comms-tpl button { height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 16px; color: var(--muted); font-size: 13px; }
.comms-tpl button.is-on { border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, transparent); }
#commsNotifyGo { display: flex; align-items: center; justify-content: center; gap: 6px; height: 48px; }
#commsNotifyGo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.comms-direct .btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; }
.comms-acts button[data-cact="del"] { color: var(--muted); }
.comms-add { align-self: flex-start; padding: 2px 0; color: var(--accent); font-size: 13px; }
.comms-cf { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); }
.comms-cf input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--input-bg); color: var(--text); font-size: 16px; }
.comms-cf > div { display: flex; gap: 8px; }
.comms-cf > div .btn { flex: 1; }
.comms-cf-msg { margin: 0; color: var(--red); font-size: 13px; }
.comms-grp { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); }
.comms-grp-h { display: flex; align-items: baseline; gap: 8px; }
.comms-grp-h em { color: var(--muted); font-size: 12px; font-style: normal; }
.comms-grp small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.comms-grp-a { display: flex; gap: 8px; margin-top: 4px; }
.comms-seg { display: flex; gap: 6px; }
.comms-seg button { flex: 1; height: 34px; border-radius: 8px; color: var(--muted); border: 1px solid var(--line-2); }
.comms-seg button.is-on { background: var(--panel-3); color: var(--text); font-weight: 650; }
.comms-pick { list-style: none; margin: 0; padding: 0; max-height: 180px; overflow: auto; display: flex; flex-direction: column; }
.comms-pick label { display: flex; align-items: center; gap: 8px; min-height: 34px; font-size: 14px; }
.comms-cf .comms-pick input { width: 18px; height: 18px; padding: 0; }
.comms-icon { min-height: 32px; padding: 0 8px; border-radius: 8px; color: var(--muted); font-size: 13px; }
.comms-icon.is-on, .comms-icon:active { background: var(--panel-3); color: var(--text); }
.comms-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px 10px 0; }
.comms-tabs button { height: 34px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.comms-tabs button.is-on { background: var(--panel-3); color: var(--text); font-weight: 650; }
.comms-body { flex: 1; min-height: 0; overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.comms-search, .comms-num, .comms-room, .comms-speak, .comms-set input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--input-bg); color: var(--text); font-size: 16px; }
.comms-speak { height: 88px; padding: 8px 12px; resize: none; line-height: 1.4; }
.comms-note, .comms-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.comms-hint.is-warn { color: var(--orange); }
.comms-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.comms-list li { display: grid; grid-template-columns: 28px 1fr auto; gap: 2px 8px; align-items: center; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); cursor: pointer; }
.comms-list li.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel-2)); }
.comms-list .dot { grid-row: 1 / span 2; width: 10px; height: 10px; margin-left: 6px; border-radius: 50%; background: var(--dim); }
.comms-list .dot.is-on { background: var(--ok); }
.comms-list .dot.is-off { background: var(--muted); }
.comms-list b { font-size: 15px; }
.comms-list small { grid-column: 2; color: var(--muted); font-size: 12px; }
.comms-list em { grid-column: 3; grid-row: 1 / span 2; font-style: normal; font-size: 11px; color: var(--muted); text-align: right; }
.comms-list li.is-reg em { color: var(--ok); }
.comms-foot { display: flex; gap: 8px; padding: 8px 12px 12px; border-top: 1px solid var(--line); }
.comms-foot .btn { flex: 1; }
.comms-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.comms-pad button { height: 52px; border-radius: 26px; background: var(--panel-3); font: 600 22px var(--num); }
.comms-pad button:active { background: var(--accent); color: var(--on-accent); }
.comms-call { height: 52px; border-radius: 26px; background: var(--ok); color: #042; font-size: 16px; font-weight: 700; }
.comms-call:disabled { opacity: .4; }
.comms-set { display: flex; flex-direction: column; gap: 8px; margin: 0 12px; padding: 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); }
.comms-set[hidden] { display: none; }
.comms-set label { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.comms-group { margin: 8px 2px 2px; color: var(--muted); font-size: 12px; }

/* 操作台紧凑版（按术中界面小样）：节点按钮、筛选条、方案区头、分类条等压低高度，把空间让给方案待执行项；收起窄栏不受影响 */
.pad:not(.is-collapsed) .milestones { padding: 5px 44px 5px 6px; }
.pad:not(.is-collapsed) .ms { min-height: 40px; gap: 0; line-height: 1.15; font-size: 11px; }
.pad:not(.is-collapsed) .ms b { font-size: 14px; }
.pad:not(.is-collapsed) .ms.is-next b { font-size: 12px; }
.pad:not(.is-collapsed) .console-handle { top: 5px; right: 6px; height: 40px; gap: 0; font-size: 10px; }
.pad:not(.is-collapsed) .console-handle svg { width: 14px; height: 14px; }
.run-bar { height: 28px; }
.stream .log-filter { min-height: 30px; padding-top: 2px; padding-bottom: 2px; }
.log li { padding-top: 4px; padding-bottom: 4px; }
.log li.lg-head { min-height: 30px; margin-top: 4px; padding-top: 2px; padding-bottom: 2px; }
.lg-head button { min-height: 24px; }
.log li.lg-plan { padding-top: 3px; padding-bottom: 3px; }
.lg-side button { height: 22px; }
.rc-g { max-height: 76px; }
.rc-t { height: 36px; }
.pad:not(.is-collapsed) .cat-strip { padding: 4px 6px; }
.pad:not(.is-collapsed) .cat-strip button { height: 32px; }
.log li.lg-rec { margin-top: 3px; }
.nr-tag { flex: none; padding: 1px 6px; border-radius: 3px; background: color-mix(in srgb, var(--ai) 14%, transparent); color: var(--ai); font-size: 11px; }
/* 面板收起时拖动把手用不上（点分类键打开），不占高度 */
.dock:not(.is-open) .dock-grip { display: none; }
.lg-rec .nr-rec-txt small { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-rec .nr-rec-txt b { flex: none; max-width: 60%; }
/* 药品卡紧凑：表头 20px + 剂量 30px，同样高度多放约一半的药；字典补位的卡片浅一些 */
.drug:not(.drug--add) { min-height: 0; gap: 2px; padding: 3px 4px 4px 10px; }
.drug-more { height: 20px; margin: 0; font-size: 18px; }
.drug-name { font-size: 14px; }
.drug-chips button { height: 30px; font-size: 13px; }
.drug.is-extra { opacity: .78; }
.drug--add { min-height: 0; padding: 6px 10px; }
.drug--add .drug-name { font-size: 13px; }
/* 列表是纵向 flex 且会滚动：行不许被压扁（带 overflow 的行最小高度会变 0，内容溢出盖到筛选条上） */
#logList > li { flex-shrink: 0; }

.meet-invites { position: fixed; top: 64px; right: 16px; z-index: 2147482800; display: flex; flex-direction: column; gap: 8px; }
.meet-invite { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); color: var(--text); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); font-size: 14px; line-height: 1.4; }
.meet-invite small { color: var(--muted); }
.meet-invite-a { display: flex; gap: 8px; }
.meet-invite-a button { min-height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--text); }
.meet-invite-a button.is-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.comms-joincode { display: flex; gap: 6px; }
.comms-joincode input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--input-bg); color: var(--text); font-size: 16px; }
.comms-joincode .btn { flex: none; }
.comms-open li { cursor: default; }

/* ================= 数字药箱（体征列下方的紧凑块 + 点开的面板），前缀 bxl- ================= */
.bxl-wrap { flex: 0 0 auto; }
.bxl { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 6px 8px 6px; text-align: left; color: var(--text); background: linear-gradient(180deg, var(--tile-a), var(--tile-b)); border: 1px solid var(--line-2); border-radius: 8px; }
.bxl:active { background: var(--panel-3); }
.bxl--warn { border-color: var(--orange); }
.bxl--bad { border-color: var(--red); }
.bxl-h { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.2; }
.bxl-h b { font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.bxl-h em { flex: 1; font-style: normal; font-weight: 600; color: var(--ok); }
.bxl--warn .bxl-h em { color: var(--orange); }
.bxl--bad .bxl-h em { color: var(--red); }
.bxl-h svg { width: 12px; height: 12px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bxl-g { display: flex; justify-content: space-between; gap: 2px; }
.bxl-s { --bc: var(--c-other); flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bxl-s.c-sedative { --bc: var(--c-sedative); } .bxl-s.c-benzo { --bc: var(--c-benzo); } .bxl-s.c-opioid { --bc: var(--c-opioid); }
.bxl-s.c-vaso { --bc: var(--c-vaso); } .bxl-s.c-anticho { --bc: var(--c-anticho); } .bxl-s.c-local { --bc: var(--c-local); } .bxl-s.c-nmb { --bc: var(--c-nmb); }
.bxl-bar { position: relative; width: 14px; height: 30px; display: flex; align-items: flex-end; border: 1.5px solid var(--bc); border-radius: 3px; overflow: hidden; }
.bxl-bar u { display: block; width: 100%; background: var(--bc); }
.bxl-s.lv-low .bxl-bar { border-color: var(--orange); } .bxl-s.lv-low .bxl-bar u { background: var(--orange); }
.bxl-s.lv-out .bxl-bar { border-color: var(--red); } .bxl-s.lv-out .bxl-bar u { background: var(--red); }
.bxl-s.lv-none .bxl-bar { border-style: dashed; border-color: var(--dim); }
.bxl-s i { font-style: normal; font-size: 11px; font-weight: 600; line-height: 1; color: var(--muted); }
.bxl-s.lv-low i { color: var(--orange); } .bxl-s.lv-out i { color: var(--red); }
.bxl-f { font-size: 11px; line-height: 1.25; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bxl--warn .bxl-f { color: var(--orange); } .bxl--bad .bxl-f { color: var(--red); }

.bxl-mask { position: fixed; inset: 0; z-index: 19; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--scrim); }
.bxl-mask[hidden] { display: none; }
.bxl-panel { width: min(980px, 100%); max-height: 90vh; display: flex; flex-direction: column; background: var(--sheet-bg); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 36px var(--shadow); animation: rise .18s ease-out; }
.bxl-panel header { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.bxl-panel h3 { margin: 0; font-size: 17px; }
.bxl-panel header small { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; }
.bxl-x { width: 40px; height: 40px; align-self: center; border-radius: 10px; background: var(--panel-2); font-size: 20px; line-height: 1; }
.bxl-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; padding: 14px 16px 16px; }
.bxl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; align-content: start; }
.bxl-side h4 { margin: 12px 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.bxl-side h4:first-child { margin-top: 0; }
.bxl-c { --bc: var(--c-other); display: flex; flex-direction: column; gap: 5px; padding: 9px 10px; background: var(--panel-2); border: 1px solid var(--line-2); border-left: 4px solid var(--bc); border-radius: 8px; }
.bxl-c.c-sedative { --bc: var(--c-sedative); } .bxl-c.c-benzo { --bc: var(--c-benzo); } .bxl-c.c-opioid { --bc: var(--c-opioid); }
.bxl-c.c-vaso { --bc: var(--c-vaso); } .bxl-c.c-anticho { --bc: var(--c-anticho); } .bxl-c.c-local { --bc: var(--c-local); } .bxl-c.c-nmb { --bc: var(--c-nmb); }
.bxl-c.lv-none { border-style: dashed; border-left-style: solid; opacity: .85; }
.bxl-c.lv-low { border-color: var(--orange); border-left-color: var(--bc); }
.bxl-c.lv-out { border-color: var(--red); border-left-color: var(--bc); }
.bxl-c-h { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.bxl-c-h b { font-size: 15px; }
.bxl-c-h em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: var(--ok); }
.bxl-c.lv-low .bxl-c-h em { color: var(--orange); } .bxl-c.lv-out .bxl-c-h em { color: var(--red); } .bxl-c.lv-none .bxl-c-h em { color: var(--muted); }
.bxl-tag { font-style: normal; padding: 1px 5px; font-size: 10.5px; border-radius: 4px; color: var(--muted); border: 1px solid var(--line-2); }
.bxl-tag.is-ctl { color: var(--red); border-color: var(--red); }
.bxl-seg { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.bxl-seg i { height: 8px; border-radius: 2px; background: var(--panel-3); }
.bxl-seg i.on { background: var(--bc); }
.bxl-c.lv-low .bxl-seg i.on { background: var(--orange); } .bxl-c.lv-out .bxl-seg i.on { background: var(--red); }
.bxl-c-n { min-height: 16px; font-size: 12.5px; color: var(--text); }
.bxl-c-n b { font-size: 15px; }
.bxl-c-s { font-size: 11.5px; color: var(--muted); }
.bxl-c-a { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.bxl-c-a .btn { min-height: 34px; padding: 0 10px; font-size: 12.5px; }
.bxl-al, .bxl-chain { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.bxl-al li, .bxl-chain li { display: flex; align-items: flex-start; gap: 6px; padding: 5px 8px; font-size: 12px; line-height: 1.4; background: var(--panel-2); border-radius: 6px; }
.bxl-al li i, .bxl-chain li i { flex: none; width: 16px; text-align: center; font-style: normal; font-weight: 700; }
.bxl-al .lv-bad { color: var(--red); } .bxl-al .lv-warn { color: var(--orange); } .bxl-al .lv-info { color: var(--muted); } .bxl-al .lv-ok { color: var(--ok); }
.bxl-al li span { color: var(--text); }
.bxl-chain li span { flex: 1; }
.bxl-chain li em { font-style: normal; color: var(--muted); }
.bxl-chain .st-ok i { color: var(--ok); } .bxl-chain .st-warn i { color: var(--orange); } .bxl-chain .st-idle i { color: var(--dim); }
.bxl-chain li[data-act] { cursor: pointer; }
.bxl-tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.bxl-tabs button { flex: 1; min-height: 34px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12.5px; }
.bxl-tabs button.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.bxl-its { display: flex; flex-direction: column; gap: 4px; }
.bxl-it { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 9px; text-align: left; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; }
.bxl-it b { font-size: 13px; } .bxl-it small { font-size: 11px; color: var(--muted); }
.bxl-it.is-on { border-color: var(--accent); }
.bxl-it.is-done { opacity: .5; }
.bxl-hint { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.bxl-chk { margin: 8px 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.bxl-chk li { display: flex; gap: 6px; line-height: 1.4; }
.bxl-chk li i { flex: none; width: 14px; font-style: normal; font-weight: 700; }
.bxl-chk .ok { color: var(--ok); } .bxl-chk .warn { color: var(--orange); } .bxl-chk .bad { color: var(--red); }
@media (max-width: 760px) { .bxl-body { grid-template-columns: minmax(0, 1fr); } }

/* 药箱数量要一眼看到 */
.bxl-h small { font-size: 10.5px; color: var(--dim); }
.bxl-q { font-size: 13px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.bxl-s.lv-low .bxl-q { color: var(--orange); } .bxl-s.lv-out .bxl-q { color: var(--red); } .bxl-s.lv-none .bxl-q { color: var(--dim); }
.bxl-bar { height: 28px; }
.bxl-c-q { display: flex; align-items: baseline; gap: 4px; }
.bxl-c-q b { font-size: 30px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.bxl-c-q span { font-size: 14px; font-weight: 700; }
.bxl-c-q small { margin-left: auto; font-size: 12px; color: var(--muted); }
.bxl-c.lv-low .bxl-c-q b, .bxl-c.lv-low .bxl-c-q span { color: var(--orange); }
.bxl-c.lv-out .bxl-c-q b, .bxl-c.lv-out .bxl-c-q span { color: var(--red); }
.bxl-c.lv-none .bxl-c-q b, .bxl-c.lv-none .bxl-c-q span { color: var(--dim); }
.bxl-seg i { height: 10px; }
.bxl-h { gap: 4px; }
.bxl-q { font-size: 14px; letter-spacing: -.04em; }
.bxl-g { gap: 1px; }

/* ================= 麻精药箱（麻药分类顶部的紧凑条 + 药箱面板），前缀 bxo- ================= */
.bxo-wrap:empty { display: none; }
#dockBody:not([data-cat="麻药"]) .bxo-wrap { display: none; }
.bxo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 8px; margin-bottom: 6px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 12px; }
.bxo--on { border-color: color-mix(in srgb, var(--ok) 55%, var(--line-2)); }
.bxo-t { font-weight: 700; color: var(--text); }
.bxo-n { color: var(--muted); font-size: 11px; }
.bxo-sp { flex: 1; }
.bxo-c, .bxo-b, .bxo-al { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--panel-3); color: var(--text); font-size: 12px; }
.bxo-c b { font: 700 12px var(--num); }
.bxo-c small { font-size: 11px; color: var(--muted); }
.bxo-c.st-online { border-color: var(--ok); }
.bxo-c.st-online small { color: var(--ok); }
.bxo-c.st-held, .bxo-c.st-issued { border-color: var(--accent); }
.bxo-c.st-held small, .bxo-c.st-issued small { color: var(--accent); }
.bxo-c.st-away { opacity: .7; }
.bxo-b { background: transparent; color: var(--accent); }
.bxo-al { border-color: var(--warn); color: var(--warn); }
.bxo-al.lv-bad { border-color: var(--red); color: var(--danger-text); }
.drug.is-box { border-left: 3px solid var(--ok); }
.drug.is-box.lv-low { border-left-color: var(--warn); }
.drug.is-box.lv-out { border-left-color: var(--red); }
.drug-box { display: flex; align-items: baseline; gap: 6px; padding: 0 2px; font: 11px var(--num); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drug-box b { padding: 0 5px; border-radius: 3px; background: var(--panel-3); color: var(--text); font-weight: 700; }
.drug-box small { font-size: 10px; color: var(--dim); }
.drug.is-box.lv-low .drug-box { color: var(--warn); }
.drug.is-box.lv-out .drug-box { color: var(--danger-text); }

.bxo-sheet { max-height: 86vh; overflow: auto; }
.bxo-tabs { display: flex; gap: 6px; margin: 8px 0; }
.bxo-tabs button { flex: 1; min-height: 38px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); font-size: 13px; }
.bxo-tabs button.is-on { border-color: var(--accent); color: var(--text); background: var(--panel-3); }
.bxo-body { display: flex; flex-direction: column; gap: 8px; }
.bxo-in { min-height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--input-bg); color: var(--text); font-size: 14px; min-width: 0; }
.bxo-scan { display: flex; gap: 6px; }
.bxo-scan .bxo-in { flex: 1; }
.bxo-pk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bxo-pk > small { color: var(--dim); }
.bxo-pk button { display: flex; flex-direction: column; align-items: flex-start; min-height: 40px; padding: 3px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-size: 12px; text-align: left; }
.bxo-pk button.is-on { border-color: var(--accent); }
.bxo-pk button small { color: var(--muted); font-size: 11px; }
.bxo-box { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); }
.bxo-bh { display: flex; align-items: baseline; gap: 8px; }
.bxo-bh b { font-size: 14px; }
.bxo-bh em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); }
.bxo-bs { font-size: 11px; color: var(--muted); }
.bxo-ln, .bxo-ck-l, .bxo-al-l, .bxo-lg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.bxo-ln li { display: flex; gap: 8px; align-items: baseline; }
.bxo-ln li span { color: var(--muted); font-size: 11px; }
.bxo-ln li em { margin-left: auto; font: normal 12px var(--num); }
.bxo-ck { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.bxo-ck input { width: 20px; height: 20px; }
.bxo-ck-l li { display: flex; gap: 6px; }
.bxo-ck-l li i { font-style: normal; width: 14px; text-align: center; }
.bxo-ck-l li.ok i { color: var(--ok); }
.bxo-ck-l li.warn i { color: var(--warn); }
.bxo-ck-l li.bad i { color: var(--red); }
.bxo-r.is-bad { padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--red) 14%, var(--panel-2)); color: var(--danger-text); font-size: 13px; }
.bxo-sl { display: grid; grid-template-columns: 78px 1fr auto; gap: 2px 8px; align-items: center; font-size: 13px; }
.bxo-sl small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.bxo-sl em { font: normal 12px var(--num); }
.bxo-bar { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.bxo-bar u { display: block; height: 100%; background: var(--bc, var(--ok)); }
/* 药名和横条的颜色跟术中主界面的药品类别一致（镇静黄 / 苯二氮䓬橙 / 阿片蓝）；余量低 / 用完仍用橙 / 红提示 */
.bxo-sl, .bxo-rf { --bc: var(--c-other); }
.bxo-sl.c-sedative, .bxo-rf.c-sedative { --bc: var(--c-sedative); }
.bxo-sl.c-benzo, .bxo-rf.c-benzo { --bc: var(--c-benzo); }
.bxo-sl.c-opioid, .bxo-rf.c-opioid { --bc: var(--c-opioid); }
.bxo-sl > b, .bxo-rf > b { color: var(--bc); }
.bxo-sl.lv-low .bxo-bar u { background: var(--orange); }
.bxo-sl.lv-out .bxo-bar u, .bxo-sl.lv-none .bxo-bar u { background: var(--red); }
.bxo-al-l li { color: var(--warn); }
.bxo-al-l li.lv-bad { color: var(--danger-text); }
.bxo-h4 { margin: 4px 0 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.bxo-lg li { display: flex; gap: 8px; }
.bxo-lg li span { color: var(--muted); font: 11px var(--num); }
.bxo-sg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bxo-sg > span { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.bxo-sg .bxo-in { width: 110px; }
.bxo-box.st-done { opacity: .7; }
.bxo-opts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bxo-opts .btn.is-on { border-color: var(--accent); }
.bxo-off { display: flex; flex-direction: column; gap: 6px; }
.bxo-demo { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 6px; }
.bxo-demo small { font-size: 11px; color: var(--dim); }

/* 麻药分类里的箱内药：一药一行；左侧药箱块：叠在一起，一药一条横条 */
.drug.is-box { grid-column: 1 / -1; flex-direction: row !important; align-items: center; gap: 10px !important; min-height: 48px; padding: 3px 4px 3px 14px !important; }
.drug.is-box .drug-name { flex: 0 0 5.2em; }
.drug-left { flex: 0 0 9em; font: 12px var(--num); color: var(--muted); white-space: nowrap; }
.drug.is-box.lv-low .drug-left { color: var(--warn); }
.drug.is-box.lv-out .drug-left { color: var(--danger-text); }
.drug.is-box .drug-chips { flex: 1; min-width: 0; }
#dockBody[data-cat] .dg-title.dg-sub { display: block; margin-top: 6px; }
.bxl--idle .bxl-h small { flex: 1; color: var(--muted); }
.bxl-hr { --bc: var(--c-other); display: flex; align-items: center; gap: 6px; font-size: 12px; }
.bxl-hr.c-sedative { --bc: var(--c-sedative); } .bxl-hr.c-benzo { --bc: var(--c-benzo); } .bxl-hr.c-opioid { --bc: var(--c-opioid); }
.bxl-hr i { flex: 0 0 4.2em; font-style: normal; color: var(--text); white-space: nowrap; overflow: hidden; }
.bxl-hr .bxl-bar { flex: 1; height: 8px; width: auto; min-width: 0; align-items: stretch; border-width: 1px; }
.bxl-hr .bxl-bar u { height: 100%; }
.bxl-hr b { flex: 0 0 2em; text-align: right; font: 600 12px var(--num); }
.bxl-hr.lv-low .bxl-bar { border-color: var(--orange); } .bxl-hr.lv-low .bxl-bar u { background: var(--orange); }
.bxl-hr.lv-out .bxl-bar { border-color: var(--red); } .bxl-hr.lv-out b { color: var(--red); }
.bxo-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); }
.bxo-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bxo-row b { font-size: 14px; }
.bxo-row small { font-size: 11px; color: var(--muted); }
.bxo-row small.bad { color: var(--danger-text); } .bxo-row small.warn { color: var(--warn); }
.bxo-rf { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 2px 4px; border-radius: 8px; font-size: 14px; }
.bxo-rf b { flex: 0 0 5.5em; }
.bxo-rf span { font: 12px var(--num); color: var(--muted); }
.bxo-rf.lv-low span { color: var(--warn); } .bxo-rf.lv-out span { color: var(--danger-text); }
.bxo-rf i { flex: 1; }
.bxo-rf button { width: 44px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-3); color: var(--text); font-size: 20px; line-height: 1; }
.bxo-rf button:disabled { opacity: .35; }
.bxo-rf em { min-width: 1.6em; text-align: center; font: normal 700 16px var(--num); }
.bxo-rf.is-on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.bxo-why { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 4px; }
.bxo-why small { color: var(--muted); font-size: 11px; }
.bxo-why button { min-height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel-3); color: var(--text); font-size: 12px; }
.bxo-why button.is-on { border-color: var(--accent); color: var(--accent); }
