/* 我的词汇：搜索建议与词条列表 */
.search {
  width: 100%;
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid #dce4f1;
  border-radius: 12px;
  outline-color: #8eafd6;
}

.results {
  margin-top: 16px;
}

.word-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid #edf0f5;
}

.word-row:last-child {
  border-bottom: 0;
}

.word-copy {
  min-width: 0;
}

.word-copy strong,
.word-copy span {
  display: block;
  overflow-wrap: anywhere;
}

.word-copy span {
  margin-top: 5px;
  color: #718096;
  font-size: 13px;
}

.word-action {
  flex-shrink: 0;
  padding: 8px 10px;
  border: 1px solid #dce4f1;
  border-radius: 10px;
  background: white;
  color: #53647c;
  font-size: 12px;
}

.empty {
  color: #718096;
  font-size: 14px;
}

/* 正式词典：筛选、加载按钮和页面布局 */

.dictionary-panel {
  padding: 20px;
  border: 1px solid var(--line, #dce4f1);
  border-radius: 20px;
  background: var(--card, white);
}

.dictionary-intro {
  margin: 8px 0 22px;
  color: var(--muted, #718096);
  font-size: 14px;
  font-style: italic;
}

.dictionary-filters {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: #f0f3f8;
}

.dictionary-filters button {
  flex: 1;
  padding: 9px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #53647c;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.dictionary-filters button[aria-pressed="true"] {
  border-color: #dce4f1;
  background: white;
  color: #244c80;
  font-weight: 700;
}

.dictionary-more {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #dce4f1;
  border-radius: 12px;
  background: white;
  color: #315d96;
  font: inherit;
  cursor: pointer;
}

.dictionary-status {
  color: var(--muted, #718096);
  font-size: 13px;
}

.dictionary-more[hidden] {
  display: none;
}

/* 词汇练习：入口与结果卡片 */

.vocabulary-practice-shell {
  padding-bottom: 40px;
}

.vocabulary-entry {
  width: 100%;
  max-width: 420px;
  margin: 20px auto;
  padding: 24px;
  border: 1px solid var(--line, #dce4f1);
  border-radius: 20px;
  background: var(--card, white);
}

.vocabulary-entry h1 {
  margin-top: 0;
  font-size: 23px;
}

.vocabulary-primary {
  width: 100%;
  min-height: 46px;
  margin-top: 16px;
  padding: 12px 16px;
  border: 0;
  border-radius: 13px;
  background: var(--navy-dark, #294f80);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.vocabulary-primary:disabled {
  opacity: 0.45;
  cursor: default;
}

.vocabulary-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.vocabulary-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #315d96;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.vocabulary-result-score {
  margin: 24px 0;
  color: #315d96;
  font-size: 40px;
  font-weight: 800;
}

/* 词汇练习：题目、输入和反馈 */

.vocabulary-question-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px;
  color: var(--muted, #718096);
  font-size: 13px;
}

.vocabulary-question-card {
  padding: 24px;
  border: 1px solid var(--line, #dce4f1);
  border-radius: 20px;
  background: var(--card, white);
}

.vocabulary-question-card h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 26px;
}

.vocabulary-answer-label {
  display: block;
  margin: 24px 0 8px;
  font-size: 13px;
  color: var(--muted, #718096);
}

.vocabulary-answer-input {
  width: 100%;
  padding: 14px;
  border: 1px solid #cbd7e8;
  border-radius: 12px;
  color: var(--navy-dark, #243752);
  background: white;
  font: inherit;
  font-size: 18px;
}

.vocabulary-answer-input:focus {
  outline: 3px solid #d9e7fa;
  border-color: #7298c8;
}

.vocabulary-feedback {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.vocabulary-feedback[data-correct="true"] {
  background: #edf7f0;
  color: #286548;
}

.vocabulary-feedback[data-correct="false"] {
  background: #fff1ef;
  color: #9a463a;
}

/* 词汇练习：进度区域 */

.vocabulary-practice-progress {
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px solid var(--line, #dce4f1);
  border-radius: 16px;
  background: var(--card, white);
}

.vocabulary-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted, #718096);
}

.vocabulary-practice-progress progress {
  display: block;
  width: 100%;
  height: 8px;
  accent-color: #315d96;
}

/* 词汇练习：隐藏区域不占位置 */

.vocabulary-practice-shell [hidden] {
  display: none;
}

/* 词汇练习：退出与重新开始弹窗 */

.vocabulary-action-dialog {
  width: calc(100% - 32px);
  max-width: 380px;
  padding: 24px;
  border: 1px solid #dce4f1;
  border-radius: 20px;
  color: #243752;
  background: white;
}

.vocabulary-action-dialog::backdrop {
  background: rgba(24, 38, 58, 0.4);
}

.vocabulary-action-dialog h2 {
  margin-top: 0;
  font-size: 21px;
}

.vocabulary-action-dialog p {
  color: #718096;
  font-size: 14px;
  line-height: 1.6;
}

.vocabulary-action-dialog .vocabulary-primary:last-child {
  background: #edf3fc;
  color: #315d96;
}

/* 词汇练习：题目居中，提示使用斜体 */

#vocabulary-question,
#vocabulary-question-hint {
  text-align: center;
}

#vocabulary-question-hint {
  font-style: italic;
}

/* 词汇练习：特殊字符快捷输入 */

.vocabulary-characters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.vocabulary-characters button {
  min-width: 35px;
  min-height: 36px;
  padding: 5px 9px;
  border: 1px solid #dce4f1;
  border-radius: 9px;
  background: #f5f8fc;
  color: #243752;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
}

/* 词汇练习：底部悬浮进度，预留内容空间 */

.vocabulary-practice-shell {
  padding-bottom: calc(140px + env(safe-area-inset-bottom));
}

.vocabulary-practice-progress {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 16px;
  width: auto;
  max-width: 580px;
  margin: 0 auto;
  box-shadow: 0 5px 20px rgba(36, 55, 82, 0.08);
}

/* 本组入口：最近成绩与日期 */

.vocabulary-last-score {
  display: block;
  margin-top: 20px;
  color: #315d96;
  font-size: 28px;
  font-weight: 800;
}

.vocabulary-last-date {
  display: block;
  margin-top: 6px;
  color: #718096;
  font-size: 13px;
}

/* 本组入口：标签正常大小，仅分数放大加粗 */

.vocabulary-last-score {
  display: block;
  margin-top: 20px;
  color: #53647c;
  font-size: 14px;
  font-weight: 400;
}

.vocabulary-last-score strong {
  margin-left: 5px;
  color: #315d96;
  font-size: 28px;
  font-weight: 800;
}

/* 词汇历史：日期、成绩和逐题记录 */

.vocabulary-history-card {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--line, #dce4f1);
  border-radius: 20px;
  background: var(--card, white);
}

.vocabulary-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.vocabulary-history-heading > span {
  color: var(--muted, #718096);
  font-size: 13px;
}

.vocabulary-history-heading > strong {
  flex-shrink: 0;
  color: #315d96;
  font-size: 25px;
  font-weight: 800;
}

.vocabulary-history-group {
  margin: 0 0 16px;
  font-size: 17px;
}

.vocabulary-history-question {
  border-top: 1px solid #edf0f5;
}

.vocabulary-history-question-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
}

.vocabulary-history-question-heading::-webkit-details-marker {
  display: none;
}

.vocabulary-history-question-heading > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.6;
}

.vocabulary-history-verdict {
  flex-shrink: 0;
  font-size: 12px;
}

.vocabulary-history-verdict::after {
  content: " ▾";
}

.vocabulary-history-question[open] .vocabulary-history-verdict::after {
  content: " ▴";
}

.vocabulary-history-verdict[data-correct="true"] {
  color: #286548;
}

.vocabulary-history-verdict[data-correct="false"] {
  color: #9a463a;
}

.vocabulary-history-answer {
  padding: 0 0 12px;
  color: #53647c;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.vocabulary-history-answer p {
  margin: 0 0 8px;
}

/* 词汇历史：整次练习可折叠，日期和成绩始终可见 */

.vocabulary-history-heading {
  margin-bottom: 0;
  cursor: pointer;
  list-style: none;
}

.vocabulary-history-heading::-webkit-details-marker {
  display: none;
}

.vocabulary-history-heading::after {
  content: "▾";
  flex-shrink: 0;
  color: #718096;
  font-size: 14px;
}

.vocabulary-history-card[open] > .vocabulary-history-heading {
  margin-bottom: 16px;
}

.vocabulary-history-card[open] > .vocabulary-history-heading::after {
  content: "▴";
}

/* 复习词汇主页：新练习与历史记录入口 */

.vocabulary-review-entries {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.vocabulary-review-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 100px;
  padding: 22px;
  border: 1px solid var(--line, #dce4f1);
  border-radius: 18px;
  background: var(--card, white);
  color: var(--navy-dark, #243752);
  text-decoration: none;
}

.vocabulary-review-entry-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.vocabulary-review-entry-copy strong {
  font-size: 18px;
  font-weight: 800;
}

.vocabulary-review-entry-copy > span {
  color: var(--muted, #718096);
  font-size: 13px;
  line-height: 1.6;
}

.vocabulary-review-entry-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: #315d96;
  font-size: 27px;
  line-height: 26px;
  text-align: center;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vocabulary-review-entry:focus-visible {
  outline: 3px solid #9bb8f0;
  outline-offset: 3px;
}

 /* 练习范围：底部选择弹窗 */

    .range-button {
      width: 100%;
      padding: 14px;
      border: 1px solid #dce4f1;
      border-radius: 12px;
      background: white;
      color: #243752;
      text-align: left;
    }

    .range-dialog {
      width: min(100%, 620px);
      max-width: 620px;
      max-height: 75dvh;
      margin: auto auto 0;
      padding: 0;
      border: 0;
      border-radius: 22px 22px 0 0;
      color: #243752;
      background: white;
    }

    .range-dialog::backdrop {
      background: rgba(24, 38, 58, 0.35);
    }

    .range-dialog-layout {
      display: flex;
      flex-direction: column;
      max-height: 75dvh;
    }

    .range-dialog-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 20px;
      border-bottom: 1px solid #edf0f5;
    }

    .range-dialog-header h2 {
      margin: 0;
      font-size: 19px;
    }

    .range-close {
      width: 34px;
      height: 34px;
      border: 0;
      border-radius: 50%;
      background: #f0f3f8;
      color: #53647c;
      font-size: 22px;
    }

    .range-dialog-content {
      overflow-y: auto;
      padding: 20px;
    }

    .range-theme {
      margin-bottom: 10px;
      border: 1px solid #dce4f1;
      border-radius: 13px;
    }

    .range-theme summary {
      padding: 14px;
      cursor: pointer;
    }

    .range-theme-heading {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .range-theme-heading label,
    .range-group {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .range-theme input {
      width: 18px;
      height: 18px;
      accent-color: #315d96;
    }

    .range-groups {
      padding: 0 14px 12px 36px;
    }

    .range-group {
      padding: 10px 0;
      font-size: 14px;
      color: #53647c;
    }

    .range-dialog-footer {
      padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
      border-top: 1px solid #edf0f5;
    }

    /* 新词汇练习：设置区域与水平选项 */

.vocabulary-selection-panel {
  margin: 20px 0 40px;
  padding: 22px;
  border: 1px solid var(--line, #dce4f1);
  border-radius: 20px;
  background: var(--card, white);
}

.vocabulary-selection-panel h1 {
  margin-top: 0;
  font-size: 23px;
}

.vocabulary-selection-label {
  margin: 24px 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.vocabulary-level-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vocabulary-level-options button {
  min-width: 48px;
  padding: 10px 14px;
  border: 1px solid #dce4f1;
  border-radius: 12px;
  background: white;
  color: #53647c;
  font: inherit;
  cursor: pointer;
}

.vocabulary-level-options button[aria-pressed="true"] {
  border-color: #315d96;
  background: #edf3fc;
  color: #244c80;
  font-weight: 700;
}

.vocabulary-level-options button:disabled {
  opacity: 0.45;
  cursor: default;
}

.selection-tools {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
}

.range-dialog-footer .vocabulary-primary {
  margin-top: 0;
}

/* 词汇历史：水平与类型筛选 */

.vocabulary-history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.vocabulary-history-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #718096;
  font-size: 13px;
}

.vocabulary-history-filters select {
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid #dce4f1;
  border-radius: 10px;
  color: #243752;
  background: white;
  font: inherit;
}

/* 词汇历史：折叠时仍显示练习名称 */

.vocabulary-history-heading-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 6px;
}

.vocabulary-history-heading-copy > strong {
  color: #243752;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.vocabulary-history-heading-copy > span {
  color: #718096;
  font-size: 12px;
}

.vocabulary-history-kind {
  align-self: flex-start;
  padding: 3px 7px;
  border-radius: 6px;
  background: #f0f4fa;
}