/* =========================================================
   ECHO · 英语跟读
   冷白 + 黑按钮 + 单一蓝点缀（与登录页一致）
   ========================================================= */

:root {
  color-scheme: light;

  --bg: #f6f7f9;
  --bg-2: #eef0f4;
  --card: #ffffff;

  --ink: #0e1116;
  --ink-2: #2a3038;
  --muted: #5b6472;
  --faint: #8b93a1;

  --line: #e4e7ec;
  --line-2: #d7dbe2;

  --accent: #2f4dff;
  --accent-strong: #1f38d6;
  --accent-ink: #1f38d6;
  --accent-soft: rgba(47, 77, 255, 0.09);
  --accent-line: rgba(47, 77, 255, 0.26);

  --indigo: #2f4dff;
  --indigo-deep: #1f38d6;
  --indigo-soft: rgba(47, 77, 255, 0.09);
  --indigo-line: rgba(47, 77, 255, 0.26);

  --lemon: #2f4dff;
  --lemon-soft: rgba(47, 77, 255, 0.14);
  --sky: #2f4dff;
  --violet: #2f4dff;
  --rose: #1f38d6;
  --amber: #5b6472;
  --track: #e7eaf0;

  /* 兼容旧变量名 */
  --mint: var(--accent);
  --mint-deep: var(--accent);
  --mint-soft: var(--accent-soft);
  --mint-line: var(--accent-line);

  --r-xl: 18px;
  --r-lg: 14px;
  --r-md: 11px;
  --r-sm: 9px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Hiragino Sans GB", "PingFang SC",
    -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --shadow: 0 1px 2px rgba(14, 17, 22, 0.05);
  --shadow-pop: 0 18px 44px -28px rgba(14, 17, 22, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(47, 77, 255, 0.18); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ---------- 容器 ---------- */

.shell {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.spacer { flex: 1; }
.row { display: flex; align-items: center; }
.stack { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  /* 原 backdrop-filter 常驻滚动内容之上，逐帧整条重算模糊；改成静态半透明底 + 顶部高光 */
  background: rgba(246, 247, 249, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.brand__mark {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--ink);
}

.brand__mark svg { width: 15px; height: 15px; stroke: #fff; }
.brand__name small {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav__link:hover { color: var(--ink); background: var(--bg-2); }
.nav__link.is-active { color: var(--ink); font-weight: 600; background: var(--bg-2); }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12.5px;
  color: var(--ink-2);
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
}

/* 免登录模式：右上角不再显示登录/注册，改为直接进入学习 */
.user-chip.is-plain {
  border: 0;
  background: none;
  padding: 0;
}
.chip-enter {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s var(--ease);
}
.chip-enter:hover { background: #2a2f3a; color: #fff; }
@media (max-width: 420px) {
  .chip-enter { padding: 0 11px; font-size: 11.5px; }
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.icon-btn:hover { background: var(--bg-2); color: var(--ink); }

/* ---------- 按钮 ---------- */

.btn {
  --h: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.btn:hover { background: var(--bg-2); border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn--primary {
  background: #12151b;
  border-color: #12151b;
  color: #fff;
  font-weight: 600;
}

.btn--primary:hover {
  background: #242935;
  border-color: #242935;
}

.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn--ghost:hover { background: var(--bg-2); border-color: transparent; }

.btn--sm { --h: 32px; padding: 0 12px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn--block { width: 100%; }

/* ---------- 输入 ---------- */

.field { display: flex; flex-direction: column; gap: 7px; }

.field__label {
  font-size: 12px;
  color: var(--muted);
}

.input {
  height: 44px;
  width: 100%;
  padding: 0 13px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
  font-size: 14.5px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--indigo-line); box-shadow: 0 0 0 3px var(--indigo-soft); }
.input--lg { height: 46px; }

.search { position: relative; flex: 1; min-width: 200px; }

.search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--faint);
  pointer-events: none;
}

.search .input { height: 38px; padding-left: 38px; }

/* ---------- 分段控件 ---------- */

.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.seg__item {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 7px;
  cursor: pointer;
  font-family: var(--font-sans);
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.seg__item:hover { color: var(--ink); }
.seg__item.is-active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }

/* ---------- 徽标 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--ink-2);
}

.badge.lv-1, .badge.lv-2, .badge.lv-3, .badge.lv-4, .badge.lv-5 {
  background: #eef0f4; border-color: #dfe3ea; color: #2a3038;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
}

/* ---------- 进度条 ---------- */

.meter {
  position: relative;
  height: 4px;
  border-radius: 99px;
  background: var(--track);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.35s var(--ease);
}

/* ---------- 动效 ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes shimmer {
  to { background-position: -120% 0; }
}

.rise {
  opacity: 0;
  animation: rise 0.5s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

/* ---------- 提示 ---------- */

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--line-2);
  font-size: 13px;
  color: var(--ink);
  box-shadow: 0 8px 24px -12px rgba(23, 22, 19, 0.28);
  animation: rise 0.3s var(--ease) both;
}

.toast--error { border-color: #e4c3c1; color: var(--rose); }
.toast--ok { border-color: #d8d5cd; }

/* ---------- 通用卡片 ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}

.glass { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); }

.empty {
  padding: 60px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.empty__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  color: var(--faint);
  border: 1px solid var(--line);
}

.empty__icon svg { width: 18px; height: 18px; }

.skeleton {
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--card);
}

.skeleton__media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(100deg, #f6f7f9 20%, #eceff3 40%, #f6f7f9 60%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
}

.skeleton__line {
  height: 10px;
  margin: 12px 14px;
  border-radius: 5px;
  background: #f6ede2;
}
.skeleton__line--short { width: 40%; }

/* =========================================================
   登录页 · 冷白底 / 黑按钮 / 单一蓝点缀
   ========================================================= */

.auth-page {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #0e1116;
  --muted: #5b6472;
  --faint: #8b93a1;
  --line: #e4e7ec;
  --line-2: #e4e7ec;
  --accent: #2f4dff;
  --accent-soft: rgba(47, 77, 255, 0.09);
  --btn: #12151b;
  --btn-hover: #242935;
  --error: #bf3b2f;

  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
}

.auth-page ::selection { background: rgba(47, 77, 255, 0.22); }

.auth-top {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-brand { display: inline-flex; align-items: center; gap: 10px; }

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
}

.brand-mark svg { width: 15px; height: 15px; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.auth-top__note { font-size: 12.5px; color: var(--faint); }

.auth-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 32px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 404px;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  min-height: calc(100svh - 80px);
}

.auth-title {
  margin: 0;
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.auth-lead {
  margin: 22px 0 0;
  max-width: 34ch;
  font-size: 16px;
  line-height: 1.72;
  color: var(--muted);
}

/* 产品画面片段 */

.preview {
  position: relative;
  margin-top: 38px;
  max-width: 504px;
  padding: 18px 20px 16px;
  border-radius: 16px;
  background: #0f1217;
  color: #eef1f6;
}

.preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #8d97a6;
}

.preview__en {
  margin: 16px 0 0;
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.preview__en b.demo-word {
  padding: 0 2px;
  border-radius: 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #fff;
  font-weight: 500;
  animation: demoWord 7s ease-in-out infinite;
}

/* 首页左侧「点词查义」循环演示：光标 → 点击 → 释义卡 → 离开 */
.demo-cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 7;
  width: 19px;
  height: 19px;
  opacity: 0;
  pointer-events: none;
  transform: translate(var(--cx0, 0px), var(--cy0, 0px));
  animation: demoCursor 7s cubic-bezier(0.42, 0, 0.2, 1) infinite;
}

.demo-cursor svg {
  display: block;
  width: 19px;
  height: 19px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5));
}

.demo-pop {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  width: 198px;
  padding: 10px 12px 11px;
  border-radius: 10px;
  background: #fff;
  color: #12151b;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(var(--px, 0px), var(--py, 0px));
  animation: demoPop 7s ease-in-out infinite;
}

.demo-pop__head {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.demo-pop__word {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.demo-pop__phon {
  font-size: 10.5px;
  color: #7a8494;
}

.demo-pop__tag {
  display: inline-block;
  margin-top: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid #e2e6ec;
  font-size: 10px;
  color: #6b7482;
}

.demo-pop__mean {
  margin: 7px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #12151b;
}

.demo-pop__eg {
  margin: 6px 0 0;
  padding-top: 6px;
  border-top: 1px solid #eef1f5;
  font-size: 11px;
  line-height: 1.5;
  color: #8b94a2;
}

@keyframes demoCursor {
  0% { opacity: 0; transform: translate(var(--cx0), var(--cy0)) scale(1); }
  7% { opacity: 1; transform: translate(var(--cx0), var(--cy0)) scale(1); }
  25% { opacity: 1; transform: translate(var(--cxw), var(--cyw)) scale(1); }
  28% { transform: translate(var(--cxw), var(--cyw)) scale(0.76); }
  31% { transform: translate(var(--cxw), var(--cyw)) scale(1); }
  62% { opacity: 1; transform: translate(var(--cxw), var(--cyw)) scale(1); }
  76% { opacity: 1; transform: translate(var(--cx0), var(--cy0)) scale(1); }
  85%, 100% { opacity: 0; transform: translate(var(--cx0), var(--cy0)) scale(1); }
}

@keyframes demoWord {
  0%, 23% { background: transparent; border-bottom-color: rgba(255, 255, 255, 0.45); }
  28%, 56% { background: var(--accent); border-bottom-color: transparent; }
  64%, 100% { background: transparent; border-bottom-color: rgba(255, 255, 255, 0.45); }
}

@keyframes demoPop {
  0%, 28% {
    opacity: 0;
    transform: translate(var(--px), var(--py)) translateY(4px) scale(0.97);
  }
  33% {
    opacity: 1;
    transform: translate(var(--px), var(--py)) translateY(0) scale(1);
  }
  56% { opacity: 1; }
  64%, 100% {
    opacity: 0;
    transform: translate(var(--px), var(--py)) translateY(3px) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-cursor { display: none; }
  .demo-word { animation: none; }
  .demo-pop {
    opacity: 1;
    animation: none;
    transform: translate(var(--px, 0px), var(--py, 0px));
  }
}

.preview__cn { margin: 10px 0 0; font-size: 13px; color: #99a3b2; }

.preview__ctrl {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: #8d97a6;
}

.preview__play {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #0f1217;
  font-size: 9px;
}

.preview__track {
  position: relative;
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
}

.preview__track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  border-radius: 2px;
  background: #fff;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

.auth-points li { display: inline-flex; align-items: center; gap: 7px; }
.auth-points i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.auth-side { display: flex; justify-content: center; }

.auth-card {
  width: 100%;
  max-width: 404px;
  padding: 28px 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.auth-card__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-card__sub { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }

.auth__tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 22px 0 22px;
  background: #f2f4f7;
  border-radius: 11px;
}

.auth__tab {
  flex: 1;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.auth__tab:hover { color: var(--ink); }
.auth__tab.is-active { background: #fff; color: var(--ink); font-weight: 600; }

.auth__form { display: flex; flex-direction: column; gap: 14px; }

.auth-page .field { display: flex; flex-direction: column; gap: 7px; }
.auth-page .field__label { font-size: 12.5px; color: var(--muted); }
.auth-page .field__hint { font-size: 12px; color: var(--faint); }

.auth-page .input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-page .input::placeholder { color: var(--faint); }
.auth-page .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.pass__pw { position: relative; }
.pass__pw .input { padding-right: 42px; }

.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.pw-toggle:hover { color: var(--ink); background: #f2f4f7; }
.pw-toggle svg { width: 18px; height: 18px; }
.pw-toggle .eye-off { display: none; }
.pw-toggle.is-on .eye-open { display: none; }
.pw-toggle.is-on .eye-off { display: block; }

.auth__error {
  display: none;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--error);
}

.auth__error.is-on { display: block; }

.auth__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 48px;
  margin-top: 2px;
  border: 0;
  border-radius: 10px;
  background: var(--btn);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.auth__submit:hover { background: var(--btn-hover); }
.auth__submit:active { transform: translateY(1px); }
.auth__submit:disabled { opacity: 0.6; cursor: default; }

.auth__spinner {
  display: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.75s linear infinite;
}

.auth__submit.is-loading .auth__spinner { display: block; }

.auth__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--faint);
}

.auth__switch {
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.auth__switch:hover { color: var(--ink); }
.auth__switch strong { color: var(--accent); font-weight: 500; }
.auth__foot b { color: var(--ink); font-weight: 500; }
.auth__foot a { color: var(--accent); }

.auth__kbd { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); white-space: nowrap; }

.auth__kbd kbd {
  font-family: inherit;
  font-size: 11.5px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
}

.auth__guest {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--faint);
  text-align: center;
}

.auth__guest a { color: var(--accent); text-decoration: none; }
.auth__guest a:hover { text-decoration: underline; }

/* hidden 属性优先于任何布局类（.field 等用了 display:flex） */
[hidden] { display: none !important; }

@keyframes authRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-intro > * { animation: authRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
.auth-intro > *:nth-child(1) { animation-delay: 0.04s; }
.auth-intro > *:nth-child(2) { animation-delay: 0.1s; }
.auth-intro > *:nth-child(3) { animation-delay: 0.16s; }
.auth-intro > *:nth-child(4) { animation-delay: 0.22s; }
.auth-card { animation: authRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.26s both; }

@media (max-width: 980px) {
  .auth-main {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 28px;
    min-height: 0;
  }
  .auth-side { order: -1; }
  .auth-card { max-width: 440px; }
  .preview { max-width: none; }
  .auth-title { font-size: clamp(30px, 7vw, 42px); }
  .auth-lead { max-width: 52ch; }
}

@media (max-width: 640px) {
  .auth-top { padding: 20px 20px 0; }
  .auth-top__note { display: none; }
  .auth-main { padding: 20px 20px 48px; gap: 32px; }
  .auth-card { padding: 22px 20px 18px; }
  .preview { margin-top: 30px; padding: 16px; }
  .preview__en { font-size: 18px; }
  .auth-points { gap: 6px 16px; margin-top: 24px; }
  .auth__kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-intro > *, .auth-card { animation: none !important; }
}

/* =========================================================
   课程库
   ========================================================= */

.library-page { padding: 30px 0 40px; }

.lib-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.lib-hero__intro { max-width: 600px; }

.lib-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--indigo-deep);
}

.lib-kicker::before {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.lib-title {
  margin: 12px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.lib-title em {
  font-style: normal;
  color: var(--accent);
}

.lib-desc { margin: 0; font-size: 14px; color: var(--muted); }

/* 继续上次学习 */
.continue-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 420px;
  max-width: 100%;
  padding: 12px 14px 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.continue-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}

.continue-card:hover {
  transform: translateY(-2px);
  border-color: var(--indigo-line);
  box-shadow: var(--shadow-pop);
}

.continue-card__cover {
  width: 104px;
  height: 74px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-2);
}

.continue-card__cover img { width: 100%; height: 100%; object-fit: cover; }

.continue-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.continue-card__kicker {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
}

.continue-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
}

.continue-card__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.continue-card__bar .meter { flex: 1; height: 3px; }
.continue-card__pct { font-family: var(--font-mono); font-size: 10px; color: var(--indigo-deep); }

.continue-card__go {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--indigo-soft);
  color: var(--indigo-deep);
}

.continue-card__go svg { width: 13px; height: 13px; }

/* 侧栏 + 主区 */
.lib-body {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.lib-side { position: sticky; top: 76px; }

.lib-side__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.lib-side__head b {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.lib-side__head span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.level-nav { display: flex; flex-direction: column; gap: 6px; }

.level-tile {
  --lv-bg: var(--bg-2);
  --lv-fg: var(--ink-2);
  --lv-solid: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--lv-bg);
  color: var(--lv-fg);
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.level-tile::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lv-solid);
  flex-shrink: 0;
}

.level-tile b {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: var(--lv-fg);
}

.level-tile span { font-size: 11.5px; color: var(--faint); margin-left: auto; }

.level-tile:hover { border-color: var(--lv-solid); }

.level-tile.is-active {
  background: var(--lv-solid);
  border-color: var(--lv-solid);
  color: #fff;
  box-shadow: 0 10px 24px -16px var(--lv-solid);
}

.level-tile.is-active b,
.level-tile.is-active span { color: #fff; }
.level-tile.is-active span { opacity: 0.76; }

.level-tile[data-level=""] {
  --lv-bg: var(--indigo-soft);
  --lv-fg: var(--indigo-deep);
  --lv-solid: var(--indigo);
}
.level-tile[data-level="1"],
.level-tile[data-level="2"],
.level-tile[data-level="3"],
.level-tile[data-level="4"],
.level-tile[data-level="5"] { --lv-bg: #eef0f4; --lv-fg: #2a3038; --lv-solid: #0e1116; }

/* 主区 */
.lib-main { min-width: 0; }

.lib-main__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.lib-main__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.lib-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--faint);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 16px;
}

.toolbar__group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.divider-v { width: 1px; height: 26px; background: var(--line); }

/* 课程卡片 */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 16px;
  padding-bottom: 50px;
}

.course {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
  opacity: 0;
  animation: rise 0.45s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

.course:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-pop);
}

.course__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  overflow: hidden;
}

.course__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.course:hover .course__cover img { transform: scale(1.05); }

.course__badge { position: absolute; top: 8px; left: 8px; }

.course__done {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  color: #fff;
  /* 卡片内几十个徽标各自 backdrop-filter 会堆出大量图层，改纯半透明底 */
  background: rgba(18, 21, 27, 0.86);
}

.course__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 13px 14px;
}

.course__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.course__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
}

.course__meta span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course__progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 2px;
}

.course__progress .meter { flex: 1; height: 3px; }
.course__pct { font-family: var(--font-mono); font-size: 10px; color: var(--indigo-deep); }

.course__start {
  margin-top: auto;
  padding-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--violet);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.load-more { display: flex; justify-content: center; padding: 8px 0 64px; }

/* =========================================================
   播放器 / 学习台
   ========================================================= */

.player-page { padding: 18px 0 60px; }

.study-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
}

.study-head__info { flex: 1; min-width: 0; }

.study-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.study-head__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 392px;
  gap: 20px;
  align-items: stretch;
}

.stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-frame {
  position: relative;
  width: 100%;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #0d0d0c;
  border: 1px solid var(--line-2);
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #0d0d0c;
}

.video-frame__cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.66);
  transform: scale(1.02);
  transition: opacity 0.2s var(--ease), visibility 0.2s;
  z-index: 2;
}

.video-frame__cover.is-hidden { opacity: 0; visibility: hidden; }

.big-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(13, 13, 12, 0.25);
  border: 0;
  cursor: pointer;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.big-play.is-hidden { opacity: 0; visibility: hidden; }

.big-play__btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 6px 24px -8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s var(--ease);
}

.big-play:hover .big-play__btn { transform: scale(1.05); }
.big-play__btn svg { width: 18px; height: 18px; color: var(--ink); }

/* 学习面板：整篇字幕为主体，当前句高亮 */
.study-panel {
  position: sticky;
  top: 74px;
  /* 光学对齐：视频是深色重块，浅色面板需略微上提才与左栏视觉等高 */
  margin-top: -12px;
  max-height: calc(100svh - 80px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 12px 14px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* 字幕内容只在卡片内部滚动，绝不溢出到卡片外 */
  overflow: hidden;
}

.sp-head { flex: 0 0 auto; }

.sp-head__row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sp-kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-right: 4px;
}

.sp-count {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  color: var(--faint);
}

.sp-count b {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.line-progress {
  height: 4px;
  border-radius: 99px;
  background: var(--track);
  overflow: hidden;
  margin: 10px 2px 4px;
}

.line-progress span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  /* 用 transform 推进，避免逐帧改 width 触发布局 */
  transition: transform 0.22s var(--ease);
}

/* 字幕列表（面板主体，内部滚动） */
.sp-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 4px;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: #d7dbe2 transparent;
}

.sp-body::-webkit-scrollbar { width: 6px; }
.sp-body::-webkit-scrollbar-thumb { background: #d7dbe2; border-radius: 99px; }

/* 字幕视图 ↔ 练习视图：滚动到学习重点时丝滑切换 */
.sp-view--subs {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  transition: opacity 0.36s var(--ease), transform 0.36s var(--ease);
}
.sp-view--quiz {
  position: absolute;
  inset: 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.study-panel.is-quiz .sp-view--subs {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}
.study-panel.is-quiz .sp-view--quiz {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.quiz-head { flex: 0 0 auto; }
.quiz-score {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-ink);
}
.quiz-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 6px;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
  scrollbar-color: #d7dbe2 transparent;
}
.quiz-body::-webkit-scrollbar { width: 6px; }
.quiz-body::-webkit-scrollbar-thumb { background: #d7dbe2; border-radius: 99px; }

.quiz-q {
  display: flex;
  flex-direction: column;
  gap: 11px;
  opacity: 1;
  transform: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.quiz-q.is-out { opacity: 0; transform: translateY(6px); }
.quiz-type {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.quiz-ask { font-size: 15.5px; line-height: 1.68; color: var(--ink); }
.quiz-ask em {
  font-style: normal;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.quiz-opts { display: flex; flex-direction: column; gap: 7px; }
.quiz-opt {
  width: 100%;
  text-align: left;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.quiz-opt:hover:not(:disabled) { border-color: var(--line-2); background: var(--bg-2); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.is-ok {
  border-color: #b9e6dd;
  background: #e9f8f4;
  color: #0b6b5e;
}
.quiz-opt.is-bad {
  border-color: #f3cdd3;
  background: #fdf0f2;
  color: #b03a4a;
}
.quiz-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}
.quiz-feedback {
  flex: 1;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--muted);
}
.quiz-feedback.is-ok { color: #0b6b5e; }
.quiz-feedback.is-bad { color: #b03a4a; }
.quiz-foot .btn { font-size: 13.5px; --h: 34px; }
.quiz-result {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  padding-top: 6px;
}
.quiz-result__score {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.quiz-result__score small { font-family: var(--font-sans); font-size: 12px; color: var(--muted); margin-left: 4px; }
.quiz-result__text { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 0; }

/* 跟读控制：嵌在视频控制条右侧，与播放控制同一条基线 */
.transport__sent {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  margin-left: 0;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.sent-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.sent-btn:hover { background: var(--card); color: var(--ink); }
.sent-btn svg { width: 12px; height: 12px; flex: 0 0 auto; }

.sent-btn--main {
  background: #12151b;
  border-color: #12151b;
  color: #fff;
  font-weight: 600;
  padding: 0 13px;
}
.sent-btn--main:hover { background: #242935; border-color: #242935; color: #fff; }

/* 播放选项：循环 / 倍速 / 中文，与「上一句 / 重听 / 下一句」同一条基线，位于其左侧 */
.transport__opts {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  margin-left: auto;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.transport__opts .pill-btn {
  height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.transport__opts .pill-btn:hover { background: var(--card); color: var(--ink); }

.transport__opts .pill-btn.is-on {
  background: var(--card);
  border-color: var(--line-2);
  color: var(--ink);
  font-weight: 600;
}

/* 控制器 */
.transport {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 13px 15px 11px;
}

.transport__scrub { display: flex; align-items: center; gap: 10px; }

.timecode {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--faint);
  white-space: nowrap;
  min-width: 38px;
  text-align: center;
}
.timecode--now { color: var(--ink-2); }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--track) var(--p, 0%));
  outline: none;
  cursor: pointer;
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--indigo);
  box-shadow: 0 2px 6px rgba(21, 29, 56, 0.18);
}

.range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--indigo);
}

.transport__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.transport__group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.ctrl {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.ctrl:hover { background: var(--bg-2); color: var(--ink); }
.ctrl svg { width: 14px; height: 14px; }

.ctrl--main {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #12151b;
  color: #fff;
}
.ctrl--main:hover { background: #242935; color: #fff; }
.ctrl--main svg { width: 14px; height: 14px; }

.pill-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  white-space: nowrap;
  transition: all 0.2s var(--ease);
}

.pill-btn:hover { background: var(--bg-2); color: var(--ink); }
.pill-btn.is-on {
  background: var(--indigo-soft);
  border-color: var(--indigo-line);
  color: var(--indigo-deep);
  font-weight: 600;
}
.pill-btn svg { width: 12px; height: 12px; }

.speed { position: relative; }

.speed__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 46px);
  gap: 2px;
  padding: 5px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line-2);
  box-shadow: 0 10px 30px -12px rgba(23, 22, 19, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s var(--ease), visibility 0.18s;
  z-index: 30;
}

.speed__menu.is-open { opacity: 1; visibility: visible; }

.speed__item {
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  border-radius: 6px;
  cursor: pointer;
}

.speed__item:hover { background: var(--bg-2); }
.speed__item.is-on { color: var(--indigo-deep); background: var(--indigo-soft); }

/* 字幕行：点击整句跳播，当前句高亮放大 */
.line {
  position: relative;
  padding: 11px 34px 11px 13px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.16s var(--ease);
  margin-bottom: 3px;
}

.line:hover { background: var(--bg-2); }

.line.is-active { background: var(--indigo-soft); }

.line.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.line__en {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s var(--ease), font-size 0.15s var(--ease);
}

.line.is-active .line__en {
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-line-clamp: 3;
}

.line__cn {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--faint);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line.is-active .line__cn { color: var(--muted); font-size: 13.5px; }

body.is-blind .line__cn { display: none; }

.line__play {
  position: absolute;
  right: 4px;
  top: 9px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--faint);
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}

.line:hover .line__play { opacity: 1; }
.line:hover .line__play:hover { background: var(--bg-2); color: var(--ink); }
.line__play svg { width: 9px; height: 9px; }

/* 词 */
.word {
  cursor: pointer;
  border-radius: 3px;
  padding: 0 1px;
  transition: background 0.12s linear, color 0.12s linear;
}

.word:hover { background: var(--accent-soft); color: var(--accent-ink); }
.word.is-said { color: var(--accent-ink); background: var(--lemon-soft); border-radius: 4px; }
.word.is-saved { border-bottom: 1px solid var(--accent-line); }

/* 查词浮层 */
.dict-pop {
  position: fixed;
  z-index: 70;
  width: 300px;
  max-width: calc(100vw - 24px);
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px -18px rgba(23, 22, 19, 0.32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}

.dict-pop.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

.dict-pop__head { display: flex; align-items: baseline; gap: 8px; padding-right: 20px; }

.dict-pop__word { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }

.dict-pop__phonetic { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.dict-pop__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.dict-pop__close:hover { background: var(--bg-2); color: var(--ink); }

.dict-pop__meanings {
  margin-top: 10px;
  max-height: 170px;
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

.dict-pop__pos {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber);
  margin-right: 5px;
}

.dict-pop__row { margin-bottom: 7px; }
.dict-pop__actions { display: flex; gap: 6px; margin-top: 11px; }

.dict-pop__loading {
  padding: 12px 0 4px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

.spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--track);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

/* =========================================================
   学习档案
   ========================================================= */

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 34px 0 22px;
  flex-wrap: wrap;
}

.profile-id { flex: 1; min-width: 200px; }

.profile-name {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.profile-sub {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--faint);
}

.avatar--lg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat {
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.stat__value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--ink);
}

.stat__value span { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 14px;
  padding-bottom: 60px;
}

.panel {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel__title { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 130px;
  padding-top: 16px;
}

.chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  height: 100%;
  justify-content: flex-end;
}

.chart__bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }

.chart__bar {
  width: 100%;
  max-width: 26px;
  border-radius: 4px;
  background: var(--accent);
  transition: height 0.6s var(--ease);
  min-height: 2px;
  position: relative;
  opacity: 0.9;
}

.chart__bar.is-zero { background: var(--track); opacity: 1; }

.chart__bar span {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.chart__col:hover .chart__bar span { opacity: 1; }

.chart__label { font-family: var(--font-mono); font-size: 9.5px; color: var(--faint); letter-spacing: 0.04em; }
.chart__label.is-today { color: var(--indigo-deep); font-weight: 600; }

.word-list { display: flex; flex-direction: column; gap: 0; max-height: 340px; overflow-y: auto; }

.word-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: var(--r-sm);
  transition: background 0.16s var(--ease);
}

.word-row:hover { background: var(--bg-2); }
.word-row__main { flex: 1; min-width: 0; }
.word-row__w { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.word-row__m { margin-top: 1px; font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.word-row__ph { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

.recent-list { display: flex; flex-direction: column; gap: 6px; }

.recent {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: all 0.16s var(--ease);
}

.recent:hover { background: var(--bg-2); border-color: var(--line); }

.recent__thumb {
  width: 64px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-2);
}

.recent__info { flex: 1; min-width: 0; }
.recent__title { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.recent__meta { margin-top: 2px; font-family: var(--font-mono); font-size: 9.5px; color: var(--faint); }
.recent__pct { font-family: var(--font-mono); font-size: 10.5px; color: var(--indigo-deep); }

/* =========================================================
   响应式
   ========================================================= */

@media (min-width: 961px) {
  .video-frame,
  .transport {
    max-width: calc((100vh - 260px) * 1.7778);
    margin-inline: auto;
    width: 100%;
  }
}

@media (max-width: 1080px) {
  .player-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .course-grid { grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); }
  .auth { grid-template-columns: minmax(0, 1fr) 356px; gap: 40px; }
}

@media (max-width: 960px) {
  .player-layout { grid-template-columns: 1fr; }
  /* 移动端取消 sticky，但仍需 position:relative 给练习视图做定位上下文 */
  .study-panel { position: relative; max-height: none; margin-top: 0; }
  .sp-body { max-height: 58vh; }
  .profile-grid { grid-template-columns: 1fr; }
  .auth {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 0 48px;
  }
  .auth__card { order: -1; }
  .auth__hero { max-width: none; }
  .auth__lead,
  .auth__demo { max-width: none; }
  .auth__title { font-size: clamp(28px, 5vw, 38px); }
  .lib-body { grid-template-columns: 1fr; gap: 18px; }
  .lib-side { position: static; }
  .lib-side__head { margin-bottom: 8px; }
  .level-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 8px;
    scrollbar-width: none;
  }
  .level-nav::-webkit-scrollbar { display: none; }
  .level-tile { width: auto; flex: 0 0 auto; padding: 9px 12px; }
  .level-tile span { margin-left: 2px; }
}

@media (max-width: 720px) {
  .topbar__hint { display: none; }
  .topbar__inner { gap: 12px; }
  /* 手机端不再直接隐藏导航，改成可横向滚动的紧凑导航 */
  .nav {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav__link {
    flex: 0 0 auto;
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
  }
  .auth__points { gap: 6px 13px; }
  .demo__en { font-size: 17px; }
  .auth__kbd { display: none; }
  .auth__card { padding: 20px 18px 16px; }
  .lib-hero { align-items: flex-start; gap: 18px; margin-bottom: 20px; }
  .continue-card { width: 100%; }
  .lib-title { margin-top: 10px; }
}

@media (max-width: 420px) {
  .brand__name { display: none; }
  .topbar__inner { gap: 8px; }
}

@media (max-width: 640px) {
  .shell { width: calc(100% - 28px); }
  .topbar__inner { gap: 10px; height: 52px; }
  .user-chip { padding: 4px; }
  .user-chip .u-name { display: none; }
  .player-page { padding-top: 12px; }
  .study-head__title { font-size: 16px; }
  .transport__sent {
    flex: 1 0 100%;
    margin-left: 0;
    justify-content: space-between;
  }
  .transport__opts {
    flex: 1 0 100%;
    margin-left: 0;
    justify-content: space-between;
  }
  .transport__opts .pill-btn { flex: 1; justify-content: center; }
  .sent-btn {
    flex: 1;
    height: 34px;
    padding: 0 6px;
    font-size: 12px;
  }
  .sent-btn svg { width: 12px; height: 12px; }
  .transport { padding: 12px 12px 10px; }
  .toolbar { padding: 8px; }
  .search { min-width: 100%; }
  .divider-v { display: none; }
  .stat__value { font-size: 24px; }
  .panel { padding: 14px; }
  .dict-pop { width: calc(100vw - 20px); }
  .chart { height: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible { outline: 2px solid rgba(47, 77, 255, 0.55); outline-offset: 2px; }

/* =========================================================
   后台（admin.html）
   ========================================================= */

.admin-page { padding: 28px 0 72px; }

.admin-head { margin-bottom: 20px; }
.admin-head .mono { display: block; margin-bottom: 6px; }
.admin-head__title {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 0;
}
.admin-head__sub { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

.admin-layout {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.admin-rail {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.admin-rail__item {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.admin-rail__item:hover { background: var(--bg-2); color: var(--ink); }
.admin-rail__item.is-active { background: #12151b; color: #fff; font-weight: 600; }

.admin-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* 后台的 panel 与学习档案页的 panel 同名，这里全部限定在 .admin-page 内，
   并把档案页留下的 flex 头部改回上下堆叠 */
.admin-page .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 20px;
  scroll-margin-top: 78px;
}
.admin-page .panel__head {
  display: block;
  margin: 0 0 16px;
}
.admin-page .panel__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.admin-page .panel__desc { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.admin-page .panel__body { display: flex; flex-direction: column; gap: 14px; }
.admin-page .panel__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.admin-page .empty { padding: 24px 12px; }
.muted-note { font-size: 12px; color: var(--muted); }

/* 开关行 */
.switch-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fbfcfd;
  cursor: pointer;
}
.switch-row__text { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.switch-row__text strong { font-size: 13.5px; font-weight: 600; }
.switch-row__text small { font-size: 12px; color: var(--muted); }

.switch {
  appearance: none;
  width: 42px;
  height: 24px;
  border-radius: 99px;
  background: var(--track);
  border: 1px solid var(--line-2);
  position: relative;
  cursor: pointer;
  flex: none;
  transition: background 0.2s var(--ease);
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(14, 17, 22, 0.2);
  transition: transform 0.2s var(--ease);
}
.switch:checked { background: #12151b; border-color: #12151b; }
.switch:checked::after { transform: translateX(18px); }

/* 激活码 */
.invite-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px auto;
  gap: 10px;
  align-items: end;
}
.invite-list, .user-list { display: flex; flex-direction: column; gap: 8px; }

.code-row, .user-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}
.code-row__code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.code-row__state {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.code-row__state.is-free { color: #0e7a4a; border-color: #bde5d1; background: #f2fbf6; }
.code-row__state.is-used { color: var(--faint); }

.user-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.user-row__name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.user-row__meta { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 后台内的搜索行：允许收缩/换行，避免窄屏溢出 */
.admin-page .row { flex-wrap: wrap; }
.admin-page .search { min-width: 0; }
.admin-rail::-webkit-scrollbar { display: none; }
.admin-rail { scrollbar-width: none; }

/* 播放页学习重点：外层保留整块卡片，内部各板块仍用标题 + 分隔线 + 留白分区 */
.notes-card {
  margin-top: 18px;
  padding: 18px 20px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
}
.notes-card[hidden] { display: none; }
.notes-card__head { display: flex; align-items: center; gap: 10px; }
.notes-card__kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.notes-card__kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.notes-card__state { margin-left: auto; font-size: 11px; color: var(--faint); }
.notes-card__title {
  margin: 6px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.01em;
}
.notes-card__body { font-size: 15.5px; line-height: 1.85; color: var(--ink-2); }

.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { margin: 18px 0 8px; color: var(--ink); letter-spacing: -0.01em; }
.markdown h1 { font-size: 17px; }
.markdown h2 { font-size: 15.5px; }
.markdown h3 { font-size: 14.5px; }
.markdown p { margin: 0 0 10px; }
.markdown ul, .markdown ol { margin: 0 0 12px; padding-left: 20px; }
.markdown li { margin: 4px 0; }
.markdown code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef1f7;
  color: var(--accent-ink);
  white-space: nowrap;
}
.markdown blockquote {
  margin: 0 0 12px;
  padding: 8px 14px;
  border-left: 3px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.markdown blockquote p { margin: 0; }
.markdown hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.markdown a { color: var(--accent-ink); text-decoration: underline; }
.markdown strong { color: var(--ink); font-weight: 600; }

/* ① 常用句式 … 五个板块：各配一组颜色，标签做成彩色小方块 */
.notes-card__body .md-sec {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 24px 0 12px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
}
.notes-card__body .md-sec:first-child { margin-top: 0; }
.notes-card__body .md-sec__tag {
  flex: none;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--sec-soft, var(--accent-soft));
  color: var(--sec, var(--accent-ink));
  font-size: 12px;
  font-weight: 700;
}
.notes-card__body .md-sec__text { color: var(--ink); }
.notes-card__body .md-sec__hint {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
.notes-card__body .md-sec:nth-of-type(1) { --sec: #2f4dff; --sec-soft: #eef1ff; }
.notes-card__body .md-sec:nth-of-type(2) { --sec: #7a5af8; --sec-soft: #f1edff; }
.notes-card__body .md-sec:nth-of-type(3) { --sec: #0e8f7e; --sec-soft: #e7f6f3; }
.notes-card__body .md-sec:nth-of-type(4) { --sec: #c0740a; --sec-soft: #fdf3e2; }
.notes-card__body .md-sec:nth-of-type(5) { --sec: #cc3d77; --sec-soft: #fdedf3; }

/* 有序列表：圆形序号 */
.markdown ol {
  list-style: none;
  padding-left: 0;
  counter-reset: md-item;
}
.markdown ol > li {
  position: relative;
  padding-left: 30px;
  margin: 11px 0;
  counter-increment: md-item;
}
.markdown ol > li::before {
  content: counter(md-item);
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
}

/* 句例 */
.markdown .md-quote {
  margin: 6px 0 8px;
  padding: 7px 12px;
  border-left: 2px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 0 6px 6px 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* 列表内的练习等子项 */
.markdown .md-sub {
  list-style: none;
  margin: 6px 0 2px;
  padding-left: 0;
}
.markdown .md-sub > li {
  position: relative;
  padding-left: 15px;
  margin: 4px 0;
  font-size: 13.5px;
  color: #6b7482;
}
.markdown .md-sub > li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.6;
}

/* 无序列表：小方块标记 */
.markdown ul:not(.md-sub) {
  list-style: none;
  padding-left: 0;
}
.markdown ul:not(.md-sub) > li {
  position: relative;
  padding-left: 16px;
  margin: 6px 0;
}
.markdown ul:not(.md-sub) > li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--faint);
}

/* 加粗标签（本课主线 / 内容定位） */
.markdown p > strong:first-child { color: var(--ink); font-weight: 600; }

/* ---------- 学习重点：分块（按认知难度排序，可折叠） ---------- */

.notes-toggle {
  display: inline-flex;
  align-items: center;
  height: 26px;
  margin-left: 10px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.notes-toggle[hidden] { display: none; }
.notes-toggle:hover { border-color: var(--line-2); background: var(--bg-2); color: var(--ink); }

/* 首段概览（内容定位 / 本课主线），不折叠，用一条细线代替外框 */
.notes-card__body .note-intro {
  margin: 0 0 6px;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--line-2);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}
.notes-card__body .note-intro p { margin: 0 0 4px; }
.notes-card__body .note-intro p:last-child { margin-bottom: 0; }

.note-part {
  --sec: var(--accent);
  --sec-soft: var(--accent-soft);
  margin: 0;
}
.note-part:first-child { margin-top: 0; }
.note-part[data-kind="words"] { --sec: #2f4dff; --sec-soft: #eef1ff; }
.note-part[data-kind="sentences"] { --sec: #7a5af8; --sec-soft: #f1edff; }
.note-part[data-kind="expressions"] { --sec: #0e8f7e; --sec-soft: #e7f6f3; }
.note-part[data-kind="grammar"] { --sec: #c0740a; --sec-soft: #fdf3e2; }
.note-part[data-kind="reading"] { --sec: #cc3d77; --sec-soft: #fdedf3; }
.note-part[data-kind="practice"] { --sec: #5b6472; --sec-soft: #eff1f5; }
.note-part[data-kind="extra"] { --sec: #8b93a1; --sec-soft: #f3f4f7; }

.note-part__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 0 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.note-part__head:hover .note-part__label { color: var(--sec); }
.note-part__idx {
  flex: none;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--sec-soft);
  color: var(--sec);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.note-part__label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.note-part__meta { font-size: 11.5px; color: var(--faint); }
.note-part__chev {
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--faint);
  transition: transform 0.25s var(--ease), color 0.2s var(--ease);
}
.note-part.is-open .note-part__chev { transform: rotate(180deg); color: var(--sec); }

.note-part__wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s var(--ease);
}
.note-part.is-open .note-part__wrap { grid-template-rows: 1fr; }
.note-part__body { overflow: hidden; min-height: 0; }
.note-part__inner { padding: 12px 0 16px; }
.note-part__hint { margin: 0 0 9px; font-size: 12.5px; color: var(--faint); }
.notes-card__body .note-part__hint { margin: 0 0 9px; }
.notes-quiz-empty {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--faint);
}

/* 词条 / 表达条目：词条 + 词性 + 释义 + 出处例句 */
.notes-card__body .note-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.notes-card__body .note-items > .note-item {
  position: relative;
  margin: 0;
  padding: 0;
}
.notes-card__body .note-items > .note-item::before { content: none; }
.notes-card__body .note-items > .note-item + .note-item {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.note-item__top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.note-item__term {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.note-item__pos {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--sec-soft);
  color: var(--sec);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
}
.notes-card__body .note-item__meaning {
  margin: 3px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.notes-card__body .note-item__eg {
  margin: 7px 0 0;
  padding: 0 0 0 10px;
  border-left: 2px solid var(--sec-soft);
}
.note-item__en {
  display: block;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.note-item__cn {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* 折叠区块内的 Markdown（常用句 / 语法 / 跟读 / 练习） */
.note-part__md { font-size: 14.5px; line-height: 1.8; }
.note-part__md > :first-child { margin-top: 0; }
.note-part__md > :last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .note-part__wrap { transition: none; }
  .note-part__chev { transition: none; }
}

@media (max-width: 640px) {
  .notes-card { padding: 16px 15px 18px; }
  .note-part__head { padding: 12px 0 10px; }
  .note-part__inner { padding: 10px 0 14px; }
  .note-item__term { font-size: 15px; }
}

@media (max-width: 860px) {
  .admin-page { padding: 20px 0 48px; }
  .admin-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .admin-head__title { font-size: 24px; }
  .admin-rail {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 4px;
  }
  .admin-rail__item { flex: 0 0 auto; padding: 8px 12px; white-space: nowrap; }
  .admin-page .panel { padding: 16px; }
  .invite-create { grid-template-columns: minmax(0, 1fr) 84px; }
  .invite-create .btn { grid-column: 1 / -1; }
  .switch-row { padding: 12px; gap: 12px; }
  .code-row, .user-row { gap: 8px; }
  .code-row .spacer { display: none; }
  .code-row .btn { margin-left: auto; }
}

@media (max-width: 480px) {
  .admin-page .panel__foot { align-items: flex-start; flex-direction: column; }
  .admin-page .panel__foot .btn { width: 100%; }
  .invite-create { grid-template-columns: minmax(0, 1fr); }
  .invite-create .btn { width: 100%; }
  .user-row .avatar { display: none; }
}
