/* 诊所02 苹果原生小样 · 在 app.css 之上的补充 */
.role-list { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.role-btn {
  width: 100%; min-height: 44px; text-align: left;
  border: 0; background: none; border-radius: var(--r-s);
  padding: 0 12px; display: flex; flex-direction: column; justify-content: center;
}
.role-btn:hover { background: rgba(0,0,0,0.05); }
.role-btn.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.role-btn small { font-size: 13px; color: var(--text-2); font-weight: 400; }
.role-btn.on small { color: var(--accent); opacity: 0.85; }

.mod-note {
  margin: 0 0 16px; padding: 10px 14px;
  background: #f6f6f8; border-radius: var(--r-s);
  font-size: 13px; color: var(--text-2);
}
.mod-note strong { color: var(--text); font-weight: 600; }
.skin-only {
  border: 1px dashed var(--line-strong); border-radius: var(--r-m);
  padding: 16px 20px; margin-top: 16px; color: var(--text-2); font-size: 14px;
}

.table-card { overflow-x: auto; }
.table-card table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-card th, .table-card td {
  padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table-card th { font-size: 13px; color: var(--text-2); font-weight: 600; }
.table-card td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-card tr:last-child td { border-bottom: 0; }

.flow-steps {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none;
}
.flow-steps li {
  min-height: 36px; padding: 6px 12px; border-radius: 18px;
  background: var(--fill); color: var(--text-2); font-size: 13px;
  display: inline-flex; align-items: center;
}
.flow-steps li.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.flow-steps li.done { background: var(--fill); color: var(--text); }
.flow-steps li.done::before { content: "✓ "; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.stat-tile {
  background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-1);
  padding: 16px 20px;
}
.stat-tile dt { font-size: 13px; color: var(--text-2); margin: 0; }
.stat-tile dd { margin: 4px 0 0; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-tile .src { margin-top: 4px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.sim-receipt {
  margin-top: 12px; padding: 12px 16px; background: #f6f6f8;
  border-radius: var(--r-s); border-left: 3px solid var(--text);
}
.sim-receipt strong { display: block; margin-bottom: 4px; }

.center-home {
  display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start;
}
.app.layout-center .center-home { grid-template-columns: 300px minmax(0, 1fr); }
.is-mobile .center-home { grid-template-columns: 1fr; }
.queue-side {
  background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-1);
  padding: 16px; position: sticky; top: 0;
}
.queue-side .list-count { margin: 8px 0; }
.hero-center-block {
  background: var(--surface); border-radius: var(--r-l); box-shadow: var(--sh-2);
  padding: 28px 32px 24px;
}
.is-mobile .hero-center-block { padding: 16px; }
.hero-center-block .hero-slot .dock { padding: 0; background: none; }
.hero-center-block .hero-slot .dock-inner { max-width: none; }
.app.hero-mode #dock-home { display: none; }

.tabs-inline { display: flex; gap: 4px; margin: 0 0 16px; background: var(--fill); border-radius: 10px; padding: 2px; }
.tabs-inline button {
  flex: 1; min-height: 40px; border: 0; background: transparent; border-radius: var(--r-s);
  font-size: 14px; color: var(--text);
}
.tabs-inline button.on { background: var(--surface); box-shadow: var(--sh-1); font-weight: 600; }

.block-banner {
  margin: 12px 0; padding: 12px 16px; background: #f6f6f8;
  border-radius: var(--r-s); border-left: 3px solid var(--text);
  font-size: 14px;
}

.sb-groups .sb-item .sb-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.sb-item.on .sb-badge { background: var(--accent); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.is-mobile .field-row { grid-template-columns: 1fr; }

.identity-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 10px 14px;
  background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-1);
}
.identity-bar select {
  min-height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface);
}

/* 正式化：隐藏历史模拟角标类；空态不再用警告色边框 */
.sim-tag { display: none !important; }
.empty-mod.skin-only { border-style: solid; border-color: var(--line); color: var(--text-2); }
.mod-note { display: none; }

/* 实验区苹果01 */
.ver-tag {
  font-size: 12px; color: var(--text-2);
  border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 2px 8px; margin-left: 4px;
  white-space: nowrap; align-self: center;
}
.collect-toggle {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; margin: 12px 0 8px;
}
.collect-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.review-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.review-item {
  padding: 12px 14px; border-radius: var(--r-s);
  background: var(--fill); border-left: 3px solid var(--line-strong);
}
.review-item.has-conflict { border-left-color: var(--accent); background: var(--accent-soft); }
.review-item .kind { font-size: 13px; font-weight: 600; color: var(--text-2); }
.review-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.summary-card .missing { margin-top: 8px; }
.option-on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
#btn-mic.live { background: var(--accent); color: #fff; box-shadow: inset 0 0 0 2px var(--accent); }
.due-flag { color: var(--accent); font-weight: 600; font-size: 13px; }

/* 手机宽度排版修正：两栏改上下堆叠；底栏芯片横滑且不与状态重叠；宽表可横滑 */
html.is-mobile .center-home,
html.is-mobile .app.layout-center .center-home,
.is-mobile .app.layout-center .center-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
html.is-mobile .center-home > *,
html.is-mobile .app.layout-center .center-home > * {
  min-width: 0;
  max-width: 100%;
}
html.is-mobile .queue-side {
  position: static;
  width: 100%;
}
html.is-mobile .center-home .card,
html.is-mobile .center-home .summary-card,
html.is-mobile .center-home-mobile .card,
html.is-mobile .center-home-mobile .summary-card {
  width: 100%;
  max-width: 100%;
}

html.is-mobile .dock-top {
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}
html.is-mobile .chips {
  flex: 0 1 auto;
  width: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
html.is-mobile .status-wrap {
  flex: none;
  width: auto;
  align-self: center;
}

html.is-mobile .table-card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
html.is-mobile .table-card table {
  width: max-content;
  min-width: 100%;
}
html.is-mobile .table-card th,
html.is-mobile .table-card td {
  white-space: nowrap;
}

html.is-mobile .tabs-inline {
  overflow-x: auto;
  flex-wrap: nowrap;
}
html.is-mobile .tabs-inline button {
  flex: 0 0 auto;
  padding: 0 12px;
}

html.is-mobile .field-row,
html.is-mobile .grid-2,
html.is-mobile .grid-3 {
  grid-template-columns: minmax(0, 1fr);
}

/* 接诊五步与病历分项来源 */
.flow-track-slot { margin: 0 0 4px; max-width: 760px; }
.flow-track-slot[hidden] { display: none !important; }
.visit-track {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 2px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #f2f2f4;
  border-radius: 8px;
  box-sizing: border-box;
}
.visit-track li { margin: 0; flex: 1 1 auto; min-width: max-content; }
.visit-track .track-seg,
.visit-track li button {
  display: block;
  width: 100%;
  min-height: 28px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6e6e73;
  font-size: 12px;
  line-height: 28px;
  font-weight: 500;
  box-shadow: none;
  white-space: nowrap;
}
.visit-track li.on .track-seg,
.visit-track li.on button {
  background: var(--accent-soft, #e8f1ff);
  color: var(--accent, #007aff);
  font-weight: 600;
}
.visit-track li.done:not(.on) .track-seg { color: #86868b; }
.visit-track .tick { font-size: 11px; margin-right: 3px; color: var(--accent, #007aff); }
.visit-track li.locked .track-seg { opacity: 0.42; }
.visit-track li.done button::before { content: none; }
.rec-field { margin-bottom: 16px; }
.rec-field .empty-flag { margin: 0 0 6px; }

.name-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.name-link:hover { opacity: 0.8; }

.chk { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 14px; }
.skip-flag { margin: 6px 0; }

.confirm-line {
  border: 1px solid var(--line);
  border-radius: var(--r-m, 12px);
  padding: 12px 14px;
  margin: 10px 0;
  background: #fff;
}
.confirm-line.has-conflict {
  border-color: #c41d3a;
  background: #fff5f5;
}
.confirm-line.has-conflict .conflict { color: #c41d3a; font-weight: 600; }
.confirm-line.is-confirmed { border-color: var(--accent); }
.chk.is-disabled { opacity: 0.55; }
.result-board { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.result-card {
  border: 1px solid var(--line);
  border-radius: var(--r-m, 12px);
  padding: 14px 16px;
  background: #fbfbfd;
}
.result-card h3 { margin: 0 0 8px; font-size: 16px; }
.result-card p { margin: 6px 0; }
.visit-track li.on.done button,
.visit-track li.done.on button { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.suggest-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.suggest-item { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.suggest-item:hover { background: var(--accent-soft, #e8f1ff); }
.suggest-item.on { background: var(--accent-soft, #e8f1ff); color: var(--accent, #007aff); box-shadow: inset 0 0 0 1px var(--accent, #007aff); font-weight: 600; }
.mode-seg { display: inline-flex; align-items: center; gap: 0; padding: 2px; margin: 0 0 8px; background: #f2f2f4; border-radius: 8px; }
.mode-seg-btn { height: 28px; padding: 0 12px; border: 0; background: transparent; border-radius: 6px; font-size: 13px; color: #6e6e73; cursor: pointer; }
.mode-seg-btn.on { background: #fff; color: var(--accent, #007aff); font-weight: 600; box-shadow: 0 0 0 0.5px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.06); }
.flow-nav { margin-top: 16px; }
.warn-flag, .update-flag { color: #b42318; }
.hist-prev { margin: 8px 0; padding: 8px 10px; background: #f6f6f8; border-radius: 8px; }
html.is-mobile .main-scroll { padding-bottom: 16px; }

    .ai-guide-slot { margin: 0 0 4px; max-width: 760px; }
.ai-guide-slot[hidden] { display: none !important; }
.ai-guide { margin: 0; font-size: 11px; line-height: 1.3; color: #6e6e73; }
.ai-guide .guide-tag { color: var(--accent, #007aff); font-weight: 600; margin-right: 4px; }
.ai-guide .guide-link {
  display: inline; padding: 0; border: 0; background: none;
  color: var(--accent, #007aff); font: inherit; text-decoration: underline; cursor: pointer;
}


/* 底部工作区压紧：叫下一位、录音、键盘同一排 */
.dock { padding: 4px 24px 10px; }
.dock-top { gap: 6px; margin-bottom: 4px; flex-wrap: nowrap; }
.chips { flex: 0 1 auto; gap: 6px; }
.chip { min-height: 28px; height: 28px; padding: 0 10px; border-radius: 14px; font-size: 12px; }
.status-btn { min-height: 28px; height: 28px; padding: 0 4px; gap: 5px; font-size: 11px; }
.status-text { display: inline-flex; align-items: center; gap: 8px; }
#status-kb { color: var(--text-2); }
.input-bar { min-height: 44px; padding: 4px; border-radius: 22px; }
.mic, .send { width: 36px; height: 36px; }
#ai-input { min-height: 36px; }
.dock-context { font-size: 13px; }
html.is-mobile .dock { padding: 4px 12px 6px; }
html.is-mobile .chip { min-height: 28px; height: 28px; }


.center-home.aux-collapsed { grid-template-columns: minmax(0, 1fr); }
.center-home.aux-collapsed .queue-side { display: none; }
html.is-mobile .center-home.aux-collapsed,
html.is-mobile .app.layout-center .center-home.aux-collapsed { grid-template-columns: minmax(0, 1fr); }
.dock-top[hidden],
.ai-guide-slot[hidden],
.flow-track-slot[hidden],
.aux-handle-slot[hidden] { display: none !important; }
.aux-handle-slot { margin: 0 0 4px; max-width: 760px; }
.aux-handle {
  height: 22px; padding: 0 8px; border: 0; background: #f2f2f4;
  border-radius: 6px; font-size: 11px; line-height: 22px; color: #6e6e73; cursor: pointer;
}
.aux-handle:hover { color: var(--accent, #007aff); background: var(--accent-soft, #e8f1ff); }


#visit-dx-block {
  scroll-margin-top: 72px;
  scroll-margin-bottom: 200px;
}
html.is-mobile #visit-dx-block {
  scroll-margin-top: 60px;
  scroll-margin-bottom: 220px;
}


/* 可编辑控件与已选区域、卡片内语音 */
.edit-ctl, .rec-field textarea, .rec-field input,
#order-suggest, #visit-dx, #fu-new, #fu-note, #fb-note, #pat-note, #fee-remark,
#guest, #slot-name, #tpl-new, #exam-item, #rx, #triage-input, #order-voice-paste {
  width: 100%; min-height: 36px; box-sizing: border-box;
}
.rec-field textarea, #fb-note, #fu-note, #pat-note, #order-voice-paste { min-height: 64px; resize: vertical; }
.empty-flag { cursor: text; color: var(--text-2, #6e6e73); }
.selected-box { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line, #e5e5ea); border-radius: 12px; background: #fbfbfd; }
.selected-box h3 { margin: 0 0 8px; font-size: 15px; }
.selected-line, .confirm-line { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid #ececf0; }
.selected-line.has-conflict, .confirm-line.has-conflict { border-color: #ff3b30; background: #fff5f5; }
.rx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.rx-cell { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #6e6e73; }
.rx-cell input { min-height: 32px; }
.voice-pane { margin: 8px 0 12px; padding: 12px; border: 1px dashed var(--accent, #007aff); border-radius: 12px; background: #f3f8ff; }
.voice-mic, .voice-stop { min-height: 48px; padding: 0 22px; font-size: 16px; border-radius: 24px; }
.voice-mic[hidden], .voice-stop[hidden], .dock-collapse[hidden] { display: none !important; }
.voice-stop { background: #ff3b30; color: #fff; border: 0; }
.voice-status { margin: 8px 0 4px; font-size: 14px; font-weight: 600; }
.voice-status.live { color: #ff3b30; }
.voice-live { min-height: 44px; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid #d9e6ff; margin-bottom: 8px; }
#order-suggest, #order-selected, #order-voice-pane, #visit-dx { scroll-margin-bottom: 200px; }


/* 全局输入条收起为右下角 AI 助手圆按钮 */
.dock-fab-wrap {
  position: fixed; right: 16px; bottom: 18px; z-index: 45;
  display: flex; align-items: center; gap: 8px;
  pointer-events: none;
}
.dock-fab-wrap[hidden] { display: none !important; }
.dock-fab, .dock-step-chip { pointer-events: auto; }
.dock-fab {
  width: 48px; height: 48px; min-width: 48px; min-height: 48px;
  border: 0; border-radius: 50%;
  background: #1d1d1f; color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  cursor: pointer;
}
.dock-fab:hover { background: #000; }
.dock-step-chip {
  height: 28px; padding: 0 10px; border-radius: 14px;
  border: 1px solid #e5e5ea; background: rgba(255,255,255,0.96);
  font-size: 12px; color: #3a3a3c; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  white-space: nowrap;
}
.dock-collapse {
  flex: none; height: 28px; padding: 0 10px; margin-right: 4px;
  border: 0; border-radius: 14px; background: #f2f2f4;
  font-size: 12px; color: #6e6e73; cursor: pointer;
}
html.dock-collapsed #dock {
  opacity: 0; transform: translateY(16px);
  pointer-events: none; visibility: hidden;
  max-height: 0; padding-top: 0; padding-bottom: 0; margin: 0;
  transition: opacity 200ms ease, transform 200ms ease, max-height 200ms ease;
}
html.dock-open #dock {
  opacity: 1; transform: none; visibility: visible;
  transition: opacity 200ms ease, transform 200ms ease;
}
html.dock-collapsed #dock-home {
  min-height: 0; height: 0; padding: 0; overflow: hidden;
  pointer-events: none;
}
html.is-mobile .dock-fab-wrap { right: 12px; bottom: 72px; }
html.is-mobile .dock-fab { width: 48px; height: 48px; }


/* 输入框至少 16px，避免 iOS 聚焦时整页放大；保证可点可选 */
.field input, .field textarea, .edit-ctl, #order-suggest, #visit-dx, #fu-new, #ai-input {
  font-size: 16px;
  -webkit-user-select: text;
  user-select: text;
}


.dx-box #visit-dx, .dx-box #fld-diagnosis { font-size: 16px; }
.dx-picked { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line, #e5e5ea); border-radius: 12px; background: #fbfbfd; }
.dx-picked h3 { margin: 0 0 8px; font-size: 15px; }
.dx-picked-row { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid #ececf0; }
.dx-suggest .suggest-item { font-size: 16px; text-align: left; width: 100%; }


/* 临时入口：接诊简化方案，不挡主操作 */
.tb-temp-plan {
  flex: none; max-width: 220px;
  font-size: 12px; line-height: 1.3; color: var(--text-2, #6e6e73);
  text-decoration: none; border: 1px dashed var(--line-strong, #d2d2d7);
  border-radius: 8px; padding: 4px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-temp-plan:hover { color: var(--accent, #007aff); }
html.is-mobile .tb-temp-plan, .is-mobile .tb-temp-plan { display: none; }
.sb-temp-plan { display: none; }
html.is-mobile .sb-temp-plan, .is-mobile .sb-temp-plan {
  display: block; margin: 8px 12px 4px; padding: 10px 12px;
  font-size: 14px; color: var(--text-2, #6e6e73); text-decoration: none;
  border: 1px dashed var(--line-strong, #d2d2d7); border-radius: 10px;
}


/* iOS 风格处方滚轮 */
.wheel-trigger { text-align: left; cursor: pointer; background: var(--fill, #f2f2f7); }
.wheel-host { position: absolute; inset: 0; z-index: 80; display: none; }
.wheel-host.is-open { display: block; }
.wheel-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.wheel-sheet {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(420px, 100%); background: #f2f2f7; border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0,0,0,.18); padding-bottom: env(safe-area-inset-bottom, 0);
  color: #1c1c1e;
}
html.is-mobile .wheel-sheet, .is-mobile .wheel-sheet { width: 100%; left: 0; transform: none; }
.wheel-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #d2d2d7; }
.wheel-bar strong { font-size: 15px; }
.wheel-cols { position: relative; display: flex; height: 200px; overflow: hidden; }
.wheel-col {
  flex: 1; height: 200px; overflow-y: auto; scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-item, .wheel-pad { height: 40px; line-height: 40px; text-align: center; scroll-snap-align: center; font-size: 16px; }
.wheel-pad { pointer-events: none; }
.wheel-item.is-on { font-weight: 600; }
.wheel-hl {
  position: absolute; left: 8px; right: 8px; top: 80px; height: 40px;
  border-top: 1px solid rgba(0,0,0,.12); border-bottom: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.45); pointer-events: none; border-radius: 8px;
}

.order-panel-host { position: absolute; inset: 0; z-index: 82; display: none; }
.order-panel-host.is-open { display: block; }
.order-panel-body { padding: 12px 16px 24px; max-height: 52vh; overflow: auto; font-size: 16px; }
.sign-box { margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--line-strong, #d2d2d7); border-radius: 8px; }
.op-log { margin-top: 8px; font-size: 13px; }

.ask-collect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
html.is-mobile .ask-collect-grid, .is-mobile .ask-collect-grid { grid-template-columns: 1fr; }
.ask-transcript { min-height: 200px; background: var(--fill, #f2f2f7); border-radius: 12px; padding: 12px; font-size: 16px; }
.ask-turn { margin: 0 0 8px; }
.ask-live { color: var(--accent, #007aff); }

/* 实验区苹果02 · 查体模板与一键全部采集 */
.pe-editor { margin-top: 6px; }
.pe-row { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; padding: 8px; border: 1px solid var(--line, #eadfd4); border-radius: 10px; background: #fffdf9; }
.pe-row label { font-size: 13px; }
.pe-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pe-row-ctrl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pe-row-ctrl .pe-wheel-btn, .pe-row-ctrl .pe-item-input { flex: 1; min-width: 160px; }

.ai-dx-box { margin: 8px 0 12px; padding: 8px; border-radius: 10px; background: #fff7ec; border: 1px solid #f0d8b4; }
.qc-slot { margin-top: 10px; }
.qc-panel { padding: 10px; border-radius: 12px; background: #fffdf8; border: 1px solid #ead7bc; }
.qc-panel h3 { margin: 0 0 6px; font-size: 16px; }
.qc-item { margin: 8px 0; padding: 8px; border-radius: 10px; background: #fff; border: 1px solid #efe4d6; }
.qc-item .chk { display: flex; font-size: 12px; line-height: 1.3; }
.dock .qc-panel .rx-grid { margin-top: 8px; }

.pe-item-input, .pe-wheel-btn { font-size: 16px; color: inherit; }
.pe-mode { display: flex; gap: 6px; flex-wrap: wrap; }
.pe-cite { margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: #f7f6f3; font-size: 13px; line-height: 1.45; color: #3a3c42; }
.pe-cite p { margin: 0 0 6px; }
.pe-cite p:last-child { margin: 0; }
.pe-cite a { word-break: break-all; color: inherit; }


/* 采集/采纳区整体更紧凑；勾选框 14–16px；输入框仍 16px */
.rec-field-fold { margin-bottom: 2px; }
.rec-fold-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 6px;
  padding: 4px 0;
  line-height: 1.25;
  border: 0;
  border-bottom: 1px solid var(--line, #e5e5ea);
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1d1d1f);
  cursor: pointer;
  text-align: left;
}
.rec-fold-toggle .rec-fold-label { flex: 1; }
.rec-fold-arrow {
  width: 5px;
  height: 5px;
  border-right: 1.5px solid #86868b;
  border-bottom: 1.5px solid #86868b;
  transform: rotate(45deg);
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.rec-fold-toggle.is-open { border-bottom-color: transparent; }
.rec-fold-toggle.is-open .rec-fold-arrow { transform: rotate(225deg); margin-top: 2px; }
.rec-fold-body { padding: 6px 0 2px; }
.rec-src-fold { margin-top: 4px; }
.rec-src-fold .rec-fold-toggle {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-2, #6e6e73);
  padding: 3px 0;
  border-bottom: 0;
}

.collect-area .rec-field { margin-bottom: 10px; }
.collect-area .chk,
.qc-panel .chk {
  gap: 6px;
  margin: 4px 0;
  font-size: 12px;
  line-height: 1.3;
  align-items: center;
}
.collect-area input[type="checkbox"],
.collect-area input[type="radio"],
.qc-panel input[type="checkbox"],
.qc-panel input[type="radio"] {
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent, #007aff);
}
.collect-area select,
.qc-panel select {
  font-size: 13px;
  min-height: 28px;
  padding: 2px 6px;
}
.collect-area .btn { font-size: 12px; min-height: 28px; padding: 0 10px; border-radius: 8px; }
.collect-area .actions { margin-top: 10px; gap: 6px; }
.collect-area .review-opts .btn { font-size: 12px; min-height: 28px; padding: 0 10px; }
.collect-area textarea.edit-ctl,
.collect-area input.edit-ctl,
.collect-area .edit-ctl,
.collect-area .dx-box input,
.collect-area .pe-item-input,
.collect-area .pe-wheel-btn {
  font-size: 16px;
}

/* 手机：外层 label / 折叠标题用内边距保证点击区域，文字和勾选框保持小尺寸 */
html.is-mobile .collect-area .chk,
.is-mobile .collect-area .chk,
html.is-mobile .qc-panel .chk,
.is-mobile .qc-panel .chk {
  min-height: 44px;
  padding: 12px 0;
  margin: 0;
  box-sizing: border-box;
}
html.is-mobile .collect-area .rec-fold-toggle,
.is-mobile .collect-area .rec-fold-toggle,
html.is-mobile .collect-area .rec-src-fold .rec-fold-toggle,
.is-mobile .collect-area .rec-src-fold .rec-fold-toggle {
  min-height: 44px;
  padding: 12px 0;
  box-sizing: border-box;
}
html.is-mobile .collect-area .rec-src-fold .rec-fold-toggle,
.is-mobile .collect-area .rec-src-fold .rec-fold-toggle { font-size: 12px; }
html.is-mobile .collect-area .btn,
.is-mobile .collect-area .btn {
  min-height: 44px;
  padding: 0 14px;
  font-size: 13px;
}

.bill-bar { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line, #eadfd4); border-radius: 10px; background: #fff; }
.bill-bar p { margin: 0 0 8px; }
.charge-slip h3, .rx-slip h3 { margin: 0 0 8px; font-size: 16px; }
.charge-slip h4, .rx-slip h4 { margin: 12px 0 6px; font-size: 14px; }

.voice-adopt-panel { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line, #e6e6e6); }
.voice-adopt-panel h3 { font-size: 15px; margin: 0 0 8px; }
.voice-adopt-panel .va-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; min-height: 44px; }
.pkg-box { margin-top: 12px; padding-top: 10px; border-top: 1px solid #eee; }
.pkg-box h3, .pkg-preview h3 { font-size: 15px; margin: 0 0 8px; }
.pkg-preview { margin-top: 8px; }
.pkg-preview .pkg-item, .pkg-edit-items .chk { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; min-height: 40px; }
.pkg-edit-items { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.wheel-host.is-dx .wheel-sheet { pointer-events: auto; }

.drug-group { margin: 10px 0 14px; }
.drug-group h4 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }


/* 收费单/处方单加宽，避免单价、来源和合计被裁切 */
.sheet.sheet-wide {
  width: min(880px, calc(100% - 32px));
  max-height: 86vh;
  overflow: auto;
}
.sheet-wide .sheet-body { overflow: auto; }
.charge-slip table, .rx-slip table { width: 100%; font-size: 13px; }
.charge-slip .src, .rx-slip .src { word-break: break-all; font-size: 12px; color: #6e7178; margin: 4px 0 0; }

/* 轻提示固定在可视区域，避免长页时落到视口外 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 140px;
  transform: translateX(-50%);
  z-index: 80;
}


/* 电脑端原生对话框：视口大于 720px 且未强制手机预览时，滚轮和退药退费面板居中显示；收费单/处方单已是居中加宽对话框，这里补上表格列不折行。手机端（html.is-mobile）仍用底部弹层，本段不生效。 */
html:not(.is-mobile) .wheel-sheet {
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 96px));
  max-height: min(80vh, 640px);
  overflow: auto;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  padding-bottom: 0;
}
html:not(.is-mobile) .wheel-sheet.order-panel {
  width: min(520px, calc(100vw - 96px));
}
html:not(.is-mobile) .sheet.sheet-wide .sheet-body table th,
html:not(.is-mobile) .sheet.sheet-wide .sheet-body table td,
html:not(.is-mobile) .charge-slip table th,
html:not(.is-mobile) .charge-slip table td,
html:not(.is-mobile) .rx-slip table th,
html:not(.is-mobile) .rx-slip table td {
  white-space: nowrap;
  vertical-align: top;
}
html:not(.is-mobile) .sheet.sheet-wide .src,
html:not(.is-mobile) .charge-slip .src,
html:not(.is-mobile) .rx-slip .src {
  white-space: normal;
  word-break: break-all;
  max-width: 280px;
}


/* 电脑端宽屏工作台：主区铺满可用宽度，接诊页多栏并排。html.is-mobile / 窄屏不走这段。 */
html:not(.is-mobile) .view {
  max-width: none;
  width: 100%;
}
html:not(.is-mobile) .app.layout-center .center-home.aux-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
html:not(.is-mobile) .center-home > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}
html:not(.is-mobile) .center-home > div > .card:first-child,
html:not(.is-mobile) .center-home > div > .ask-collect-grid,
html:not(.is-mobile) .center-home > div > .path-track,
html:not(.is-mobile) .center-home > div > .path-command,
html:not(.is-mobile) .center-home > div > .flow-nav,
html:not(.is-mobile) .center-home > div > .visit-path,
html:not(.is-mobile) .center-home > div > .summary-card {
  grid-column: 1 / -1;
}
html:not(.is-mobile) .collect-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 24px;
  align-items: start;
}
html:not(.is-mobile) .collect-area > [data-field="diagnosis"],
html:not(.is-mobile) .collect-area > [data-field="pe"],
html:not(.is-mobile) .collect-area > .actions,
html:not(.is-mobile) .collect-area > .review-list,
html:not(.is-mobile) .collect-area > .collect-batch,
html:not(.is-mobile) .collect-area > .pe-editor {
  grid-column: 1 / -1;
}
html:not(.is-mobile) .order-compose-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
html:not(.is-mobile) .patient-card-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
@media (min-width: 1600px) {
  html:not(.is-mobile) .patient-card-wall {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}


/* 电脑端医学常规区铺满宽度：检查检验、查体、药品、大病历、常规检查项用多列或宽表，不受 860 限宽。 */
html:not(.is-mobile) .card,
html:not(.is-mobile) .finish {
  max-width: none;
  width: 100%;
}
html:not(.is-mobile) .table-card,
html:not(.is-mobile) .bill-body table.data,
html:not(.is-mobile) .compose-sec table,
html:not(.is-mobile) .charge-slip table,
html:not(.is-mobile) .rx-slip table {
  width: 100%;
}
html:not(.is-mobile) .pe-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  align-items: start;
}
html:not(.is-mobile) .pe-editor > .src,
html:not(.is-mobile) .pe-editor > .muted,
html:not(.is-mobile) .pe-editor > .field,
html:not(.is-mobile) .pe-editor > .actions,
html:not(.is-mobile) .pe-editor > .pe-cat {
  grid-column: 1 / -1;
}
@media (min-width: 1600px) {
  html:not(.is-mobile) .pe-editor {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  html:not(.is-mobile) .collect-area {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
html:not(.is-mobile) .exam-pkg-list,
html:not(.is-mobile) .pkg-edit-items,
html:not(.is-mobile) .pkg-box {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
}
html:not(.is-mobile) .compose-sec { min-width: 0; }
html:not(.is-mobile) .path-track {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 12px 16px; margin: 0 0 16px;
  background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
html:not(.is-mobile) .path-track .path-step { padding: 6px 12px; border-radius: 999px; background: #ececf0; font-size: 14px; }
html:not(.is-mobile) .path-track .path-step.on { background: #e8f1fc; color: #0a66d8; font-weight: 600; }
html:not(.is-mobile) .path-track .path-step.done { background: #e8f8ee; }
html:not(.is-mobile) .path-command { margin-bottom: 16px; }
html:not(.is-mobile) .record-review-grid,
html:not(.is-mobile) .order-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}
@media (min-width: 1600px) {
  html:not(.is-mobile) .record-review-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
html:not(.is-mobile) .record-review-grid .span-all,
html:not(.is-mobile) .order-review-grid .span-all { grid-column: 1 / -1; }
.pc-card { background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06); padding: 16px 18px; border-left: 8px solid #d8d8dd; cursor: pointer; text-align: left; width: 100%; }
.pc-card.grade-0 { border-left-color: #c8c8ce; background: #ffffff; }
.pc-card.grade-1 { border-left-color: #e3b8a6; background: #fdf4ef; }
.pc-card.grade-2 { border-left-color: #e0916d; background: #fbe2d5; }
.pc-card.grade-3 { border-left-color: #c95a35; background: #f4b79c; }
.pc-card.grade-4 { border-left-color: #6e1414; background: #b8321f; color: #fff; }
.pc-card.grade-4 .src, .pc-card.grade-4 p { color: #fff; }
.pc-card h3 { margin: 0 0 6px; font-size: 17px; }
.pc-grade { font-size: 13px; font-weight: 600; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.store-item { background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06); padding: 16px; }
html.is-mobile .pe-editor,
html.is-mobile .collect-area,
html.is-mobile .center-home > div,
html.is-mobile .order-compose-row,
html.is-mobile .record-review-grid,
html.is-mobile .patient-card-wall,
html.is-mobile .store-grid {
  display: block;
}
html.is-mobile .patient-card-wall .pc-card { margin-bottom: 12px; }

/* 实验区苹果03：签约患者回传行 */
.vital-board { margin-bottom: 16px; }
.vital-board .title-m .src { font-weight: 400; margin-left: 8px; }
.vital-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.vital-chip { padding: 12px 14px; }
.vital-chip h3 { font-size: 16px; }
html.is-mobile .vital-row { display: block; }
html.is-mobile .vital-row .vital-chip { margin-bottom: 10px; }
