/* 问渠 WenQu 背单词页样式（vocab.html / js/vocab.js）
 * 设计约束：无 icon、无 CSS 自绘图形、无「框内单字」标识、素材真实、字体非默认。
 */
/* 原生 button 外观重置 */
button,
input[type="button"],
[role="button"] {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  font: inherit;
  font-family: inherit;
  color: inherit;
  line-height: inherit;
  cursor: pointer;
  text-align: inherit;
}

.vc-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.vc-lib {
  background: rgba(246, 246, 242, .6);
  border: 1px solid rgba(32, 36, 47, .1);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.vc-lib:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(32, 36, 47, .08); border-color: var(--gold); }
.vc-lib-name { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: var(--ink, #20242f); }
.vc-lib-desc { display: block; margin-top: 6px; font-size: .84rem; color: var(--text-soft, #4c5463); }

.vc-modes { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 20px; }
.vc-mode {
  border: 1px solid rgba(32, 36, 47, .16);
  background: transparent;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: .9rem;
  color: var(--ink, #20242f);
  cursor: pointer;
}
.vc-mode.active { background: var(--ink, #20242f); color: #f6f6f2; border-color: var(--ink, #20242f); }
.vc-mode-quiet { margin-left: auto; color: var(--text-soft, #4c5463); }

/* —— 词卡翻转 —— */
.vc-card-wrap { perspective: 1200px; margin: 6px 0 20px; }
.vc-card {
  position: relative;
  width: 100%;
  min-height: 250px;
  transform-style: preserve-3d;
  transition: transform .5s ease;
}
.vc-card.flipped { transform: rotateY(180deg); }
.vc-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 26px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(32, 36, 47, .1);
  box-shadow: 0 10px 26px rgba(32, 36, 47, .08);
}
.vc-back { transform: rotateY(180deg); background: linear-gradient(180deg, #ffffff, #f6f6f2); }
.vc-word { font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--ink, #20242f); margin: 0; text-align: center; }
.vc-phonetic { font-size: 1rem; color: var(--text-soft, #4c5463); margin: 0; }
.vc-meaning { font-size: 1.2rem; color: var(--ink, #20242f); margin: 0; text-align: center; line-height: 1.6; }
.vc-example { font-family: var(--display); font-size: 1rem; color: var(--ink-soft, #3d4453); margin: 4px 0 0; text-align: center; line-height: 1.6; }
.vc-example-cn { font-size: .9rem; color: var(--text-soft, #4c5463); margin: 0; text-align: center; line-height: 1.6; }
.vc-hint { font-size: .8rem; color: var(--muted, #8b91a0); margin: 0; }
.vc-listen {
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold-deep, #0e7490);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .85rem;
  cursor: pointer;
}
.vc-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 12px; }
.vc-count { text-align: center; color: var(--text-soft, #4c5463); font-size: .86rem; margin: 0; }

/* —— 小测 —— */
.vc-quiz-word { text-align: center; margin: 8px 0 20px; }
.vc-quiz-word .vc-word { font-size: 1.8rem; }

/* —— 进度（纯排版 + 进度条，无自绘图形） —— */
.vc-progress-main { margin-bottom: 20px; }
.vc-progress-hero {
  background: linear-gradient(135deg, rgba(14, 116, 144, .1), rgba(14, 116, 144, .04));
  border: 1px solid rgba(14, 116, 144, .2);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 16px;
}
.vc-mastered-pct {
  display: block;
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold-deep);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.vc-mastered-label {
  display: block;
  font-size: .84rem;
  color: var(--muted);
  margin: 6px 0 14px;
}
.vc-progress-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.vc-progress-stats p {
  margin: 0;
  font-size: .92rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.vc-progress-stats b {
  font-family: var(--display);
  color: var(--gold-deep);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .vc-library { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 2.5vw, 14px); }
  .vc-lib { padding: clamp(14px, 3.5vw, 18px) clamp(12px, 3vw, 14px); border-radius: clamp(12px, 3vw, 14px); max-width: 100%; }
  .vc-lib-name { font-size: clamp(0.98rem, 3.4vw, 1.08rem); }
  .vc-lib-desc { font-size: clamp(0.78rem, 2.6vw, 0.84rem); }
  .vc-progress-stats { grid-template-columns: 1fr; gap: clamp(10px, 2.5vw, 12px); }
  .vc-card { min-height: clamp(260px, 68vw, 300px); }
  .vc-card-face { padding: clamp(20px, 5vw, 30px); border-radius: clamp(16px, 4vw, 20px); }
  .vc-card-face .vc-word { font-size: clamp(1.6rem, 6vw, 2rem); }
  .vc-progress-hero { padding: clamp(16px, 4vw, 22px) clamp(16px, 4vw, 26px); border-radius: clamp(12px, 3vw, 16px); }
  .vc-actions { gap: clamp(8px, 2vw, 12px); }
  .vc-actions .btn { min-height: 44px; max-height: 52px; }
}

/* —— 2026-08-17 学习档案（onboarding）：桌面图文并排，窄屏堆叠 —— */
.ob-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 26px; align-items: start; }
.ob-media { position: sticky; top: 24px; }
.ob-media img { width: 100%; height: auto; border-radius: 18px; display: block; box-shadow: 0 12px 30px rgba(32, 36, 47, .12); }
.ob-main { min-width: 0; }
@media (max-width: 860px) {
  .ob-layout { grid-template-columns: 1fr; }
  .ob-media { position: static; }
  .ob-media img { max-height: 180px; object-fit: cover; }
}

/* —— 2026-08-17 学习档案（onboarding） —— */
.ob-block {
  background: #fff;
  border: 1px solid rgba(32, 36, 47, .1);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.ob-block-title { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 14px; color: var(--ink, #20242f); }
.ob-score-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.ob-score-label { font-size: .9rem; color: var(--text-soft, #4c5463); width: 60px; }
.ob-range {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  background: linear-gradient(90deg, var(--tea) 0%, var(--tea-2) var(--fill, 50%), var(--paper-2) var(--fill, 50%), var(--paper-2) 100%);
  cursor: pointer;
}
.ob-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--tea);
  box-shadow: 0 2px 8px rgba(14, 116, 144, .35);
}
.ob-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--tea);
}
.ob-score-num { font-family: var(--display); font-weight: 700; color: var(--gold-deep, #0e7490); min-width: 34px; text-align: right; }
.ob-weak-hint { font-size: .84rem; color: var(--muted, #8b91a0); margin: 10px 0 8px; }
.ob-none { font-size: .86rem; color: var(--muted, #8b91a0); }
.ob-actions { text-align: center; margin: 22px 0; }

/* ==========================================================================
 * 2026-08-17 背单词 / 学习档案 桌面深化（v16）
 *  - 词库卡更讲究：金色上饰线 + 更大气内边距
 *  - 模式切换沿用站内金色选中态（与 wq-chip.selected 同源）
 *  - 桌面宽度下词卡 / 进度区留白更足
 * 素材一律站内真实摄影；字体分层不变。
 * ========================================================================== */

/* —— 词库卡 —— */
.vc-library { gap: 16px; }
.vc-lib {
  position: relative;
  background: linear-gradient(180deg, #ffffff, var(--paper));
  border: 1px solid rgba(32, 36, 47, .08);
  border-radius: 14px;
  padding: 24px 20px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, border-top-color .18s ease;
}
.vc-lib:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(32, 36, 47, .1);
  border-color: rgba(14, 116, 144, .4);
  border-top-color: var(--gold);
}
.vc-lib-name { font-size: 1.22rem; }
.vc-lib-desc { font-size: .88rem; line-height: 1.7; }

/* —— 模式切换 —— */
.vc-modes { gap: 10px; margin: 6px 0 24px; }
.vc-mode {
  padding: 9px 20px;
  font-size: .92rem;
  letter-spacing: .08em;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.vc-mode:hover { border-color: var(--gold); transform: translateY(-1px); }
.vc-mode.active {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(14, 116, 144, .3);
}
.vc-mode-quiet { margin-left: auto; color: var(--muted); }

/* —— 词卡 —— */
.vc-card-face { border-radius: 20px; padding: 30px; }
.vc-word { font-size: 2.2rem; }
.vc-phonetic { font-size: 1.05rem; }

/* —— 进度 —— */
.vc-progress-stats p { font-size: 1rem; }
.vc-progress-stats b { font-size: 1.18rem; }

/* ==========================================================================
 * 2026-08-17 背单词桌面深化（v18）
 *  - 词库卡桌面 5 列；词卡更宽居中；模式切换与进度区更舒展
 *  - 进度：已掌握百分比大数字 + 进度条 + 5 统计卡
 * 素材一律站内真实摄影；字体分层不变；无自绘图形。
 * ========================================================================== */
@media (min-width: 1024px) {
  .vc-library { grid-template-columns: repeat(5, 1fr); gap: 18px; }
  .vc-lib { padding: 28px 22px; border-radius: 16px; }
  .vc-lib-name { font-size: 1.28rem; }
  .vc-lib-desc { font-size: .9rem; }

  .vc-card-wrap { max-width: 720px; margin-left: auto; margin-right: auto; }
  .vc-card { min-height: 320px; }
  .vc-card-face { border-radius: 22px; padding: 36px; }
  .vc-word { font-size: 2.6rem; }
  .vc-meaning { font-size: 1.35rem; }
  .vc-actions .btn { min-width: 140px; padding: 13px 26px; }

  .vc-progress-hero { padding: 30px 34px; }
  .vc-mastered-pct { font-size: 3rem; }
}
@media (max-width: 900px) {
  .vc-library { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .vc-library { grid-template-columns: repeat(2, 1fr); }
}

/* —— 2026-08-18 词卡升级：发音/翻转分开 + 换词过渡 + 高度稳定 —— */
.vc-card-wrap { animation: vcCardIn .28s ease; }
@keyframes vcCardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vc-card-wrap { animation: none; } }
.vc-card { min-height: 300px; }
.vc-card-face { overflow-y: auto; }
.vc-card-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.vc-card-actions .vc-listen,
.vc-card-actions .vc-flip {
  border-radius: 999px;
  padding: 8px 18px;
  font-size: .86rem;
  letter-spacing: .02em;
}
.vc-flip {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.vc-flip:hover { border-color: var(--tea); color: var(--tea-deep); background: var(--tea-soft); }
.vc-card-face .vc-word { font-size: 2rem; }
@media (min-width: 1024px) {
  .vc-card { min-height: 340px; }
  .vc-card-face .vc-word { font-size: 2.4rem; }
}
