/* ==================================================================
   H.ai ·「适合我的讲法」：标定对话框（同一道题两种讲法并排）· 回答下的「懂了 / 没懂」· 讲法来源标记
   只用 styles.css 的变量，换肤自动跟随。
   ================================================================== */

/* ---------------------------------------------------------------- 快捷区「讲法」下拉：有画像时主色更实 */
.chip-select.has-profile { border-color: var(--accent-line); background: var(--accent-soft); }
.chip-select select { max-width: 150px; text-overflow: ellipsis; }
.who-level .who-src {
  display: inline-block; margin-left: 5px; padding: 0 6px; border-radius: var(--pill); font-size: 10.5px; font-style: normal; font-weight: 600; line-height: 16px;
  background: var(--accent-soft); color: var(--accent-h); vertical-align: 1px;
}

/* ---------------------------------------------------------------- 回答下的反馈 */
.msg-tools { flex-wrap: wrap; align-items: center; }
.msg-fb { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding-left: 8px; border-left: 1px solid var(--border-2); }
.msg-fb-label { font-size: 11.5px; color: var(--ink-4); margin-right: 2px; }
.msg-fb .link-btn .ico { width: 13px; height: 13px; }
.msg-fb.done .link-btn { pointer-events: none; opacity: .6; }
.msg-fb-done { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ok); }
.msg-fb-done .ico { width: 13px; height: 13px; }
.msg:has(.msg-fb:not(.done)) .msg-tools { opacity: 1; }   /* 有待反馈的回答：按钮常显，不用悬停才看到 */

/* ---------------------------------------------------------------- 标定对话框 */
.dlg-style { width: min(1080px, 96vw); }
#dlg-style .dlg-body { padding-top: 16px; }

.st-intro { display: flex; flex-direction: column; gap: 12px; }
.st-lead { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-1); }
.st-lead b { color: var(--accent-h); }
.st-points { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 1.75; }
.st-points b { color: var(--ink-1); }
.st-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 4px; }
.st-style {
  position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--panel-2); border: 1px solid transparent; font-size: 12.5px; line-height: 1.5; color: var(--ink-3);
}
.st-style b { color: var(--ink-1); font-size: 13px; }
.st-style.on { border-color: var(--accent-line); background: var(--accent-soft); }
.st-cur { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 11px; color: var(--accent-h); font-weight: 600; }

/* 题目卡 */
.st-q { padding: 12px 14px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--border); margin-bottom: 12px; }
.st-q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 8px; }
.st-q-ans { margin-left: auto; color: var(--ink-3); }
.st-q-ans b { color: var(--ok); font-size: 14px; }
.st-q-stem { font-size: 14px; line-height: 1.75; color: var(--ink-1); white-space: pre-wrap; }
.st-q-opts { margin: 8px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 3px 16px; font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.st-q-opts b { color: var(--ink-1); margin-right: 2px; }

/* 两栏讲法 */
.st-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.st-col { border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); overflow: hidden; }
.st-col-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--panel-2); font-size: 13px; }
.st-side { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 12.5px; }
.st-col[data-side="B"] .st-side { background: var(--fav); }
.st-col-name { font-weight: 600; color: var(--ink-1); }
.st-col-status { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.st-col-body { padding: 12px 14px; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); min-height: 120px; max-height: 46vh; overflow-y: auto; }
.st-col-body .typing { font-size: 13px; }

/* 选择 */
.st-choice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--panel-2); }
.st-choice-label { font-size: 13px; color: var(--ink-2); margin-right: 4px; }
.st-choice:not(.ready) .st-choice-label::after { content: "（等两边都讲完）"; color: var(--ink-4); font-size: 12px; }
.st-choice .btn[data-choice="b"] { background: var(--fav); border-color: var(--fav); }
.st-choice .btn[data-choice="b"]:hover { filter: brightness(.94); }
.st-choice .btn:disabled { opacity: .55; cursor: default; }

/* 结果 */
.st-result { display: flex; flex-direction: column; gap: 12px; }
.st-result-main { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); background: var(--accent-soft); }
.st-result-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); color: var(--accent-h); flex: none; }
.st-result-icon .ico { width: 24px; height: 24px; }
.st-result-title { font-size: 16px; color: var(--ink-1); }
.st-result-title b { color: var(--accent-h); }
.st-result-text { margin: 6px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.st-scores { display: grid; gap: 6px; padding: 4px 6px; }
.st-score { display: grid; grid-template-columns: 90px 1fr 40px; align-items: center; gap: 10px; font-size: 12.5px; }
.st-score-name { color: var(--ink-2); text-align: right; }
.st-score-bar { height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.st-score-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.st-score-bar.neg i { background: var(--ink-4); }
.st-score-num { font-family: var(--mono); color: var(--ink-3); }

@media (max-width: 760px) {
  .st-cols { grid-template-columns: 1fr; }
  .st-col-body { max-height: 34vh; }
  .st-score { grid-template-columns: 72px 1fr 36px; }
}
