:root {
  --ink: #17202a;
  --muted: #64748b;
  --paper: #fbfaf7;
  --panel: #fff;
  --line: #e8e1d5;
  --red: #d6342f;
  --jade: #0b7f78;
  --gold: #f7bd46;
  --shadow: 0 22px 70px rgba(23, 32, 42, 0.12);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, "Microsoft YaHei", Arial, sans-serif; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
input, textarea, select, button { font: inherit; }
.shell { max-width: 1180px; margin: 0 auto; padding: 24px; }
.topbar { align-items: center; display: flex; gap: 18px; margin-bottom: 28px; }
.topbar .brand { font-weight: 900; margin-right: auto; }
.topbar a, .topbar button { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); cursor: pointer; padding: 9px 12px; }
.hero, .hero-panel, .billing { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) 280px; padding: 34px; }
.hero img, .billing img { border: 1px solid var(--line); border-radius: 8px; width: 100%; }
.hero h1, .hero-panel h1, .section-head h1 { font-size: clamp(38px, 5vw, 68px); line-height: 1; margin: 0 0 18px; }
.compact { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 28px; }
.eyebrow { color: var(--jade); font-size: 13px; font-weight: 900; letter-spacing: .08em; margin: 0 0 10px; text-transform: uppercase; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.button { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); cursor: pointer; display: inline-flex; font-weight: 900; justify-content: center; min-height: 44px; padding: 10px 16px; }
.primary { background: var(--red); border-color: var(--red); color: #fff; }
.grid { display: grid; gap: 18px; }
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 24px; }
.card, .panel, .practice-panel, .lesson-list, .course-side { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.card h2, .panel h2 { margin-top: 0; }
.meter { background: #f1eee8; border-radius: 999px; height: 10px; margin: 18px 0; overflow: hidden; }
.meter span { background: var(--jade); display: block; height: 100%; }
.auth { display: grid; min-height: 70vh; place-items: center; }
.auth .panel { display: grid; gap: 14px; max-width: 430px; width: 100%; }
.panel input, .panel textarea, .panel select, .auth input { background: #f8f5ef; border: 1px solid var(--line); border-radius: 8px; min-height: 46px; padding: 10px 12px; width: 100%; }
.panel textarea { min-height: 110px; }
.alert { background: rgba(214,52,47,.1); border-left: 4px solid var(--red); border-radius: 8px; margin: 0 auto 18px; max-width: 430px; padding: 14px; }
.section-head { margin: 22px 0; }
.course-layout { display: grid; gap: 22px; grid-template-columns: 330px minmax(0, 1fr); }
.lesson-list { display: grid; gap: 12px; }
.lesson-row { align-items: center; background: #f8f5ef; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 12px; grid-template-columns: 44px 1fr; padding: 14px; }
.lesson-row span { align-items: center; background: var(--jade); border-radius: 999px; color: #fff; display: inline-flex; height: 36px; justify-content: center; width: 36px; }
.lesson-row p { color: var(--muted); margin: 4px 0 0; }
.lesson-player { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 340px; }
.video-box { aspect-ratio: 16 / 9; background: #111827; border-radius: 8px; overflow: hidden; }
.video-box iframe { border: 0; height: 100%; width: 100%; }
.lesson-notes { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.practice-panel { margin-top: 22px; }
.quiz { background: #f8f5ef; border: 1px solid var(--line); border-radius: 8px; margin-top: 12px; padding: 16px; }
.quiz-choice { background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; margin: 4px; padding: 9px 12px; }
.quiz-choice.right { border-color: var(--jade); color: var(--jade); }
.quiz-choice.wrong { border-color: var(--red); color: var(--red); }
.admin-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.billing { grid-template-columns: minmax(0, 1fr) 260px; }
.wechat-modal { display: none; inset: 0; position: fixed; z-index: 20; }
.wechat-modal.open { display: block; }
.wechat-backdrop { background: rgba(15,23,42,.58); border: 0; inset: 0; position: absolute; width: 100%; }
.wechat-dialog { background: #fff; border-radius: 8px; left: 50%; max-width: 420px; padding: 26px; position: absolute; text-align: center; top: 50%; transform: translate(-50%, -50%); width: calc(100vw - 32px); }
.wechat-dialog img { max-width: 300px; width: 100%; }
.wechat-close { float: right; }
@media (max-width: 850px) {
  .hero, .hero-panel, .billing, .course-layout, .lesson-player, .admin-grid, .cards { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
}
