/* ============ 吕明泽的语言库 全局样式 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --ink: #1c2130;
  --muted: #6b7280;
  --line: #e8eaf1;
  --brand: #5b6cff;
  --brand2: #8b5cf6;
  --grad: linear-gradient(135deg, #5b6cff 0%, #8b5cf6 100%);
  --en: #3b82f6;
  --ja: #f43f5e;
  --ko: #8b5cf6;
  --ok: #16a34a;
  --bad: #dc2626;
  --warn: #f59e0b;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(28, 33, 48, .08);
  --shadow-lg: 0 16px 48px rgba(28, 33, 48, .16);
}
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ============ 顶部导航 ============ */
#header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 28px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 900;
}
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  padding: 7px 14px; border-radius: 10px; font-size: 14.5px; color: var(--muted);
  transition: .15s;
}
.nav-links a:hover { color: var(--ink); background: #f0f1f7; }
.nav-links a.active { color: var(--brand); background: #eef0ff; font-weight: 600; }
.nav-user { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  cursor: pointer; user-select: none;
}
.user-menu { position: relative; }
.user-drop {
  position: absolute; right: 0; top: 46px; width: 180px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); overflow: hidden; display: none;
}
.user-menu.open .user-drop { display: block; }
.user-drop a, .user-drop button {
  display: block; width: 100%; text-align: left; padding: 11px 16px;
  font-size: 14px; color: var(--ink);
}
.user-drop a:hover, .user-drop button:hover { background: #f5f6fa; }
.user-drop .uname { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 12px;
  font-size: 15px; font-weight: 600;
  transition: .18s; border: 1.5px solid transparent;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(91,108,255,.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(91,108,255,.45); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: #eef0ff; color: var(--brand); }
.btn-soft:hover { background: #e2e6ff; }
.btn-sm { padding: 7px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.icon { width: 18px; height: 18px; flex: none; }

/* ============ 首页 ============ */
.hero { padding: 64px 0 48px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 44px; line-height: 1.25; letter-spacing: -0.5px; }
.hero h1 .hl {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { margin: 18px 0 28px; color: var(--muted); font-size: 17px; max-width: 480px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-img { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-img img { width: 100%; height: 340px; object-fit: cover; }
.hero-stats { display: flex; gap: 36px; margin-top: 36px; }
.hero-stats .stat b { font-size: 26px; display: block; }
.hero-stats .stat span { color: var(--muted); font-size: 13.5px; }

.sec { padding: 56px 0; }
.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head h2 { font-size: 30px; letter-spacing: -0.3px; }
.sec-head p { color: var(--muted); margin-top: 8px; }

.lang-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lang-card {
  background: var(--card); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow); transition: .2s; cursor: pointer;
  border: 1px solid var(--line);
}
.lang-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.lang-card .lc-img { height: 160px; overflow: hidden; position: relative; }
.lang-card .lc-img img { width: 100%; height: 100%; object-fit: cover; }
.lang-card .lc-badge {
  position: absolute; left: 14px; bottom: -18px;
  width: 44px; height: 44px; border-radius: 12px; color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 17px;
  box-shadow: var(--shadow);
}
.lang-card .lc-body { padding: 28px 20px 20px; }
.lang-card h3 { font-size: 19px; }
.lang-card .lc-meta { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.lang-card .lc-tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: #f0f1f7; color: var(--muted);
}

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat {
  background: var(--card); border-radius: var(--radius); padding: 26px;
  border: 1px solid var(--line); transition: .2s;
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feat .f-ico {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; color: #fff; margin-bottom: 16px;
}
.feat h3 { font-size: 17px; margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: 14px; }

.cta-band {
  margin: 56px 0; border-radius: 24px; background: var(--grad);
  color: #fff; padding: 48px; text-align: center;
}
.cta-band h2 { font-size: 28px; margin-bottom: 10px; }
.cta-band p { opacity: .85; margin-bottom: 24px; }
.cta-band .btn { background: #fff; color: var(--brand); }

/* ============ 课程页 ============ */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: 32px; letter-spacing: -0.3px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.filter-row { display: flex; gap: 10px; margin: 24px 0; flex-wrap: wrap; }
.chip {
  padding: 8px 18px; border-radius: 999px; font-size: 14px;
  background: #fff; border: 1.5px solid var(--line); color: var(--muted);
  transition: .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }

.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-bottom: 64px; }
.course-card {
  background: var(--card); border-radius: 18px; padding: 24px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: .2s;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lang-badge {
  width: 42px; height: 42px; border-radius: 12px; color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none;
}
.course-top .lv { font-size: 12.5px; color: var(--muted); }
.course-card h3 { font-size: 17.5px; line-height: 1.4; }
.course-card .desc { color: var(--muted); font-size: 13.5px; margin: 8px 0 14px; flex: 1; }
.prog { height: 7px; border-radius: 99px; background: #eef0f5; overflow: hidden; }
.prog > i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .4s; }
.course-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.course-foot .meta { font-size: 12.5px; color: var(--muted); }
.course-card.locked { opacity: .75; background: repeating-linear-gradient(45deg,#fff,#fff 12px,#fafafc 12px,#fafafc 24px); }
.lock-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: 14px; }

/* ============ 课程详情 ============ */
.lesson-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 64px; }
.lesson-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; display: flex; align-items: center; gap: 18px;
  transition: .18s;
}
.lesson-item:hover { box-shadow: var(--shadow); }
.lesson-ico {
  width: 48px; height: 48px; border-radius: 14px; flex: none;
  display: grid; place-items: center; color: #fff;
}
.lesson-item h4 { font-size: 16px; }
.lesson-item .ld { color: var(--muted); font-size: 13px; }
.lesson-item .grow { flex: 1; }
.done-pill {
  font-size: 12px; padding: 4px 12px; border-radius: 999px;
  background: #e8f7ee; color: var(--ok); font-weight: 600;
}
.todo-pill { font-size: 12px; padding: 4px 12px; border-radius: 999px; background: #f0f1f7; color: var(--muted); }

/* ============ 学习模块通用 ============ */
.practice { max-width: 720px; margin: 0 auto; padding: 36px 24px 72px; }
.practice-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.practice-head .ttl { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.practice-head .cnt { color: var(--muted); font-size: 14px; }
.exit-link { color: var(--muted); font-size: 14px; }
.exit-link:hover { color: var(--bad); }

/* 单词闪卡 */
.flash-stage { perspective: 1200px; margin: 26px 0; }
.flash-card {
  position: relative; width: 100%; height: 300px; cursor: pointer;
  transform-style: preserve-3d; transition: transform .55s cubic-bezier(.4,.1,.2,1);
}
.flash-card.flipped { transform: rotateY(180deg); }
.flash-face {
  position: absolute; inset: 0; border-radius: 24px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px; text-align: center; box-shadow: var(--shadow-lg);
}
.flash-front { background: var(--card); border: 1px solid var(--line); }
.flash-back { background: var(--grad); color: #fff; transform: rotateY(180deg); }
.flash-word { font-size: 42px; font-weight: 800; letter-spacing: .5px; }
.flash-phon { margin-top: 10px; color: var(--muted); font-size: 16px; }
.flash-hint { position: absolute; bottom: 18px; font-size: 12.5px; color: #b6bacb; }
.flash-back .fm { font-size: 26px; font-weight: 700; }
.flash-back .fex { margin-top: 14px; font-size: 15.5px; opacity: .92; }
.flash-back .fexm { font-size: 13.5px; opacity: .75; margin-top: 4px; }
.speak-mini {
  margin-top: 14px; width: 42px; height: 42px; border-radius: 50%;
  background: #eef0ff; color: var(--brand); display: grid; place-items: center;
  transition: .15s;
}
.speak-mini:hover { background: var(--brand); color: #fff; }
.flash-actions { display: flex; gap: 14px; }
.flash-actions .btn { flex: 1; padding: 14px; font-size: 16px; }
.btn-know { background: #e8f7ee; color: var(--ok); }
.btn-know:hover { background: #d3f0dd; }
.btn-dunno { background: #fdecec; color: var(--bad); }
.btn-dunno:hover { background: #fbdddd; }

/* 选项题（语法/听力） */
.quiz-card { background: var(--card); border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 30px; margin-top: 24px; }
.quiz-q { font-size: 20px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
.quiz-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.opt-list { display: flex; flex-direction: column; gap: 12px; }
.opt {
  text-align: left; padding: 14px 18px; border-radius: 13px;
  border: 1.5px solid var(--line); background: #fff; font-size: 15.5px;
  transition: .15s; display: flex; align-items: center; gap: 12px;
}
.opt:hover:not(:disabled) { border-color: var(--brand); background: #f7f8ff; }
.opt .key {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: #f0f1f7; color: var(--muted);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.opt.correct { border-color: var(--ok); background: #e8f7ee; color: var(--ok); font-weight: 600; }
.opt.correct .key { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: #fdecec; color: var(--bad); }
.opt.wrong .key { background: var(--bad); color: #fff; }
.opt:disabled { cursor: default; }
.quiz-tip {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  background: #fff8e8; border: 1px solid #f6e3b3; color: #92600a;
  font-size: 14px; display: none;
}
.quiz-tip.show { display: block; }
.quiz-foot { margin-top: 22px; display: flex; justify-content: flex-end; }
.listen-play {
  width: 100%; padding: 26px; border-radius: 16px; background: #f4f6ff;
  border: 1.5px dashed #c8d0ff; color: var(--brand);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 16px; font-weight: 600; margin-bottom: 20px; transition: .15s;
}
.listen-play:hover { background: #e9edff; }
.listen-play .icon { width: 26px; height: 26px; }

/* 口语跟读 */
.speak-card { background: var(--card); border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 34px; margin-top: 24px; text-align: center; }
.speak-sentence { font-size: 27px; font-weight: 800; line-height: 1.5; }
.speak-mean { color: var(--muted); margin-top: 8px; font-size: 15px; }
.speak-controls { display: flex; gap: 14px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.btn-rec { background: var(--grad); color: #fff; padding: 13px 26px; border-radius: 999px; font-size: 15.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 4px 14px rgba(91,108,255,.35); }
.btn-rec.recording { background: linear-gradient(135deg,#ef4444,#f97316); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4);} 50% { box-shadow: 0 0 0 12px rgba(239,68,68,0);} }
.sr-result { margin-top: 20px; padding: 16px; border-radius: 13px; background: #f5f6fa; font-size: 14.5px; display: none; text-align: left; }
.sr-result.show { display: block; }
.sr-result .you { color: var(--muted); }
.sr-score { display: inline-block; margin-top: 8px; font-weight: 700; }
.sr-score.good { color: var(--ok); } .sr-score.mid { color: var(--warn); } .sr-score.low { color: var(--bad); }

/* 结算页 */
.result-card { background: var(--card); border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 48px; text-align: center; margin-top: 30px; }
.result-card .big-ico { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; }
.result-card h2 { font-size: 26px; }
.result-xp { font-size: 44px; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 14px 0 4px; }
.result-sub { color: var(--muted); margin-bottom: 28px; }
.result-stats { display: flex; justify-content: center; gap: 40px; margin-bottom: 32px; }
.result-stats b { font-size: 22px; display: block; }
.result-stats span { color: var(--muted); font-size: 13px; }
.result-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============ 学习中心 ============ */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-bottom: 20px; }
.panel { background: var(--card); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 26px; }
.panel h3 { font-size: 17px; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 28px 0; }
.stat-card { background: var(--card); border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 22px; }
.stat-card .sc-top { display: flex; align-items: center; justify-content: space-between; }
.stat-card .sc-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.stat-card b { font-size: 27px; display: block; margin-top: 10px; }
.stat-card span { color: var(--muted); font-size: 13px; }
.level-bar { margin-top: 6px; }
.level-bar .lb-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.week-bars { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding-top: 10px; }
.wb-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.wb-bar { width: 100%; max-width: 44px; border-radius: 8px 8px 4px 4px; background: var(--grad); min-height: 4px; transition: height .4s; position: relative; }
.wb-bar:hover::after {
  content: attr(data-xp); position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
  font-size: 11px; background: var(--ink); color: #fff; padding: 1px 7px; border-radius: 6px; white-space: nowrap;
}
.wb-day { font-size: 12px; color: var(--muted); }
.module-rows { display: flex; flex-direction: column; gap: 14px; }
.mod-row { display: flex; align-items: center; gap: 14px; }
.mod-row .mi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.mod-row .grow { flex: 1; }
.mod-row .mt { font-size: 14.5px; font-weight: 600; }
.mod-row .ms { font-size: 12.5px; color: var(--muted); }
.plan-lang { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.plan-lang b { font-size: 18px; }
.next-lessons { display: flex; flex-direction: column; gap: 10px; }
.next-lesson {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: 12px; background: #f7f8ff; border: 1px solid #e4e8ff; font-size: 14px;
}
.next-lesson:hover { background: #eef1ff; }
.plan-empty { color: var(--muted); font-size: 14.5px; text-align: center; padding: 18px 0; }

/* ============ 成就墙 ============ */
.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-bottom: 64px; }
.badge-card {
  background: var(--card); border-radius: 18px; border: 1px solid var(--line);
  padding: 26px 20px; text-align: center; transition: .2s; position: relative;
}
.badge-card.earned { box-shadow: var(--shadow); border-color: #d9defc; }
.badge-card:not(.earned) { opacity: .55; filter: grayscale(.8); }
.badge-medal {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px;
  background: var(--grad); box-shadow: 0 6px 16px rgba(91,108,255,.3);
}
.badge-card:not(.earned) .badge-medal { background: #c3c7d6; box-shadow: none; }
.badge-card h4 { font-size: 15.5px; }
.badge-card p { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.badge-date { font-size: 11.5px; color: var(--brand); margin-top: 10px; }

/* ============ 社区 ============ */
.community-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; padding-bottom: 64px; align-items: start; }
.post-box { background: var(--card); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; }
.post-box textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 13px; padding: 14px;
  font-family: inherit; font-size: 14.5px; resize: vertical; min-height: 84px;
  outline: none; transition: .15s;
}
.post-box textarea:focus { border-color: var(--brand); }
.post-box-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 12px; }
.post-box select {
  padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line);
  font-family: inherit; font-size: 13.5px; color: var(--ink); background: #fff; outline: none;
}
.post-card { background: var(--card); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px; }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-head .avatar { width: 40px; height: 40px; cursor: default; }
.post-head .pu { font-weight: 700; font-size: 15px; }
.post-head .pt { color: var(--muted); font-size: 12.5px; }
.post-text { font-size: 15px; line-height: 1.7; }
.post-actions { display: flex; gap: 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pa-btn { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13.5px; transition: .15s; }
.pa-btn:hover { color: var(--brand); }
.pa-btn.liked { color: #e11d48; }
.comments { margin-top: 14px; display: none; }
.comments.show { display: block; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.comment .avatar { width: 28px; height: 28px; font-size: 12px; }
.comment b { font-size: 13px; }
.comment-input { display: flex; gap: 10px; margin-top: 10px; }
.comment-input input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 14px;
  font-family: inherit; font-size: 13.5px; outline: none;
}
.comment-input input:focus { border-color: var(--brand); }
.side-panel { background: var(--card); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.side-panel h4 { font-size: 15px; margin-bottom: 14px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.rank-num { width: 24px; height: 24px; border-radius: 8px; background: #f0f1f7; color: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.rank-row.top .rank-num { background: var(--grad); color: #fff; }
.rank-row .grow { flex: 1; font-size: 14px; }
.rank-row .xp { font-size: 12.5px; color: var(--muted); }

/* ============ 推荐向导 ============ */
.wizard { max-width: 640px; margin: 0 auto; padding: 48px 24px 80px; }
.wiz-steps { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 36px; }
.wiz-dot { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 2px solid var(--line); color: var(--muted); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.wiz-dot.active { background: var(--grad); color: #fff; border-color: transparent; }
.wiz-dot.done { background: #e8f7ee; color: var(--ok); border-color: transparent; }
.wiz-line { width: 44px; height: 2px; background: var(--line); }
.wiz-card { background: var(--card); border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 38px; }
.wiz-card h2 { font-size: 23px; margin-bottom: 6px; }
.wiz-card .wz-sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pick {
  border: 2px solid var(--line); border-radius: 15px; padding: 22px 12px;
  text-align: center; transition: .15s; background: #fff;
}
.pick:hover { border-color: var(--brand); }
.pick.sel { border-color: var(--brand); background: #f5f7ff; }
.pick .pk-badge { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 13px; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.pick b { font-size: 15.5px; }
.pick .pk-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.goal-list { display: flex; flex-direction: column; gap: 12px; }
.goal {
  display: flex; align-items: center; gap: 14px; text-align: left;
  border: 2px solid var(--line); border-radius: 14px; padding: 16px 18px; background: #fff; transition: .15s;
}
.goal:hover { border-color: var(--brand); }
.goal.sel { border-color: var(--brand); background: #f5f7ff; }
.goal b { font-size: 15px; }
.goal span { font-size: 12.5px; color: var(--muted); display: block; }
.wiz-foot { display: flex; justify-content: space-between; margin-top: 30px; }
.rec-result { text-align: center; }
.rec-course {
  margin: 24px auto; max-width: 420px; border-radius: 18px; padding: 26px;
  background: #f7f8ff; border: 1.5px solid #dbe1ff;
}
.rec-course .rc-lv { color: var(--brand); font-weight: 700; font-size: 13px; }
.rec-course h3 { font-size: 20px; margin-top: 6px; }
.rec-course p { color: var(--muted); font-size: 13.5px; margin-top: 8px; }

/* ============ 认证弹窗 ============ */
.overlay {
  position: fixed; inset: 0; background: rgba(20,24,40,.5);
  backdrop-filter: blur(4px); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dialog {
  background: #fff; border-radius: 22px; width: 100%; max-width: 400px;
  padding: 34px; box-shadow: var(--shadow-lg); animation: popIn .25s cubic-bezier(.3,1.4,.6,1);
}
@keyframes popIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dialog h2 { font-size: 22px; text-align: center; }
.dialog .d-sub { text-align: center; color: var(--muted); font-size: 13.5px; margin: 6px 0 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.field input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 15px;
  font-family: inherit; font-size: 14.5px; outline: none; transition: .15s;
}
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,108,255,.12); }
.form-err { color: var(--bad); font-size: 13px; min-height: 20px; margin: 4px 0 10px; text-align: center; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.auth-switch a { color: var(--brand); font-weight: 600; cursor: pointer; }
.d-close { position: absolute; top: 16px; right: 20px; color: var(--muted); font-size: 22px; line-height: 1; }
.d-close:hover { color: var(--ink); }

/* ============ Toast ============ */
#toast-root { position: fixed; bottom: 26px; right: 26px; z-index: 200; display: flex; flex-direction: column; gap: 12px; }
.toast {
  background: var(--ink); color: #fff; border-radius: 14px; padding: 14px 20px;
  display: flex; align-items: center; gap: 12px; font-size: 14.5px;
  box-shadow: var(--shadow-lg); animation: slideUp .3s cubic-bezier(.3,1.3,.6,1);
  max-width: 340px;
}
.toast.badge-toast { background: linear-gradient(135deg,#7c5cf0,#b45cf0); }
.toast .t-ico { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; flex: none; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast.out { animation: slideDown .3s forwards; }
@keyframes slideDown { to { transform: translateY(20px); opacity: 0; } }

/* ============ 页脚 ============ */
#footer { border-top: 1px solid var(--line); background: #fff; margin-top: 40px; }
.foot-inner { max-width: 1120px; margin: 0 auto; padding: 36px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-inner .f-note { color: var(--muted); font-size: 13px; }
.foot-langs { display: flex; gap: 10px; }
.foot-langs span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; }

.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state .e-ico { width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 20px; background: #f0f1f7; display: grid; place-items: center; color: #b6bacb; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .lang-grid, .feat-grid, .course-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid, .community-layout { grid-template-columns: 1fr; }
  .stat-cards, .badge-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .nav { gap: 12px; }
  .nav-links a { padding: 7px 9px; font-size: 13px; }
  .logo span.txt { display: none; }
  .lang-grid, .feat-grid, .course-grid, .stat-cards, .badge-grid, .pick-grid { grid-template-columns: 1fr; }
  .hero { padding: 36px 0; }
  .flash-face { padding: 20px; }
  .flash-word { font-size: 32px; }
  .result-card { padding: 32px 22px; }
  .week-bars { gap: 6px; }
}
