/* ============================================================
   学习主链路：学习空间 / 教材 / 单元 / 课文 / 单词 / 练习 / 结果
   依赖 tokens.css + base.css + home.css（复用双壳）
   ============================================================ */

/* ---------- 共享壳补充 ---------- */
.topbar .crumb {
  flex: none;
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-400);
}

.top-back {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  margin-right: 8px;
  border-radius: 9px;
  color: var(--ink-600);
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}

.top-back:hover {
  background: #f2f5fa;
  color: var(--brand-600);
}

.top-back .ico {
  width: 18px;
  height: 18px;
}

.workspace {
  position: relative;
}

.ctx-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 16px;
  z-index: 60;
  width: 214px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-float);
}

.ctx-menu[hidden] {
  display: none;
}

.ctx-menu-label {
  padding: 6px 8px 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-400);
}

.ctx-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  text-align: left;
  font-size: 13px;
  color: var(--ink-600);
}

.ctx-menu button:hover {
  background: #f5f8fd;
  color: var(--ink-900);
}

.ctx-menu button.is-on {
  background: var(--brand-050);
  color: var(--brand-600);
  font-weight: 600;
}

.ctx-menu .m-flag {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #f2f5fa;
  font-size: 11px;
  color: var(--ink-600);
}

.ctx-menu button small {
  display: block;
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-400);
}

.ctx-menu .m-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- 通用页头 ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-400);
}

.page-title {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.page-sub {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-600);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-600);
  transition: all var(--dur-fast) var(--ease-soft);
}

.ghost-btn:hover {
  border-color: var(--brand-200);
  color: var(--brand-600);
  background: var(--brand-050);
}

.ghost-btn .ico {
  width: 15px;
  height: 15px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--brand-500);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.24);
  transition: background var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}

.primary-btn:hover {
  background: var(--brand-600);
  transform: translateY(-1px);
}

.primary-btn .ico {
  width: 15px;
  height: 15px;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
}

.section-bar h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
}

.section-bar h2::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--brand-500);
}

.section-bar span {
  font-size: 12px;
  color: var(--ink-400);
}

/* ============================================================
   ST-05 学习空间
   ============================================================ */
.st-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  padding: 24px 26px;
  border-radius: 20px;
  background:
    radial-gradient(520px 300px at 88% -20%, rgba(91, 139, 255, 0.5), transparent 68%),
    linear-gradient(135deg, #10203d 0%, #0a1428 68%);
  color: var(--on-dark-1);
  box-shadow: 0 18px 40px rgba(10, 20, 40, 0.22);
}

.st-hero::after {
  content: attr(data-glyph);
  position: absolute;
  right: 26%;
  bottom: -34px;
  font-family: var(--font-lang);
  font-size: 150px;
  line-height: 1;
  opacity: 0.06;
  pointer-events: none;
}

.st-hero .st-eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--on-dark-3);
}

.st-hero h1 {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.st-hero p {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--on-dark-2);
}

.st-hero-side {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}

.st-progress {
  text-align: right;
}

.st-progress span {
  display: block;
  font-size: 11px;
  color: var(--on-dark-3);
}

.st-progress b {
  display: block;
  margin-top: 2px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.st-progress b small {
  font-size: 12px;
  font-weight: 500;
  color: var(--on-dark-2);
}

.st-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  border-radius: 9px;
  background: #fff;
  color: #14306b;
  font-size: 12.5px;
  font-weight: 700;
  transition: transform var(--dur-fast) var(--ease-soft);
}

.st-cta:hover {
  transform: translateY(-1px);
}

.mod-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.mod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 120px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  transition: transform var(--dur-base) var(--ease-soft), border-color var(--dur-base), box-shadow var(--dur-base);
}

.mod-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-200);
  box-shadow: 0 12px 26px rgba(20, 40, 80, 0.08);
}

.mod-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--brand-050);
  color: var(--brand-600);
}

.mod-ico .ico {
  width: 19px;
  height: 19px;
}

.mod-card:nth-child(2) .mod-ico { background: #e8f8f2; color: #08795a; }
.mod-card:nth-child(3) .mod-ico { background: #fff4e5; color: #8a5a00; }
.mod-card:nth-child(4) .mod-ico { background: #eef1ff; color: #4a5bd6; }
.mod-card:nth-child(6) .mod-ico { background: #fdf0e9; color: #c2410c; }
.mod-card:nth-child(7) .mod-ico { background: #f2ecff; color: #6d4bd1; }
.mod-card:nth-child(8) .mod-ico { background: #eaf4ff; color: #1666c2; }

.mod-title {
  margin-top: 11px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-900);
}

.mod-sub {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-400);
}

.mod-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  font-size: 11px;
  color: var(--ink-600);
}

.mod-bar {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #eef1f6;
}

.mod-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--brand-500);
}

.mod-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

/* ============================================================
   ST-09 教材书架
   ============================================================ */
.mat-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.mat-card {
  flex: 0 0 218px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  transition: all var(--dur-base) var(--ease-soft);
}

.mat-card:hover {
  border-color: var(--brand-200);
  transform: translateY(-1px);
}

.mat-card.is-on {
  border-color: var(--brand-500);
  background: linear-gradient(160deg, #f5f9ff, #eef4ff);
  box-shadow: inset 0 0 0 1px var(--brand-500);
}

.mat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mat-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-400);
}

.mat-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-600);
}

.mat-name {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
}

.mat-meta {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.mat-bar {
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9edf4;
}

.mat-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--brand-500);
}

.unit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.unit-card {
  display: flex;
  flex-direction: column;
  min-height: 128px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  transition: all var(--dur-base) var(--ease-soft);
}

.unit-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-200);
  box-shadow: 0 10px 24px rgba(20, 40, 80, 0.07);
}

.unit-no {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-400);
}

.unit-name {
  margin-top: 7px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-900);
}

.unit-meta {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.unit-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  height: 20px;
  margin-top: auto;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
}

.unit-state i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.unit-state.doing { background: var(--brand-050); color: var(--brand-600); }
.unit-state.done { background: #e8f9f3; color: var(--success-deep); }
.unit-state.todo { background: #f2f4f8; color: var(--ink-400); }

/* ============================================================
   ST-10 单元详情
   ============================================================ */
.unit-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid #dbe6ff;
  border-radius: 18px;
  background: linear-gradient(135deg, #f7faff 0%, #eef4ff 100%);
}

.unit-hero .u-no {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--brand-600);
}

.unit-hero h1 {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 700;
}

.unit-hero p {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--ink-600);
}

.unit-ring {
  display: grid;
  place-items: center;
  flex: none;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: conic-gradient(var(--brand-500) calc(var(--v, 62) * 1%), #dfe7f5 0);
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-600);
}

.unit-ring::before {
  content: "";
  position: absolute;
}

.unit-ring span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
}

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.lesson-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: all var(--dur-fast) var(--ease-soft);
}

.lesson-row:hover {
  border-color: var(--brand-200);
  box-shadow: 0 8px 20px rgba(20, 40, 80, 0.05);
}

.lesson-no {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-050);
  color: var(--brand-600);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.lesson-info {
  flex: 1;
  min-width: 0;
}

.lesson-info b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-900);
}

.lesson-info span {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.lesson-acts {
  display: flex;
  gap: 5px;
  flex: none;
}

.lact {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #f6f8fb;
  color: var(--ink-400);
  transition: all var(--dur-fast) var(--ease-soft);
}

.lact:hover {
  background: var(--brand-050);
  color: var(--brand-600);
}

.lact .ico {
  width: 16px;
  height: 16px;
}

.unit-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.ucard {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  transition: all var(--dur-fast) var(--ease-soft);
}

.ucard:hover {
  border-color: var(--brand-200);
  background: #fbfdff;
}

.ucard .u-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--brand-050);
  color: var(--brand-600);
}

.ucard b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900);
}

.ucard span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-400);
}

/* ============================================================
   ST-11 课文学习
   ============================================================ */
.ls-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ls-head h1 {
  margin-top: 5px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.ls-head p {
  margin-top: 5px;
  font-size: 12px;
  color: var(--ink-400);
}

.ls-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-600);
  flex: none;
}

.ls-mark.is-done {
  border-color: #bfeadd;
  background: #e8f9f3;
  color: var(--success-deep);
}

.ls-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}

.ls-audio {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #132241, #0a1428);
  color: var(--on-dark-1);
  box-shadow: 0 10px 26px rgba(10, 20, 40, 0.2);
}

.ls-play {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-500);
  color: #fff;
}

.ls-play .ico {
  width: 16px;
  height: 16px;
}

.ls-track {
  flex: 1;
  min-width: 0;
}

.ls-track .ls-bar {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
}

.ls-track .ls-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: #7aa2ff;
  transition: width 0.3s linear;
}

.ls-track .ls-time {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--on-dark-3);
}

.ls-tool {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--on-dark-2);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ls-tool:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.ls-tool.is-on {
  background: var(--brand-500);
  color: #fff;
}

.ls-mode {
  display: inline-flex;
  gap: 2px;
  margin-top: 14px;
  padding: 3px;
  border-radius: 9px;
  background: #eef1f6;
}

.ls-mode button {
  height: 28px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-600);
}

.ls-mode button.is-on {
  background: #fff;
  color: var(--brand-600);
  box-shadow: 0 1px 3px rgba(20, 40, 80, 0.1);
}

.ls-resume {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #fff8e8;
  color: var(--warn-deep);
  font-size: 11.5px;
}

.ls-resume .ico {
  width: 14px;
  height: 14px;
}

.ls-text {
  margin-top: 12px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.sentence {
  position: relative;
  padding: 12px 14px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-soft), border-color var(--dur-fast);
}

.sentence + .sentence {
  margin-top: 4px;
}

.sentence:hover {
  background: #f8fafe;
}

.sentence.is-active {
  border-left-color: var(--brand-500);
  background: var(--brand-050);
}

.sentence .jp {
  font-family: var(--font-lang);
  font-size: 20px;
  line-height: 1.9;
  color: var(--ink-900);
}

.sentence .trans {
  display: none;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-600);
}

.sentence.is-active .trans,
.ls-text.mode-bilingual .sentence .trans {
  display: block;
}

.ls-text.mode-zh .sentence .jp {
  display: none;
}

.ls-text.mode-zh .sentence .trans {
  display: block;
  margin-top: 0;
  font-size: 14px;
  color: var(--ink-900);
}

.sentence .vocab {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.sentence.is-active .vocab {
  display: flex;
}

.vocab span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--ink-600);
}

.vocab span b {
  font-family: var(--font-lang);
  font-weight: 600;
  color: var(--ink-900);
}

.ls-side {
  position: sticky;
  top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.ls-side h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}

.ls-side .ls-tool-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.ls-side .ls-tool-row a,
.ls-side .ls-tool-row button {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fafbfd;
  font-size: 12px;
  color: var(--ink-600);
  text-align: left;
}

.ls-side .ls-tool-row a:hover {
  border-color: var(--brand-200);
  color: var(--brand-600);
  background: var(--brand-050);
}

.ls-side .ls-tool-row .ico {
  width: 16px;
  height: 16px;
  color: var(--brand-600);
}

.ls-side .ls-tool-row b {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-900);
}

.ls-bottom {
  display: none;
}

/* ============================================================
   ST-12 单元单词卡
   ============================================================ */
.wd-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.wd-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.wd-chip {
  flex: none;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-600);
}

.wd-chip.is-on {
  border-color: var(--brand-500);
  background: var(--brand-500);
  color: #fff;
}

.wd-search {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 300px;
}

.wd-search .ico {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: var(--ink-400);
}

.wd-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 33px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
}

.wd-sort {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  color: var(--ink-600);
}

.wd-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
}

.word-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.word-main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  cursor: pointer;
}

.word-main:hover {
  background: #fbfcfe;
}

.word-form {
  flex: 0 0 170px;
  min-width: 0;
}

.word-form b {
  display: block;
  font-family: var(--font-lang);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-900);
}

.word-form span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-400);
}

.word-pos {
  flex: none;
  display: inline-flex;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  background: #f2f5fa;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-600);
}

.word-def {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink-600);
}

.word-dots {
  display: flex;
  gap: 3px;
  flex: none;
}

.word-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e1e6ef;
}

.word-dots i.on {
  background: var(--success);
}

.word-act {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--ink-400);
}

.word-act:hover {
  background: var(--brand-050);
  color: var(--brand-600);
}

.word-act.is-on {
  color: #d99a00;
  background: #fff8e8;
}

.word-act .ico {
  width: 15px;
  height: 15px;
}

.word-detail {
  display: none;
  padding: 0 15px 14px 199px;
  font-size: 12px;
  color: var(--ink-600);
}

.word-row.is-open .word-detail {
  display: block;
}

.word-detail .ex {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.word-detail .ex + .ex {
  margin-top: 6px;
}

.word-detail .ex b {
  font-family: var(--font-lang);
  font-weight: 600;
  color: var(--ink-900);
}

.word-detail .ex span {
  display: block;
  margin-top: 2px;
  color: var(--ink-400);
}

.word-detail .wd-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  margin-top: 9px;
  padding: 0 10px;
  border: 1px solid var(--brand-100);
  border-radius: 7px;
  background: var(--brand-050);
  color: var(--brand-600);
  font-size: 11.5px;
  font-weight: 600;
}

.word-empty {
  padding: 34px;
  text-align: center;
  color: var(--ink-400);
  font-size: 12.5px;
}

.wd-bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.wd-bottom .wd-progress {
  flex: 1;
}

.wd-bottom .wd-progress span {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-400);
}

.wd-bottom .wd-progress span b {
  color: var(--success-deep);
}

.wd-bottom .wd-bar {
  height: 5px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1f7;
}

.wd-bottom .wd-bar i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: 99px;
  background: var(--success);
}

.wd-bottom .primary-btn {
  flex: none;
  height: 40px;
}

/* ============================================================
   ST-14 一课一练
   ============================================================ */
.qz-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.qz-title {
  flex: 1;
  min-width: 0;
}

.qz-title b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
}

.qz-title span {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.qz-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff8e8;
  color: var(--warn-deep);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.qz-timer .ico {
  width: 14px;
  height: 14px;
}

.qz-exit {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 11.5px;
  color: var(--ink-600);
}

.qz-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1f7;
}

.qz-progress i {
  display: block;
  width: 33%;
  height: 100%;
  border-radius: 99px;
  background: var(--brand-500);
  transition: width 0.25s var(--ease-soft);
}

.qz-card {
  margin-top: 14px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.qz-type {
  display: inline-flex;
  height: 22px;
  padding: 0 8px;
  align-items: center;
  border-radius: 5px;
  background: var(--brand-050);
  color: var(--brand-600);
  font-size: 10.5px;
  font-weight: 600;
}

.qz-stem {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-900);
}

.qz-stem .lang {
  font-family: var(--font-lang);
  font-size: 20px;
}

.qz-passage {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 2px solid var(--brand-100);
  border-radius: 0 8px 8px 0;
  background: #f8fafe;
  font-family: var(--font-lang);
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-600);
}

.qz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.qz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  font-size: 14px;
  color: var(--ink-600);
  transition: all var(--dur-fast) var(--ease-soft);
}

.qz-option:hover {
  border-color: var(--brand-200);
  background: #fbfdff;
}

.qz-option .key {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f2f5fa;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-400);
}

.qz-option.is-on {
  border-color: var(--brand-500);
  background: var(--brand-050);
  color: var(--ink-900);
}

.qz-option.is-on .key {
  background: var(--brand-500);
  color: #fff;
}

.qz-input {
  width: 100%;
  height: 46px;
  margin-top: 16px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
}

.qz-textarea {
  width: 100%;
  min-height: 110px;
  margin-top: 16px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
}

.qz-hint {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.qz-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.qz-footer .qz-spacer {
  flex: 1;
}

.qz-footer button {
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-600);
}

.qz-footer button.primary {
  border-color: transparent;
  background: var(--brand-500);
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 107, 255, 0.22);
}

.qz-footer button:disabled {
  opacity: 0.45;
}

/* ============================================================
   ST-15 结果与解析
   ============================================================ */
.rs-score {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 26px 28px;
  border-radius: 20px;
  background:
    radial-gradient(420px 260px at 88% -30%, rgba(91, 139, 255, 0.42), transparent 68%),
    linear-gradient(135deg, #10203d, #0a1428);
  color: var(--on-dark-1);
}

.rs-ring {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: conic-gradient(#6f97ff calc(var(--v, 78) * 1%), rgba(255, 255, 255, 0.14) 0);
}

.rs-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #0e1a31;
}

.rs-ring b {
  position: relative;
  z-index: 1;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.rs-ring b small {
  font-size: 12px;
  font-weight: 500;
  color: var(--on-dark-2);
}

.rs-ring span {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  font-size: 10px;
  color: var(--on-dark-3);
}

.rs-main {
  flex: 1;
  min-width: 0;
}

.rs-main h1 {
  font-size: 24px;
  font-weight: 700;
}

.rs-main p {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--on-dark-2);
}

.rs-metrics {
  display: flex;
  gap: 28px;
  margin-top: 18px;
}

.rs-metrics div span {
  display: block;
  font-size: 10.5px;
  color: var(--on-dark-3);
}

.rs-metrics div b {
  display: block;
  margin-top: 3px;
  font-size: 19px;
  font-weight: 700;
}

.rs-sections {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.rs-sec {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.rs-sec span {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-400);
}

.rs-sec span b {
  color: var(--ink-900);
}

.rs-sec .bar {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1f7;
}

.rs-sec .bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--brand-500);
}

.rs-sec.is-pending .bar i {
  background: var(--warn);
}

.rs-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}

.rs-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.rs-item.is-wrong {
  border-color: #f6d7c8;
  background: #fffdfb;
}

.rs-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rs-no {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f2f5fa;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-600);
}

.rs-item.is-wrong .rs-no {
  background: var(--danger-bg);
  color: var(--danger-deep);
}

.rs-item-head b {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900);
}

.rs-tag {
  flex: none;
  display: inline-flex;
  height: 20px;
  padding: 0 6px;
  align-items: center;
  border-radius: 5px;
  background: #f2f5fa;
  font-size: 10px;
  color: var(--ink-400);
}

.rs-ans {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.rs-ans b {
  color: var(--ink-900);
  font-weight: 600;
}

.rs-ans b.ok {
  color: var(--success-deep);
}

.rs-ans b.bad {
  color: var(--danger-deep);
}

.rs-exp {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-600);
}

.rs-pending {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 7px;
  margin-top: 9px;
  border-radius: 5px;
  background: var(--warn-bg);
  color: var(--warn-deep);
  font-size: 10.5px;
  font-weight: 600;
}

.rs-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.rs-actions .primary-btn,
.rs-actions .ghost-btn {
  height: 44px;
  font-size: 13px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
  .topbar .crumb {
    display: none;
  }

  .mod-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .unit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ls-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 14px;
  }

  .word-form {
    flex-basis: 150px;
  }

  .word-detail {
    padding-left: 179px;
  }
}

@media (max-width: 1023px) {
  /* 手机壳 */
  .page-title {
    font-size: 20px;
  }

  .page-sub {
    font-size: 12px;
  }

  .page-head {
    align-items: flex-start;
    margin-bottom: 12px;
  }

  .section-bar {
    margin: 14px 0 10px;
  }

  .section-bar h2 {
    font-size: 15px;
  }

  .st-hero {
    display: block;
    padding: 16px;
    border-radius: 16px;
  }

  .st-hero h1 {
    font-size: 20px;
  }

  .st-hero p {
    font-size: 12px;
  }

  .st-hero-side {
    margin-top: 14px;
    justify-content: space-between;
  }

  .st-progress {
    text-align: left;
  }

  .st-progress b {
    font-size: 22px;
  }

  .st-cta {
    height: 36px;
  }

  .mod-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
  }

  .mod-card {
    height: 88px;
    padding: 11px;
    border-radius: 13px;
  }

  .mod-ico {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .mod-ico .ico {
    width: 16px;
    height: 16px;
  }

  .mod-title {
    margin-top: 7px;
    font-size: 14px;
  }

  .mod-sub {
    margin-top: 1px;
    font-size: 10.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mod-foot {
    font-size: 10px;
  }

  .mod-badge {
    top: 9px;
    right: 9px;
    min-width: 17px;
    height: 17px;
    font-size: 9px;
  }

  .mat-card {
    flex-basis: 200px;
  }

  .unit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .unit-card {
    min-height: 116px;
    padding: 12px;
  }

  .unit-name {
    font-size: 14.5px;
  }

  .unit-hero {
    padding: 16px;
    border-radius: 14px;
  }

  .unit-hero h1 {
    font-size: 20px;
  }

  .unit-ring {
    width: 62px;
    height: 62px;
    font-size: 13px;
  }

  .unit-ring span {
    width: 48px;
    height: 48px;
  }

  .lesson-row {
    padding: 10px;
    gap: 10px;
  }

  .lesson-no {
    width: 34px;
    height: 34px;
  }

  .lesson-info b {
    font-size: 13.5px;
  }

  .lact {
    width: 32px;
    height: 32px;
  }

  .unit-cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ucard {
    padding: 11px 12px;
  }

  .ls-head {
    margin-bottom: 10px;
  }

  .ls-head h1 {
    font-size: 19px;
  }

  .ls-layout {
    display: block;
  }

  .ls-side {
    display: none;
  }

  .ls-audio {
    height: 56px;
    padding: 0 12px;
    border-radius: 12px;
    gap: 10px;
  }

  .ls-play {
    width: 34px;
    height: 34px;
  }

  .ls-tool[data-hide-mobile] {
    display: none;
  }

  .ls-mode {
    margin-top: 10px;
  }

  .ls-text {
    margin-top: 10px;
    padding: 14px;
    border-radius: 14px;
  }

  .sentence {
    padding: 10px 11px;
  }

  .sentence .jp {
    font-size: 18px;
    line-height: 1.85;
  }

  .ls-bottom {
    display: flex;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
  }

  .ls-bottom a,
  .ls-bottom button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-600);
  }

  .ls-bottom .primary {
    border-color: transparent;
    background: var(--brand-500);
    color: #fff;
  }

  .ls-bottom b {
    font-family: var(--font-mono);
    font-size: 11px;
  }

  .wd-toolbar {
    gap: 8px;
  }

  .wd-filters {
    flex: 1 0 100%;
    flex-wrap: wrap;
    overflow: visible;
  }

  .wd-search {
    order: 0;
    flex: 1 1 150px;
    min-width: 0;
    max-width: none;
  }

  .wd-sort {
    order: 0;
    flex: none;
    margin-left: 0;
  }

  .word-main {
    gap: 9px;
    padding: 11px 12px;
    flex-wrap: wrap;
  }

  .word-form {
    flex: 1;
    min-width: 120px;
  }

  .word-form b {
    font-size: 17px;
  }

  .word-def {
    order: 4;
    flex-basis: 100%;
    font-size: 12px;
  }

  .word-dots {
    order: 3;
    margin-left: auto;
  }

  .word-act {
    width: 30px;
    height: 30px;
  }

  .word-detail {
    padding: 0 12px 12px;
  }

  .wd-bottom {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .qz-head {
    flex-wrap: wrap;
    gap: 8px;
  }

  .qz-title {
    flex-basis: 100%;
  }

  .qz-card {
    padding: 16px 14px;
    border-radius: 14px;
  }

  .qz-stem {
    font-size: 15.5px;
  }

  .qz-option {
    min-height: 44px;
    font-size: 13.5px;
  }

  .qz-footer {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .qz-footer button {
    height: 44px;
    padding: 0 14px;
  }

  .rs-score {
    display: block;
    padding: 20px;
    border-radius: 16px;
  }

  .rs-ring {
    width: 96px;
    height: 96px;
    margin-bottom: 14px;
  }

  .rs-ring b {
    font-size: 25px;
  }

  .rs-main h1 {
    font-size: 20px;
  }

  .rs-metrics {
    gap: 20px;
    margin-top: 14px;
  }

  .rs-metrics div b {
    font-size: 17px;
  }

  .rs-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .rs-actions .primary-btn,
  .rs-actions .ghost-btn {
    flex: 1;
    height: 44px;
  }
}

@media (max-width: 420px) {
  .mod-sub {
    display: none;
  }

  .mod-card {
    height: 82px;
  }

  .word-form {
    flex-basis: 100px;
  }

  .rs-metrics {
    justify-content: space-between;
    gap: 8px;
  }

  .rs-sections {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   学习主链路补充
   ============================================================ */
[hidden] {
  display: none !important;
}

.mat-card {
  display: flex;
  flex-direction: column;
}

.mat-name,
.mat-meta,
.mat-bar {
  display: block;
}

.st-hero-main {
  flex: 1;
  min-width: 0;
}

/* 弹层限制在 H5 机身内（电脑强制手机预览时不会跑出外框） */
.home-stage .dlg-mask {
  position: absolute;
}

html.is-mobile .dlg-mask {
  padding: 18px;
}

html.is-mobile .dlg {
  width: 100%;
  padding: 22px 18px 18px;
  border-radius: 18px;
}

html.is-mobile .dlg h3 {
  font-size: 18px;
}

html.is-mobile .dlg-btn {
  height: 44px;
}

.qz-page,
.rs-page,
.wd-page {
  width: 100%;
}

.rs-eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--on-dark-3);
}

.qz-page {
  max-width: 880px;
  margin: 0 auto;
}

.rs-page,
.wd-page {
  max-width: 1000px;
  margin: 0 auto;
}

.qz-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-400);
}

/* 空状态 */
.empty-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 52px 24px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fbfcfe;
  text-align: center;
}

.empty-block .e-ico {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: var(--brand-050);
  color: var(--brand-600);
}

.empty-block .e-ico .ico {
  width: 27px;
  height: 27px;
}

.empty-block h3 {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
}

.empty-block p {
  max-width: 320px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-400);
}

.empty-block .primary-btn {
  margin-top: 6px;
}

/* 课文页右侧提示 */
.ls-tip {
  margin-top: 9px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink-400);
}

/* 图标尺寸校正（页面内联 width 需覆盖全局 .ico 20px） */
.st-cta .ico { width: 14px; height: 14px; }
.ls-tool .ico { width: 12px; height: 12px; }
.ls-bottom .ico { width: 15px; height: 15px; }
.word-row .wd-add .ico { width: 13px; height: 13px; }
.rs-pending .ico { width: 12px; height: 12px; }

.word-detail .wd-forms {
  margin-top: 8px;
  font-size: 11px;
  color: var(--ink-400);
}

/* 手机端返回键触控面积 */
html.is-mobile .top-back {
  width: 38px;
  height: 38px;
  margin-right: 0;
}

html.is-mobile .ctx-text,
html.is-mobile .ctx-exam {
  white-space: nowrap;
}

html.is-mobile .ls-head > div {
  min-width: 0;
}

html.is-mobile .ls-head .page-eyebrow {
  font-size: 8.5px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.is-mobile .st-hero::after {
  font-size: 110px;
  bottom: -26px;
}

/* 手机壳可读性与触控补充 */
@media (max-width: 1023px) {
  .page-eyebrow,
  .rs-eyebrow {
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  .unit-meta,
  .lesson-info span,
  .mat-meta,
  .word-form span,
  .word-pos,
  .qz-type,
  .qz-hint,
  .rs-ans,
  .rs-exp,
  .rs-sec span,
  .rs-pending,
  .rs-tag,
  .vocab span,
  .word-detail .wd-forms,
  .ls-mode button,
  .ls-tool,
  .rs-metrics div span {
    font-size: 12px;
  }

  .ls-tool {
    height: 32px;
    padding: 0 9px;
  }

  .ls-play {
    width: 38px;
    height: 38px;
  }

  .ls-time {
    font-size: 11px;
  }

  .ls-mode button {
    height: 32px;
  }

  .wd-chip {
    height: 34px;
    font-size: 12px;
  }

  .word-act {
    width: 34px;
    height: 34px;
  }

  .lact {
    width: 36px;
    height: 36px;
  }

  .st-cta,
  .ls-mark {
    height: 40px;
  }

  .wd-bottom .primary-btn,
  .ls-bottom a,
  .ls-bottom button {
    height: 44px;
  }

  .unit-state {
    height: 22px;
    font-size: 12px;
  }
}

/* ============================================================
   ST-16 单词背诵首页（SRS）
   ============================================================ */
.ws-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  padding: 24px 26px;
  border-radius: 20px;
  background:
    radial-gradient(480px 300px at 86% -20%, rgba(122, 162, 255, 0.55), transparent 66%),
    linear-gradient(135deg, #123a8f 0%, #0a1d47 72%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(10, 25, 60, 0.24);
}

.ws-hero::after {
  content: "単";
  position: absolute;
  right: 20%;
  bottom: -40px;
  font-family: var(--font-lang);
  font-size: 170px;
  line-height: 1;
  opacity: 0.07;
  pointer-events: none;
}

.ws-hero-main {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.ws-eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.55);
}

.ws-hero h1 {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.ws-hero h1 b {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ws-sub {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
}

.ws-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.ws-actions .primary-btn {
  background: #fff;
  color: #14306b;
  box-shadow: 0 8px 20px rgba(4, 14, 36, 0.22);
}

.ws-actions .primary-btn:hover {
  background: #f2f6ff;
}

.ws-actions .ghost-btn {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #e8efff;
}

.ws-actions .ghost-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.ws-hero-side {
  position: relative;
  z-index: 1;
  flex: none;
  text-align: center;
}

.ws-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(#8fb0ff calc(var(--v, 0) * 1%), rgba(255, 255, 255, 0.16) 0);
}

.ws-ring::before {
  content: "";
  position: absolute;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #0e2660;
}

.ws-ring span {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 700;
}

.ws-ring small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
}

.ws-hero-side p {
  margin-top: 8px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
}

.ws-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ws-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
}

.ws-stat .s-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--brand-050);
  color: var(--brand-600);
}

.ws-stat .s-ico.amber {
  background: #fff5e6;
  color: #c77700;
}

.ws-stat .s-ico.mint {
  background: #e8f9f3;
  color: var(--success-deep);
}

.ws-stat .s-ico .ico {
  width: 18px;
  height: 18px;
}

.ws-stat span {
  display: block;
  font-size: 11.5px;
  color: var(--ink-400);
}

.ws-stat b {
  display: block;
  margin-top: 2px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.2;
}

.ws-stat b small {
  margin-left: 2px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-400);
}

.ws-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 14px;
  margin-top: 16px;
}

.ws-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.ws-panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}

.ws-panel h3::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--brand-500);
}

.ws-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--ink-600);
}

.ws-row b {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brand-600);
}

.ws-range {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--brand-500);
}

.ws-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ws-mode {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-600);
}

.ws-mode.is-on {
  border-color: var(--brand-500);
  background: var(--brand-050);
  color: var(--brand-600);
}

.ws-libs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.ws-lib {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fafbfd;
  text-align: left;
}

.ws-lib.is-on {
  border-color: var(--brand-200);
  background: var(--brand-050);
}

.ws-lib b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
}

.ws-lib span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-400);
}

.ws-lib em {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  color: var(--brand-600);
  white-space: nowrap;
}

.ws-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.ws-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-400);
}

.ws-day .bar {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 64px;
  border-radius: 6px;
  background: #f4f6fa;
}

.ws-day .bar i {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: var(--brand-100);
}

.ws-day.is-on .bar i {
  background: linear-gradient(180deg, #5b8bff, #2f6bff);
}

.ws-day.is-now {
  color: var(--brand-600);
  font-weight: 600;
}

/* ============================================================
   ST-17 背诵卡片
   ============================================================ */
.fc-wrap {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 4px 0 16px;
}

.fc-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.fc-count {
  flex: none;
  font-size: 11.5px;
  color: var(--ink-400);
  white-space: nowrap;
}

.fc-count b {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-900);
}

.fc-progress {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9edf4;
}

.fc-progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--brand-500);
  transition: width 0.25s var(--ease-soft);
}

.fc-pos {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-400);
}

.fc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 330px;
  padding: 32px 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 44px rgba(15, 30, 60, 0.08);
  text-align: center;
  transition: transform 0.18s var(--ease-soft), opacity 0.18s var(--ease-soft);
}

.fc-card.is-out {
  transform: translateX(-44px);
  opacity: 0;
}

.fc-lib {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--ink-400);
}

.fc-word {
  margin-top: 10px;
  font-family: var(--font-lang);
  font-size: 52px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-900);
  word-break: break-all;
}

.fc-kana {
  margin-top: 6px;
  font-family: var(--font-lang);
  font-size: 14px;
  color: var(--ink-400);
}

.fc-speak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  margin-top: 14px;
  padding: 0 14px;
  border-radius: 99px;
  background: var(--brand-050);
  color: var(--brand-600);
  font-size: 12px;
  font-weight: 600;
}

.fc-speak .ico {
  width: 15px;
  height: 15px;
}

.fc-reveal {
  width: 100%;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.fc-def {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.5;
}

.fc-ex {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  text-align: left;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-600);
}

.fc-ex b {
  display: block;
  font-family: var(--font-lang);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
}

.fc-ex span {
  display: block;
  margin-top: 3px;
  color: var(--ink-400);
}

.fc-forms {
  width: 100%;
  margin-top: 10px;
  text-align: left;
  font-size: 11px;
  color: var(--ink-400);
}

.fc-flip {
  margin-top: 18px;
  padding-bottom: 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-400);
}

.fc-spell-input {
  width: 100%;
  height: 50px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-lang);
  font-size: 19px;
  text-align: center;
}

.fc-spell-input:focus {
  border-color: var(--brand-400);
  outline: 0;
  box-shadow: var(--shadow-focus);
}

.fc-feedback {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-400);
}

.fc-feedback.ok {
  color: var(--success-deep);
}

.fc-feedback.bad {
  color: var(--danger-deep);
}

.fc-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
}

.fc-opt {
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 12.5px;
  color: var(--ink-600);
  text-align: left;
}

.fc-opt:hover {
  border-color: var(--brand-200);
}

.fc-opt.is-on {
  border-color: var(--brand-500);
  background: var(--brand-050);
  color: var(--ink-900);
}

.fc-opt.ok {
  border-color: #bfeadd;
  background: #e8f9f3;
  color: var(--success-deep);
}

.fc-opt.bad {
  border-color: #f6d7c8;
  background: #fffdfb;
  color: var(--danger-deep);
}

.fc-rates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.fc-rates button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-600);
  transition: all var(--dur-fast) var(--ease-soft);
}

.fc-rates button small {
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-400);
}

.fc-rates button:hover {
  transform: translateY(-1px);
}

.fc-rates button[data-rate="0"] {
  border-color: #f6d7c8;
  background: #fffdfb;
  color: var(--danger-deep);
}

.fc-rates button[data-rate="1"] {
  border-color: #f8e3bb;
  background: #fffdf6;
  color: var(--warn-deep);
}

.fc-rates button[data-rate="2"] {
  border-color: #bfeadd;
  background: #f7fdfa;
  color: var(--success-deep);
}

.fc-rates button[data-rate="3"] {
  border-color: var(--brand-200);
  background: var(--brand-050);
  color: var(--brand-600);
}

.fc-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-400);
}

/* ============================================================
   ST-18 背诵结算
   ============================================================ */
.wr-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #f8e3bb;
  border-radius: 14px;
  background: linear-gradient(90deg, #fffaef 0%, #fff6e2 100%);
}

.wr-badge .b-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff1d6;
  color: #d98200;
  animation: ring-pulse 2.6s infinite;
}

.wr-badge .b-ico .ico {
  width: 20px;
  height: 20px;
}

.wr-badge b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}

.wr-badge span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-600);
}

.wr-next {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid #dbe6ff;
  border-radius: 12px;
  background: #f7faff;
  font-size: 12px;
  color: var(--brand-600);
}

.wr-next .ico {
  width: 15px;
  height: 15px;
}

.wr-next b {
  font-family: var(--font-mono);
  font-size: 13px;
}

.wr-words {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.wr-word {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.wr-word b {
  flex: none;
  font-family: var(--font-lang);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-900);
}

.wr-word span {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--ink-600);
}

.wr-word em {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-style: normal;
  color: var(--danger-deep);
}

/* ============================================================
   ST-19 生词本
   ============================================================ */
.wb-page {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.wb-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: #eef1f6;
  margin-bottom: 12px;
}

.wb-tab {
  height: 32px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-600);
}

.wb-tab.is-on {
  background: #fff;
  color: var(--brand-600);
  box-shadow: 0 1px 3px rgba(20, 40, 80, 0.1);
}

.wb-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.wb-tools .wd-search {
  flex: 1;
  max-width: 320px;
}

.wb-src {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.wb-src.wrong {
  background: #fdf0e9;
  color: var(--danger-deep);
}

.wb-src.manual {
  background: var(--brand-050);
  color: var(--brand-600);
}

.wb-date {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-400);
}

.wb-del {
  flex: none;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
  color: var(--ink-600);
}

.wb-del:hover {
  border-color: #f6d7c8;
  background: #fffdfb;
  color: var(--danger-deep);
}

/* ============================================================
   SRS 响应式
   ============================================================ */
@media (max-width: 1180px) {
  .ws-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1023px) {
  .ws-hero {
    display: block;
    padding: 18px;
    border-radius: 16px;
  }

  .ws-hero h1 {
    font-size: 20px;
  }

  .ws-hero h1 b {
    font-size: 28px;
  }

  .ws-sub {
    font-size: 12px;
  }

  .ws-actions {
    margin-top: 14px;
  }

  .ws-actions .primary-btn,
  .ws-actions .ghost-btn {
    height: 44px;
    font-size: 13px;
  }

  .ws-hero-side {
    position: absolute;
    top: 16px;
    right: 16px;
    text-align: center;
  }

  .ws-ring {
    width: 64px;
    height: 64px;
  }

  .ws-ring::before {
    width: 52px;
    height: 52px;
  }

  .ws-ring span {
    font-size: 15px;
  }

  .ws-ring small {
    display: none;
  }

  .ws-hero-side p {
    display: none;
  }

  .ws-stats {
    gap: 8px;
    margin-top: 10px;
  }

  .ws-stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
  }

  .ws-stat .s-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .ws-stat .s-ico .ico {
    width: 15px;
    height: 15px;
  }

  .ws-stat span {
    font-size: 11px;
  }

  .ws-stat b {
    font-size: 16px;
  }

  .ws-grid {
    margin-top: 12px;
    gap: 10px;
  }

  .ws-panel {
    padding: 14px;
    border-radius: 14px;
  }

  .ws-panel h3 {
    font-size: 14px;
  }

  .ws-mode {
    height: 36px;
    font-size: 12px;
  }

  .ws-day .bar {
    height: 48px;
  }

  .fc-wrap {
    padding-bottom: 8px;
  }

  .fc-card {
    min-height: 290px;
    padding: 22px 16px;
    border-radius: 18px;
  }

  .fc-word {
    font-size: 42px;
  }

  .fc-def {
    font-size: 16px;
  }

  .fc-rates {
    gap: 6px;
  }

  .fc-rates button {
    min-height: 60px;
    font-size: 11.5px;
  }

  .fc-rates button small {
    font-size: 9.5px;
  }

  .fc-options {
    grid-template-columns: 1fr;
  }

  .wb-tools .wd-search {
    flex: 1 0 100%;
    max-width: none;
  }

  .wb-date {
    display: none;
  }
}

@media (max-width: 420px) {
  .ws-stat b {
    font-size: 15px;
  }

  .ws-stat span {
    font-size: 10.5px;
  }

  .ws-eyebrow {
    font-size: 8.5px;
  }

  .ws-day {
    gap: 4px;
    font-size: 9px;
  }

  .fc-word {
    font-size: 36px;
  }

  .fc-rates button {
    font-size: 11px;
  }
}

/* ============================================================
   ST-25 错题本
   ============================================================ */
.qb-page {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.qb-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.qb-stat {
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.qb-stat span {
  display: block;
  font-size: 11.5px;
  color: var(--ink-400);
}

.qb-stat b {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink-900);
}

.qb-stat b small {
  margin-left: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-400);
}

.qb-stat.danger b {
  color: var(--danger-deep);
}

.qb-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.qb-select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  color: var(--ink-600);
}

.qb-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: #eef1f6;
}

.qb-toggle button {
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-600);
}

.qb-toggle button.is-on {
  background: #fff;
  color: var(--brand-600);
  box-shadow: 0 1px 3px rgba(20, 40, 80, 0.1);
}

.qb-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qb-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft);
}

.qb-item.is-on {
  border-color: var(--brand-300, #9db9ff);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.08);
}

.qb-check {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--brand-500);
}

.qb-body {
  flex: 1;
  min-width: 0;
}

.qb-stem {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-900);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.qb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.qb-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: #f2f4f8;
  font-size: 10.5px;
  color: var(--ink-600);
  white-space: nowrap;
}

.qb-tag.type {
  background: var(--brand-050);
  color: var(--brand-600);
}

.qb-tag.kp {
  background: #fff7ea;
  color: var(--warn-deep);
}

.qb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--ink-400);
}

.qb-err {
  color: var(--danger-deep);
  font-weight: 600;
}

.qb-redo {
  flex: none;
  align-self: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--brand-200);
  border-radius: 8px;
  background: var(--brand-050);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-600);
}

.qb-redo:hover {
  background: var(--brand-100);
}

.qb-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 12px 32px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.qb-dock span {
  font-size: 12.5px;
  color: var(--ink-600);
}

.qb-dock span b {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--brand-600);
}

.qb-dock .primary-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 手动添加错题表单 */
.qb-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  text-align: left;
}

.qb-form label {
  font-size: 11.5px;
  color: var(--ink-600);
}

.qb-field {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--ink-900);
}

textarea.qb-field {
  min-height: 64px;
  resize: vertical;
}

.qb-field:focus {
  border-color: var(--brand-400);
  outline: 0;
  box-shadow: var(--shadow-focus);
}

/* ============================================================
   ST-26 错题重做
   ============================================================ */
.qr-page {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.qr-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid #f8e3bb;
  border-radius: 10px;
  background: #fffaf0;
  font-size: 12px;
  color: var(--warn-deep);
}

.qr-tip .ico {
  width: 15px;
  height: 15px;
}

.qr-page .qz-footer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* ============================================================
   ST-27 学情总览
   ============================================================ */
.sg-page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.sg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.sg-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: #eef1f6;
}

.sg-seg button {
  height: 32px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-600);
}

.sg-seg button.is-on {
  background: #fff;
  color: var(--brand-600);
  box-shadow: 0 1px 3px rgba(20, 40, 80, 0.1);
}

.sg-scope {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--ink-400);
}

.sg-scope b {
  color: var(--brand-600);
  font-weight: 600;
}

.sg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sg-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.sg-card.wide {
  grid-column: 1 / -1;
}

.sg-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}

.sg-card h3::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--brand-500);
}

.sg-sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.sg-word {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
}

.sg-ring {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: conic-gradient(var(--success) calc(var(--v, 68) * 1%), #e7f2ee 0);
}

.sg-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #fff;
}

.sg-ring b {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 700;
  color: var(--success-deep);
}

.sg-ring b small {
  font-size: 10px;
  font-weight: 500;
}

.sg-bars {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sg-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--ink-600);
}

.sg-bar-row > span {
  flex: none;
  width: 52px;
}

.sg-track {
  flex: 1;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #eef1f6;
}

.sg-track i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--brand-500);
}

.sg-track i.mint {
  background: var(--success);
}

.sg-track i.amber {
  background: var(--warn);
}

.sg-bar-row b {
  flex: none;
  width: 34px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-600);
}

.sg-metrics {
  display: flex;
  gap: 30px;
  margin: 6px 0 14px;
}

.sg-metrics span {
  display: block;
  font-size: 11px;
  color: var(--ink-400);
}

.sg-metrics b {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-900);
}

.sg-metrics b small {
  margin-left: 2px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-400);
}

.sg-line {
  width: 100%;
  height: auto;
  margin-top: 8px;
}

.sg-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--ink-400);
}

.sg-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 2px;
}

.sg-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.sg-week .ws-day .bar {
  height: 86px;
}

.sg-weak {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.sg-weak-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fafbfd;
}

.sg-weak-row b {
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-900);
}

.sg-weak-row span {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--ink-400);
}

.sg-weak-row em {
  flex: none;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--danger-deep);
}

.sg-weak-row a {
  flex: none;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--brand-200);
  border-radius: 7px;
  background: var(--brand-050);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-600);
  line-height: 26px;
}

.sg-log-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.sg-log-entry.wide {
  grid-column: 1 / -1;
}

.sg-log-entry .l-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-050);
  color: var(--brand-600);
}

.sg-log-entry .l-ico .ico {
  width: 20px;
  height: 20px;
}

.sg-log-entry b {
  display: block;
  font-size: 13.5px;
  color: var(--ink-900);
}

.sg-log-entry span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.sg-log-entry .l-arrow {
  margin-left: auto;
  color: var(--ink-400);
}

.sg-log-entry .l-arrow .ico {
  width: 16px;
  height: 16px;
}

/* ============================================================
   ST-28 学习日志
   ============================================================ */
.sl-page {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.sl-heat {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 4px;
  margin-top: 14px;
}

.sl-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #f1f4f9;
}

.sl-cell.l1 { background: #dce7ff; }
.sl-cell.l2 { background: #b9ceff; }
.sl-cell.l3 { background: #7fa3ff; }
.sl-cell.l4 { background: #2f6bff; }

.sl-months {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-400);
}

.sl-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 10px;
  color: var(--ink-400);
}

.sl-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.sl-legend i.l1 { background: #dce7ff; }
.sl-legend i.l2 { background: #b9ceff; }
.sl-legend i.l3 { background: #7fa3ff; }
.sl-legend i.l4 { background: #2f6bff; }

.sl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.sl-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.sl-date b {
  display: block;
  font-size: 12.5px;
  color: var(--ink-900);
}

.sl-date span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--ink-400);
}

.sl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11.5px;
  color: var(--ink-600);
}

.sl-meta b {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink-900);
}

.sl-ok {
  color: var(--success-deep);
  font-weight: 600;
}

.sl-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #e8f9f3;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--success-deep);
  white-space: nowrap;
}

.sl-check.miss {
  background: #f2f4f8;
  color: var(--ink-400);
}

.sl-check .ico {
  width: 12px;
  height: 12px;
}

@media (max-width: 1023px) {
  .qb-stat {
    padding: 11px;
    border-radius: 12px;
  }

  .qb-stat span {
    font-size: 10.5px;
  }

  .qb-stat b {
    font-size: 21px;
  }

  .qb-select {
    height: 40px;
    font-size: 12.5px;
  }

  .qb-toggle button {
    height: 34px;
    font-size: 12px;
  }

  .qb-item {
    padding: 12px;
    gap: 10px;
  }

  .qb-stem {
    font-size: 12.5px;
  }

  .qb-redo {
    height: 40px;
    padding: 0 10px;
  }

  .qb-dock {
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }

  .qb-dock .primary-btn {
    height: 44px;
  }

  .sg-toolbar {
    gap: 8px;
  }

  .sg-seg button {
    height: 36px;
    padding: 0 12px;
  }

  .sg-scope {
    flex: 1 0 100%;
    margin-left: 0;
  }

  .sg-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sg-card {
    padding: 14px;
    border-radius: 14px;
  }

  .sg-word {
    gap: 14px;
  }

  .sg-ring {
    width: 88px;
    height: 88px;
  }

  .sg-ring b {
    font-size: 19px;
  }

  .sg-metrics {
    gap: 20px;
  }

  .sg-metrics b {
    font-size: 19px;
  }

  .sg-week .ws-day .bar {
    height: 64px;
  }

  .sg-weak-row {
    padding: 8px 10px;
  }

  .sl-heat {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 3px;
  }

  .sl-row {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
  }

  .sl-meta {
    grid-column: 1 / -1;
    order: 3;
    gap: 12px;
  }

  .sl-check {
    order: 2;
  }
}

