/* 真题库样式：列表 / 听力 / 阅读 / 写作 / 口语，含暗色模式 */
#view-bank .bk-wrap { max-width: 1180px; margin: 0 auto; }

/* ---------- 顶部栏 ---------- */
.bk-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bk-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.bk-tab {
  border: 1px solid #e5e7eb; background: #fff; color: #374151; border-radius: 10px;
  padding: 8px 14px; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.bk-tab i {
  font-style: normal; font-size: 12px; background: #f3f4f6; color: #6b7280;
  border-radius: 999px; padding: 1px 7px;
}
.bk-tab:hover { border-color: #c7d2fe; }
.bk-tab.on { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.bk-tab.on i { background: rgba(255,255,255,.22); color: #fff; }

.bk-search {
  flex: 1 1 260px; min-width: 220px; padding: 9px 12px; border: 1px solid #e5e7eb;
  border-radius: 10px; font-size: 14px; outline: none; background: #fff; color: #111827;
}
.bk-search:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.12); }

.bk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.bk-chip {
  border: 1px solid #e5e7eb; background: #fff; color: #4b5563; border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; cursor: pointer;
}
.bk-chip.on { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; font-weight: 600; }

.bk-count { font-size: 13px; color: #6b7280; margin-bottom: 12px; }
.bk-count b { color: #4f46e5; }

/* ---------- 卡片列表 ---------- */
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 10px; }
.bk-card {
  position: relative; text-align: left; border: 1px solid #e5e7eb; background: #fff;
  border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: all .15s;
  display: flex; flex-direction: column; gap: 8px; font: inherit;
}
.bk-card:hover { border-color: #a5b4fc; box-shadow: 0 4px 14px rgba(79,70,229,.10); transform: translateY(-1px); }
.bk-card .bk-t { font-size: 14.5px; font-weight: 600; color: #111827; line-height: 1.4; }
.bk-card .bk-m { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.bk-tag {
  font-style: normal; font-size: 11.5px; color: #6b7280; background: #f3f4f6;
  border-radius: 6px; padding: 2px 7px;
}
.bk-n { font-size: 11.5px; color: #9ca3af; margin-left: auto; }
.bk-ico { position: absolute; top: 10px; right: 12px; font-size: 13px; opacity: .55; }
.bk-more { text-align: center; margin: 18px 0; }
.bk-empty { text-align: center; color: #9ca3af; padding: 40px 12px; font-size: 14px; line-height: 1.8; }
.bk-hint { font-size: 12.5px; color: #9ca3af; }
.bk-hint code { background: #f3f4f6; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ---------- 单题头 ---------- */
.bk-head { margin-bottom: 14px; }
.bk-back {
  border: 0; background: #f3f4f6; color: #4b5563; border-radius: 8px; padding: 6px 12px;
  font-size: 13px; cursor: pointer; margin-bottom: 10px;
}
.bk-back:hover { background: #e5e7eb; }
.bk-head h2 { font-size: 20px; margin: 0 0 8px; color: #111827; }
.bk-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bk-fs {
  border: 1px solid #e5e7eb; background: #fff; border-radius: 8px; padding: 3px 10px;
  font-size: 12.5px; cursor: pointer; color: #4b5563; margin-left: 8px;
}

/* ---------- 音频卡 ---------- */
.bk-audio-card {
  background: linear-gradient(180deg, #f8fafc, #fff); border: 1px solid #e5e7eb;
  border-radius: 14px; padding: 14px 16px; margin-bottom: 16px;
}
.bk-audio-card audio { width: 100%; height: 40px; }
.bk-speed { display: flex; gap: 6px; align-items: center; margin-top: 10px; font-size: 12.5px; color: #6b7280; }
.bk-sp {
  border: 1px solid #e5e7eb; background: #fff; border-radius: 7px; padding: 3px 10px;
  font-size: 12.5px; cursor: pointer; color: #4b5563;
}
.bk-sp.on { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.bk-tip { font-size: 12.5px; color: #9ca3af; margin-top: 8px; }

/* ---------- 题目区 ---------- */
.bk-sec { margin-bottom: 18px; }
.bk-sec-h { font-size: 12.5px; color: #6b7280; margin-bottom: 8px; font-weight: 600; }
.bk-stem {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px;
  font-size: 14.5px; line-height: 1.85; color: #1f2937; overflow-x: auto;
}
.bk-stem img { max-width: 100%; height: auto; border-radius: 8px; }
.bk-stem table { border-collapse: collapse; max-width: 100%; }
.bk-stem td, .bk-stem th { border: 1px solid #e5e7eb; padding: 6px 8px; font-size: 14px; }

.bk-blank { display: inline-flex; align-items: center; gap: 3px; margin: 0 2px; }
.bk-input {
  width: 122px; padding: 3px 7px; border: 0; border-bottom: 2px solid #c7d2fe;
  background: #f8faff; border-radius: 4px 4px 0 0; font-size: 14px; color: #1f2937; outline: none;
}
.bk-input:focus { border-bottom-color: #4f46e5; background: #eef2ff; }
.bk-input.filled { color: #6b7280; }
.bk-mark { font-style: normal; font-size: 13px; width: 14px; }
.bk-blank.ok .bk-input { border-bottom-color: #10b981; background: #ecfdf5; }
.bk-blank.ok .bk-mark::before { content: "✓"; color: #10b981; }
.bk-blank.bad .bk-input { border-bottom-color: #ef4444; background: #fef2f2; }
.bk-blank.bad .bk-mark::before { content: "✗"; color: #ef4444; }

.bk-analysis {
  margin-top: 10px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
  padding: 12px 14px; font-size: 13.5px; line-height: 1.8; color: #78350f;
}
.bk-an-line { padding: 6px 0; border-bottom: 1px dashed #fde68a; }
.bk-an-line:last-child { border-bottom: 0; }
.bk-an-line b { color: #b45309; margin-right: 6px; }

.bk-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px 0 8px; }
.bk-actions.sticky { position: sticky; bottom: 0; background: rgba(255,255,255,.96); padding: 10px 0; backdrop-filter: blur(4px); }
.bk-score { font-size: 13.5px; color: #6b7280; }
.bk-score.show { color: #4b5563; }
.bk-score.good { color: #059669; font-weight: 600; }

/* ---------- 听力原文 ---------- */
.bk-transcript { margin-top: 20px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; overflow: hidden; }
.bk-transcript h3 { margin: 0; padding: 12px 16px; font-size: 14px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; color: #374151; }
.bk-lines { max-height: 460px; overflow-y: auto; padding: 6px 0; }
.bk-line { display: flex; gap: 10px; padding: 5px 16px; }
.bk-line:hover { background: #f9fafb; }
.bk-ts {
  flex: 0 0 auto; font-size: 12px; color: #6366f1; cursor: pointer; text-decoration: none;
  font-variant-numeric: tabular-nums; padding-top: 2px;
}
.bk-ts.on { font-weight: 700; color: #4338ca; }
.bk-lt { flex: 1; }
.bk-en { font-size: 14px; color: #1f2937; line-height: 1.6; }
.bk-cn { font-size: 12.5px; color: #9ca3af; line-height: 1.6; margin-top: 1px; }

/* ---------- 阅读 ---------- */
.bk-read { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bk-read .bk-passage {
  position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px 22px;
  font-size: 15px; line-height: 1.95; color: #1f2937;
}
.bk-read .bk-passage.wide { position: static; max-height: none; }
.bk-passage img { max-width: 100%; height: auto; }
.bk-qs { min-width: 0; }

/* ---------- 写作 / 口语 ---------- */
.bk-write, .bk-speak { display: flex; flex-direction: column; gap: 14px; }
.bk-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; }
.bk-card-h {
  font-size: 13px; font-weight: 600; color: #4b5563; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.bk-qtext { font-size: 15px; line-height: 1.9; color: #1f2937; }
.bk-qtext img { max-width: 100%; height: auto; border-radius: 8px; }
.bk-words { font-size: 12.5px; color: #9ca3af; font-weight: 400; }
.bk-words.ok { color: #059669; }
.bk-essay {
  width: 100%; min-height: 320px; padding: 14px; border: 1px solid #e5e7eb; border-radius: 10px;
  font-size: 15px; line-height: 1.9; color: #1f2937; resize: vertical; outline: none;
  font-family: inherit; background: #fff;
}
.bk-essay:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.10); }
.bk-ref { font-size: 14.5px; line-height: 1.95; color: #1f2937; }
.bk-ref img { max-width: 100%; }

.bk-sp .bk-qtext { font-size: 15.5px; font-weight: 500; margin-bottom: 10px; }
.bk-sp-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.bk-play {
  border: 1px solid #c7d2fe; background: #eef2ff; color: #4338ca; border-radius: 8px;
  padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.bk-play:hover { background: #e0e7ff; }
.bk-sample { margin-top: 12px; padding: 12px; background: #f9fafb; border-radius: 10px; font-size: 14px; line-height: 1.85; color: #374151; }

/* ---------- 暗色模式 ---------- */
html[data-theme="dark"] .bk-tab,
html[data-theme="dark"] .bk-search,
html[data-theme="dark"] .bk-chip,
html[data-theme="dark"] .bk-card,
html[data-theme="dark"] .bk-stem,
html[data-theme="dark"] .bk-card,
html[data-theme="dark"] .bk-transcript,
html[data-theme="dark"] .bk-read .bk-passage,
html[data-theme="dark"] .bk-essay { background: #1f2937; border-color: #374151; color: #e5e7eb; }
html[data-theme="dark"] .bk-tab { color: #d1d5db; }
html[data-theme="dark"] .bk-tab i { background: #374151; color: #9ca3af; }
html[data-theme="dark"] .bk-tab.on { background: #6366f1; border-color: #6366f1; color: #fff; }
html[data-theme="dark"] .bk-chip { color: #d1d5db; }
html[data-theme="dark"] .bk-chip.on { background: #312e81; border-color: #4338ca; color: #c7d2fe; }
html[data-theme="dark"] .bk-card .bk-t,
html[data-theme="dark"] .bk-head h2,
html[data-theme="dark"] .bk-qtext,
html[data-theme="dark"] .bk-ref,
html[data-theme="dark"] .bk-en,
html[data-theme="dark"] .bk-stem,
html[data-theme="dark"] .bk-read .bk-passage,
html[data-theme="dark"] .bk-sample { color: #e5e7eb; }
html[data-theme="dark"] .bk-tag { background: #374151; color: #9ca3af; }
html[data-theme="dark"] .bk-audio-card { background: #1f2937; border-color: #374151; }
html[data-theme="dark"] .bk-sp { background: #1f2937; border-color: #4b5563; color: #d1d5db; }
html[data-theme="dark"] .bk-sp.on { background: #6366f1; border-color: #6366f1; color: #fff; }
html[data-theme="dark"] .bk-input { background: #111827; border-bottom-color: #4f46e5; color: #e5e7eb; }
html[data-theme="dark"] .bk-blank.ok .bk-input { background: #064e3b; }
html[data-theme="dark"] .bk-blank.bad .bk-input { background: #450a0a; }
html[data-theme="dark"] .bk-transcript h3 { background: #111827; border-color: #374151; color: #d1d5db; }
html[data-theme="dark"] .bk-line:hover { background: #374151; }
html[data-theme="dark"] .bk-cn { color: #6b7280; }
html[data-theme="dark"] .bk-analysis { background: #422006; border-color: #78350f; color: #fcd34d; }
html[data-theme="dark"] .bk-an-line { border-color: #78350f; }
html[data-theme="dark"] .bk-an-line b { color: #fbbf24; }
html[data-theme="dark"] .bk-back { background: #374151; color: #d1d5db; }
html[data-theme="dark"] .bk-play { background: #312e81; border-color: #4338ca; color: #c7d2fe; }
html[data-theme="dark"] .bk-sample { background: #111827; }
html[data-theme="dark"] .bk-actions.sticky { background: rgba(31,41,55,.96); }

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .bk-read { grid-template-columns: 1fr; }
  .bk-read .bk-passage { position: static; max-height: none; }
  .bk-grid { grid-template-columns: 1fr; }
  .bk-input { width: 96px; }
}
