/* 智能推荐卡片（G1，D3-03/04/05/06/07/10；G-01/02/03）：
   白底大圆角约 16–20px、左上蓝字小标题、右上 ×+⤢、内容上下滚动、卡宽≤半屏；
   问题 chip 蓝底白字 pill；卡底「内容由AI生成」灰字 + 朗读/赞/踩。 */
.sr-panel {
  position: fixed; right: 16px; top: 76px; z-index: 10000;
  width: min(430px, 46vw); max-height: calc(100vh - 120px);
  display: flex; flex-direction: column;
  background: #f4f8fa; border-radius: 18px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .22);
  color: #0f172a; font: 16px/1.55 system-ui, sans-serif;
  overflow: hidden;
}
.sr-panel.is-expanded { width: min(640px, 60vw); }
.sr-panel[hidden] { display: none; }
.sr-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 8px 4px 16px;
}
.sr-title { color: #0080f0; font-size: 15px; font-weight: 700; }
.sr-head-btns { display: flex; gap: 2px; }
.sr-close, .sr-expand {
  border: 0; background: none; font-size: 20px; line-height: 1;
  color: #64748b; cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.sr-close:hover, .sr-expand:hover { color: #0f172a; background: #e2e8f0; }
.sr-chip {
  margin: 6px 16px 4px; display: inline-block; align-self: flex-start;
  background: #0080f0; color: #fff; font-size: 15px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px;
}
.sr-body {
  overflow-y: auto; padding: 6px 16px 12px; min-height: 120px;
  scrollbar-width: thin;
}
.sr-section h3 { font-size: 16px; margin: 14px 0 4px; }
.sr-section p { font-size: 16px; margin: 0 0 6px; color: #1e293b; }
.sr-figure { margin: 8px auto; text-align: center; }
.sr-figure svg { max-width: 100%; height: auto; }
.sr-figure figcaption { font-size: 12px; color: #64748b; }
.sr-figure-wrap { text-align: center; }
.sr-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 16px; border-top: 1px solid #e2e8f0;
}
.sr-btn {
  border: 1px solid #cbd5e1; background: #fff; color: #0f172a;
  border-radius: 999px; padding: 7px 14px; font-size: 14px; cursor: pointer;
}
.sr-btn:hover { border-color: #0080f0; color: #0080f0; }
.sr-btn-primary { background: #2c78dc; border-color: #2c78dc; color: #fff; }
.sr-btn-primary:hover { background: #2563bd; color: #fff; }
.sr-back { border-style: dashed; }
.sr-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px 12px;
}
.sr-source { font-size: 12px; color: #94a3b8; }
.sr-feedback { display: flex; gap: 4px; }
.sr-icon-btn {
  border: 0; background: none; font-size: 17px; cursor: pointer;
  padding: 4px 6px; border-radius: 8px; opacity: .75;
}
.sr-icon-btn:hover { opacity: 1; background: #e2e8f0; }
.sr-icon-btn.is-active { opacity: 1; background: #dbeafe; }
.sr-view h3 { font-size: 16px; margin: 10px 0 8px; }
.sr-row { display: flex; gap: 8px; margin: 8px 0; }
.sr-row input[type="text"] {
  flex: 1; min-width: 0; border: 1px solid #cbd5e1; border-radius: 10px;
  padding: 8px 10px; font-size: 15px; background: #fff; color: #0f172a;
}
.sr-answer { font-size: 15px; color: #1e293b; }
.sr-answer p { margin: 6px 0; }
.sr-exercise {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  width: 100%; text-align: left; margin: 0 0 10px;
  border: 1px solid #cbd5e1; border-radius: 12px; background: #fff;
  padding: 10px 12px; cursor: pointer; font-size: 15px; color: #0f172a;
}
.sr-exercise:hover { border-color: #0080f0; }
.sr-exercise-index {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #dbeafe; color: #1d4ed8; font-size: 13px; font-weight: 700;
}
.sr-loading, .sr-note, .sr-empty { font-size: 13px; color: #64748b; }
@media (max-width: 700px) {
  .sr-panel { right: 8px; left: 8px; top: auto; bottom: 8px; width: auto; max-height: 62vh; }
  .sr-panel.is-expanded { width: auto; }
}
