/* 中医祖师回答样式 · 处方笺版式
 *
 * 配色沿用站点主色 #2F6BE4，圆角与阴影对齐 .card/.bubble，
 * 不另起一套设计语言。
 *
 * 注意：.bubble 带 white-space:pre-wrap，会把本模块生成的 HTML
 * 源码缩进一并显示为空格，故 .tcm-answer 必须重置为 normal。
 */

.tcm-answer { white-space: normal; }

/* 节名之前的开场白 */
.tcm-lead {
  margin: 0 0 10px;
  color: #3A4150;
}

/* ── 节卡 ────────────────────────────────────────────── */
.tcm-sec {
  margin: 9px 0;
  padding: 9px 12px;
  background: #F7F9FD;
  border-left: 3px solid #2F6BE4;
  border-radius: 0 10px 10px 0;
}

.tcm-sec-hd { margin-bottom: 6px; }

/* 节名做「印章」标签：整篇回答的骨架靠它立起来 */
.tcm-sec-name {
  display: inline-block;
  padding: 1px 9px;
  background: #E8F0FF;
  border-radius: 4px;
  color: #2F6BE4;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2px;
}

.tcm-sec-bd {
  color: #2A3040;
  font-size: 13.5px;
}

.tcm-p {
  margin: 0 0 7px;
  line-height: 1.75;
  word-break: break-word;
}
.tcm-p:last-child { margin-bottom: 0; }

.tcm-li {
  position: relative;
  padding-left: 13px;
  margin: 3px 0;
  line-height: 1.72;
}
.tcm-li::before {
  content: '·';
  position: absolute;
  left: 3px;
  color: #2F6BE4;
  font-weight: 700;
}

/* ── 依据徽章 ─────────────────────────────────────────── */
/* 这两个标注是回答可信度的核心标识，此前淹没在正文里毫无区分。
   徽章化后，医师一眼可辨：哪句有典籍出处，哪句是祖师自陈推衍。 */
.tcm-badge {
  display: inline-block;
  margin: 0 2px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  vertical-align: 1px;
  white-space: nowrap;
}
.tcm-b-cite {
  color: #1E8E5A;
  background: #E8F6EF;
  border: 1px solid rgba(30, 142, 90, .22);
}
.tcm-b-insight {
  color: #B4700A;
  background: #FDF3E3;
  border: 1px solid rgba(224, 138, 30, .28);
}

/* ── 剂量高亮 ─────────────────────────────────────────── */
/* 处方里剂量是关键信息，用等宽字体 + 浅底使其可扫读 */
.tcm-dose {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 0 3px;
  border-radius: 3px;
  background: #EDF3FF;
  color: #2F6BE4;
  font-weight: 600;
}

/* ── 组成与剂量表 ─────────────────────────────────────── */
.tcm-table-wrap {
  margin: 8px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tcm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tcm-table th {
  padding: 6px 8px;
  background: #EEF3FB;
  color: #4A5568;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #E0E8F5;
  white-space: nowrap;
}
.tcm-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #F0F3F8;
  vertical-align: top;
  line-height: 1.6;
}
.tcm-table tr:last-child td { border-bottom: none; }

/* 窄屏收紧内边距，避免处方在小屏上过于拥挤 */
@media (max-width: 360px) {
  .tcm-sec { padding: 8px 9px; }
  .tcm-sec-name { font-size: 12px; letter-spacing: 1px; }
}
