:root {
  --paper: #f5f1e8;
  --ink: #171815;
  --muted: #696960;
  --gold: #9a7441;
  --line: rgba(23, 24, 21, .14);
  --white: #fffdf8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.site-header {
  height: 72px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .08em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
  font-size: 16px;
}

.hero {
  min-height: 480px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 88px 28px 104px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "微";
  position: absolute;
  z-index: -1;
  top: -72px;
  right: 2%;
  color: rgba(154, 116, 65, .07);
  font: 460px/1 "Songti SC", "STSong", serif;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  max-width: 760px;
  font: 700 clamp(42px, 7vw, 72px)/1.2 "Songti SC", "STSong", serif;
  letter-spacing: .03em;
}
.hero-copy {
  max-width: 520px;
  margin: 28px 0 34px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}
.primary-button {
  display: inline-block;
  padding: 14px 25px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 3px;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: .08em;
}

.courses {
  padding: 80px max(28px, calc((100vw - 1064px) / 2)) 110px;
  background: var(--white);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section-heading h2 {
  margin: 0;
  font: 700 34px/1.2 "Songti SC", "STSong", serif;
}
.course-count { color: var(--muted); font-size: 13px; }
.course-card {
  display: grid;
  grid-template-columns: minmax(280px, 44%) 1fr;
  gap: 50px;
  padding: 42px 0 0;
}
.course-cover {
  aspect-ratio: 16 / 10;
  padding: 30px;
  display: flex;
  flex-direction: column;
  color: #ece1cc;
  background:
    radial-gradient(circle at 80% 20%, rgba(184, 146, 92, .25), transparent 28%),
    linear-gradient(145deg, #292b26, #11120f);
  text-decoration: none;
  box-shadow: 0 20px 50px rgba(29, 27, 21, .16);
}
.cover-index { color: #bb9561; font: 16px/1 Georgia, serif; }
.cover-line { width: 42px; height: 1px; margin: auto 0 18px; background: #bb9561; }
.cover-label { font: 600 clamp(21px, 3vw, 32px)/1.4 "Songti SC", "STSong", serif; letter-spacing: .12em; }
.course-body { align-self: center; }
.course-meta { display: flex; gap: 18px; color: var(--gold); font-size: 12px; }
.course-body h3 { margin: 17px 0 14px; font: 700 32px/1.35 "Songti SC", "STSong", serif; }
.course-body h3 a { text-decoration: none; }
.course-body p { max-width: 520px; margin: 0 0 27px; color: var(--muted); line-height: 1.85; }
.text-link { text-decoration: none; font-size: 14px; font-weight: 600; }
.text-link span { display: inline-block; margin-left: 8px; color: var(--gold); }

.site-footer {
  padding: 28px;
  color: #8b8b83;
  background: #171815;
  text-align: center;
  font-size: 12px;
  line-height: 1.8;
}
.site-footer p { margin: 0 0 3px; }
.site-footer div { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { text-decoration: none; }

.lesson-page { background: #171815; }
.dark-header { color: #f5f1e8; }
.dark-header .brand-mark { color: #171815; background: #f5f1e8; }
.back-link { color: #b4b3aa; font-size: 13px; text-decoration: none; }
.lesson-main { background: var(--paper); }
.player-wrap { padding: 34px max(20px, calc((100vw - 1000px) / 2)) 0; background: #171815; }
.video-shell { aspect-ratio: 16/9; position: relative; background: #070806; box-shadow: 0 18px 54px rgba(0,0,0,.24); }
.video-shell video { width: 100%; height: 100%; display: block; background: #070806; }
.player-actions {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #86867f;
  font-size: 12px;
}
.player-actions button {
  min-height: 38px;
  padding: 0 2px 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e6ddcd;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.fullscreen-icon {
  width: 15px;
  height: 15px;
  display: inline-block;
  border: 1px solid #ae8a58;
  position: relative;
}
.fullscreen-icon::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid #ae8a58;
}
.player-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  color: #b9b7ae;
  background: #0d0e0c;
  font-size: 13px;
}
.player-state.hidden { display: none; }
.player-state.error { padding: 30px; color: #e4d2b7; text-align: center; }
.spinner { width: 24px; height: 24px; border: 2px solid #3a3a35; border-top-color: #b58d57; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lesson-content { max-width: 1000px; margin: 0 auto; padding: 58px 28px 100px; }
.lesson-content h1 { margin: 0; font: 700 clamp(30px, 5vw, 48px)/1.3 "Songti SC", "STSong", serif; }
.lesson-intro { max-width: 660px; margin: 19px 0 45px; color: var(--muted); line-height: 1.8; }
.lesson-list { border-top: 1px solid var(--line); }
.lesson-row { min-height: 84px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.lesson-number { color: var(--gold); font: 13px Georgia, serif; }
.lesson-row strong { display: block; font-size: 15px; }
.lesson-row small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.playing-dot { width: 7px; height: 7px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 5px rgba(154,116,65,.12); }
.lesson-footer { border-top: 1px solid #2b2c28; }

@media (max-width: 700px) {
  .site-header { height: 62px; padding: 0 20px; }
  .brand { gap: 9px; font-size: 17px; }
  .brand-mark { width: 30px; height: 30px; font-size: 14px; }
  .hero { min-height: 440px; padding: 64px 24px 82px; }
  .hero::after { top: -5px; right: -45px; font-size: 270px; }
  .hero h1 { font-size: 43px; }
  .hero-copy { font-size: 15px; }
  .courses { padding: 60px 24px 80px; }
  .section-heading h2 { font-size: 29px; }
  .course-card { grid-template-columns: 1fr; gap: 30px; }
  .course-cover { padding: 24px; }
  .course-body h3 { font-size: 27px; }
  .site-footer { padding: 26px 20px calc(26px + env(safe-area-inset-bottom)); }
  .site-footer div { flex-direction: column; gap: 0; }
  .player-wrap { padding: 10px 0 0; }
  .video-shell { box-shadow: none; }
  .player-actions { padding: 0 18px; }
  .lesson-content { padding: 42px 24px 74px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation: none; }
}
