/* ============================================================
   150 LEAPS · 全站样式（浅色/深色双主题，无外部依赖）
   ============================================================ */
:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #efefe9;
  --ink: #141614;
  --ink-2: #3d423d;
  --muted: #6f746e;
  --line: #e2e2dc;
  --brand: #1f4b3f;
  --brand-deep: #14352d;
  --brand-soft: #e3ece7;
  --accent: #a96500;
  --danger: #b42318;
  --ok: #1e7a4b;
  --warn: #a15c00;
  --radius: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow: 0 8px 30px rgba(20, 22, 20, .08);
  --header-h: 64px;
  --max: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, Menlo, monospace;
}
[data-theme="dark"] {
  --bg: #171917;
  --surface: #1f221f;
  --surface-2: #262a26;
  --ink: #eef0eb;
  --ink-2: #c7cbc4;
  --muted: #9aa096;
  --line: #333833;
  --brand: #7fb49f;
  --brand-deep: #a8cfbf;
  --brand-soft: #26352e;
  --accent: #d5a35a;
  --danger: #e8837a;
  --ok: #7fc59d;
  --warn: #d9a45f;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 22px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 30px; width: auto; object-fit: contain; }
.brand-name { font-size: 13px; color: var(--muted); white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.nav-link { display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-link.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-search { display: flex; align-items: center; background: var(--surface-2); border-radius: 16px; padding: 0 6px 0 12px; height: 38px; }
.header-search input { border: 0; background: transparent; color: var(--ink); width: 170px; font-size: 13px; outline: none; }
.header-search button { border: 0; background: transparent; color: var(--muted); cursor: pointer; display: flex; padding: 6px; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 16px; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 16px; background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.nav-toggle { display: none; }
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 14px; font-family: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
[data-theme="dark"] .btn-primary { color: #0f1a15; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.field .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 15px; font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.textarea { min-height: 110px; resize: vertical; }
.field-err { color: var(--danger); font-size: 13px; }
.field-hint { color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.form-note { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--muted); font-size: 13px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.qty button { width: 36px; height: 36px; border: 0; background: var(--surface-2); color: var(--ink); font-size: 16px; cursor: pointer; }
.qty input { width: 48px; height: 36px; border: 0; background: var(--surface); color: var(--ink); text-align: center; font-family: inherit; }
.qty input:focus { outline: none; }

/* cards & layout */
.main { min-height: 60vh; }
.section { padding: 48px 0; }
.section-tight { padding: 28px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.section-head .more { color: var(--muted); font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-body { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 17px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.page-head { padding: 34px 0 20px; }
.page-head h1 { font-size: 30px; margin-bottom: 6px; }
.page-head p { color: var(--muted); margin: 0; }
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h3 { color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 16px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; }
.tag.is-active { background: var(--brand); color: #fff; }
[data-theme="dark"] .tag.is-active { color: #0f1a15; }
.price { color: var(--danger); font-weight: 700; font-family: var(--mono); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 13px; margin-left: 6px; }
.badge-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); font-size: 12px; }
.badge-warn { background: rgba(161, 92, 0, .12); color: var(--warn); }
.badge-danger { background: rgba(180, 35, 24, .1); color: var(--danger); }
.badge-ok { background: rgba(30, 122, 75, .12); color: var(--ok); }

/* hero */
.hero { padding: 64px 0 52px; background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.hero h1 { font-size: 46px; line-height: 1.15; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-facts { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.hero-fact b { display: block; font-size: 24px; font-family: var(--mono); color: var(--ink); }
.hero-fact span { font-size: 12px; color: var(--muted); }
.hero-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.hero-panel h2 { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-item { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.quick-item:hover { border-color: var(--brand); text-decoration: none; }
.quick-item b { font-size: 14px; }
.quick-item span { font-size: 12px; color: var(--muted); }

/* product / course cards */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); }
.product-card:hover { border-color: var(--brand); text-decoration: none; }
.product-cover { aspect-ratio: 4/3; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-cover img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body .name { font-size: 15px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-body .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-body .meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; }
.product-body .sales { color: var(--muted); font-size: 12px; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.course-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); display: flex; flex-direction: column; }
.course-card:hover { border-color: var(--brand); text-decoration: none; }
.course-cover { aspect-ratio: 16/9; background: var(--surface-2); }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.course-body h3 { font-size: 16px; margin: 0; }
.course-body .sub { color: var(--muted); font-size: 13px; }
.course-body .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: auto; padding-top: 8px; }

/* news */
.news-list { display: flex; flex-direction: column; }
.news-item { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.news-item:hover { text-decoration: none; }
.news-item:hover .news-title { color: var(--brand); }
.news-main { min-width: 0; }
.news-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-summary { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { color: var(--muted); font-size: 12px; margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.news-cover { width: 180px; aspect-ratio: 16/10; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.news-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-cats { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }

/* prose */
.prose { max-width: 780px; font-size: 16px; line-height: 1.9; }
.prose h2 { font-size: 21px; margin-top: 1.4em; }
.prose h3 { font-size: 17px; margin-top: 1.2em; }
.prose p { margin: 0 0 1em; }
.prose img { margin: 16px auto; border-radius: 10px; }
.prose blockquote { margin: 16px 0; padding: 10px 16px; border-left: 3px solid var(--brand); background: var(--surface-2); color: var(--ink-2); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { background: var(--surface-2); font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { font-family: var(--mono); }

/* tabs & pagination & toasts */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 14px; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 26px 0; flex-wrap: wrap; }
.pager-link { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); font-size: 13px; }
.pager-link:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pager-link.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-theme="dark"] .pager-link.is-current { color: #0f1a15; }
.pager-gap { align-self: center; color: var(--muted); }
.toasts { position: fixed; top: 78px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { padding: 12px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; animation: toast-in .2s ease; }
.toast-ok { border-left: 4px solid var(--ok); }
.toast-err { border-left: 4px solid var(--danger); }
.toast-warn { border-left: 4px solid var(--warn); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 42px 0 24px; margin-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer-brand p { color: var(--muted); font-size: 13px; margin: 10px 0 0; max-width: 320px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h3 { font-size: 13px; color: var(--ink); margin: 0 0 4px; }
.footer-col a { color: var(--muted); font-size: 13px; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links { margin-top: 12px; font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }

/* user dropdown */
.user-menu { position: relative; }
.user-trigger { gap: 8px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700; }
.avatar-lg { width: 44px; height: 44px; font-size: 18px; }
.dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 80; }
.user-menu.is-open .dropdown { display: block; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: transparent; color: var(--ink); font-size: 14px; font-family: inherit; border-radius: 6px; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); text-decoration: none; }

/* auth */
.auth-page { background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; }
.auth-bar { border-bottom: 1px solid var(--line); background: var(--surface); }
.auth-bar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.auth-bar-links { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.auth-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 44px 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-foot { border-top: 1px solid var(--line); padding: 16px 0; font-size: 12px; color: var(--muted); }
.auth-foot .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.auth-foot a { color: var(--muted); margin-left: 14px; }
.auth-links { display: flex; justify-content: space-between; font-size: 13px; }
.auth-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* member */
.member-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.member-side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 84px; }
.member-side-user { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.member-side-user div { display: flex; flex-direction: column; min-width: 0; }
.member-side-user b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-side-user span { font-size: 12px; }
.member-nav { display: flex; flex-direction: column; gap: 2px; }
.member-nav-link { display: flex; align-items: center; height: 38px; padding: 0 10px; border-radius: 10px; color: var(--ink-2); font-size: 14px; }
.member-nav-link:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.member-nav-link.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.member-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat-card b { display: block; font-size: 24px; font-family: var(--mono); }
.stat-card span { font-size: 12px; color: var(--muted); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.list-row .meta { font-size: 12px; color: var(--muted); }

/* lesson / player */
.player-wrap { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; color: #aaa; position: relative; }
.player-wrap:fullscreen, .player-wrap:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; background: #000; }
.player-wrap:fullscreen video, .player-wrap:-webkit-full-screen video { object-fit: contain; }
.player-tools { position: absolute; top: 10px; right: 12px; z-index: 8; display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.55); color: #fff; padding: 4px 10px; border-radius: 10px; }
.player-tools-label { font-size: 12px; color: #fff; }
.player-tools-select { border: 0; border-radius: 6px; padding: 3px 6px; font-size: 12px; background: #fff; color: #1C2420; }
.player-fs-btn { border: 0; border-radius: 6px; padding: 3px 9px; font-size: 12px; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; }
.player-fs-btn:hover { background: rgba(255,255,255,.28); }
.player-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player-watermark { position: absolute; left: 14px; top: 12px; z-index: 6; pointer-events: none; color: rgba(255,255,255,.42); font-size: 12px; line-height: 1.4; text-shadow: 0 1px 4px rgba(0,0,0,.65); transition: left .6s ease, top .6s ease; white-space: nowrap; }
.trial-mask { position: absolute; inset: 0; z-index: 9; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: 20px; }
.trial-mask[hidden] { display: none; }
.trial-mask-card { max-width: 330px; background: #fff; color: var(--ink); border-radius: 16px; padding: 22px; text-align: center; }
.trial-mask-card b { font-size: 17px; color: var(--brand); }
.trial-mask-card p { margin: 8px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.trial-mask-card .btn { margin: 3px; }
.player-wrap video { width: 100%; height: 100%; background: #000; }
.lesson-list { display: flex; flex-direction: column; }
.lesson-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-size: 14px; }
.lesson-item:hover { background: var(--surface-2); text-decoration: none; }
.lesson-item.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.lesson-item .dur { margin-left: auto; font-size: 12px; color: var(--muted); font-family: var(--mono); }

/* question / answer */
.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.q-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.q-stem { font-size: 16px; line-height: 1.9; }
.q-options { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.q-option { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); }
.q-option:hover { border-color: var(--brand); }
.q-option input { margin-top: 4px; }
.q-option.is-correct { border-color: var(--ok); background: rgba(30, 122, 75, .08); }
.q-option.is-wrong { border-color: var(--danger); background: rgba(180, 35, 24, .08); }
.q-option .key { font-family: var(--mono); font-weight: 700; color: var(--brand); }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 3px; line-height: 1.15; }
.frac-n { border-bottom: 1px solid currentColor; padding: 0 3px; }
.frac-d { padding: 0 3px; }
.sqrt { white-space: nowrap; }
.sqrt .rad { border-top: 1px solid currentColor; padding: 0 2px; }
.math { font-family: "Cambria Math", "Times New Roman", serif; }
.vec { position: relative; padding-top: .35em; }
.vec::before { content: "→"; position: absolute; left: 0; right: 0; top: -.25em; text-align: center; font-size: .8em; }
.ovl { text-decoration: overline; }
.comp { white-space: nowrap; }
.cal { font-style: italic; }

/* responsive */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  h1 { font-size: 26px; }
  .header-inner { flex-wrap: wrap; gap: 8px; padding: 8px 0; min-height: auto; }
  .main-nav { order: 3; flex: 1 0 100%; overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
  .header-search { display: none; }
  .user-name { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero { padding: 36px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 22px; }
  .hero h1 { font-size: 28px; }
  .hero-panel { box-shadow: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .member-layout { grid-template-columns: 1fr; }
  .member-side-card { position: static; }
  .member-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .member-nav-link { flex: 0 0 auto; white-space: nowrap; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .news-cover { width: 120px; }
  .section { padding: 32px 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .container { padding: 0 16px; }
  .main-nav { margin: 0 -16px; padding: 0 16px; }
  .toasts { left: 16px; right: 16px; top: 70px; max-width: none; }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-facts { gap: 18px; }
  .hero-fact b { font-size: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .news-cover { display: none; }
  .quick-grid { grid-template-columns: 1fr; }
  .table th, .table td { padding: 9px 10px; font-size: 13px; }
}


/* 手机端课程播放器：视频区域占满内容宽度并居中 */
@media (max-width: 760px) {
  #coursePlayer { padding-left: 12px !important; padding-right: 12px !important; gap: 14px !important; }
  #coursePlayer > div:first-child { flex: 1 1 100% !important; width: 100%; max-width: 100%; }
  #coursePlayer .player-wrap { width: 100%; max-width: 100%; margin-left: auto; margin-right: auto; }
  #coursePlayer .player-wrap video { margin-left: auto; margin-right: auto; }
  #coursePlayer aside { flex: 1 1 100% !important; min-width: 0 !important; max-width: none !important; }
}


/* 在线作答 AI 进度条 */
.ai-progress{margin:14px 0 0;padding:13px 15px;border:1px solid var(--line);border-radius: 16px;background:var(--surface);}
.ai-progress[hidden]{display:none!important}
.ai-progress-head{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;font-weight:700;color:var(--ink);}
.ai-progress-head span:last-child{font-family:var(--mono);color:var(--brand);font-size:12px;}
.ai-progress-track{height:8px;border-radius: 16px;background:var(--surface-2);overflow:hidden;margin-top:9px;}
.ai-progress-fill{height:100%;width:0;border-radius: 16px;background:linear-gradient(90deg,var(--brand),var(--accent));transition:width .4s ease;}
.ai-progress-tip{margin-top:7px;font-size:11px;color:var(--muted);}
.ai-progress.is-fail .ai-progress-head span:last-child{color:var(--danger)}
.ai-progress.is-fail .ai-progress-fill{background:var(--danger)}
.ans-ai-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:12px;}
.ans-ai-explain{margin-top:12px;}
.ai-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius: 16px;background:var(--brand-soft,#eef3ff);color:var(--brand);font-size:11px;font-weight:700;}

@media (max-width: 560px) {
  .brand-name { display: none; }
  .brand-logo { height: 22px; max-width: 100px; }
  .header-inner { gap: 2px; }
  .header-actions { gap: 0; flex: none; min-width: 0; }
  .header-actions .theme-toggle,
  .header-actions .nav-toggle { display: none; }
  .header-actions .icon-btn { width: 40px; height: 40px; flex: none; }
  .header-actions .icon-btn svg { width: 18px; height: 18px; }
  .header-actions .btn { min-height: 36px; padding: 0 9px; font-size: 12px; flex: none; }
  .header-actions .user-trigger { padding: 0 2px; gap: 0; }
  .header-actions .avatar { width: 30px; height: 30px; font-size: 12px; }
  .header-actions .user-menu { flex: none; }
}
