/* ============================================================
   typing-web · 深色/浅色双主题
   深色：主色 teal #2dd4bf，背景近黑 #0a0d0c
   浅色：主色 blue #3b82f6，背景浅灰蓝 #f0f4f8
   英文答题区字体：Baloo 2 / Fredoka / Quicksand（自托管 woff2）
   ============================================================ */

/* ---- 自托管英文圆润粗体（fallback 顺序：Baloo2 → Fredoka → Quicksand） ---- */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/typing/fonts/baloo2.woff2') format('woff2');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/typing/fonts/fredoka.woff2') format('woff2');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/typing/fonts/quicksand.woff2') format('woff2');
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; max-width: 100%; overflow-x: hidden; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  transition: background 0.2s ease, color 0.2s ease;
}
#app { position: relative; min-height: 100%; max-width: 100%; overflow-x: hidden; box-sizing: border-box; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---- 英文答题区字体栈（只作用于英文，不影响全站 UI） ---- */
:root {
  --en-font: 'Baloo 2', 'Fredoka', 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  --zh-font: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
}

/* ============ 深色主题（默认） ============ */
:root {
  --bg: #0a0d0c;
  --bg-2: #0d1110;
  --card: #141a18;
  --card-2: #1a211f;
  --line: rgba(255,255,255,0.06);
  --line-strong: rgba(255,255,255,0.08);
  --teal: #2dd4bf;
  --teal-deep: #14b8a6;
  --teal-soft: rgba(45,212,191,0.15);
  --teal-softer: rgba(45,212,191,0.20);
  --white: #ffffff;
  --ink: #e2e8f0;
  --sub: #94a3b8;
  --muted: #64748b;
  --wrong: #ef4444;
  --pending-line: #334155;
  --done-line: rgba(255,255,255,0.15);
  --bar-bg: rgba(10,13,12,0.97);
  --hover-bg: rgba(255,255,255,0.04);
  --text-on-accent: #04211d;
  --accent: var(--teal);
  --accent-soft: var(--teal-soft);
  --accent-softer: var(--teal-softer);
  --sidebar-w: 232px;
}

/* ============ 浅色主题 ============ */
:root[data-theme="light"] {
  --bg: #f0f4f8;
  --bg-2: #eef2f7;
  --card: #ffffff;
  --card-2: #f8fafc;
  --line: rgba(15,23,42,0.08);
  --line-strong: rgba(15,23,42,0.12);
  --teal: #3b82f6;
  --teal-deep: #2563eb;
  --teal-soft: rgba(59,130,246,0.12);
  --teal-softer: rgba(59,130,246,0.18);
  --white: #0f172a;
  --ink: #1e293b;
  --sub: #64748b;
  --muted: #94a3b8;
  --wrong: #ef4444;
  --pending-line: #cbd5e1;
  --done-line: rgba(30,41,59,0.18);
  --bar-bg: rgba(255,255,255,0.92);
  --hover-bg: rgba(15,23,42,0.05);
  --text-on-accent: #ffffff;
  --accent: #3b82f6;
  --accent-soft: rgba(59,130,246,0.12);
  --accent-softer: rgba(59,130,246,0.18);
}

.view { display: none; min-height: 100vh; }
.view.active { display: block; }

/* 字体大小档位（沿用） */
:root { --ts: 1.0; }
body.fs-small { --ts: 0.88; }
body.fs-medium { --ts: 1.0; }
body.fs-large { --ts: 1.16; }

/* ============ 框架布局（侧栏 + 主内容区） ============ */
.layout { display: none; }
.layout.active { display: flex; min-height: 100vh; padding-left: var(--sidebar-w); }

/* ---- 侧栏 ---- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--bg);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; height: 100vh;
  z-index: 50;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px 18px;
  text-decoration: none; color: inherit; cursor: pointer;
  border-radius: 12px; transition: background 0.15s;
}
.sidebar-brand:hover { background: var(--hover-bg); }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; overflow: hidden;
}
.brand-logo-img {
  width: 34px; height: 34px; display: block;
  border-radius: 10px; object-fit: cover;
}
.brand-name { font-size: 16px; font-weight: 700; color: var(--white); letter-spacing: 0.3px; }

.sidebar-nav { flex: 1; padding: 8px 10px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 10px;
  color: var(--sub); font-size: 14px; font-weight: 500;
  text-decoration: none; margin-bottom: 2px;
  position: relative; transition: background 0.15s, color 0.15s;
  width: 100%; text-align: left;
}
.nav-item:hover { background: var(--hover-bg); color: var(--ink); }
.nav-item.active {
  background: rgba(45,212,191,0.12);
  color: var(--teal);
  font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 2px 2px 0;
  background: var(--teal);
}
.nav-ico { width: 18px; height: 18px; flex: 0 0 auto; }

.sidebar-footer { padding: 10px; border-top: 1px solid var(--line); }
.nav-item--btn { justify-content: flex-start; }

.nav-group-label {
  font-size: 11px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.8px;
  padding: 14px 12px 4px;
}
.nav-item--disabled { opacity: 0.4; cursor: not-allowed; justify-content: space-between; }
.nav-item--disabled:hover { background: transparent; color: var(--sub); }
.soon-pill {
  font-size: 10px; font-weight: 500; color: var(--muted);
  background: var(--line);
  padding: 2px 8px; border-radius: 8px;
  white-space: nowrap; flex: 0 0 auto; margin-left: auto;
}
.lite-toast {
  display: none; position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%); z-index: 400;
  background: var(--card); border: 1px solid var(--line-strong);
  color: var(--ink); font-size: 14px; padding: 10px 20px;
  border-radius: 20px; white-space: nowrap; pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.lite-toast.show { display: block; animation: toast-fade 1.8s ease forwards; }
@keyframes toast-fade {
  0% { opacity: 0; transform: translateX(-50%) translateY(8px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-4px); }
}

/* ---- 移动端抽屉遮罩 ---- */
.drawer-mask {
  display: none;
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,0.5);
}
.drawer-mask.show { display: block; }

/* ---- 主内容区 ---- */
.main-content {
  flex: 1; min-width: 0;
  background: var(--bg-2);
  padding: 24px 32px calc(env(safe-area-inset-bottom, 0px) + 32px);
  position: relative;
}

/* ---- 移动端汉堡按钮 ---- */
.hamburger {
  display: none;
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 12px; z-index: 60;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  align-items: center; justify-content: center;
  color: var(--ink);
}

/* ============ 通用页面头（选课/会员/邀请共用） ============ */
.page-header {
  max-width: 800px; margin: 0 auto 8px;
  padding: 4px 0 14px;
}
.page-title { font-size: 26px; margin: 0; font-weight: 700; color: var(--white); letter-spacing: 0.5px; }
.page-sub { font-size: 13px; color: var(--sub); margin: 6px 0 0; }

/* ============ 选课页（深色皮肤，布局不变） ============ */
.courses-list {
  padding: 8px 0 calc(env(safe-area-inset-bottom, 0px) + 32px);
  max-width: 800px; margin: 0 auto;
}
.loading-tip { text-align: center; color: var(--sub); padding: 48px 0; }

.cat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px; margin: 14px 0; overflow: hidden;
}
.cat-head { padding: 16px 18px 6px; }
.cat-label { font-size: 17px; font-weight: 700; color: var(--white); }
.cat-sublabel { font-size: 12px; color: var(--sub); margin-top: 3px; }

.group-name {
  font-size: 12px; color: var(--sub); font-weight: 600; letter-spacing: 0.5px;
  padding: 12px 18px 4px;
}
.unit-list { padding: 2px 8px 10px; }
.unit-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px; border-radius: 12px;
}
.unit-item:active { background: var(--hover-bg); }
.unit-left { flex: 1; min-width: 0; }
.unit-title {
  font-size: 15px; color: var(--white); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.unit-meta { font-size: 12px; color: var(--sub); margin-top: 2px; }
.unit-progress {
  font-size: 12px; color: var(--teal); margin-left: 10px;
  background: var(--teal-soft); padding: 3px 10px; border-radius: 10px; white-space: nowrap;
}
.unit-progress--done { color: var(--teal); background: var(--teal-soft); }

/* ============ 会员权益页 ============ */
.view-vip { max-width: 1080px; margin: 0 auto; }
.view-invite { max-width: 800px !important; margin: 0 auto; }
.vip-section { margin-bottom: 28px; }
.vip-section-title {
  font-size: 16px; font-weight: 700; color: var(--white);
  margin-bottom: 14px;
}

.price-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.price-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 18px 14px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.price-card:hover { border-color: var(--line-strong); }
.price-card--selected, .price-card--featured {
  border-color: var(--teal);
  background: rgba(45,212,191,0.06);
}
.pc-tag {
  display: inline-block;
  font-size: 11px; color: var(--sub);
  background: var(--line);
  padding: 3px 10px; border-radius: 10px;
  margin-bottom: 10px;
}
.price-card--featured .pc-tag {
  background: var(--teal-soft); color: var(--teal);
}
.pc-time { margin-bottom: 6px; }
.pc-num { font-size: 26px; font-weight: 700; color: var(--white); }
.pc-unit { font-size: 14px; color: var(--sub); margin-left: 2px; }
.pc-price { font-size: 12px; color: var(--sub); margin-top: 4px; }
.pc-badge {
  position: absolute; top: -8px; right: 8px;
  font-size: 11px; font-weight: 600;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: var(--white); padding: 2px 8px; border-radius: 8px;
  white-space: nowrap;
}
.vip-tips {
  margin-top: 10px; font-size: 12px; color: var(--sub);
  line-height: 1.6;
}

/* 权益对比表 */
.benefit-table {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.bt-head, .bt-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}
.bt-head {
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.bt-col {
  padding: 12px 14px;
  font-size: 13px;
  text-align: center;
}
.bt-col--label { text-align: left; color: var(--ink); font-weight: 500; }
.bt-col--vip { color: var(--teal); font-weight: 600; background: rgba(45,212,191,0.06); }
.bt-row { border-bottom: 1px solid var(--line); }
.bt-row:last-child { border-bottom: none; }
.bt-row .bt-col:not(.bt-col--label):not(.bt-col--vip) { color: var(--sub); }

/* 购买提示 + CTA */
.vip-notice {
  display: flex; align-items: center; gap: 10px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 12px; padding: 14px 16px;
  margin: 20px 0 16px;
}
.vip-notice__icon { flex: 0 0 auto; display: flex; align-items: center; }
.vip-notice__text { font-size: 13px; color: #fbbf24; line-height: 1.5; }

.vip-cta {
  display: block; width: 100%;
  padding: 14px; border-radius: 26px;
  background: var(--teal); color: var(--text-on-accent);
  font-size: 15px; font-weight: 700;
  text-align: center;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  outline: none;
}
.vip-cta:hover { opacity: 0.92; transform: translateY(-1px); }
.vip-cta:active { transform: translateY(0); }
.vip-cta:focus-visible { box-shadow: 0 0 0 3px var(--teal-soft); }
.vip-hero__title {
  font-size: 30px; font-weight: 800; color: var(--white);
  margin: 0 0 18px; letter-spacing: 0.5px;
}
.vip-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.vip-pill {
  font-size: 13px; color: var(--sub);
  background: var(--card); border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 28px;
}
.plan-card {
  position: relative;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 26px 22px;
  display: flex; flex-direction: column;
}
.plan-card--member {
  border-color: var(--line);
}
.plan-card--partner {
  border-color: #fbbf24;
  background: linear-gradient(180deg, rgba(245,158,11,0.14) 0%, var(--card) 60%);
  box-shadow: 0 0 0 1.5px rgba(245,158,11,0.55), 0 14px 48px rgba(245,158,11,0.28);
}
.plan-rec--gold {
  position: absolute; top: -11px; left: 16px;
  background: #1a1005; color: #fbbf24;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 8px;
  border: 1px solid rgba(245,158,11,0.5);
  white-space: nowrap;
}
.plan-rec {
  position: absolute; top: -11px; right: 16px;
  background: var(--teal); color: var(--text-on-accent);
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 8px;
}
.plan-hot {
  position: absolute; top: -11px; right: 16px;
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1005;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 8px;
  white-space: nowrap; box-shadow: 0 4px 14px rgba(245,158,11,0.35);
}
.plan-head { margin-bottom: 16px; }
.plan-name { font-size: 19px; font-weight: 700; color: var(--white); }
.plan-crown, .plan-gem { font-size: 16px; }
.plan-desc { font-size: 12px; color: var(--sub); margin-top: 4px; }
.plan-price {
  font-size: 36px; font-weight: 800; color: var(--white);
  line-height: 1; margin-bottom: 6px;
}
.plan-price__unit { font-size: 14px; font-weight: 500; color: var(--sub); margin-left: 4px; }
.plan-price__origin {
  font-size: 14px; font-weight: 500; color: var(--muted);
  margin-left: 8px; text-decoration: line-through;
}
.plan-price--mp { font-size: 16px; color: var(--teal); font-weight: 600; margin: 8px 0 14px; }
.plan-badge {
  display: inline-block; align-self: flex-start;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 8px; margin-bottom: 14px;
}
.plan-badge--neutral { background: var(--line); color: var(--sub); }
.plan-badge--gold { background: rgba(245,158,11,0.15); color: #fbbf24; }

.m-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px; margin-bottom: 14px;
}
.m-tab {
  flex: 1 1 auto;
  padding: 8px 6px; border-radius: 9px;
  font-size: 13px; color: var(--sub); font-weight: 600;
  position: relative; white-space: nowrap;
}
.m-tab--on { background: var(--teal); color: var(--text-on-accent); }
.m-tab__badge {
  position: absolute; top: -8px; right: -4px;
  font-size: 9px; font-weight: 700;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: var(--white); padding: 1px 5px; border-radius: 6px;
  white-space: nowrap;
}

.plan-list { list-style: none; padding: 0; margin: 16px 0 0; flex: 1; }
.plan-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13.5px; color: var(--ink);
  padding: 7px 0; line-height: 1.5;
}
.plan-item::before {
  content: '✓'; flex: 0 0 auto;
  color: var(--teal); font-weight: 700;
}
.plan-item--strong { color: var(--white); font-weight: 600; }
.plan-item b { color: var(--teal); font-weight: 700; }
.plan-item--note { color: var(--muted); font-size: 12px; }
.plan-item--note::before { content: '·'; color: var(--muted); }

.plan-btn {
  display: block; width: 100%;
  padding: 13px; border-radius: 26px;
  font-size: 15px; font-weight: 700;
  text-align: center; margin-top: 18px;
}
.plan-btn--teal { background: var(--teal); color: var(--text-on-accent); }
.plan-btn--gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1005; box-shadow: 0 6px 20px rgba(245,158,11,0.35); }

.vip-thanks {
  text-align: center; color: var(--sub); font-size: 13px;
  padding: 18px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; margin-top: 8px;
}

@media (min-width: 960px) {
  .plan-card--partner {
    transform: none;
    z-index: 2;
  }
}
@media (max-width: 959.98px) {
  .plans { grid-template-columns: 1fr; }
  .vip-hero__title { font-size: 24px; }
}

/* ============ 推广返利页（颜色全部走主题变量，不写死深色） ============ */
.rebate-hero {
  position: relative;
  text-align: center;
  padding: 34px 18px 30px;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--teal-soft) 0%, transparent 62%),
    linear-gradient(180deg, var(--card) 0%, transparent 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-bottom: 20px;
  overflow: hidden;
}
.rebate-hero::before {
  content: "";
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 180px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
}
.rebate-flow {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.rebate-flow__step { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.rebate-flow__icon {
  width: 64px; height: 64px; border-radius: 20px;
  background: linear-gradient(145deg, var(--teal-soft) 0%, var(--card) 78%);
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal);
  box-shadow: 0 6px 16px -8px var(--teal-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rebate-flow__step:hover .rebate-flow__icon {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px -8px var(--teal-soft);
}
.rebate-flow__icon svg { width: 30px; height: 30px; }
.rebate-flow__label { font-size: 13px; color: var(--ink); font-weight: 600; }
.rebate-flow__arrow {
  width: 34px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--teal-soft), var(--teal), var(--teal-soft));
  position: relative;
  flex: 0 0 auto;
  margin-top: -18px;
}
.rebate-flow__arrow::after {
  content: "";
  position: absolute; right: -2px; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  transform: translateY(-50%);
  box-shadow: 0 0 8px var(--teal);
}

.rebate-rate-line {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  font-size: 15px; color: var(--ink); font-weight: 600;
  line-height: 1.4;
}
.rebate-rate {
  font-size: 56px; font-weight: 800; line-height: 1;
  margin: 0 2px;
  background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 18px rgba(251,191,36,0.35));
}
.rebate-rate__note { font-size: 12px; color: var(--sub); font-weight: 500; }
.rebate-partner-line {
  margin-top: 16px; font-size: 13px; color: #f59e0b;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.22);
  border-radius: 999px; padding: 7px 18px; display: inline-block;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.teal-text { color: var(--teal); }

.rebate-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 22px 18px;
  margin-bottom: 20px;
}
.rebate-card__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 12px;
}
.rebate-card__title::before {
  content: "";
  width: 4px; height: 16px; border-radius: 3px;
  background: linear-gradient(180deg, var(--teal), var(--teal-soft));
  flex: 0 0 auto;
}
.rebate-card__desc { font-size: 13px; color: var(--sub); line-height: 1.6; margin-bottom: 14px; }
.rebate-share-btn {
  margin-bottom: 20px;
  box-shadow: 0 10px 24px -10px var(--teal);
}
.rebate-rule-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--ink); line-height: 1.6;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.rebate-rule-item:last-child { border-bottom: none; }
.rebate-rule-item .rule-dot {
  color: var(--teal); font-weight: 700; flex: 0 0 auto;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--teal-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; margin-top: 2px;
}
.view-typing.active { display: block; }

/* ---- 三段式布局壳：顶栏 / 中间滚动区 / 底部工具条 ---- */
.typing-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  left: 0; right: 0;
}
/* 键盘弹起时：壳整体钉到 visualViewport 可见区 */
.typing-shell.kb-open {
  height: var(--vv-h, 100dvh);
  position: fixed;
  left: 0; right: 0;
  top: var(--vv-top, 0px);
  bottom: auto;
}

/* ---- 顶部栏（壳内 flex 子项，不再 fixed） ---- */
.top-bar {
  flex: 0 0 auto;
  width: 100%; max-width: 100vw;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
  padding-bottom: 10px;
  padding-left: calc(env(safe-area-inset-left, 0px) + 16px);
  padding-right: calc(env(safe-area-inset-right, 0px) + 16px);
  box-sizing: border-box;
  overflow: hidden;
  background: var(--bar-bg);
  border-bottom: 1px solid var(--line);
}
.top-left { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
/* 设置移到左上：返回键与设置保持安全距离，设置紧贴标题 */
.top-left .back-btn { margin-right: 4px; }
.gear-btn--left { margin-left: 2px; margin-right: 2px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: var(--sub); transition: background 0.15s, color 0.15s;
}
.icon-btn:active { background: var(--teal-soft); color: var(--teal); }
.icon-btn svg { width: 22px; height: 22px; }
.breadcrumb {
  display: flex; align-items: baseline; gap: 6px; min-width: 0; flex: 1 1 auto;
  font-size: 14px; white-space: nowrap; overflow: hidden;
}
.bc-course { color: var(--sub); flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-sep { color: var(--muted); flex: 0 0 auto; }
.bc-unit { color: var(--white); font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.top-right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; min-width: 0; margin-left: auto; }
.mode-wrap { position: relative; }
.mode-btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--teal); color: var(--teal);
  border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 600;
}
.mode-caret { font-size: 10px; }
.mode-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 120;
  min-width: 160px;
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}
.mode-menu.show { display: block; }
.mode-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--ink);
}
.mode-item:hover { background: var(--hover-bg); }
.mode-item--on { color: var(--teal); font-weight: 600; }
.mode-item[disabled] { color: var(--muted); cursor: not-allowed; }
.mode-item .soon { font-size: 11px; color: var(--muted); }

.top-stat {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--sub); font-size: 13px;
  padding: 5px 8px; border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.stat-ico { width: 16px; height: 16px; }
.stat-num { color: var(--ink); }

/* ---- 中间滚动区（唯一可滚动容器） ---- */
.typing-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.typing-inner {
  max-width: 800px; margin: 0 auto;
  min-height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 16px 24px;
  box-sizing: border-box;
}

/* 原文卡（默认隐藏） */
.original-card {
  display: none;
  margin-bottom: 30px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 22px 22px 18px;
}
.original-card.show { display: block; }
.oc-words {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 18px 22px;
}
.oc-word { display: inline-flex; flex-direction: column; align-items: center; }
.oc-word__text {
  font-family: var(--en-font);
  font-size: 26px; font-weight: 600; color: var(--white); line-height: 1.2;
  border-bottom: 2px solid var(--accent-soft);
  padding-bottom: 4px;
}
.oc-translation {
  margin-top: 16px; text-align: center;
  color: var(--sub); font-size: 16px; line-height: 1.5;
}
/* ===== 句型成分分组卡（有解析时） ===== */
.struct-scroll { width: 100%; }
.struct-group {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--line);
}
.struct-group:last-child { margin-bottom: 0; }
.struct-group-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.struct-words {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-start;
}
.struct-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}
.struct-word-text {
  font-family: var(--en-font);
  color: var(--white);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  border-bottom: 2px solid;
  padding-bottom: 2px;
  white-space: nowrap;
}
.struct-word-ipa { color: #94a3b8; font-size: 11px; margin-top: 2px; white-space: nowrap; }
.struct-word-mean { color: #94a3b8; font-size: 11px; margin-top: 1px; white-space: nowrap; }

/* 中文译文 */
.sentence-translation {
  text-align: center;
  font-family: var(--zh-font);
  font-size: calc(30px * var(--ts));
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 28px;
}

/* 词槽区 */
.word-slots {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end;
  gap: 12px 16px;
}
.word-slot {
  position: relative;
  display: inline-block;
  min-width: 1.6em;
  cursor: pointer; user-select: none;
}
.word-ghost {
  visibility: hidden;
  font-family: var(--en-font);
  font-size: calc(30px * var(--ts));
  font-weight: 600; line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}
.word-text {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  font-family: var(--en-font);
  font-size: calc(30px * var(--ts));
  font-weight: 600; line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}
.word-underline {
  display: block;
  width: 100%;
  height: 3px; border-radius: 2px;
  margin-top: 3px;
}
/* 状态 */
.slot--pending .word-text { color: transparent; }
.slot--pending .word-underline { background: var(--pending-line); }

.slot--current .word-text { color: var(--white); }
.slot--current .word-underline { background: var(--accent); }

.slot--filled .word-text { color: var(--white); }
.slot--filled .word-underline { background: var(--accent); }

.slot--correct .word-text { color: var(--white); }
.slot--correct .word-underline { background: var(--accent); }

.slot--wrong .word-text { color: var(--wrong); }
.slot--wrong .word-underline { background: var(--wrong); }
.word-slot.slot--shake { animation: word-shake 0.3s ease; }

@keyframes word-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

/* ---- 底部胶囊工具条（壳内流式 flex 子项，不再 fixed） ---- */
.bottom-toolbar {
  position: static;
  left: auto; bottom: auto; transform: none;
  flex: 0 0 auto;
  margin: 0 auto 12px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 4px);
  display: flex; gap: 4px;
  background: var(--bar-bg);
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  padding-top: 10px;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: content-box;
}
.tool-btn {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--sub);
  transition: background 0.15s, color 0.15s;
}
.tool-btn svg { width: 24px; height: 24px; }
.tool-btn:hover { background: var(--teal-soft); color: var(--teal); }
.tool-btn:active { background: var(--teal-soft); color: var(--teal); }
.tool-btn.is-on { color: var(--teal); background: var(--teal-softer); }
/* 主题快捷切换按钮：深色显示太阳(切到浅色)，浅色显示月亮(切到深色) */
#btn-theme .ico-sun { display: none; }
#btn-theme .ico-moon { display: block; }
:root[data-theme="light"] #btn-theme .ico-sun { display: block; }
:root[data-theme="light"] #btn-theme .ico-moon { display: none; }

/* ---- 隐藏输入框（必须在屏幕内才能弹 iOS 键盘） ---- */
.hidden-input {
  position: fixed;
  top: 0; left: -9999px;
  width: 200px; height: 30px;
  opacity: 1; pointer-events: none;
  font-size: 16px;
  border: none; padding: 0; margin: 0;
  background: transparent; color: transparent;
  z-index: -1;
}

/* ============ 结算页（深色） ============ */
.view-finish { display: none; }
.view-finish.active {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.finish-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 26px; width: 100%; max-width: 380px;
  text-align: center;
}
.finish-icon { font-size: 48px; }
.finish-title { font-size: 22px; font-weight: 700; margin-top: 12px; color: var(--white); }
.finish-sub { font-size: 13px; color: var(--sub); margin-top: 8px; }
.finish-stats {
  display: flex; justify-content: space-around;
  margin: 24px 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 0;
}
.fstat-num { font-size: 22px; font-weight: 700; color: var(--teal); }
.fstat-label { font-size: 12px; color: var(--sub); margin-top: 4px; }
.finish-btn {
  display: block; width: 100%;
  padding: 13px; border-radius: 24px;
  background: var(--teal); color: var(--text-on-accent);
  font-size: 15px; font-weight: 700;
  margin-top: 12px;
}
.finish-btn--ghost {
  background: transparent; color: var(--sub);
  border: 1px solid var(--sub);
}

/* ============ 设置弹层（深色） ============ */
.sc-mask {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6);
  align-items: flex-end; justify-content: center;
}
.sc-mask.show { display: flex; }
.sc-card {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px;
  max-height: 82vh; overflow-y: auto;
  padding: 18px 20px calc(env(safe-area-inset-bottom, 0px) + 22px);
}
.sc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sc-title { font-size: 17px; font-weight: 700; color: var(--white); }
.sc-x { font-size: 18px; color: var(--sub); padding: 4px 10px; }

.set-group-title {
  font-size: 14px; font-weight: 600; margin: 16px 0 8px;
  display: flex; align-items: baseline; gap: 8px; color: var(--ink);
}
.set-group-sub { font-size: 11px; color: var(--sub); font-weight: 400; }
.set-row { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-btn {
  padding: 8px 16px; border-radius: 18px;
  background: var(--bg-2); color: var(--sub);
  font-size: 13px; border: 1px solid var(--line);
}
.seg-btn--on {
  background: var(--teal-soft); color: var(--teal); border-color: transparent; font-weight: 600;
}
.sc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.sc-name { font-size: 14px; color: var(--ink); }
.ui-switch {
  width: 46px; height: 26px; border-radius: 13px;
  background: var(--line-strong); position: relative; transition: background 0.15s;
}
.ui-switch__dot {
  position: absolute; top: 2px; left: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: left 0.15s;
}
.ui-switch.on { background: var(--teal); }
.ui-switch.on .ui-switch__dot { left: 22px; }

/* ============ 庆祝动效 ============ */
.celebrate-layer {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.celebrate-layer.show { display: flex; }
.celebrate-check {
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(45,212,191,0.15);
  display: flex; align-items: center; justify-content: center;
  animation: pop 0.4s ease;
}
.celebrate-check__mark {
  width: 40px; height: 22px;
  border-left: 4px solid var(--teal);
  border-bottom: 4px solid var(--teal);
  transform: rotate(-45deg) translate(2px,-2px);
}
@keyframes pop {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ============ 软键盘弹起 ============
   旧方案 body.kb-open 上移 fixed 工具条 + 给 .typing-main 加 padding-bottom 已停用。
   现由 .typing-shell.kb-open 钉到 visualViewport（见上），容器收缩天然避让。 */
.typing-shell.kb-open { /* 规则见上方三段式壳 */ }

/* ============ 桌面宽屏 ============ */
@media (min-width: 768px) {
  .sentence-translation { font-size: calc(36px * var(--ts)); }
  .word-text { font-size: calc(36px * var(--ts)); }
  .word-ghost { font-size: calc(36px * var(--ts)); }
  .oc-word__text { font-size: 30px; }
}

/* ============ 移动端（<960px）：抽屉模式 ============ */
@media (max-width: 959.98px) {
  .layout.active { padding-left: 0; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 70;
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar.open { transform: translateX(0); }
  .hamburger { display: flex; }
  .main-content { padding: calc(env(safe-area-inset-top, 0px) + 60px) 16px calc(env(safe-area-inset-bottom, 0px) + 32px); }
  .price-cards { grid-template-columns: repeat(2, 1fr); }
}

/* 移动端：隐藏全屏按钮 + 顶栏收窄（≤767.98px） */
@media (max-width: 767.98px) {
  .fs-btn { display: none !important; }
  .top-bar {
    gap: 6px;
    padding-left: calc(env(safe-area-inset-left, 0px) + 10px);
    padding-right: calc(env(safe-area-inset-right, 0px) + 10px);
  }
  .top-right { gap: 2px; }
  .mode-btn { padding: 3px 6px; font-size: 12px; }
  .mode-caret { font-size: 9px; }
  .top-stat { padding: 3px 2px; font-size: 12px; gap: 3px; }
  .stat-ico { display: none; }
  .breadcrumb { font-size: 13px; gap: 4px; }
  .bc-course, .bc-sep { display: none; }
  .icon-btn { width: 32px; height: 32px; }
  .icon-btn svg { width: 19px; height: 19px; }
}

/* 手机窄屏专项（≤480px） */
@media (max-width: 480px) {
  .top-bar {
    gap: 4px;
    padding-left: calc(env(safe-area-inset-left, 0px) + 8px);
    padding-right: calc(env(safe-area-inset-right, 0px) + 8px);
  }
  .top-left { gap: 4px; }
  .top-right { gap: 2px; flex: 0 0 auto; }
  .mode-btn { padding: 2px 5px; font-size: 11px; gap: 3px; border-radius: 7px; }
  .top-stat { padding: 2px 1px; font-size: 11px; gap: 2px; }
  .breadcrumb { font-size: 12px; }
  .bc-unit { max-width: 150px; }
  .icon-btn { width: 30px; height: 30px; }
  .icon-btn svg { width: 18px; height: 18px; }
}

/* 极窄屏（≤360px） */
@media (max-width: 360px) {
  .top-bar { gap: 3px; }
  .top-right { gap: 1px; }
  .timer { display: none !important; }
  .bc-unit { max-width: 120px; }
}

/* ============ 确认支付弹窗 ============ */
.pay-mask {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.pay-mask.show { opacity: 1; pointer-events: auto; }
.pay-modal {
  width: 92%; max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 24px 20px;
  position: relative;
  transform: translateY(16px) scale(.97);
  transition: transform .2s;
  max-height: 90vh; overflow-y: auto;
}
.pay-mask.show .pay-modal { transform: translateY(0) scale(1); }
.pay-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--line); color: var(--sub);
  font-size: 14px; line-height: 1;
}
.pay-title { font-size: 19px; font-weight: 700; color: var(--white); text-align: center; }
.pay-subtitle { font-size: 13px; color: var(--sub); text-align: center; margin-top: 6px; }

.pay-methods { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.pay-method {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg-2); cursor: pointer;
}
.pay-method--on { border-color: var(--teal); background: rgba(45,212,191,0.08); }
.pay-method--disabled { opacity: .5; cursor: not-allowed; }
.pay-method__icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto; }
.pay-method__icon--wechat { color: #07c160; }
.pay-method__icon--alipay { color: #1677ff; }
.pay-method__name { flex: 1; font-size: 14px; font-weight: 600; color: var(--white); }
.pay-method__tag { font-size: 10px; padding: 2px 8px; border-radius: 6px; }
.pay-method__tag--wechat { background: rgba(7,193,96,0.15); color: #07c160; }
.pay-method__tag--muted { background: var(--line-strong); color: var(--sub); }

.pay-item {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px; padding: 14px;
  background: var(--bg-2); border-radius: 12px;
}
.pay-item__name { font-size: 14px; color: var(--ink); }
.pay-item__price { display: flex; align-items: baseline; gap: 8px; flex: 0 0 auto; }
.pay-item__origin { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.pay-item__pay { font-size: 22px; font-weight: 800; color: var(--white); }

.pay-benefits { margin-top: 14px; }
.pay-benefit-row {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12.5px; color: var(--sub); padding: 3px 0;
}
.pay-benefit-row::before { content: '✓'; color: var(--teal); font-weight: 700; flex: 0 0 auto; }

.pay-warn {
  margin-top: 14px; padding: 12px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 10px;
  font-size: 12px; color: #fbbf24; line-height: 1.6;
}

.pay-agree {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; font-size: 12.5px; color: var(--sub);
  cursor: pointer;
}
.pay-agree input { accent-color: var(--teal); width: 16px; height: 16px; flex: 0 0 auto; }

.pay-submit {
  display: block; width: 100%; margin-top: 16px;
  padding: 13px; border-radius: 26px;
  font-size: 15px; font-weight: 700; text-align: center;
  background: var(--teal); color: var(--text-on-accent);
}
.pay-submit:disabled { opacity: .4; cursor: not-allowed; }
.pay-submit--gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1005; box-shadow: 0 6px 20px rgba(245,158,11,0.35); }
.pay-submit--gold:disabled { box-shadow: none; }

.pay-fallback {
  display: block; width: 100%; margin-top: 10px;
  padding: 12px; border-radius: 26px;
  font-size: 14px; font-weight: 600; text-align: center;
  background: var(--line); color: var(--teal);
  border: 1px solid var(--teal);
}

.pay-secure { margin-top: 14px; text-align: center; font-size: 11px; color: var(--muted); }

/* 移动端：底部弹层 */
@media (max-width: 959.98px) {
  .pay-mask { align-items: flex-end; }
  .pay-modal {
    width: 100%; max-width: none;
    border-radius: 18px 18px 0 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    max-height: 92vh;
  }
  .pay-mask.show .pay-modal { transform: translateY(0); }
}

/* ============ 账户区（侧栏底部） ============ */
.account-area { padding: 6px 0; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.account-login-btn { width: 100%; }
.account-logged {
  display: flex; align-items: center; gap: 8px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
}
.account-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-soft) 130%);
  color: var(--text-on-accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px -3px var(--teal-soft);
}
.account-avatar svg { width: 18px; height: 18px; }
.account-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.account-avatar span { font-size: 15px; font-weight: 700; }
.account-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.account-top-line {
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
.account-copy {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  color: var(--sub);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.account-copy svg { width: 12px; height: 12px; }
.account-copy:hover { color: var(--teal); border-color: var(--teal); background: var(--teal-soft); }
.account-copy.copied { color: var(--white); border-color: var(--teal); background: var(--teal); }
.account-phone {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--ink);
  font-family: var(--en-font);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.account-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
  width: max-content;
  box-shadow: 0 2px 8px -2px rgba(245,158,11,0.55);
  flex: 0 0 auto;
}
.account-badge[hidden] { display: none; }
.account-logout {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.account-logout svg { width: 15px; height: 15px; }
.account-logout:hover { color: var(--wrong); border-color: var(--wrong); background: var(--hover-bg); }

/* ============ 登录弹窗 ============ */
.login-mask {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.login-mask.show { opacity: 1; pointer-events: auto; }

.login-modal {
  position: relative;
  width: 90%; max-width: 400px;
  background: var(--card);
  border-radius: 18px;
  padding: 32px 28px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.login-mask.show .login-modal { transform: scale(1); }

.login-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 16px; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.login-close:hover { background: var(--hover-bg); color: var(--ink); }

.login-title {
  font-size: 22px; font-weight: 700; color: var(--ink);
  margin-bottom: 6px;
}
.login-subtitle {
  font-size: 13px; color: var(--sub);
  margin-bottom: 24px;
}

.login-field { margin-bottom: 16px; }
.login-field__label {
  font-size: 13px; font-weight: 600; color: var(--sub);
  margin-bottom: 8px;
}
.login-phone-row, .login-code-row {
  display: flex; align-items: center; gap: 10px;
}
.login-country {
  font-size: 16px; font-weight: 600; color: var(--ink);
  padding-right: 10px;
  border-right: 1px solid var(--line-strong);
  white-space: nowrap;
  font-family: var(--en-font);
}
.login-input {
  flex: 1; min-width: 0;
  height: 46px;
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 16px; color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  font-family: var(--en-font);
}
.login-input::placeholder { color: var(--muted); }
.login-input:focus { border-color: var(--teal); }
.login-input--code { letter-spacing: 4px; }

.login-code-btn {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  background: var(--teal-soft);
  color: var(--teal);
  border: 1px solid var(--teal);
  white-space: nowrap;
  transition: opacity 0.15s, background 0.15s;
}
.login-code-btn:disabled {
  opacity: 0.4; cursor: not-allowed;
  background: var(--card-2);
  color: var(--muted);
  border-color: var(--line-strong);
}

.login-agree {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 18px 0 20px;
  cursor: pointer;
}
.login-agree input[type="checkbox"] {
  margin-top: 2px;
  width: 16px; height: 16px;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
}
.login-agree__text {
  font-size: 12px; color: var(--sub);
  line-height: 1.6;
}
.login-agree__link {
  color: var(--teal);
  cursor: pointer;
}
.login-agree__link:hover { text-decoration: underline; }

.login-submit {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: 16px; font-weight: 700;
  background: var(--teal);
  color: var(--text-on-accent);
  transition: opacity 0.15s, transform 0.1s;
}
.login-submit:disabled {
  opacity: 0.35; cursor: not-allowed;
}
.login-submit:not(:disabled):active { transform: scale(0.98); }
.login-submit.loading { opacity: 0.6; pointer-events: none; }

.login-tip {
  margin-top: 12px;
  font-size: 12px; color: var(--wrong);
  text-align: center;
  min-height: 16px;
}

/* 移动端：登录弹窗底部弹出 */
@media (max-width: 959.98px) {
  .login-mask { align-items: flex-end; }
  .login-modal {
    width: 100%; max-width: none;
    border-radius: 18px 18px 0 0;
    padding: 28px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    max-height: 90vh;
  }
  .login-mask.show .login-modal { transform: translateY(0); }
}

/* ============ 返利明细（合伙人态） ============ */
.rebate-summary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--sub);
  background: var(--teal-soft);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 10px 18px;
  margin-bottom: 16px;
}
.rebate-summary b {
  color: #fbbf24; font-size: 26px; line-height: 1;
  margin: 0 2px;
  text-shadow: 0 0 14px rgba(251,191,36,0.3);
}

.rebate-tabs {
  display: flex; gap: 4px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}
.rebate-tab {
  flex: 1;
  padding: 9px 0;
  font-size: 14px; font-weight: 600;
  color: var(--sub);
  border-radius: 9px;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}
.rebate-tab--on {
  color: var(--text-on-accent);
  background: var(--teal);
  box-shadow: 0 4px 12px -4px var(--teal);
}

.rebate-list { min-height: 80px; }
.rebate-list__loading, .rebate-list__empty {
  text-align: center; color: var(--muted);
  padding: 32px 0; font-size: 13px;
}
.rebate-list__nomore {
  text-align: center; color: var(--muted);
  padding: 16px 0; font-size: 12px;
}
.rebate-list__error {
  text-align: center; color: var(--wrong);
  padding: 24px 0; font-size: 13px;
}
.rebate-retry {
  display: block; margin: 10px auto 0;
  padding: 6px 20px; border-radius: 8px;
  font-size: 13px; color: var(--teal);
  border: 1px solid var(--teal);
  background: var(--teal-soft);
}

.rebate-load-more {
  display: block; width: 100%;
  padding: 10px; margin-top: 12px;
  border-radius: 10px;
  font-size: 13px; color: var(--teal);
  border: 1px solid var(--line-strong);
  background: var(--card-2);
}
.rebate-load-more:hover { background: var(--hover-bg); }

.rebate-item {
  display: flex; align-items: center;
  padding: 12px 6px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
  border-radius: 12px;
  transition: background 0.15s;
}
.rebate-item:hover { background: var(--hover-bg); }
.rebate-item:last-child { border-bottom: none; }
.rebate-item__avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(145deg, var(--teal) 0%, var(--teal-soft) 100%);
  color: var(--text-on-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 10px -4px var(--teal-soft);
}
.rebate-item__avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.rebate-item__info {
  flex: 1; min-width: 0;
}
.rebate-item__name {
  font-size: 14px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rebate-item__meta {
  font-size: 12px; color: var(--muted);
  margin-top: 3px;
  font-family: var(--en-font);
}.rebate-item__copy {
  flex: 0 0 auto;
  margin-left: 8px;
  font-size: 11px; color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 2px 9px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.rebate-item__copy:hover { color: var(--white); border-color: var(--teal); background: var(--teal); }
.rebate-item__copy.copied { color: var(--white); border-color: var(--teal); background: var(--teal); }
.rebate-item__amount {
  font-size: 16px; font-weight: 800; color: #fbbf24;
  white-space: nowrap;
  font-family: var(--en-font);
  text-shadow: 0 0 12px rgba(251,191,36,0.25);
}
.home-cta__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.home-cta__title { font-size: 15px; color: var(--ink); }
.home-cta__sub { font-size: 12px; color: var(--sub); }
.home-cta__btn {
  flex: 0 0 auto; padding: 9px 18px; border: none; border-radius: 10px;
  background: var(--teal); color: var(--text-on-accent);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.home-cta__btn:active { transform: scale(.97); }
@media (max-width: 520px) {
  .home-cta { flex-direction: column; align-items: stretch; }
  .home-cta__btn { width: 100%; }
}

/* ============ 对齐新增：工具条按钮状态 ============ */
.tool-btn { position: relative; }
.tool-btn .speed-tag {
  position: absolute; bottom: 2px; right: 4px;
  font-size: 9px; font-weight: 700; color: var(--teal);
  background: var(--teal-softer); border-radius: 4px; padding: 0 3px; line-height: 1.3;
}
.tool-btn.is-on { color: var(--teal); background: var(--teal-softer); }
.tool-btn .star-ico { width: 22px; height: 22px; }
.tool-btn.is-collected .star-ico { fill: #f59e0b; stroke: #f59e0b; }

/* ============ 对齐新增：句型结构阶段 ============ */
.stage-structure {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  background: var(--bg);
  padding: 20px 18px calc(96px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.stage-structure[hidden] { display: none; }
.struct-scroll-wrap { flex: 1; overflow-y: auto; }
.struct-sentence-text {
  font-size: calc(26px * var(--ts, 1)); font-weight: 700; color: var(--ink);
  line-height: 1.4; margin-bottom: 8px;
}
.struct-translation { font-size: calc(15px * var(--ts, 1)); color: var(--sub); margin-bottom: 22px; }
.struct-groups { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; }
.struct-group { display: flex; flex-direction: column; }
.struct-group-tag {
  align-self: flex-start; color: #fff; font-size: 11px; font-weight: 600;
  padding: 1px 8px; border-radius: 8px; margin-bottom: 4px;
}
.struct-words { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; }
.struct-word { display: inline-flex; flex-direction: column; align-items: center; cursor: pointer; }
.struct-word-text {
  font-size: calc(22px * var(--ts, 1)); font-weight: 600; color: var(--ink);
  border-bottom: 3px solid; padding-bottom: 2px;
}
.struct-word.score-high .struct-word-text { color: #5cb87a; }
.struct-word.score-mid .struct-word-text { color: #facc15; }
.struct-word.score-low .struct-word-text { color: #f56c6c; }
.struct-word-ipa { color: var(--sub); font-size: 11px; margin-top: 2px; white-space: nowrap; }
.struct-word-mean { color: var(--sub); font-size: 11px; margin-top: 1px; white-space: nowrap; }
.struct-loading, .struct-retry { color: var(--sub); font-size: 14px; margin-top: 20px; }
.struct-retry-btn {
  margin-left: 10px; padding: 4px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--teal); cursor: pointer;
}
.assess-area { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.assess-btn {
  width: 132px; height: 132px; border-radius: 50%;
  border: 3px solid var(--teal); background: var(--teal-softer);
  color: var(--teal); font-size: 16px; font-weight: 700; cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none;
  transition: transform .1s;
}
.assess-btn.recording { background: #f56c6c; border-color: #f56c6c; color: #fff; transform: scale(1.06); }
.assess-msg { font-size: 13px; color: var(--sub); min-height: 18px; }
.assess-result { display: flex; align-items: center; gap: 22px; margin-top: 6px; }
.assess-ring { position: relative; width: 96px; height: 96px; }
.assess-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.assess-ring__bg { fill: none; stroke: var(--line); stroke-width: 8; }
.assess-ring__fg {
  fill: none; stroke: var(--teal); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .6s ease, stroke .3s;
}
.assess-ring__num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: var(--ink);
}
.assess-bars { display: flex; flex-direction: column; gap: 8px; min-width: 180px; }
.assess-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--sub); }
.assess-bar__track { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.assess-bar__fill { height: 100%; border-radius: 3px; width: 0; transition: width .6s ease; }
.assess-bar__num { width: 30px; text-align: right; color: var(--ink); font-weight: 600; }
.struct-continue {
  margin: 22px auto 0; padding: 13px 34px; border: none; border-radius: 24px;
  background: var(--teal); color: var(--text-on-accent); font-size: 16px; font-weight: 700; cursor: pointer;
}
.struct-continue:active { transform: scale(.97); }

/* ============ 对齐新增：庆祝动效 ============ */
.celebrate-layer { z-index: 400; }
.celebrate-ring {
  position: absolute; width: 200px; height: 200px; border-radius: 50%;
  border: 4px solid rgba(255,213,74,.8);
  opacity: 0; animation: ring-pop .6s ease-out forwards;
}
@keyframes ring-pop {
  0% { transform: scale(.3); opacity: .9; }
  100% { transform: scale(1.6); opacity: 0; }
}
.celebrate-burst { position: absolute; left: 50%; top: 45%; pointer-events: none; }
.burst-dot {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  animation: burst-fly var(--dur,1s) cubic-bezier(.1,.7,.3,1) forwards;
  animation-delay: var(--delay,0s);
}
.burst-dot.bar { width: 10px; height: 4px; border-radius: 2px; }
.burst-dot.star { width: 10px; height: 10px; border-radius: 50%; background: transparent; }
@keyframes burst-fly {
  0% { transform: translate(0,0) rotate(0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.4); opacity: 0; }
}
.celebrate-ribbon { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ribbon-piece {
  position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 2px;
  animation: ribbon-fall var(--dur,1.6s) ease-in forwards;
  animation-delay: var(--delay,0s);
}
@keyframes ribbon-fall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: .6; }
}

/* ============ 对齐新增：字体滑块 ============ */
.set-row--slider { align-items: center; gap: 12px; }
#font-scale-slider { flex: 1; accent-color: var(--teal); }
.seg-btn--mini { padding: 5px 12px; font-size: 12px; }
.sc-shortcuts { font-size: 12px; color: var(--sub); line-height: 1.9; }
.sc-shortcuts kbd {
  display: inline-block; padding: 1px 6px; border: 1px solid var(--line);
  border-radius: 4px; background: var(--card); color: var(--ink);
  font-family: inherit; font-size: 11px; margin: 0 2px;
}

/* 可自定义快捷键 */
.hk-list { display: flex; flex-direction: column; }
.hk-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.hk-name { font-size: 13px; color: var(--ink); }
.hk-key {
  padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); min-width: 64px;
}
.hk-key kbd {
  display: inline-block; min-width: 20px; text-align: center;
  font-family: inherit; font-size: 13px; color: var(--teal); font-weight: 600;
}
.hk-key:active { background: var(--teal-soft); }
.hk-capt { font-size: 12px; color: var(--sub); }
.hk-reset {
  margin-top: 12px; width: 100%; padding: 10px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--sub); font-size: 13px;
}

/* ============ 对齐新增：点词翻译面板 ============ */
.word-popup-mask {
  display: none; position: fixed; inset: 0; z-index: 350;
  background: rgba(0,0,0,.5); align-items: flex-end; justify-content: center;
}
.word-popup-mask.show { display: flex; }
.word-popup {
  width: min(560px, 100%); max-height: 70vh; overflow-y: auto;
  background: var(--card); border-radius: 18px 18px 0 0; padding: 18px 20px 28px;
}
.word-popup__head { display: flex; align-items: center; justify-content: space-between; }
.word-popup__word { font-size: 24px; font-weight: 700; color: var(--ink); }
.word-popup__actions { display: flex; gap: 8px; }
.word-popup__btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 16px; cursor: pointer;
}
.word-popup__btn.stared { color: #f59e0b; border-color: #f59e0b; }
.word-popup__ipa { color: var(--sub); font-size: 14px; margin: 6px 0 10px; }
.word-popup__content { font-size: 14px; color: var(--ink); line-height: 1.7; }
.finish-btn--primary { background: var(--teal); color: var(--text-on-accent); }

/* fix: hidden 属性被自定义 display 覆盖导致提前显示（#assess-result/#btn-next-course 等） */
[hidden] { display: none !important; }


/* ============ 句型结构层 视觉精修（参考设计稿） ============ */
.stage-structure { align-items: center; text-align: center; padding-top: 44px; }
.struct-scroll-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; }
.struct-sentence-text { font-size: calc(30px * var(--ts, 1)); letter-spacing: .3px; margin-bottom: 6px; }
.struct-translation { margin-bottom: 30px; }
.struct-groups { justify-content: center; gap: 18px 20px; }
.struct-group { align-items: center; }
.struct-group-tag { border-radius: 7px; padding: 2px 10px; font-size: 12px; }
.struct-words { justify-content: center; }
.struct-word {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 18px 10px;
  box-shadow: 0 2px 12px rgba(15,23,42,.06);
  transition: transform .12s ease;
}
.struct-word:active { transform: scale(.96); }
.struct-word-text { font-size: calc(24px * var(--ts, 1)); }
.assess-area { margin-top: 36px; }
.assess-btn {
  width: 148px; height: 148px;
  box-shadow: 0 10px 32px rgba(45,212,191,.28);
}
.struct-continue { padding: 14px 44px; border-radius: 28px; margin-top: 30px; }
@media (max-width: 520px) {
  .struct-word { padding: 10px 14px 8px; }
  .struct-word-text { font-size: calc(21px * var(--ts, 1)); }
}
/* 语法点胶囊 + 进度/鼓励行 */
.struct-grammar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px auto 4px; }
.struct-grammar[hidden] { display: none; }
.grammar-chip {
  background: var(--card); border: 1px solid var(--line); color: var(--sub);
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
}
.struct-meta { margin-top: 16px; font-size: 13px; color: var(--sub); display: flex; align-items: center; justify-content: center; gap: 8px; }
.struct-meta[hidden] { display: none; }
.struct-meta__prog { color: var(--teal); font-weight: 600; }
.struct-meta__dot { color: var(--line); }
.struct-meta__tip { color: var(--sub); }
/* 修正：去掉单词白卡，只保留组级灰卡（对齐参考图） */
.struct-group {
  background: var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 0;
}
.struct-words { align-items: flex-start; }
.struct-word {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.struct-word:active { transform: none; }
/* ===== 对齐参考稿：去词卡 + 胶囊朗读钮 + 收紧间距 ===== */
.struct-group { background: transparent !important; padding: 0 !important; margin-bottom: 0 !important; }
.struct-group-tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; margin-bottom: 6px; }
.struct-groups { gap: 20px 26px; align-items: flex-start; }
.struct-words { gap: 0; }
.struct-word { background: transparent !important; border: none !important; padding: 0 !important; box-shadow: none !important; }
.struct-word-text { font-size: calc(23px * var(--ts, 1)); border-bottom-width: 2px; padding-bottom: 3px; }
.struct-words { justify-content: center; }
.struct-grammar { margin-top: 22px; }

/* 朗读：圆形大按钮 -> 小胶囊 */
.assess-area { margin-top: 26px; gap: 8px; }
.assess-btn {
  width: auto !important; height: auto !important;
  display: inline-flex !important; align-items: center; gap: 8px;
  padding: 10px 20px !important;
  border-radius: 999px !important;
  border: 1px solid var(--teal) !important;
  background: rgba(45,212,191,.12) !important;
  color: var(--teal); font-size: 14px !important; font-weight: 600;
  box-shadow: none !important;
}
.assess-btn__ico { width: 18px; height: 18px; flex: 0 0 auto; }
.assess-btn.recording { background: #f56c6c !important; border-color: #f56c6c !important; color: #fff !important; transform: scale(1.04); }
.struct-continue { padding: 11px 36px; font-size: 15px; margin-top: 26px; }
/* 垂直居中 + 自适应：内容别贴顶 */
.struct-scroll-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 100%; max-width: 760px; margin: 0 auto;
}
.struct-sentence-text, .struct-translation, .struct-groups, .struct-grammar, .struct-meta {
  text-align: center;
}
.struct-groups { justify-content: center; }
.assess-area { margin-top: 30px; }
@media (max-width: 520px) {
  .stage-structure { padding-top: 16px; }
  .struct-groups { gap: 14px 18px; }
}
/* 看原文卡：词组横排不竖排 */
.struct-scroll { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-start; }

/* 打字时词槽行强制水平居中 */
.word-slots { width: 100% !important; justify-content: center !important; }
.typing-inner { align-items: center; }
.ver-badge{position:fixed;left:10px;bottom:8px;z-index:9999;font:11px/1.4 -apple-system,Segoe UI,sans-serif;opacity:.45;color:#888;user-select:none;pointer-events:none;letter-spacing:.3px;}

/* ============ 课程市场 ============ */
.view-market { padding: 28px 32px 60px; }
.market-head { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:18px; }
.market-head .page-title { margin:0 0 6px; font-size:30px; font-weight:700; }
.market-head .page-sub { margin:0; color:var(--muted,#888); font-size:14px; }
.market-search { position:relative; width:320px; flex:none; }
.market-search__ico { position:absolute; left:14px; top:50%; transform:translateY(-50%); width:18px; height:18px; color:#aaa; }
.market-search input { width:100%; padding:11px 16px 11px 42px; border:1px solid var(--line,#e5e8ef); border-radius:22px; background:#fff; font-size:14px; outline:none; }
.market-search input:focus { border-color:#2f6bff; }
.market-banner { display:flex; align-items:center; gap:8px; background:#eef4ff; color:#2f6bff; padding:12px 16px; border-radius:10px; font-size:13px; margin-bottom:18px; }
.market-banner__dot { font-weight:700; }
.market-tabs, .market-subtabs { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.market-tab, .market-subtab { padding:8px 18px; border-radius:18px; background:#fff; border:1px solid var(--line,#e5e8ef); font-size:14px; cursor:pointer; color:#444; }
.market-tab--active, .market-subtab--active { background:#1f2937; color:#fff; border-color:#1f2937; }
.market-subtab { background:#eef4ff; border-color:transparent; color:#2f6bff; }
.market-subtab--active { background:#2f6bff; color:#fff; }
.market-count { text-align:right; color:#888; font-size:13px; margin:-6px 0 14px; }
.market-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
@media (max-width:1200px){ .market-grid{ grid-template-columns:repeat(3,1fr);} }
@media (max-width:900px){ .market-grid{ grid-template-columns:repeat(2,1fr);} .market-search{ width:200px; } }
.mcard { cursor:pointer; }
.mcard__cover { position:relative; width:100%; aspect-ratio:4/3.2; border-radius:12px; background:#dfe5ee center/cover no-repeat; overflow:hidden; }
.mcard__level { position:absolute; left:10px; top:10px; background:rgba(255,255,255,.9); color:#555; font-size:11px; padding:3px 9px; border-radius:8px; }
.mcard__title { margin-top:10px; font-size:15px; font-weight:600; color:#222; line-height:1.35; }

/* 设置：选中态 & 方框输入 */
.sc-card .seg-btn--on, .set-row .seg-btn--on { background:#2f6bff; color:#fff; border-color:#2f6bff; }
html[data-slot-style="box"] .word-underline { background:transparent !important; border:1.5px solid var(--line-strong, #cbd5e1); border-radius:6px; height:1.1em; margin-top:2px; }
html[data-slot-style="box"] .slot--current .word-underline { border-color:var(--accent,#2f6bff); }
html[data-slot-style="box"] .slot--filled .word-underline, html[data-slot-style="box"] .slot--correct .word-underline { border-color:var(--accent,#2f6bff); }
html[data-slot-style="box"] .slot--wrong .word-underline { border-color:var(--wrong,#f56c6c); }

/* ============ 课程详情页 ============ */
.view-detail { padding: 24px 32px 60px; max-width: 1100px; margin: 0 auto; }
.dt-back { color:#2f6bff; font-size:14px; cursor:pointer; margin-bottom:16px; }
.dt-hero { display:flex; gap:24px; background:#fff; border:1px solid var(--line,#eef1f6); border-radius:16px; padding:24px; box-shadow:0 4px 18px rgba(20,40,90,.05); }
.dt-hero__cover { width:300px; flex:none; aspect-ratio:4/3; border-radius:12px; background:linear-gradient(135deg,#4f8bff,#7aa8ff); display:flex; align-items:center; justify-content:center; }
.dt-cover-emoji { font-size:72px; }
.dt-hero__main { flex:1; min-width:0; }
.dt-hero__title { margin:0 0 10px; font-size:26px; font-weight:700; }
.dt-tags { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.dt-tag { font-size:12px; color:#667; background:#f1f4fa; padding:3px 10px; border-radius:8px; }
.dt-prog { margin-bottom:18px; }
.dt-prog__label { display:flex; justify-content:space-between; font-size:13px; color:#667; margin-bottom:6px; }
.dt-prog__bar { height:8px; background:#eef1f7; border-radius:5px; overflow:hidden; }
.dt-prog__fill { height:100%; width:0; background:linear-gradient(90deg,#2f6bff,#5ea0ff); transition:width .3s; }
.dt-hero__actions { display:flex; gap:12px; }
.dt-btn { padding:10px 22px; border-radius:10px; font-size:14px; cursor:pointer; border:none; }
.dt-btn--primary { background:#2f6bff; color:#fff; }
.dt-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin:22px 0; }
.dt-stat { background:#fff; border:1px solid var(--line,#eef1f6); border-radius:12px; padding:18px; text-align:center; }
.dt-stat__num { font-size:26px; font-weight:700; color:#222; }
.dt-stat__lbl { font-size:13px; color:#888; margin-top:4px; }
.dt-section { margin-top:10px; }
.dt-section__head { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.dt-section__title { font-size:17px; font-weight:700; }
.dt-section__sub { font-size:13px; color:#888; }
.dt-lesson-list { display:flex; flex-direction:column; gap:12px; }
.dt-lesson { display:flex; align-items:center; gap:14px; background:#fff; border:1px solid var(--line,#eef1f6); border-radius:12px; padding:14px 18px; cursor:pointer; }
.dt-lesson__no { width:34px; height:34px; flex:none; border-radius:9px; background:#eef4ff; color:#2f6bff; font-weight:700; display:flex; align-items:center; justify-content:center; font-size:14px; }
.dt-lesson__no--done { background:#e6f7ec; color:#16a34a; }
.dt-lesson__body { flex:1; min-width:0; }
.dt-lesson__title { font-size:15px; font-weight:600; }
.dt-lesson__meta { font-size:12px; color:#999; margin-top:3px; }
.dt-lesson__count { font-size:13px; color:#667; }
.dt-lesson__go { padding:7px 16px; border-radius:9px; font-size:13px; background:#2f6bff; color:#fff; border:none; }
.dt-lesson__go--done { background:#16a34a; }
@media (max-width:800px){ .dt-hero{ flex-direction:column;} .dt-hero__cover{ width:100%;} .dt-stats{ grid-template-columns:repeat(2,1fr);} }
/* sidebar-navitem-fix */
html, body { overflow-x: hidden !important; }
.nav-item > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.nav-item { flex-wrap: nowrap; }
.nav-item .nav-ico { flex: 0 0 auto; }
.sidebar { overflow-x: hidden; }
.main, .view { max-width: 100%; }/* market-ref-style */
.market-tab { padding:9px 20px !important; border-radius:20px !important; background:#2f3b52 !important; border:1px solid #2f3b52 !important; color:#fff !important; font-weight:500; }
.market-tab--active { background:#111827 !important; border-color:#111827 !important; }
.mcard { cursor:pointer; transition:transform .15s; }
.mcard:hover { transform:translateY(-3px); }
.mcard__cover { aspect-ratio:4/3 !important; border-radius:14px !important; box-shadow:0 6px 18px rgba(30,50,90,.10); }
.mcard__level { background:rgba(22,163,74,.92) !important; color:#fff !important; }
.mcard__join { margin-top:3px; font-size:12px; color:#9aa3b2; }/* sidebar-hard-fix */
.sidebar-nav .nav-item span, .nav-item > span { white-space:nowrap !important; overflow:hidden; text-overflow:ellipsis; display:inline-block; max-width:100%; }
.nav-item { flex-wrap:nowrap !important; }
.sidebar { width:232px !important; flex:0 0 232px !important; }/* mcard-overlay-style */
.mcard__cover { position:relative; }
.mcard__overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(20,35,70,.35); opacity:0; transition:opacity .18s; border-radius:14px; }
.mcard:hover .mcard__overlay, .mcard__cover:hover .mcard__overlay { opacity:1; }
.mcard__joinbtn { padding:9px 22px; border-radius:20px; border:none; background:#fff; color:#2f6bff; font-size:14px; font-weight:600; cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,.18); }
.mcard__joinbtn.is-started { background:#2f6bff; color:#fff; }
.mcard__joinbtn.is-done { background:#16a34a; color:#fff; }/* market-tab-white-fix */
.market-tab { background:#fff !important; border:1px solid #e5e8ef !important; color:#4b5563 !important; }
.market-tab--active { background:#1a2233 !important; border-color:#1a2233 !important; color:#fff !important; }
.market-subtab { background:#f3f5f9 !important; border:1px solid transparent !important; color:#6b7280 !important; }
.market-subtab--active { background:#2f6bff !important; color:#fff !important; }/* mc-grid-style */
.mc-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin:18px 0; }
.mc-stat { background:#fff; border:1px solid #eef1f6; border-radius:12px; padding:16px; text-align:center; }
.mc-stat__n { font-size:26px; font-weight:700; color:#1f2937; }
.mc-stat__l { font-size:13px; color:#8a94a6; margin-top:4px; }
.mc-continue { display:flex; align-items:center; gap:16px; background:#fff; border:1px solid #eef1f6; border-radius:16px; padding:16px 20px; margin-bottom:22px; cursor:pointer; box-shadow:0 4px 16px rgba(20,40,90,.05); }
.mc-continue__cover { width:86px; height:64px; border-radius:10px; background:linear-gradient(135deg,#4f8bff,#7aa8ff); display:flex; align-items:center; justify-content:center; font-size:34px; flex:none; }
.mc-continue__main { flex:1; min-width:0; }
.mc-continue__title { font-size:16px; font-weight:700; }
.mc-continue__meta { font-size:13px; color:#8a94a6; margin:4px 0 8px; }
.mc-continue__bar { height:6px; background:#eef1f7; border-radius:4px; overflow:hidden; }
.mc-continue__fill { height:100%; background:#2f6bff; }
.mc-continue__btn { padding:9px 20px; border-radius:10px; background:#2f6bff; color:#fff; border:none; font-size:14px; cursor:pointer; }
.mc-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.mc-card { background:#fff; border:1px solid #eef1f6; border-radius:14px; overflow:hidden; cursor:pointer; transition:transform .15s; }
.mc-card:hover { transform:translateY(-3px); }
.mc-card__cover { height:120px; background:linear-gradient(135deg,#e8eefc,#d6e2fb); display:flex; align-items:center; justify-content:center; font-size:48px; position:relative; }
.mc-card__level { position:absolute; left:10px; top:10px; font-size:11px; padding:3px 9px; border-radius:8px; color:#fff; }
.mc-card__level--low { background:rgba(22,163,74,.9); }
.mc-card__level--mid { background:rgba(245,158,11,.9); }
.mc-card__level--high { background:rgba(239,68,68,.9); }
.mc-card__body { padding:12px 14px; }
.mc-card__title { font-size:15px; font-weight:600; }
.mc-card__meta { font-size:12px; color:#8a94a6; margin:4px 0 8px; }
.mc-card__bar { height:5px; background:#eef1f7; border-radius:3px; overflow:hidden; }
.mc-card__fill { height:100%; background:#2f6bff; }
.mc-add { height:180px; border:1.5px dashed #d5dbe8; border-radius:14px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#9aa6bb; cursor:pointer; }
.mc-add__plus { font-size:34px; line-height:1; }
.mc-add__txt { font-size:13px; margin-top:8px; }
@media (max-width:900px){ .mc-grid{ grid-template-columns:repeat(2,1fr);} .mc-stats{ grid-template-columns:repeat(2,1fr);} }/* struct-redesign-v32 */
.struct-sentence-text { display:none !important; }
.struct-translation { font-size:calc(28px * var(--ts,1)) !important; font-weight:700 !important; color:var(--text,#1f2937) !important; letter-spacing:.5px; margin-bottom:28px !important; }
.struct-grammar { margin-top:22px !important; }
.grammar-chip { background:var(--card,#fff); border:1px solid var(--line,#e5e7eb); color:var(--sub,#6b7280); }/* mcard-joined-v33 */
.mcard__overlay { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; }
.mcard__joined { background:rgba(34,197,94,.95); color:#fff; font-size:13px; font-weight:600; padding:7px 16px; border-radius:999px; }
.mcard__gostudy { background:#2f6bff; color:#fff; font-size:14px; font-weight:600; padding:9px 24px; border-radius:999px; border:none; cursor:pointer; }.bt-col--partner { color:#b45309; font-weight:600; background:rgba(245,158,11,.08); }.account-badge[hidden]{ display:none; }
