/* ================================================================
   vocab.css —— 背单词「词库选择器」版式
   ----------------------------------------------------------------
   管三块：出题方向 / 词书卡片 / 导入自己的词库。
   想换词书卡片的颜色 → 改下面 .vb-book.is-on 的 border-color 和
   background（品牌橙用 var(--brand)，词书主题紫用 var(--purple)）。
   ================================================================ */

/* ---------- 面板整体 ---------- */
.vb-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 6px;
}
.vb-sec { display: flex; flex-direction: column; gap: 10px; }
.vb-sec-t {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.vb-sec-n {
  font-weight: 700;
  font-size: 12px;
  color: var(--ink-2, #8A8578);
}
.vb-hint {
  font-size: 12.5px;
  color: var(--ink-2, #8A8578);
  line-height: 1.5;
}

/* ---------- 分段选择（出题方向 / 每轮题量）---------- */
.vb-seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.vb-seg button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 2px solid var(--line, #E5E5E5);
  border-radius: var(--r-m);
  background: var(--card, #fff);
  padding: 9px 16px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.vb-seg button i {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2, #8A8578);
}
.vb-seg button:hover { transform: translateY(-1px); }
.vb-seg button.is-on {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.vb-seg button.is-on i { color: var(--brand-deep); opacity: .8; }

/* ---------- 词书卡片 ---------- */
.vb-books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
}
.vb-book {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  border: 2px solid var(--line, #E5E5E5);
  border-radius: var(--r-m);
  background: var(--card, #fff);
  padding: 13px 14px;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.vb-book:hover { transform: translateY(-1px); }
.vb-book.is-on {
  border-color: var(--purple, #8B5CF6);
  background: var(--purple-soft, #F4EFFE);
}
.vb-book-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vb-book-h b {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
}
.vb-cnt {
  flex: none;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--purple-deep, #5B21B6);
  background: var(--purple-soft, #F4EFFE);
  border-radius: var(--r-pill);
  padding: 2px 9px;
}
.vb-book.is-on .vb-cnt {
  background: #fff;
}
.vb-book-s {
  font-size: 12px;
  color: var(--ink-2, #8A8578);
  line-height: 1.45;
}
.vb-del {
  position: absolute;
  right: 10px;
  bottom: 9px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--danger, #FF4B4B);
  opacity: .75;
}
.vb-del:hover { opacity: 1; text-decoration: underline; }

/* ---------- 导入自己的词库 ---------- */
.vb-import {
  border: 2px dashed var(--line, #E5E5E5);
  border-radius: var(--r-m);
  background: #FCFBF7;
  padding: 12px 14px;
}
.vb-import > summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--brand-deep);
  list-style: none;
}
.vb-import > summary::-webkit-details-marker { display: none; }
.vb-import[open] > summary { margin-bottom: 12px; }
.vb-import-b { display: flex; flex-direction: column; gap: 10px; }
.vb-field { display: flex; flex-direction: column; gap: 5px; }
.vb-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2, #8A8578);
}
.vb-field input[type="text"],
.vb-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid var(--line, #E5E5E5);
  border-radius: var(--r-s, 10px);
  background: #fff;
  padding: 9px 11px;
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--ink);
  resize: vertical;
}
.vb-field textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
}
.vb-field input:focus,
.vb-field textarea:focus {
  outline: none;
  border-color: var(--brand);
}
.vb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.vb-file {
  font-size: 12.5px;
  color: var(--ink-2, #8A8578);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 底部 ---------- */
.vb-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.vb-foot-t {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2, #8A8578);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 词汇题里的两个小补充 ---------- */
.ls-scene-chip.is-vocab {
  color: var(--purple-deep);
  background: var(--purple-soft);
  border-color: var(--purple);
}
.word-card.is-zh .word-card-w {
  font-size: 26px;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .vb-books { grid-template-columns: 1fr; }
  .vb-seg button { flex: 1; }
}

/* ================================================================
   v0.9 新增：章节选择器 / 建议词量 / 记忆曲线报告
   ================================================================ */

/* ---------- 章节选择（完整版词库专用）---------- */
.vb-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 148px;
  overflow-y: auto;
  padding: 2px 2px 6px;
}
.vb-chapters button {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border: 2px solid var(--line, #E5E5E5);
  border-radius: var(--r-pill);
  background: var(--card, #fff);
  padding: 6px 12px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.vb-chapters button i {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2, #8A8578);
}
.vb-chapters button:hover { border-color: var(--brand); }
.vb-chapters button.is-on {
  border-color: var(--purple, #8B5CF6);
  background: var(--purple-soft, #F4EFFE);
  color: var(--purple-deep, #5B21B6);
}

/* ---------- "小雅建议"的词量按钮 ---------- */
.vb-seg button.is-advice {
  border-color: var(--ok);
  background: var(--ok-soft);
  color: var(--ok-deep);
  position: relative;
}
.vb-seg button.is-advice i { color: var(--ok-deep); opacity: .85; }
.vb-seg button.is-advice.is-on { box-shadow: 0 0 0 3px rgba(88, 204, 2, .18); }
.vb-due { color: var(--brand-deep); margin-left: 6px; }

/* ================================================================
   记忆曲线 · 学习报告（vrep-）
   ================================================================ */
.vrep-wrap { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
.vrep-title { font-size: 19px; font-weight: 800; color: var(--ink); }
.vrep-sub { font-size: 12.5px; color: var(--ink-2, #8A8578); margin-top: -10px; }
.vrep-dim { color: var(--ink-2, #8A8578); font-weight: 500; }

.vrep-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.vrep-card {
  border: 2px solid var(--line, #E5E5E5);
  border-radius: var(--r-m);
  background: var(--card, #fff);
  padding: 13px 14px;
}
.vrep-card-t { font-size: 12.5px; font-weight: 700; color: var(--ink-2, #8A8578); }
.vrep-card-v {
  font-size: 25px;
  font-weight: 800;
  color: var(--brand-deep);
  line-height: 1.25;
  margin-top: 2px;
}
.vrep-card-s { font-size: 11.5px; color: var(--ink-2, #8A8578); margin-top: 3px; }

.vrep-sec { display: flex; flex-direction: column; gap: 8px; }
.vrep-sec-t { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.vrep-svg { width: 100%; height: auto; display: block; }
.vrep-svg-sm { max-width: 620px; }
.vrep-grid { stroke: #EFEAE0; stroke-width: 1; }
.vrep-axis { fill: #9C9689; font-size: 10.5px; font-family: var(--font, sans-serif); }
.vrep-line-a { fill: none; stroke: #C9C4B8; stroke-width: 2; stroke-dasharray: 5 5; }
.vrep-line-b { fill: none; stroke: var(--ok, #58CC02); stroke-width: 2.6; }
.vrep-dot { fill: var(--ok, #58CC02); }
.vrep-bar { fill: var(--brand, #E8912F); }
.vrep-bar-n { fill: var(--brand-deep, #8A4E0C); font-size: 11px; font-weight: 700; font-family: var(--font, sans-serif); }
.vrep-tip {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2, #8A8578);
  background: #FCFBF7;
  border: 2px solid var(--line, #E5E5E5);
  border-radius: var(--r-m);
  padding: 10px 12px;
}

.vrep-dist-row {
  display: grid;
  grid-template-columns: 210px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.vrep-dist-l { color: var(--ink); font-weight: 700; }
.vrep-dist-bar {
  height: 12px;
  border-radius: var(--r-pill);
  background: #F1EDE4;
  overflow: hidden;
}
.vrep-dist-bar i { display: block; height: 100%; border-radius: var(--r-pill); }
.vrep-dist-n { color: var(--ink-2, #8A8578); white-space: nowrap; }

.vrep-advice {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--brand-soft);
  border: 2px solid var(--brand);
  border-radius: var(--r-m);
  padding: 12px 14px;
}
.vrep-advice b { color: var(--brand-deep); }
.vrep-row { display: flex; gap: 9px; flex-wrap: wrap; }

.vrep-wlist { display: flex; flex-direction: column; gap: 6px; }
.vrep-wrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border: 2px solid var(--line, #E5E5E5);
  border-radius: var(--r-s, 10px);
  background: #fff;
  padding: 8px 12px;
}
.vrep-wword { font-size: 14px; font-weight: 800; color: var(--ink); }
.vrep-wmeta { font-size: 11.5px; color: var(--ink-2, #8A8578); }
.vrep-empty {
  font-size: 12.5px;
  color: var(--ink-2, #8A8578);
  background: #FCFBF7;
  border: 2px dashed var(--line, #E5E5E5);
  border-radius: var(--r-m);
  padding: 12px;
}
.vrep-foot-note {
  font-size: 12px;
  color: var(--ink-2, #8A8578);
  border-top: 2px solid var(--line, #E5E5E5);
  padding-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.vrep-reset {
  border: 0;
  background: none;
  padding: 0;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  color: var(--danger, #FF4B4B);
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .vrep-dist-row { grid-template-columns: 130px 1fr auto; }
  .vb-chapters { max-height: none; }
}

/* ================================================================
   这一轮背几个：小雅建议卡 + 自定义输入（v0.9.1 调整）
   ================================================================ */
.vb-round {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}
.vb-advice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  border: 2px solid var(--ok);
  border-radius: var(--r-m);
  background: var(--ok-soft);
  padding: 11px 18px;
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease;
}
.vb-advice-card:hover { transform: translateY(-1px); }
.vb-advice-card.is-on { box-shadow: 0 0 0 3px rgba(88, 204, 2, .22); }
.vb-advice-n {
  font-size: 15px;
  font-weight: 800;
  color: var(--ok-deep);
}
.vb-advice-s {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ok-deep);
  opacity: .85;
}
.vb-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--line, #E5E5E5);
  border-radius: var(--r-m);
  background: var(--card, #fff);
  padding: 8px 14px;
}
.vb-custom label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2, #8A8578);
}
.vb-custom input {
  width: 78px;
  border: 0;
  border-bottom: 2px solid var(--line, #E5E5E5);
  background: none;
  padding: 3px 2px;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
}
.vb-custom input:focus {
  outline: none;
  border-bottom-color: var(--brand);
}
.vb-custom-u {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2, #8A8578);
}

/* ================================================================
   背单词「设置」面板里的实时记忆曲线（v0.9.6 新增，vset-）
   ----------------------------------------------------------------
   从答题页右上角 ⚙ 进来时，这块嵌在面板最上面。
   绿框 = "这条曲线正在跟着你答题实时变"，和白底的词书卡片分开。
   ================================================================ */
.vb-live {
  border: 2px solid var(--ok);
  border-radius: var(--r-m);
  background: var(--ok-soft);
  padding: 14px 16px;
  gap: 11px;
}
/* 曲线画在白底上，免得绿底吃掉曲线的对比度 */
.vb-live .vrep-svg {
  background: #fff;
  border-radius: var(--r-s, 10px);
  padding: 6px 0 2px;
}

.vset-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.vset-head-t { font-size: 14.5px; font-weight: 800; color: var(--ok-deep, #3B7A0A); }
.vset-head-s { font-size: 11.5px; font-weight: 600; color: var(--ok-deep, #3B7A0A); opacity: .85; }

.vset-round { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vset-round-t { font-size: 12px; font-weight: 800; color: var(--ink-2, #8A8578); white-space: nowrap; }
.vset-round-bar {
  flex: 1 1 120px;
  height: 10px;
  border-radius: var(--r-pill);
  background: #fff;
  overflow: hidden;
}
.vset-round-bar i {
  display: block;
  height: 100%;
  background: var(--ok);
  border-radius: var(--r-pill);
  transition: width .3s ease;
}
.vset-round-n { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }

.vset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}
.vset-cell {
  background: #fff;
  border: 2px solid var(--line, #E5E5E5);
  border-radius: var(--r-s, 10px);
  padding: 9px 11px;
}
.vset-cell-t { font-size: 11.5px; font-weight: 700; color: var(--ink-2, #8A8578); }
.vset-cell-v {
  font-size: 18px;
  font-weight: 800;
  color: var(--ok-deep, #3B7A0A);
  line-height: 1.25;
  margin-top: 1px;
}
.vset-cell-s { font-size: 11px; color: var(--ink-2, #8A8578); margin-top: 2px; }

@media (max-width: 900px) {
  .vset-grid { grid-template-columns: 1fr 1fr; }
}
