/* 医学参考局部样式；不改变既有运营卡、状态与计数字段。 */
#medicalPreview { color: #d7e3ee; }
#medicalPreview .reference-card { min-width: 0; gap: 18px; }
#medicalPreview .reference-card-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
#medicalPreview .reference-badge { background: #17395c; color: #bee49f; }
#medicalPreview .reference-card-intro { color: #b8cddd; font-size: 13px; line-height: 1.8; }
#medicalPreview .reference-summary-list { display: grid; gap: 0; }
#medicalPreview .reference-summary-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid #29445e; }
#medicalPreview .reference-summary-row:last-child { border-bottom: 0; }
#medicalPreview .reference-summary-label { color: #f0f5fa; font-size: 14px; font-weight: 600; }
#medicalPreview .reference-summary-value { color: #b5dd92; font-size: 15px; text-align: right; max-width: 170px; }
#medicalPreview .reference-summary-meta { grid-column: 1 / -1; font-size: 12px; color: #afc3d5; line-height: 1.75; overflow-wrap: anywhere; }
#medicalPreview .reference-summary-row a:hover { text-decoration: underline; }
#medicalPreview .reference-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; align-items: center; }
#medicalPreview .reference-card-actions a { color: #ecf4fc; border: 1px solid #718ba3; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
#medicalPreview .reference-card-actions a:first-child { background: #254c6e; }
#medicalPreview .reference-card-actions a:hover { background: #315b7e; }
#medicalPreview .reference-card-actions span { color: #b7c6d4; font-size: 12px; }
#medicalPreview .reference-catalog-note { color: #b8cddd; font-size: 12px; line-height: 1.8; }
#medicalPreview .reference-inline-retry { color: #fff; background: transparent; border: 1px solid #718ba3; padding: 8px 12px; border-radius: 8px; font: inherit; cursor: pointer; }
.reference-badge { display: inline-block; padding: 4px 9px; border-radius: 6px; font-size: 12px; line-height: 1.6; color: #245f32; background: #eaf4e4; }
#medicalPreview a:focus-visible, #medicalPreview button:focus-visible { outline: 3px solid #b5dd92; outline-offset: 4px; }
.reference-page { margin: 0; background: #f4f7fa; color: #20384d; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.8; }
.reference-page * { box-sizing: border-box; }
.reference-page a { color: #1b6489; text-decoration: none; }
.reference-page a:hover { text-decoration: underline; }
.reference-page button, .reference-page select { font: inherit; }
.reference-page button, .reference-page select, .reference-page a { -webkit-tap-highlight-color: transparent; }
.reference-page :focus-visible { outline: 3px solid #528f29; outline-offset: 3px; }
.reference-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px max(24px, calc((100vw - 1120px) / 2)); background: #0d2137; color: #fff; }
.reference-header a { color: #eff5fb; }
.reference-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.reference-main { max-width: 1120px; margin: 0 auto; padding: 46px 24px; }
.reference-intro { max-width: 860px; margin-bottom: 28px; }
.reference-eyebrow { color: #488020; font-size: 13px; font-weight: 700; letter-spacing: .06em; margin: 0 0 8px; }
.reference-intro h1 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; line-height: 1.4; color: #112d43; }
.reference-intro > p:last-child { color: #4a6378; margin: 0; }
.reference-tool-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.reference-tool-nav button, .reference-theme-nav button { border: 1px solid #bcccd8; border-radius: 8px; padding: 10px 16px; background: #fff; color: #2e4c63; cursor: pointer; }
.reference-tool-nav button[aria-pressed="true"] { background: #15354f; color: #fff; border-color: #15354f; }
.reference-workspace { padding: 28px; border: 1px solid #dae4ec; border-radius: 16px; background: #fff; }
.reference-section-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.reference-section-title h2 { font-size: 22px; margin: 0; }
.reference-status, .reference-hint, .reference-result-status { font-size: 13px; color: #536c80; }
.reference-status { margin: 8px 0 20px; }
.reference-theme-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.reference-theme-nav button { font-size: 14px; padding: 8px 12px; }
.reference-theme-nav button[aria-pressed="true"] { border-color: #689b44; color: #315c1d; background: #edf5e8; }
.reference-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.reference-filter-row label { min-width: 0; font-size: 13px; color: #486278; }
.reference-filter-row select { width: 100%; min-width: 0; display: block; margin-top: 5px; padding: 9px 10px; border: 1px solid #b8cad8; border-radius: 8px; color: #233e53; background: #fff; font-size: 14px; }
.reference-entries { display: grid; gap: 18px; }
.reference-entry { min-width: 0; padding: 22px; border: 1px solid #dce5ec; border-radius: 12px; overflow-wrap: anywhere; }
.reference-entry-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.reference-entry h3 { margin: 0; color: #18384f; font-size: 18px; }
.reference-entry-value { flex-shrink: 0; font-size: 25px; line-height: 1.4; font-weight: 700; color: #30681c; }
.reference-entry-value.reference-missing { max-width: 170px; font-size: 14px; color: #60778b; }
.reference-entry-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.reference-review-badge { background: #fff5df; color: #77540b; }
.reference-metadata { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 7px 14px; margin: 16px 0; font-size: 14px; }
.reference-metadata dt { color: #60758a; }
.reference-metadata dd { margin: 0; color: #29475d; }
.reference-entry-limit { padding: 11px 14px; border-left: 3px solid #9bb57f; background: #f4f7ee; font-size: 13px; color: #485d39; margin: 14px 0; }
.reference-entry details { margin-top: 14px; font-size: 13px; }
.reference-entry summary { color: #1b6489; cursor: pointer; padding: 6px 0; }
.reference-entry details p { margin: 8px 0; }
.reference-empty { padding: 30px 20px; border-radius: 12px; background: #f5f8fa; border: 1px dashed #bbccda; color: #516b80; }
.reference-empty strong { display: block; color: #28475f; font-size: 16px; margin-bottom: 6px; }
.reference-button { display: inline-block; border: 1px solid #8ca7bc; padding: 10px 16px; border-radius: 8px; background: #fff; color: #235577; font: inherit; font-size: 14px; cursor: pointer; }
.reference-button-primary { background: #234968; color: #fff !important; border-color: #234968; }
.reference-local-panel { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: #e8f0e3; border: 1px solid #d0dfc5; border-radius: 14px; padding: 25px 28px; margin-top: 24px; }
.reference-local-panel h2 { margin: 0 0 6px; font-size: 20px; }
.reference-local-panel p { margin: 0; color: #47653b; font-size: 14px; }
.reference-local-panel a { flex-shrink: 0; }
.reference-footer-note { font-size: 12px; color: #657c8e; }
.reference-page [hidden], #medicalPreview [hidden] { display: none !important; }
@media (max-width: 640px) {
  #medicalPreview .reference-summary-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  #medicalPreview .reference-summary-value { text-align: left; max-width: none; }
  .reference-header { padding: 15px 18px; font-size: 14px; }
  .reference-main { padding: 30px 16px; }
  .reference-workspace { padding: 20px 16px; }
  .reference-filter-row { grid-template-columns: 1fr; }
  .reference-entry { padding: 18px 14px; }
  .reference-entry-heading { flex-direction: column; gap: 8px; }
  .reference-entry-value.reference-missing { max-width: none; }
  .reference-metadata { grid-template-columns: 1fr; gap: 0; }
  .reference-metadata dd { margin-bottom: 8px; }
  .reference-local-panel { flex-direction: column; align-items: stretch; padding: 20px; }
}
