:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #14b8a6;
  --line: #e2e8f0;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
  /* 圆角系列 */
  --radius-card: 20px;
  --radius-button: 12px;
  --radius-hero: 24px;
  --radius-tile: 16px;
  --radius-input: 12px;
  --radius-pill: 999px;
  /* 按钮系列 */
  --btn-bg: var(--primary);
  --btn-color: #fff;
  --btn-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
  --btn-secondary-bg: var(--surface-strong);
  --btn-secondary-color: var(--text);
  /* Hero系列 */
  --hero-bg: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.95) 28%), #fff;
  --hero-subtitle-color: #475569;
  /* 品牌标识 */
  --brand-mark-bg: linear-gradient(135deg, var(--primary), var(--primary-light));
  --brand-mark-shadow: 0 10px 24px rgba(15, 118, 110, 0.24);
  /* FAB悬浮按钮 */
  --fab-bg: var(--primary);
  --fab-shadow: 0 16px 30px rgba(15, 118, 110, 0.24);
  /* 底部导航 */
  --nav-btn-bg: #f8fafc;
  --nav-btn-color: #0f172a;
  --nav-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  --nav-bg: rgba(255, 255, 255, 0.96);
}

* { box-sizing: border-box; }

.pull-refresh {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 0;
  color: var(--muted);
  font-size: 13px;
  transition: opacity 0.2s;
}
.pull-refresh.visible { display: flex; }
.pull-refresh.loading .pull-refresh-icon {
  animation: spin 0.8s linear infinite;
}
.pull-refresh-icon { font-size: 18px; display: inline-block; }
.pull-refresh.ready .pull-refresh-icon { transform: rotate(180deg); transition: transform 0.2s; }
@keyframes spin { to { transform: rotate(360deg); } }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.08), transparent 20%),
    linear-gradient(180deg, #f8fafc 0%, #f3f5f7 100%);
  color: var(--text);
  overscroll-behavior-y: contain;
}

/* === 主题模板：完整变量覆盖 === */

/* studio — 工作室：深青绿，大圆角，强阴影 */
body[data-site-template="studio"] {
  --primary: #134e4a;
  --primary-dark: #042f2e;
  --primary-light: #0d9488;
  --radius-card: 24px;
  --radius-button: 14px;
  --radius-hero: 28px;
  --radius-tile: 18px;
  --shadow: 0 22px 60px rgba(15, 118, 110, 0.12);
  --shadow-soft: 0 12px 28px rgba(15, 118, 110, 0.08);
  --btn-bg: linear-gradient(135deg, #0f766e, #14b8a6);
  --btn-shadow: 0 12px 24px rgba(15, 118, 110, 0.28);
  --hero-bg: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(255, 255, 255, 0.95) 28%), #fff;
  --hero-subtitle-color: #134e4a;
  --brand-mark-bg: linear-gradient(135deg, #134e4a, #0d9488);
  --brand-mark-shadow: 0 10px 24px rgba(19, 78, 74, 0.3);
  --fab-bg: linear-gradient(135deg, #0f766e, #14b8a6);
  --fab-shadow: 0 16px 30px rgba(15, 118, 110, 0.3);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.12), transparent 22%),
    linear-gradient(180deg, #f8fafc 0%, #eef4f6 100%);
}

/* warm — 暖色咨询：橙色调，暖色阴影，柔和 */
body[data-site-template="warm"] {
  --primary: #c2410c;
  --primary-dark: #9a3412;
  --primary-light: #fb923c;
  --line: #fed7aa;
  --radius-card: 22px;
  --radius-button: 14px;
  --radius-hero: 26px;
  --shadow: 0 18px 50px rgba(180, 83, 9, 0.1);
  --shadow-soft: 0 10px 24px rgba(180, 83, 9, 0.08);
  --btn-bg: linear-gradient(135deg, #ea580c, #f97316);
  --btn-shadow: 0 12px 24px rgba(234, 88, 12, 0.25);
  --hero-bg: linear-gradient(135deg, rgba(234, 88, 12, 0.1), rgba(255, 255, 255, 0.95) 28%), #fff;
  --hero-subtitle-color: #9a3412;
  --brand-mark-bg: linear-gradient(135deg, #c2410c, #fb923c);
  --brand-mark-shadow: 0 10px 24px rgba(194, 65, 12, 0.3);
  --fab-bg: linear-gradient(135deg, #ea580c, #f97316);
  --fab-shadow: 0 16px 30px rgba(234, 88, 12, 0.3);
  --nav-btn-bg: #fff7ed;
  background:
    radial-gradient(circle at top left, rgba(180, 83, 9, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(120, 53, 15, 0.1), transparent 20%),
    linear-gradient(180deg, #fff9f2 0%, #f8f1eb 100%);
}

/* minimal — 极简目录：灰色调，小圆角，几乎无阴影 */
body[data-site-template="minimal"] {
  --primary: #475569;
  --primary-dark: #334155;
  --primary-light: #94a3b8;
  --surface-soft: #fafbfc;
  --line: #e5e7eb;
  --radius-card: 12px;
  --radius-button: 8px;
  --radius-hero: 16px;
  --radius-tile: 10px;
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.03);
  --btn-bg: #475569;
  --btn-shadow: none;
  --hero-bg: #ffffff;
  --hero-subtitle-color: #64748b;
  --brand-mark-bg: #475569;
  --brand-mark-shadow: none;
  --fab-bg: #475569;
  --fab-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  --nav-btn-bg: #f8fafc;
  --nav-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* ocean — 海蓝品牌：蓝色调，中圆角，清新 */
body[data-site-template="ocean"] {
  --primary: #0f4c81;
  --primary-dark: #082f49;
  --primary-light: #38bdf8;
  --line: #bae6fd;
  --radius-card: 18px;
  --radius-button: 12px;
  --radius-hero: 22px;
  --shadow: 0 18px 50px rgba(14, 116, 144, 0.1);
  --shadow-soft: 0 10px 24px rgba(14, 116, 144, 0.06);
  --btn-bg: linear-gradient(135deg, #0f4c81, #0ea5e9);
  --btn-shadow: 0 12px 24px rgba(14, 76, 129, 0.25);
  --hero-bg: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(255, 255, 255, 0.95) 28%), #fff;
  --hero-subtitle-color: #075985;
  --brand-mark-bg: linear-gradient(135deg, #0f4c81, #38bdf8);
  --brand-mark-shadow: 0 10px 24px rgba(14, 76, 129, 0.3);
  --fab-bg: linear-gradient(135deg, #0f4c81, #0ea5e9);
  --fab-shadow: 0 16px 30px rgba(14, 76, 129, 0.3);
  --nav-btn-bg: #f0f9ff;
  background:
    radial-gradient(circle at top left, rgba(14, 116, 144, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(8, 47, 73, 0.14), transparent 22%),
    linear-gradient(180deg, #effaff 0%, #f0f9ff 100%);
}

/* slate — 沉稳专业：深灰调，小圆角，商务风 */
body[data-site-template="slate"] {
  --primary: #334155;
  --primary-dark: #1e293b;
  --primary-light: #64748b;
  --surface-soft: #f1f5f9;
  --line: #cbd5e1;
  --radius-card: 10px;
  --radius-button: 6px;
  --radius-hero: 14px;
  --radius-tile: 8px;
  --shadow: 0 12px 40px rgba(51, 65, 85, 0.1);
  --shadow-soft: 0 6px 20px rgba(51, 65, 85, 0.06);
  --btn-bg: #334155;
  --btn-shadow: 0 8px 20px rgba(51, 65, 85, 0.2);
  --hero-bg: linear-gradient(135deg, rgba(51, 65, 85, 0.06), rgba(255, 255, 255, 0.95) 30%), #fff;
  --hero-subtitle-color: #475569;
  --brand-mark-bg: linear-gradient(135deg, #334155, #64748b);
  --brand-mark-shadow: 0 8px 20px rgba(51, 65, 85, 0.25);
  --fab-bg: #334155;
  --fab-shadow: 0 12px 28px rgba(51, 65, 85, 0.25);
  --nav-btn-bg: #f1f5f9;
  --nav-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  background:
    radial-gradient(circle at top left, rgba(51, 65, 85, 0.16), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

/* tech-blue — 科技蓝：亮蓝色，渐变按钮，发光效果 */
body[data-site-template="tech-blue"] {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #60a5fa;
  --surface-soft: #eff6ff;
  --line: #93c5fd;
  --radius-card: 16px;
  --radius-button: 10px;
  --radius-hero: 20px;
  --radius-tile: 12px;
  --shadow: 0 18px 50px rgba(37, 99, 235, 0.12);
  --shadow-soft: 0 10px 24px rgba(37, 99, 235, 0.08);
  --btn-bg: linear-gradient(135deg, #2563eb, #3b82f6);
  --btn-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  --hero-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(255, 255, 255, 0.95) 28%), #fff;
  --hero-subtitle-color: #1e40af;
  --brand-mark-bg: linear-gradient(135deg, #1e3a8a, #60a5fa);
  --brand-mark-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
  --fab-bg: linear-gradient(135deg, #2563eb, #3b82f6);
  --fab-shadow: 0 0 24px rgba(37, 99, 235, 0.4);
  --nav-btn-bg: #eff6ff;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(30, 64, 175, 0.12), transparent 22%),
    linear-gradient(180deg, #eff6ff 0%, #e0f2fe 100%);
}

/* elegant-purple — 雅致紫：紫色，大圆角，柔和阴影 */
body[data-site-template="elegant-purple"] {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --primary-light: #c4b5fd;
  --surface-soft: #faf5ff;
  --line: #ddd6fe;
  --radius-card: 24px;
  --radius-button: 16px;
  --radius-hero: 28px;
  --radius-tile: 18px;
  --shadow: 0 18px 50px rgba(124, 58, 237, 0.1);
  --shadow-soft: 0 10px 24px rgba(124, 58, 237, 0.06);
  --btn-bg: linear-gradient(135deg, #7c3aed, #a78bfa);
  --btn-shadow: 0 12px 24px rgba(124, 58, 237, 0.25);
  --hero-bg: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(255, 255, 255, 0.95) 28%), #fff;
  --hero-subtitle-color: #6b21a8;
  --brand-mark-bg: linear-gradient(135deg, #5b21b6, #c4b5fd);
  --brand-mark-shadow: 0 10px 24px rgba(124, 58, 237, 0.28);
  --fab-bg: linear-gradient(135deg, #7c3aed, #a78bfa);
  --fab-shadow: 0 16px 30px rgba(124, 58, 237, 0.28);
  --nav-btn-bg: #faf5ff;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(91, 33, 182, 0.08), transparent 22%),
    linear-gradient(180deg, #faf5ff 0%, #f5f3ff 100%);
}

/* fresh-green — 清新绿：绿色调，中圆角，自然清新 */
body[data-site-template="fresh-green"] {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #6ee7b7;
  --surface-soft: #ecfdf5;
  --line: #a7f3d0;
  --radius-card: 20px;
  --radius-button: 12px;
  --radius-hero: 24px;
  --shadow: 0 18px 50px rgba(5, 150, 105, 0.08);
  --shadow-soft: 0 10px 24px rgba(5, 150, 105, 0.05);
  --btn-bg: linear-gradient(135deg, #059669, #34d399);
  --btn-shadow: 0 12px 24px rgba(5, 150, 105, 0.2);
  --hero-bg: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(255, 255, 255, 0.95) 28%), #fff;
  --hero-subtitle-color: #065f46;
  --brand-mark-bg: linear-gradient(135deg, #065f46, #6ee7b7);
  --brand-mark-shadow: 0 10px 24px rgba(5, 150, 105, 0.25);
  --fab-bg: linear-gradient(135deg, #059669, #34d399);
  --fab-shadow: 0 16px 30px rgba(5, 150, 105, 0.25);
  --nav-btn-bg: #ecfdf5;
  background:
    radial-gradient(circle at top left, rgba(5, 150, 105, 0.1), transparent 28%),
    radial-gradient(circle at top right, rgba(6, 95, 70, 0.06), transparent 22%),
    linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-button);
  background: var(--brand-mark-bg);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--brand-mark-shadow);
}

.brand small, .muted, .section-label, .eyebrow { color: var(--muted); }

.nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  color: #334155;
}

.nav a:hover { background: #f1f5f9; }

.topbar-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: min(320px, 100%);
}

.top-claim-field {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.top-claim-input {
  margin-top: 6px;
}

.top-claim-status {
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: none;
}

.ghost-button, .primary-button, .secondary-button {
  min-height: 44px;
  border: none;
  border-radius: var(--radius-button);
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  background: var(--btn-bg);
  color: var(--btn-color);
  box-shadow: var(--btn-shadow);
}

.secondary-button, .ghost-button {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-color);
  box-shadow: inset 0 0 0 1px var(--line);
}

.page-shell {
  max-width: 1260px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.page-shell > [data-section-key][hidden] {
  display: none !important;
}

.hero {
  display: block;
  margin-bottom: 16px;
  min-height: 30vh;
}

.hero-copy, .hero-panel, .section, .drawer-panel, .hero-note {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: var(--radius-hero);
  padding: 40px 24px;
  background: var(--hero-bg);
  text-align: center;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero-brand-subtitle {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--hero-subtitle-color);
}

.hero-subtitle {
  margin: 0;
  max-width: 700px;
  font-size: 17px;
  line-height: 1.75;
}

.hero-feature-card {
  border-radius: var(--radius-card);
  padding: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.hero-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-card-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.hero-shortcuts-grid {
  display: grid;
  gap: 12px;
}

.hero-shortcut-button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.featured-course-slider {
  overflow: hidden;
}

.featured-course-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 14px;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 6px;
  border-right: 1px solid #e2e8f0;
}

.featured-course-track::-webkit-scrollbar {
  width: 8px;
}

.featured-course-track::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.course-preview-section {
  margin-top: 8px;
}

.course-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.featured-course-tile {
  display: block;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-tile);
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.featured-tile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px 10px;
}

.featured-tile-title {
  display: block;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
  color: #1e293b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-course-cover {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15,118,110,0.2), rgba(30,41,59,0.08));
}

.featured-course-cover-empty {
  display: block;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-points span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
}

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  color: #334155;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.hero-nav-link:hover { background: #f8fafc; }

.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.hero-panel {
  border-radius: 24px;
  padding: 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  border-radius: 18px;
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.metric-card strong { display: block; margin-top: 8px; font-size: 24px; line-height: 1.3; }

.wide-metric { grid-column: 1 / -1; }

.section {
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2, .player-meta h3 { margin: 0; }

.section-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card-grid.compact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* VIP卡片3列网格 */
.vip-card-scroll {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.vip-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px;
  border-radius: var(--radius-card);
  background: var(--surface-strong, #fff);
  border: 1px solid var(--border, #e5e7eb);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.vip-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.vip-card:active { transform: scale(0.97); }
.vip-card-icon { font-size: 36px; margin-bottom: 10px; }
.vip-card-body h3 { margin: 0 0 4px; font-size: 15px; color: var(--heading, #1f2937); }
.vip-card-body p { margin: 0; font-size: 12px; color: var(--muted, #6b7280); line-height: 1.4; }
.vip-card-arrow { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 20px; color: #d1d5db; font-weight: 300; }

/* 设备及工具卡片 */
.tool-card-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 4px 0 8px;
}
.tool-card-scroll::-webkit-scrollbar { height: 4px; }
.tool-card-scroll::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.tool-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px;
  border-radius: var(--radius-card);
  background: var(--surface-strong, #fff);
  border: 1px solid var(--border, #e5e7eb);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.tool-card:active { transform: scale(0.97); }
.tool-card-icon { font-size: 36px; margin-bottom: 10px; }
.tool-card-body h3 { margin: 0 0 4px; font-size: 14px; color: var(--heading, #1f2937); }
.tool-card-body p { margin: 0; font-size: 12px; color: var(--muted, #6b7280); line-height: 1.4; }
.tool-card-arrow { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 20px; color: #d1d5db; font-weight: 300; }

.course-card, .order-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.decor-card {
  min-height: 100%;
}

.custom-section-shell {
  margin-bottom: 24px;
}

.custom-section-shell .section {
  margin-bottom: 0;
}

.custom-section-shell[data-block-style="highlight"] .section {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(255, 255, 255, 0.96) 34%),
    #fff;
}

.custom-section-shell[data-block-style="notice"] .section {
  background: #fffaf4;
  border-color: #fed7aa;
}

.custom-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.custom-note {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px dashed #cbd5e1;
  color: var(--muted);
  line-height: 1.8;
  background: #fff;
}

.course-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15,118,110,0.24), rgba(30,41,59,0.08));
}

.card-body { padding: 20px; }

.card-body h3, .card-body h4 { margin: 0 0 10px; line-height: 1.4; }

.card-meta, .order-meta { color: var(--muted); font-size: 14px; line-height: 1.7; }

.card-actions, .drawer-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.course-card .card-meta:first-child,
.order-card .card-meta:first-child {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.price-line { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }

.price-line strong { color: var(--primary-dark); font-size: 28px; letter-spacing: -0.03em; }

.price-line span { color: var(--muted); text-decoration: line-through; }

.detail-player-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 320px;
  gap: 20px;
  margin: 22px 0;
}

.player-main, .lesson-panel {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.lesson-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.lesson-panel-head h3 {
  margin: 0;
}

.remember-button {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}

.lesson-total {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.lesson-scroll-box {
  max-height: 340px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}

.lesson-scroll-box::-webkit-scrollbar {
  width: 8px;
}

.lesson-scroll-box::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.video {
  width: 100%;
  border-radius: 16px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.resume-media-card {
  width: 100%;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.resume-media-card__thumb {
  min-height: 170px;
  background-size: cover;
  background-position: center;
  background: linear-gradient(135deg, rgba(15,118,110,0.24), rgba(30,41,59,0.1));
}

.resume-media-card__body {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 18px 20px;
}

.resume-media-card__body strong {
  font-size: 18px;
}

.global-fab {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 40;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.global-fab__button {
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: var(--fab-bg);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--fab-shadow);
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.global-fab__menu {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.member-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.contact-card {
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.contact-card p {
  margin: 0 0 12px;
  line-height: 1.7;
}

.contact-card p:last-child {
  margin-bottom: 0;
}

.purchased-list,
.profile-orders {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.profile-history-panel {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.profile-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-history-head h3 {
  margin: 0;
}

.purchased-card,
.profile-panel,
.profile-order-item {
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed #dbe3ee;
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-order-item {
  display: grid;
  gap: 6px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 25;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
  width: min(460px, calc(100% - 24px));
  padding: 10px;
  border-radius: var(--radius-card);
  background: var(--nav-bg);
  border: 1px solid var(--line);
  box-shadow: var(--nav-shadow);
  backdrop-filter: blur(14px);
}

.bottom-nav-button {
  min-height: 48px;
  border: none;
  border-radius: var(--radius-tile);
  background: var(--nav-btn-bg);
  color: var(--nav-btn-color);
  font-weight: 800;
  cursor: pointer;
}

.detail-note {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* === 模板增强样式 === */

/* classic 经典课堂 */
body[data-site-template="classic"] .section { background: var(--surface-strong); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
body[data-site-template="classic"] .course-card,
body[data-site-template="classic"] .order-card { border-left: 3px solid var(--primary); }
body[data-site-template="classic"] .vip-card { border: 1px solid var(--line); }
body[data-site-template="classic"] .tool-card { border: 1px solid var(--line); }
body[data-site-template="classic"] .contact-card { background: #f0fdf4; border-color: #bbf7d0; }
body[data-site-template="classic"] .hero-copy { background: linear-gradient(135deg, rgba(15,118,110,0.08), rgba(255,255,255,0.96) 34%), #fff; }
body[data-site-template="classic"] .global-fab__button { background: var(--primary); }

/* studio 工作室 */
body[data-site-template="studio"] { --primary: #0f766e; --primary-dark: #134e4a; }
body[data-site-template="studio"] .topbar { background: rgba(19,78,74,0.96); backdrop-filter: blur(16px); border-bottom-color: rgba(255,255,255,0.1); }
body[data-site-template="studio"] .topbar .brand-name,
body[data-site-template="studio"] .topbar .hero-nav-link { color: #fff; }
body[data-site-template="studio"] .hero-copy {
  background: linear-gradient(135deg, rgba(15,118,110,0.18), rgba(255,255,255,0.96) 34%), #fff;
  box-shadow: 0 12px 40px rgba(15,118,110,0.1);
}
body[data-site-template="studio"] .hero-points span { background: rgba(15,118,110,0.14); color: #134e4a; }
body[data-site-template="studio"] .hero-nav-link { background: rgba(19,78,74,0.92); color: #fff; border-color: rgba(19,78,74,0.3); }
body[data-site-template="studio"] .section { background: var(--surface-strong); box-shadow: 0 8px 32px rgba(15,23,42,0.06); border-color: transparent; }
body[data-site-template="studio"] .course-card,
body[data-site-template="studio"] .order-card { box-shadow: 0 6px 24px rgba(15,23,42,0.08); border-color: transparent; }
body[data-site-template="studio"] .vip-card { box-shadow: 0 4px 16px rgba(15,118,110,0.08); border-color: rgba(15,118,110,0.15); }
body[data-site-template="studio"] .tool-card { box-shadow: 0 4px 16px rgba(15,118,110,0.08); border-color: rgba(15,118,110,0.15); }
body[data-site-template="studio"] .contact-card { background: linear-gradient(135deg, rgba(15,118,110,0.06), #fff); border-color: rgba(15,118,110,0.15); }
body[data-site-template="studio"] .global-fab__button { background: #134e4a; box-shadow: 0 12px 30px rgba(19,78,74,0.3); }

/* warm 暖色咨询 */
body[data-site-template="warm"] { --primary: #d97706; --primary-dark: #92400e; }
body[data-site-template="warm"] .topbar { background: rgba(255,251,235,0.95); }
body[data-site-template="warm"] .hero-copy {
  background: linear-gradient(135deg, rgba(217,119,6,0.14), rgba(255,251,235,0.96) 34%), #fffef9;
  border-radius: 28px;
}
body[data-site-template="warm"] .hero-points span { background: rgba(217,119,6,0.12); color: #9a3412; border-radius: 12px; }
body[data-site-template="warm"] .hero-nav-link { border-radius: 14px; border-color: #fed7aa; }
body[data-site-template="warm"] .section { background: var(--surface-strong); border-radius: 28px; box-shadow: 0 8px 28px rgba(180,83,9,0.06); border-color: #fed7aa; }
body[data-site-template="warm"] .course-card,
body[data-site-template="warm"] .order-card { border-radius: 24px; border-color: #fed7aa; }
body[data-site-template="warm"] .vip-card { border-radius: 24px; border-color: #fed7aa; }
body[data-site-template="warm"] .tool-card { border-radius: 24px; border-color: #fed7aa; }
body[data-site-template="warm"] .contact-card { background: linear-gradient(135deg, #fff7ed, #fffbeb); border-radius: 28px; border-color: #fdba74; box-shadow: 0 8px 28px rgba(180,83,9,0.08); }
body[data-site-template="warm"] .global-fab__button { background: #d97706; box-shadow: 0 12px 30px rgba(217,119,6,0.28); border-radius: 18px; }

/* minimal 极简目录 */
body[data-site-template="minimal"] { --primary: #475569; --primary-dark: #1e293b; }
body[data-site-template="minimal"] .topbar { background: #fff; box-shadow: none; border-bottom: 1px solid #e2e8f0; }
body[data-site-template="minimal"] .hero-copy,
body[data-site-template="minimal"] .section,
body[data-site-template="minimal"] .contact-card { border-radius: 16px; box-shadow: none; border: 1px solid #e2e8f0; background: #fff; }
body[data-site-template="minimal"] .hero-points span { background: #f1f5f9; color: #475569; }
body[data-site-template="minimal"] .hero-nav-link { box-shadow: none; border-color: #cbd5e1; }
body[data-site-template="minimal"] .course-card,
body[data-site-template="minimal"] .order-card { box-shadow: none; border: 1px solid #e2e8f0; border-radius: 16px; }
body[data-site-template="minimal"] .vip-card { box-shadow: none; border: 1px solid #e2e8f0; border-radius: 16px; }
body[data-site-template="minimal"] .tool-card { box-shadow: none; border: 1px solid #e2e8f0; border-radius: 16px; }
body[data-site-template="minimal"] .global-fab__button { background: #475569; box-shadow: 0 4px 12px rgba(71,85,105,0.2); }

/* ocean 海蓝品牌 */
body[data-site-template="ocean"] { --primary: #0369a1; --primary-dark: #0c4a6e; }
body[data-site-template="ocean"] .topbar { background: rgba(240,249,255,0.96); border-bottom-color: #bae6fd; }
body[data-site-template="ocean"] .hero-copy {
  background: linear-gradient(135deg, rgba(14,116,144,0.16), rgba(255,255,255,0.96) 34%), #f8fdff;
  box-shadow: 0 8px 32px rgba(14,116,144,0.08);
}
body[data-site-template="ocean"] .hero-points span { background: rgba(14,116,144,0.1); color: #0f4c81; }
body[data-site-template="ocean"] .hero-nav-link { border-color: #bae6fd; }
body[data-site-template="ocean"] .section { background: var(--surface-strong); border: 1px solid #bae6fd; box-shadow: 0 6px 24px rgba(14,116,144,0.06); }
body[data-site-template="ocean"] .course-card,
body[data-site-template="ocean"] .order-card { border: 1px solid #bae6fd; }
body[data-site-template="ocean"] .vip-card { border: 1px solid #bae6fd; }
body[data-site-template="ocean"] .tool-card { border: 1px solid #bae6fd; }
body[data-site-template="ocean"] .contact-card { background: linear-gradient(135deg, #f0f9ff, #ecfeff); border-color: #7dd3fc; }
body[data-site-template="ocean"] .global-fab__button { background: #0369a1; box-shadow: 0 12px 30px rgba(3,105,161,0.28); }

/* slate 沉稳专业 */
body[data-site-template="slate"] { --primary: #475569; --primary-dark: #1e293b; }
body[data-site-template="slate"] .topbar { background: rgba(248,250,252,0.98); border-bottom-color: #cbd5e1; }
body[data-site-template="slate"] .hero-copy {
  background: linear-gradient(135deg, rgba(51,65,85,0.14), rgba(255,255,255,0.96) 34%), #fff;
  border-radius: 18px;
}
body[data-site-template="slate"] .hero-points span { background: rgba(51,65,85,0.1); color: #334155; border-radius: 8px; }
body[data-site-template="slate"] .hero-nav-link { border-radius: 8px; }
body[data-site-template="slate"] .section { background: var(--surface-strong); border: 1px solid #cbd5e1; border-radius: 18px; box-shadow: 0 4px 16px rgba(15,23,42,0.05); }
body[data-site-template="slate"] .course-card,
body[data-site-template="slate"] .order-card { border-radius: 16px; border-color: #cbd5e1; }
body[data-site-template="slate"] .vip-card { border-radius: 16px; border-color: #cbd5e1; }
body[data-site-template="slate"] .tool-card { border-radius: 16px; border-color: #cbd5e1; }
body[data-site-template="slate"] .contact-card { background: #f8fafc; border-color: #94a3b8; border-radius: 18px; }
body[data-site-template="slate"] .global-fab__button { background: #475569; border-radius: 12px; box-shadow: 0 8px 24px rgba(71,85,105,0.24); }

/* tech-blue 科技蓝 */
body[data-site-template="tech-blue"] {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(30,64,175,0.12), transparent 22%),
    linear-gradient(180deg, #eff6ff 0%, #e0f2fe 100%);
}
body[data-site-template="tech-blue"] .topbar { background: rgba(30,58,138,0.96); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(96,165,250,0.2); }
body[data-site-template="tech-blue"] .topbar .brand-name,
body[data-site-template="tech-blue"] .topbar .hero-nav-link { color: #fff; }
body[data-site-template="tech-blue"] .hero-copy {
  background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(239,246,255,0.96) 34%), #eff6ff;
  box-shadow: 0 12px 40px rgba(37,99,235,0.12);
  border: 1px solid rgba(96,165,250,0.3);
}
body[data-site-template="tech-blue"] .hero-points span { background: rgba(37,99,235,0.12); color: #1e40af; }
body[data-site-template="tech-blue"] .hero-nav-link { background: rgba(30,58,138,0.9); color: #fff; border-color: rgba(96,165,250,0.3); }
body[data-site-template="tech-blue"] .section { background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); border: 1px solid rgba(96,165,250,0.25); box-shadow: 0 8px 32px rgba(37,99,235,0.08); }
body[data-site-template="tech-blue"] .course-card,
body[data-site-template="tech-blue"] .order-card { border: 1px solid rgba(96,165,250,0.3); box-shadow: 0 4px 16px rgba(37,99,235,0.06); }
body[data-site-template="tech-blue"] .vip-card { border: 1px solid rgba(96,165,250,0.3); box-shadow: 0 4px 16px rgba(37,99,235,0.06); }
body[data-site-template="tech-blue"] .tool-card { border: 1px solid rgba(96,165,250,0.3); box-shadow: 0 4px 16px rgba(37,99,235,0.06); }
body[data-site-template="tech-blue"] .contact-card { background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(239,246,255,0.96)); border-color: rgba(96,165,250,0.35); }
body[data-site-template="tech-blue"] .global-fab__button { background: linear-gradient(135deg, #2563eb, #1e40af); box-shadow: 0 12px 30px rgba(37,99,235,0.35); }

/* elegant-purple 雅致紫 */
body[data-site-template="elegant-purple"] {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  background:
    radial-gradient(circle at top left, rgba(124,58,237,0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(91,33,182,0.08), transparent 22%),
    linear-gradient(180deg, #faf5ff 0%, #f5f3ff 100%);
}
body[data-site-template="elegant-purple"] .topbar { background: rgba(250,245,255,0.96); border-bottom-color: #ddd6fe; }
body[data-site-template="elegant-purple"] .hero-copy {
  background: linear-gradient(135deg, rgba(124,58,237,0.14), rgba(250,245,255,0.96) 34%), #faf5ff;
  box-shadow: 0 12px 40px rgba(124,58,237,0.1);
  border-radius: 28px;
}
body[data-site-template="elegant-purple"] .hero-points span { background: rgba(124,58,237,0.1); color: #5b21b6; }
body[data-site-template="elegant-purple"] .hero-nav-link { border-color: #ddd6fe; border-radius: 14px; }
body[data-site-template="elegant-purple"] .section { background: var(--surface-strong); border: 1px solid #ddd6fe; border-radius: 28px; box-shadow: 0 8px 28px rgba(124,58,237,0.06); }
body[data-site-template="elegant-purple"] .course-card,
body[data-site-template="elegant-purple"] .order-card { border: 1px solid #ddd6fe; border-radius: 24px; }
body[data-site-template="elegant-purple"] .vip-card { border: 1px solid #ddd6fe; border-radius: 24px; }
body[data-site-template="elegant-purple"] .tool-card { border: 1px solid #ddd6fe; border-radius: 24px; }
body[data-site-template="elegant-purple"] .contact-card { background: linear-gradient(135deg, #faf5ff, #f5f3ff); border-color: #c4b5fd; border-radius: 28px; }
body[data-site-template="elegant-purple"] .global-fab__button { background: linear-gradient(135deg, #7c3aed, #5b21b6); box-shadow: 0 12px 30px rgba(124,58,237,0.3); border-radius: 20px; }

/* fresh-green 清新绿 */
body[data-site-template="fresh-green"] {
  --primary: #059669;
  --primary-dark: #065f46;
  background:
    radial-gradient(circle at top left, rgba(5,150,105,0.1), transparent 28%),
    radial-gradient(circle at top right, rgba(6,95,70,0.06), transparent 22%),
    linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
}
body[data-site-template="fresh-green"] .topbar { background: rgba(236,253,245,0.96); border-bottom-color: #a7f3d0; }
body[data-site-template="fresh-green"] .hero-copy {
  background: linear-gradient(135deg, rgba(5,150,105,0.12), rgba(236,253,245,0.96) 34%), #ecfdf5;
  box-shadow: 0 8px 28px rgba(5,150,105,0.08);
}
body[data-site-template="fresh-green"] .hero-points span { background: rgba(5,150,105,0.1); color: #065f46; }
body[data-site-template="fresh-green"] .hero-nav-link { border-color: #a7f3d0; }
body[data-site-template="fresh-green"] .section { background: var(--surface-strong); border: 1px solid #a7f3d0; border-radius: 22px; box-shadow: 0 6px 20px rgba(5,150,105,0.05); }
body[data-site-template="fresh-green"] .course-card,
body[data-site-template="fresh-green"] .order-card { border: 1px solid #a7f3d0; border-radius: 20px; }
body[data-site-template="fresh-green"] .vip-card { border: 1px solid #a7f3d0; border-radius: 20px; }
body[data-site-template="fresh-green"] .tool-card { border: 1px solid #a7f3d0; border-radius: 20px; }
body[data-site-template="fresh-green"] .contact-card { background: linear-gradient(135deg, #ecfdf5, #f0fdf4); border-color: #6ee7b7; border-radius: 22px; }
body[data-site-template="fresh-green"] .global-fab__button { background: #059669; box-shadow: 0 12px 30px rgba(5,150,105,0.28); }

.claim-course-list { margin: 12px 0 0; }

.lesson-button {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 10px;
  cursor: pointer;
}

.lesson-button.active { border-color: var(--primary); background: rgba(15, 118, 110, 0.08); }

.lesson-progress-copy {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.lesson-progress-bar {
  display: block;
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.trial-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.trial-banner {
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  border-radius: 12px 12px 0 0;
}

.featured-trial-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  align-self: flex-start;
}

.featured-trial-badge.expired {
  background: #fee2e2;
  color: #dc2626;
}

.featured-trial-badge.member {
  background: #e0f2fe;
  color: #0369a1;
}

.non-member-notice {
  display: block;
  margin-top: 4px;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trial-global-banner {
  margin: 10px 0 4px;
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0.03));
  border: 1px solid rgba(15, 118, 110, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--primary-dark);
}

.trial-global-banner strong {
  font-size: 14px;
}

.trial-global-banner .trial-time {
  margin-left: auto;
  font-family: 'Courier New', monospace;
  font-weight: 800;
  font-size: 14px;
  color: var(--primary);
}

.trial-countdown-panel {
  margin: 14px 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.06), rgba(15, 118, 110, 0.02));
  border: 1px solid rgba(15, 118, 110, 0.2);
}

.trial-countdown-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-dark);
}

.trial-countdown-icon {
  font-size: 18px;
}

.trial-countdown-time {
  margin-left: auto;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}

.trial-countdown-track {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.trial-countdown-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6, #0f766e);
  transition: width 1s linear;
}

.trial-countdown-bar.trial-bar-warning {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.trial-countdown-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.trial-expired-notice {
  margin: 14px 0;
  padding: 12px 18px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.material-trial-locked {
  background: #fff7ed !important;
  color: #c2410c !important;
  border: 1px dashed #fdba74;
}

.lesson-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6, #0f766e);
}

.drawer.hidden, .hidden { display: none; }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.44);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(560px, 100%);
  height: 100%;
  overflow: auto;
  padding: 24px;
  background: #fff;
}

.drawer-panel.narrow { width: min(420px, 100%); }

.close-button {
  margin-left: auto;
  display: flex;
  border: none;
  background: transparent;
  font-size: 15px;
  cursor: pointer;
  color: var(--muted);
}

.field-label { display: block; margin-top: 16px; font-weight: 600; }

.login-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.or-divider {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sms-code-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.sms-code-input {
  flex: 1;
  min-width: 0;
}

.sms-send-button {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.sms-send-button:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
}

.sms-send-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  border-color: var(--muted);
  color: var(--muted);
}

.text-input {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.detail-list, .benefit-list {
  display: grid;
  gap: 10px;
  color: var(--muted);
  padding-left: 18px;
}

.materials-list .material-download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}

.materials-list .material-download-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.22);
}

.materials-list .material-locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 98px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty-tip {
  padding: 18px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: var(--muted);
}

body[data-preview-viewport="landscape"] .detail-player-shell,
body[data-preview-viewport="landscape"] .metric-grid,
body[data-preview-viewport="landscape"] .card-grid,
body[data-preview-viewport="landscape"] .card-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-preview-viewport="landscape"] .topbar-inner {
  flex-wrap: nowrap;
  padding: 16px 24px;
}

body[data-preview-viewport="landscape"] .topbar-actions {
  width: 300px;
}

body[data-preview-viewport="landscape"] .topbar-actions .ghost-button,
body[data-preview-viewport="landscape"] .topbar-actions .primary-button {
  flex: 0 0 auto;
}

@media (max-width: 960px) {
  .detail-player-shell, .metric-grid { grid-template-columns: 1fr; }
  .topbar-inner { flex-wrap: wrap; padding: 14px 16px; }
  .nav { order: 3; width: 100%; overflow: auto; justify-content: flex-start; }
  .topbar-actions { width: 100%; }
  .topbar-actions .ghost-button, .topbar-actions .primary-button { width: 100%; }
  .page-shell { padding: 12px 12px 42px; }
  .section, .hero-copy, .hero-panel { padding: 16px; border-radius: 20px; }
  .hero-copy h1 { font-size: 38px; }
  .featured-course-track { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 440px; }
  .featured-course-tile { min-height: 0; }
  .featured-course-cover { height: 110px; }
  .resume-media-card { grid-template-columns: 1fr; }
  .resume-media-card__thumb { min-height: 150px; }
  .lesson-panel-head { align-items: flex-start; flex-direction: column; }
  .remember-button { width: 100%; }
  .profile-history-head { align-items: flex-start; flex-direction: column; }
  .lesson-scroll-box { max-height: 300px; }
  .global-fab { right: 16px; bottom: 88px; }
  .bottom-nav { bottom: 10px; width: calc(100% - 20px); }
}

@media (max-width: 960px) {
  body[data-preview-viewport="landscape"] .detail-player-shell,
  body[data-preview-viewport="landscape"] .metric-grid,
  body[data-preview-viewport="landscape"] .card-grid,
  body[data-preview-viewport="landscape"] .card-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-preview-viewport="landscape"] .topbar-inner {
    flex-wrap: nowrap;
  }
}

/* 试看申请弹窗 */
.trial-request-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.trial-request-modal {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.25s ease-out;
}

.trial-request-modal-icon {
  font-size: 48px;
  line-height: 1;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 抽屉打开时隐藏hero区块 */
body.drawer-open .hero { display: none !important; }

/* ========== 小商城商品卡片 ========== */
.shop-product-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.shop-product-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s;
}

.shop-product-card.purchased {
  opacity: 0.7;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.shop-product-cover {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-product-placeholder {
  font-size: 28px;
  opacity: 0.5;
}

.shop-product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.shop-product-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-product-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.shop-product-price {
  font-size: 16px;
  font-weight: 700;
  color: #dc2626;
}

.shop-product-card.purchased .shop-product-price {
  color: #16a34a;
}

.shop-product-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: #dcfce7;
  color: #16a34a;
  font-size: 12px;
  font-weight: 600;
}

.shop-buy-btn {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.shop-buy-btn:active {
  transform: scale(0.96);
}

.shop-buy-btn:hover {
  background: var(--primary-dark);
}

.shop-buy-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.shop-buy-btn.free {
  background: #2563eb;
}

.shop-buy-btn.free:hover {
  background: #1d4ed8;
}

/* ========== 扫码支付弹窗 ========== */
.qr-pay-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: modalFadeIn 0.2s ease-out;
}

.qr-pay-modal {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  width: min(320px, 88vw);
  text-align: center;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}

.qr-pay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-pay-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.qr-pay-modal h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #0f172a;
}

.qr-pay-course {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 16px;
}

.qr-pay-code {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.qr-pay-code img {
  border-radius: 8px;
}

.qr-pay-hint {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 4px;
}

.qr-pay-status {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin: 0;
}

.qr-pay-link {
  text-align: center;
}

.qr-pay-link p {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 8px;
}

.qr-pay-link input {
  width: 100%;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
}

/* ========== VIP购买区域 ========== */
.vip-purchase-section {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: var(--radius-card);
  text-align: center;
}

.vip-purchase-title {
  font-size: 18px;
  font-weight: 700;
  color: #92400e;
  margin: 0 0 6px;
}

.vip-purchase-desc {
  font-size: 13px;
  color: #a16207;
  margin: 0 0 16px;
}

.vip-package-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.vip-package-card {
  position: relative;
  padding: 14px 6px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.vip-package-card:hover {
  background: #fff;
}

.vip-package-card.selected {
  border-color: #d97706;
  background: #fff;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.vip-package-duration {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 4px;
}

.vip-package-price {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #d97706;
}

.vip-package-tag {
  position: absolute;
  top: -8px;
  right: -6px;
  padding: 2px 8px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
}

.vip-purchase-btn {
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.3);
  transition: transform 0.1s, box-shadow 0.2s;
}

.vip-purchase-btn:active {
  transform: scale(0.97);
}

.vip-purchase-btn:hover {
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.4);
}

.vip-purchase-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}