/* ============================================================
   数学帮 · 前台设计系统 v1
   风格：浅灰蓝底 + 白色卡片 + 靛蓝主色（只给可交互元素）
   对标极客数学帮：蓝色教育调性 / 圆润卡片 / 强层级
   ============================================================ */

:root {
  /* ── 背景（浅蓝灰，白卡片浮起） ── */
  --bg: #F2F4F8;
  --bg-2: #E9ECF3;
  --card: #FFFFFF;
  --card-2: #FAFBFD;

  /* ── 主色：靛蓝（教育蓝） ── */
  --bl: #2B5CE6;
  --bl-hi: #4A78F0;
  --bl-lo: #1D3FAE;
  --bl-soft: #EDF2FE;
  --bl-soft-2: #DCE6FD;
  --bl-line: #C3D4FB;
  --bl-ink: #16307A;

  /* ── 辅色：橙（价格 / 强调） ── */
  --or: #FF6A00;
  --or-hi: #FF8A1F;
  --or-soft: #FFF3E6;
  --or-line: #FFD9B8;

  /* ── 文字 ── */
  --tx-1: #14181F;
  --tx-2: #5B6474;
  --tx-3: #8E97A6;
  --tx-4: #BCC3CE;

  /* ── 语义 ── */
  --green: #12B76A; --green-bg: #E7F8F0;
  --red: #F04438;   --red-bg: #FEE9E7;
  --cyan: #0BA5A5;  --cyan-bg: #E5F6F6;
  --gold: #D48806;  --gold-bg: #FEF6E5;
  --violet: #7C3AED; --violet-bg: #F3EBFF;

  /* ── 边框/分割 ── */
  --line: #EBEEF4;
  --line-2: #DFE3EC;

  /* ── 圆角 ── */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-pill: 999px;

  /* ── 阴影 ── */
  --sh-xs: 0 1px 2px rgba(20, 30, 60, .04);
  --sh-sm: 0 2px 10px rgba(20, 30, 60, .06);
  --sh-md: 0 10px 28px rgba(20, 30, 60, .10);
  --sh-bl: 0 6px 18px rgba(43, 92, 230, .22);
  --sh-bl-lg: 0 12px 30px rgba(43, 92, 230, .28);

  /* ── 字体 ── */
  --font: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-num: 'DIN Alternate', 'Bahnschrift', 'Arial Narrow', var(--font);

  /* ── 尺寸 ── */
  --app-max: 480px;
  --tabbar-h: 58px;
  --topbar-h: 50px;
  --gut: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--tx-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
table { border-collapse: collapse; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--tx-3); }
::-webkit-scrollbar { width: 0; height: 0; }

/* ══════════ App ══════════ */
.app {
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}
@media (min-width: 481px) {
  body { background: #E4E8F0; }
  .app { box-shadow: 0 0 44px rgba(20, 30, 60, .10); }
}
.spacer { height: 24px; }
.app.has-tabbar .spacer { height: calc(var(--tabbar-h) + 20px); }

/* ══════════ 顶栏 ══════════ */
.topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  padding: 0 var(--gut);
  position: sticky; top: 0; z-index: 60;
  overflow: hidden;
}
.topbar .logo { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 16.5px; color: var(--bl); flex: none; }
.topbar .logo img { width: 27px; height: 27px; border-radius: 8px; flex: none; }
.topbar .logo .sub { font-size: 11px; color: var(--tx-3); font-weight: 400; white-space: nowrap; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--tx-2); flex: none; white-space: nowrap; }
.topbar .right a { display: flex; align-items: center; gap: 4px; }
.topbar .right a:active { color: var(--bl); }
.topbar .back {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: var(--r-sm); color: var(--tx-1);
  font-size: 0;
  position: relative;
}
.topbar .back::before {
  content: '';
  width: 9px; height: 9px; margin-left: 3px;
  border-left: 2.2px solid currentColor;
  border-bottom: 2.2px solid currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
}
.topbar .back:active { background: var(--bg-2); }
.topbar.blue { background: var(--bl); border-bottom: 0; color: #fff; }
.topbar.blue .right, .topbar.blue .right a { color: rgba(255,255,255,.92); }
.topbar.blue .back { color: #fff; }
.topbar.blue .back:active { background: rgba(255,255,255,.16); }

/* ══════════ Hero ══════════ */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 24px var(--gut) 26px;
  color: #fff;
  background: linear-gradient(135deg, #2B5CE6 0%, #4A78F0 52%, #6D93F5 100%);
}
.hero::after {
  content: ''; position: absolute; z-index: 0;
  width: 240px; height: 240px; right: -70px; top: -96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.20), transparent 68%);
}
.hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 80% at 2% -20%, rgba(255,255,255,.20), transparent 62%),
    linear-gradient(100deg, rgba(12,32,96,.34) 0%, rgba(12,32,96,.10) 42%, rgba(12,32,96,0) 70%);
}
.hero-body { position: relative; z-index: 2; max-width: 76%; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
  background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.15));
  border: 1px solid rgba(255,255,255,.34);
  padding: 4px 11px 4px 9px; border-radius: var(--r-pill);
  margin-bottom: 11px; box-shadow: 0 2px 8px rgba(12,32,96,.18);
}
.hero-eyebrow i {
  width: 5px; height: 5px; border-radius: 50%; background: #C8F5D8;
  box-shadow: 0 0 0 3px rgba(200,245,216,.28);
}
.hero h1 {
  font-size: 25px; font-weight: 800; line-height: 1.34; letter-spacing: -.5px;
  text-shadow: 0 2px 10px rgba(12,32,96,.24);
}
.hero h1 .hl {
  display: inline-block; vertical-align: baseline;
  font-family: var(--font-num); font-weight: 800; letter-spacing: -.6px;
  color: #1D3FAE;
  background: linear-gradient(180deg, #FFFFFF 0%, #E8F0FF 100%);
  padding: 0 8px 2px; border-radius: 8px;
  transform: rotate(-1.6deg); margin-right: 5px;
  box-shadow: 0 4px 12px rgba(12,32,96,.28), inset 0 -2px 0 rgba(120,160,240,.42);
  text-shadow: none;
}
.hero h1 .hh { font-size: 23px; }
.hero p {
  font-size: 12.5px; line-height: 1.62; margin-top: 9px;
  color: rgba(255,255,255,.94);
}
.hero-stats {
  display: inline-flex; align-items: stretch; margin-top: 15px;
  padding: 8px 2px;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.10));
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.30), 0 6px 18px rgba(12,32,96,.20);
}
.hero-stat { position: relative; padding: 0 13px; text-align: center; }
.hero-stat + .hero-stat::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 1px; background: rgba(255,255,255,.26);
}
.hero-stat b {
  display: block; font-family: var(--font-num); font-size: 19px; line-height: 22px;
  font-weight: 800; letter-spacing: -.6px; font-variant-numeric: tabular-nums;
}
.hero-stat b.is-wide { font-size: 16px; letter-spacing: -.7px; }
.hero-stat span { display: block; font-size: 10.5px; margin-top: 3px; color: rgba(255,255,255,.86); }

/* ══════════ 搜索 ══════════ */
.searchbar {
  background: #fff; padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 9px;
}
.searchbox {
  flex: 1; background: var(--bg); border-radius: 18px; height: 34px;
  display: flex; align-items: center; padding: 0 13px;
  font-size: 12.5px; color: var(--tx-3); cursor: pointer;
}
.searchbox svg { margin-right: 7px; flex: none; }
.searchbox:active { background: var(--bg-2); }

/* ══════════ 分类 chips ══════════ */
.chips {
  display: flex; gap: 8px; padding: 11px var(--gut);
  overflow-x: auto; background: #fff;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: var(--r-pill);
  background: var(--bg); color: var(--tx-2);
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
  transition: all .16s;
}
.chip .ci { display: inline-flex; }
.chip.active {
  background: var(--bl); color: #fff;
  box-shadow: 0 3px 10px rgba(43,92,230,.26);
}
.chip:active { transform: scale(.96); }

/* ══════════ 通用区块 ══════════ */
.section { padding: 16px var(--gut) 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 11px;
}
.section-head h3 {
  font-size: 16px; font-weight: 700; letter-spacing: -.3px;
  display: flex; align-items: center; gap: 6px;
}
.section-head h3::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--bl-hi), var(--bl-lo));
}
.section-head .more { font-size: 12.5px; color: var(--tx-3); }

.card {
  background: var(--card); border-radius: var(--r-lg);
  box-shadow: var(--sh-xs); overflow: hidden;
}
.card-pad { padding: 14px 15px; }
.hr { height: 1px; background: var(--line); margin: 10px 0; }

/* ══════════ 名师网格 ══════════ */
.teacher-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.teacher-card {
  background: var(--card); border-radius: var(--r-lg); padding: 13px;
  box-shadow: var(--sh-xs); text-align: center;
  border: 1px solid var(--line);
}
.teacher-card:active { background: var(--card-2); }
.tc-avatar {
  width: 50px; height: 50px; border-radius: 50%; margin: 0 auto 8px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--bl-hi), var(--bl-lo));
  color: #fff; font-weight: 700; font-size: 18px;
  box-shadow: 0 4px 12px rgba(43,92,230,.24);
}
.tc-name { font-size: 14px; font-weight: 700; letter-spacing: -.2px; }
.tc-title { font-size: 11px; color: var(--tx-3); margin-top: 2px; }
.tc-meta { font-size: 11px; color: var(--tx-4); margin-top: 5px; }
.tc-meta .star { color: var(--or); font-weight: 700; }

/* ══════════ 课程卡片 ══════════ */
.course {
  background: var(--card); border-radius: var(--r-lg);
  padding: 13px 14px; margin-bottom: 10px;
  box-shadow: var(--sh-xs); border: 1px solid var(--line);
  display: flex; gap: 11px; align-items: flex-start;
  position: relative; overflow: hidden; width: 100%;
}
.course:active { background: var(--card-2); }
.cs-thumb {
  width: 76px; height: 76px; border-radius: var(--r-md); flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; text-align: center; padding: 7px 5px; overflow: hidden;
  background: linear-gradient(140deg, var(--bl-hi), var(--bl-lo));
  box-shadow: 0 4px 12px rgba(43,92,230,.20);
}
.cs-thumb .g { font-size: 11px; opacity: .9; font-weight: 600; letter-spacing: .3px; flex: none; }
.cs-thumb .t {
  font-size: 11px; font-weight: 700; margin-top: 3px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all; max-height: 28px;
  padding: 0 1px;
}
.cs-thumb .d {
  font-size: 10px; opacity: .85; margin-top: 3px; flex: none;
  background: rgba(255,255,255,.22); border-radius: var(--r-pill);
  padding: 1px 6px; white-space: nowrap;
}
.cs-main { flex: 1; min-width: 0; overflow: hidden; }
.cs-name {
  font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cs-teacher {
  font-size: 12px; color: var(--tx-2); margin-top: 5px;
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.cs-teacher .avatar {
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(140deg, var(--bl-hi), var(--bl-lo));
  color: #fff; font-size: 9px; display: grid; place-items: center;
  font-weight: 700; flex: none;
}
.cs-tags { display: flex; gap: 5px; margin-top: 6px; flex-wrap: nowrap; overflow: hidden; }
.cs-tag {
  font-size: 10.5px; padding: 1.5px 7px; border-radius: var(--r-pill);
  background: var(--bl-soft); color: var(--bl); border: 1px solid var(--bl-line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px;
}
.cs-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-top: 9px; gap: 8px; flex-wrap: nowrap;
}
.cs-price { display: flex; align-items: baseline; gap: 3px; min-width: 0; }
.cs-price .cur { color: var(--or); font-size: 12px; font-weight: 700; }
.cs-price .val {
  font-family: var(--font-num); font-size: 22px; font-weight: 800;
  color: var(--or); letter-spacing: -.8px; line-height: 1;
}
.cs-price .orig { font-size: 11px; color: var(--tx-4); text-decoration: line-through; margin-left: 3px; white-space: nowrap; }
.cs-sold { font-size: 11px; color: var(--tx-4); margin-top: 3px; }
.cs-buy { flex: none; }
.cs-buy .btn { height: 30px; padding: 0 14px; font-size: 12.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 34px; padding: 0 16px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: all .16s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--bl-hi), var(--bl-lo));
  color: #fff; box-shadow: var(--sh-bl);
}
.btn-primary:active { box-shadow: 0 3px 10px rgba(43,92,230,.26); }
.btn-or {
  background: linear-gradient(135deg, var(--or-hi), var(--or));
  color: #fff; box-shadow: 0 6px 16px rgba(255,106,0,.24);
}
.btn-ghost {
  background: var(--bl-soft); color: var(--bl); border: 1px solid var(--bl-line);
}
.btn-plain { background: var(--bg-2); color: var(--tx-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-block { display: flex; width: 100%; }
.grow { flex: 1; min-width: 0; }
.btn[disabled], .btn.off {
  background: var(--bg-2); color: var(--tx-4); box-shadow: none; pointer-events: none;
}

/* ══════════ 徽标 ══════════ */
.badge {
  display: inline-block; font-size: 10.5px; font-weight: 600;
  padding: 2px 7px; border-radius: var(--r-xs); line-height: 1.5;
  background: var(--bg-2); color: var(--tx-2);
}
.badge-bl { background: var(--bl-soft); color: var(--bl); }
.badge-or { background: var(--or-soft); color: var(--or); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-danger { background: var(--red-bg); color: var(--red); }
.badge-info { background: var(--cyan-bg); color: var(--cyan); }
.badge-gray { background: var(--bg-2); color: var(--tx-3); }
.badge-warning { background: var(--gold-bg); color: var(--gold); }

.tag-hot {
  position: absolute; top: 0; left: 0;
  background: linear-gradient(135deg, #FF7A45, #FF4D4F); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: var(--r-lg) 0 var(--r-lg) 0;
}

/* ══════════ 列表行 ══════════ */
.rows { background: var(--card); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-xs); }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row .k { font-size: 13.5px; color: var(--tx-2); }
.row .v { margin-left: auto; font-size: 13.5px; font-weight: 600; }
.money { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; }
.text-bl { color: var(--bl); }
.text-or { color: var(--or); }
.text-2 { color: var(--tx-2); }
.text-3 { color: var(--tx-3); }
.text-4 { color: var(--tx-4); }
.center-t { text-align: center; }

/* ══════════ 统计格 ══════════ */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat-box {
  background: var(--card); border-radius: var(--r-md); padding: 12px 8px;
  text-align: center; box-shadow: var(--sh-xs); border: 1px solid var(--line);
}
.stat-box b {
  display: block; font-family: var(--font-num); font-size: 20px; font-weight: 800;
  letter-spacing: -.6px; color: var(--tx-1);
}
.stat-box span { display: block; font-size: 11px; color: var(--tx-3); margin-top: 2px; }

/* ══════════ 邀请卡 ══════════ */
.invite-box {
  background: linear-gradient(140deg, var(--bl) 0%, #3F6BEA 60%, #5C86F2 100%);
  border-radius: var(--r-lg); padding: 16px 16px 18px; color: #fff;
  box-shadow: var(--sh-bl-lg); position: relative; overflow: hidden;
}
.invite-box::after {
  content: ''; position: absolute; width: 160px; height: 160px;
  right: -50px; bottom: -70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 68%);
}
.iv-title { font-size: 13px; opacity: .9; position: relative; z-index: 1; }
.invite-code {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 9px; position: relative; z-index: 1;
}
.invite-code b {
  font-family: var(--font-num); font-size: 26px; font-weight: 800;
  letter-spacing: 3px;
}
.iv-copy {
  background: rgba(255,255,255,.94); color: var(--bl);
  font-size: 12px; font-weight: 600; padding: 5px 13px; border-radius: var(--r-pill);
}
.invite-link {
  margin-top: 12px; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.30);
  border-radius: var(--r-md); padding: 9px 11px;
  display: flex; align-items: center; gap: 8px; position: relative; z-index: 1;
}
.invite-link .url {
  font-size: 11.5px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  opacity: .95;
}
.cp-ico { opacity: .85; flex: none; display: flex; }
.iv-tip {
  font-size: 11px; line-height: 1.75; opacity: .82;
  margin-top: 10px; position: relative; z-index: 1;
}

/* ══════════ 提示条 ══════════ */
.notice {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--bl-soft); border: 1px solid var(--bl-line);
  border-radius: var(--r-md); padding: 11px 13px;
  font-size: 12.5px; color: var(--bl-ink); line-height: 1.75;
}
.notice > span { flex: none; color: var(--bl); display: flex; margin-top: 1px; }
.notice b { color: var(--bl-lo); }
.notice.warn { background: var(--gold-bg); border-color: #F5DFB0; color: #8A5B08; }
.notice.warn > span { color: var(--gold); }
.notice.warn b { color: #7A4F06; }

/* ══════════ 进度条 ══════════ */
.progress {
  height: 7px; border-radius: var(--r-pill); background: var(--bg-2); overflow: hidden;
}
.progress i {
  display: block; height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--bl-hi), var(--bl-lo));
  transition: width .4s;
}

/* ══════════ Tab 切换 ══════════ */
.tab-underline {
  display: flex; background: var(--card); border-bottom: 1px solid var(--line);
}
.tab-underline button {
  flex: 1; padding: 11px 0; font-size: 13.5px; color: var(--tx-2);
  position: relative; font-weight: 500;
}
.tab-underline button.active { color: var(--bl); font-weight: 700; }
.tab-underline button.active::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 26px; height: 2.5px; border-radius: 2px; background: var(--bl);
}
.seg {
  display: flex; background: var(--bg-2); border-radius: var(--r-pill); padding: 3px; gap: 3px;
}
.seg button {
  flex: 1; padding: 7px 0; border-radius: var(--r-pill);
  font-size: 13px; color: var(--tx-2); font-weight: 500;
}
.seg button.active { background: #fff; color: var(--bl); font-weight: 700; box-shadow: var(--sh-xs); }

/* ══════════ 底部导航 ══════════ */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--app-max);
  height: var(--tabbar-h); background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex; z-index: 80;
  box-shadow: 0 -2px 14px rgba(20,30,60,.05);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10.5px; color: var(--tx-3); font-weight: 500;
}
.tabbar a .ic { display: flex; }
.tabbar a.active { color: var(--bl); font-weight: 600; }
.tabbar a.active .ic { transform: translateY(-1px); }

/* ══════════ 表单 ══════════ */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12.5px; color: var(--tx-2);
  margin-bottom: 6px; font-weight: 500;
}
.input {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r-md); font-size: 15px; color: var(--tx-1);
  transition: border-color .16s, box-shadow .16s;
}
.input:focus {
  outline: none; border-color: var(--bl); box-shadow: 0 0 0 3px var(--bl-soft);
}
.input.err { border-color: var(--red); }
.input::placeholder { color: var(--tx-4); }
textarea.input { height: auto; padding: 11px 14px; resize: vertical; min-height: 84px; line-height: 1.6; }
.code-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 12.5px; color: var(--bl); font-weight: 600;
  padding: 0 10px; height: 32px; border-radius: var(--r-sm);
  background: var(--bl-soft);
}
.code-btn[disabled] { color: var(--tx-4); background: var(--bg-2); }

/* ══════════ 弹层 ══════════ */
.mask {
  position: fixed; inset: 0; background: rgba(16,22,40,.48);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 24px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: var(--r-xl); padding: 20px;
  width: 100%; max-width: 340px; box-shadow: var(--sh-md);
  animation: pop .2s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h4 { font-size: 16.5px; font-weight: 700; letter-spacing: -.3px; }
.modal .desc { font-size: 13px; color: var(--tx-2); margin-top: 8px; line-height: 1.7; }
.modal .modal-body { margin-top: 14px; }
.modal .acts { display: flex; gap: 10px; margin-top: 18px; }
.modal .acts .btn { flex: 1; height: 42px; }

.toast {
  position: fixed; left: 50%; top: 46%; transform: translate(-50%, -50%);
  background: rgba(16,22,40,.88); color: #fff;
  padding: 11px 20px; border-radius: var(--r-md);
  font-size: 13.5px; z-index: 300; max-width: 78%;
  text-align: center; line-height: 1.6;
  animation: fade .16s ease;
}

/* ══════════ 空状态 ══════════ */
.empty {
  padding: 46px 20px; text-align: center;
}
.empty .t { font-size: 13.5px; color: var(--tx-3); }
.empty .ico { font-size: 40px; margin-bottom: 10px; opacity: .34; }

/* ══════════ 页脚 ══════════ */
.site-foot {
  padding: 22px var(--gut) 26px;
  text-align: center; font-size: 11.5px; color: var(--tx-4);
  line-height: 2;
}
.sf-links { display: flex; justify-content: center; gap: 9px; margin-bottom: 8px; }
.sf-links a { color: var(--tx-3); }
.sf-links i { font-style: normal; color: var(--tx-4); }
.sf-org { color: var(--tx-3); }
.sf-org b { color: var(--tx-2); }
.sf-lic a { color: var(--tx-3); }
.sf-copy { color: var(--tx-4); }

/* ══════════ 阶梯表 ══════════ */
.ladder { font-size: 12.5px; }
.ladder th {
  text-align: center; padding: 8px 4px; color: var(--tx-3);
  font-weight: 500; background: var(--bg-2); font-size: 11.5px;
}
.ladder th:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.ladder th:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.ladder td {
  text-align: center; padding: 8px 4px;
  border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.ladder tr.hl td { background: var(--bl-soft); color: var(--bl); font-weight: 700; }

/* ══════════ 二维码 ══════════ */
.qr-box {
  background: #fff; padding: 14px; border-radius: var(--r-lg);
  display: inline-block; box-shadow: var(--sh-sm);
  border: 1px solid var(--line);
}
.qr-box img, .qr-box svg { display: block; width: 190px; height: 190px; }

/* ══════════ 价格条 ══════════ */
.price-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--app-max);
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 10px var(--gut); display: flex; align-items: center; gap: 12px;
  z-index: 70; box-shadow: 0 -3px 16px rgba(20,30,60,.07);
}
.app.has-pricebar .spacer { height: 84px; }
.pb-info .lbl { font-size: 11px; color: var(--tx-3); }
.pb-info .val {
  font-family: var(--font-num); font-size: 24px; font-weight: 800;
  color: var(--or); letter-spacing: -.8px; line-height: 1.1;
}
.pb-info .val small { font-size: 13px; }

/* ══════════ 详情页 ══════════ */
.detail-hero {
  background: linear-gradient(150deg, #E8EFFF 0%, #F2F6FF 100%);
  padding: 18px var(--gut) 20px; border-bottom: 1px solid var(--line);
}
.dh-title {
  font-size: 18px; font-weight: 800; letter-spacing: -.4px; line-height: 1.4;
}
.dh-tags { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.dh-price {
  display: flex; align-items: baseline; gap: 8px; margin-top: 14px;
}
.dh-price .now {
  font-family: var(--font-num); font-size: 32px; font-weight: 800;
  color: var(--or); letter-spacing: -1.2px; line-height: 1;
}
.dh-price .now small { font-size: 17px; }
.dh-price .old { font-size: 13px; color: var(--tx-4); text-decoration: line-through; }
.dh-price .off {
  font-size: 11px; background: var(--or-soft); color: var(--or);
  padding: 2px 7px; border-radius: var(--r-xs); font-weight: 600;
}
.teacher-panel {
  display: flex; gap: 12px; align-items: center;
  background: var(--card); border-radius: var(--r-lg); padding: 14px;
  box-shadow: var(--sh-xs); border: 1px solid var(--line);
}
.tp-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 19px;
  background: linear-gradient(140deg, var(--bl-hi), var(--bl-lo));
  box-shadow: 0 4px 12px rgba(43,92,230,.22);
}
.tp-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tp-title { font-size: 12px; color: var(--tx-2); margin-top: 2px; }
.tp-meta { font-size: 11.5px; color: var(--tx-3); margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; }
.tp-meta .star { color: var(--or); font-weight: 700; }

.hl-list { display: flex; flex-direction: column; gap: 9px; }
.hl-item {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 13px; color: var(--tx-2); line-height: 1.7;
}
.hl-item::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--bl); margin-top: 8px; flex: none;
}
.desc-text { font-size: 13px; color: var(--tx-2); line-height: 1.95; }

/* ══════════ 倒计时 ══════════ */
.promo {
  background: linear-gradient(135deg, #FF8A1F 0%, #FF6A00 55%, #F05300 100%);
  border-radius: var(--r-lg); padding: 16px 17px; color: #fff;
  position: relative; overflow: hidden; box-shadow: 0 8px 22px rgba(255,106,0,.24);
}
.promo::after {
  content: ''; position: absolute; width: 150px; height: 150px; right: -46px; bottom: -64px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 68%);
}
.promo-kicker {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; opacity: .9;
}
.promo h3 { font-size: 19px; font-weight: 800; margin-top: 5px; letter-spacing: -.4px; }
.promo p { font-size: 12px; opacity: .92; margin-top: 5px; }
.promo-time {
  margin-top: 11px; font-size: 11.5px;
  background: rgba(255,255,255,.20); border-radius: var(--r-pill);
  padding: 4px 12px; display: inline-block;
  position: relative; z-index: 1;
}
.promo-time b { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ══════════ 横幅轮播 ══════════ */
.banner-wrap { padding: 12px var(--gut) 0; }
.banner {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--card); box-shadow: var(--sh-xs); border: 1px solid var(--line);
}
.banner-track { display: flex; transition: transform .38s cubic-bezier(.3,.8,.3,1); }
.banner-item { flex: 0 0 100%; }
.banner-item img { width: 100%; height: 132px; object-fit: cover; display: block; }
.banner-dots {
  position: absolute; bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 5px;
}
.banner-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.55); transition: all .2s;
}
.banner-dots i.on { width: 14px; background: #fff; }

/* ══════════ 工具 ============ */
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.p-14 { padding: 14px var(--gut); }
.f-11 { font-size: 11px; }
.f-12 { font-size: 12px; }
.f-13 { font-size: 13px; }
.f-15 { font-size: 15px; }
.fw-6 { font-weight: 600; }
.fw-7 { font-weight: 700; }
.lh-18 { line-height: 1.8; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
