/* ==========================================================================
   知行网校 · 设计系统
   ========================================================================== */

:root {
  --paper: #f4efe3;
  --paper-2: #ece5d5;
  --paper-3: #e3d9c5;
  --paper-on-night: #eee6d4;
  --night: #101410;
  --night-2: #171d16;
  --cinnabar: #a3372a;
  --cinnabar-2: #bf4a34;
  --jade: #2c4a3d;
  --gold: #a9854e;
  --gold-2: #c8a468;

  --bg: var(--paper);
  --surface: #faf6ec;
  --surface-2: var(--paper-2);
  --ink: #17170f;
  --ink-2: #2a2a20;
  --muted: #7b7565;
  --muted-2: #9b9482;
  --line: rgba(23, 23, 15, 0.16);
  --line-2: rgba(23, 23, 15, 0.08);
  --brand: var(--cinnabar);
  --brand-dark: #7a2a22;
  --brand-soft: #efe0d8;
  --amber: var(--gold);
  --amber-soft: #f0e7d2;
  --green: var(--jade);
  --green-soft: #e4ebe5;
  --danger: var(--cinnabar);
  --danger-soft: #f3dfda;
  --shadow-sm: 0 1px 0 rgba(23, 23, 15, 0.04);
  --shadow-md: 0 18px 40px -28px rgba(30, 24, 12, 0.2);
  --shadow-lg: 0 30px 80px -40px rgba(30, 24, 12, 0.28);
  --radius: 2px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --serif-zh: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: "Inter", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "Consolas", monospace;
  --font: var(--sans);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(120% 80% at 80% -20%, rgba(201, 164, 104, 0.12), transparent 60%),
    radial-gradient(90% 60% at -10% 30%, rgba(44, 74, 61, 0.07), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body.no-scroll {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2.5px solid rgba(44, 75, 221, 0.45);
  outline-offset: 2px;
}

::selection {
  background: rgba(44, 75, 221, 0.18);
}

/* 主题色 ------------------------------------------------------------------ */
.theme-history {
  --c1: #17170f;
  --c2: #4b493c;
  --soft: #eee8da;
  --tint: #2a2a20;
}
.theme-strategy {
  --c1: #6b4a22;
  --c2: #a9854e;
  --soft: #f0e7d2;
  --tint: #8a5a16;
}
.theme-yixue {
  --c1: #223d32;
  --c2: #4f7563;
  --soft: #e4ebe5;
  --tint: #2c4a3d;
}
.theme-literature {
  --c1: #6f241d;
  --c2: #a3372a;
  --soft: #f0dfd9;
  --tint: #a3372a;
}
.theme-family {
  --c1: #4f3124;
  --c2: #8a5a3a;
  --soft: #eee2d7;
  --tint: #6b3f2b;
}
.theme-culture {
  --c1: #26332c;
  --c2: #5c6b60;
  --soft: #e7ebe4;
  --tint: #3c4f43;
}
.theme-code {
  --c1: #14295f;
  --c2: #3568e8;
  --soft: #e9efff;
  --tint: #2452d8;
}
.theme-math {
  --c1: #075e54;
  --c2: #26b99a;
  --soft: #e3faf4;
  --tint: #0b8d77;
}
.theme-language {
  --c1: #4c1d95;
  --c2: #a566f5;
  --soft: #f2eaff;
  --tint: #7c3aed;
}
.theme-design {
  --c1: #9d174d;
  --c2: #f59e6b;
  --soft: #fff0e8;
  --tint: #db2777;
}
.theme-career {
  --c1: #7c3f06;
  --c2: #f3b53a;
  --soft: #fff6df;
  --tint: #b45309;
}
.theme-humanities {
  --c1: #263449;
  --c2: #7f94ad;
  --soft: #eef2f7;
  --tint: #475569;
}

/* 应用外框 ---------------------------------------------------------------- */
#app {
  min-height: 100dvh;
}

.app {
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow-x: clip;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

@media (min-width: 760px) {
  body {
    padding: 24px 0 112px;
  }
  .app {
    min-height: calc(100dvh - 136px);
    border-radius: 34px;
    box-shadow: 0 40px 100px -50px rgba(20, 28, 66, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    overflow: clip;
    padding-bottom: 104px;
  }
}

/* 顶部栏 ------------------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 20px 12px;
  background: rgba(244, 245, 249, 0.84);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

@media (min-width: 760px) {
  .topbar {
    padding-top: 20px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-logo {
  flex: none;
  filter: drop-shadow(0 7px 12px rgba(35, 59, 160, 0.24));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand-name {
  font-size: 16.5px;
  font-weight: 850;
  letter-spacing: 0.3px;
}

.brand-sub {
  font-size: 9.5px;
  color: var(--muted-2);
  letter-spacing: 1.6px;
  margin-top: 2px;
  font-weight: 600;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 39px;
  height: 39px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.18s ease, background 0.18s ease;
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px #fff;
}

.avatar-btn {
  width: 39px;
  height: 39px;
  border-radius: 13px;
  border: 0;
  background: linear-gradient(145deg, #3358e8, #172a7d);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  letter-spacing: 0.3px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(13px + env(safe-area-inset-top)) 18px 12px;
  background: rgba(244, 245, 249, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.navbar h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.2px;
  flex: 1;
  text-align: center;
  padding-right: 39px;
}

.navbar .icon-btn {
  flex: none;
}

@media (min-width: 760px) {
  .navbar {
    padding-top: 20px;
  }
}

/* 页面 -------------------------------------------------------------------- */
.page {
  padding: 4px 20px 24px;
  animation: fade-up 0.4s cubic-bezier(0.22, 0.68, 0.36, 1);
}

.page-tight {
  padding-top: 0;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.section {
  margin-top: 26px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.section-head-tight {
  margin-top: 0;
}

.section-title {
  font-size: 18.5px;
  font-weight: 850;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-title .spark {
  color: var(--amber);
}

.section-link {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 3px 0;
}

.section-desc {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* 首页 Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  margin-top: 4px;
  padding: 22px 22px 16px;
  border-radius: 28px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 201, 107, 0.32), transparent 46%),
    linear-gradient(145deg, #17296f 0%, #2947d2 58%, #5474ff 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 24px 44px -26px rgba(31, 55, 160, 0.7);
}

.hero::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  right: -90px;
  top: -80px;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.035), 0 0 0 58px rgba(255, 255, 255, 0.025);
}

.hero::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 201, 107, 0.18);
  filter: blur(30px);
  right: 20px;
  bottom: -60px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 10px;
  border-radius: 99px;
  position: relative;
  z-index: 2;
}

.hero-kicker .live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7cf7c3;
  box-shadow: 0 0 0 3px rgba(124, 247, 195, 0.16);
}

.hero h1 {
  position: relative;
  z-index: 2;
  font-size: 30px;
  line-height: 1.26;
  font-weight: 850;
  letter-spacing: -1.3px;
  margin: 14px 0 9px;
  max-width: 290px;
}

.hero h1 em {
  font-style: normal;
  color: #ffd479;
}

.hero-sub {
  position: relative;
  z-index: 2;
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  max-width: 270px;
}

.hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 9px;
  margin-top: 17px;
}

.hero-art {
  position: absolute;
  right: -18px;
  top: 18px;
  width: 158px;
  height: 170px;
  pointer-events: none;
  z-index: 1;
}

.hero-art .ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.hero-art .ring-a {
  width: 118px;
  height: 118px;
  right: 6px;
  top: 12px;
}

.hero-art .ring-b {
  width: 78px;
  height: 78px;
  right: 26px;
  top: 32px;
  border-color: rgba(255, 212, 121, 0.36);
}

.hero-art .glyph-chip {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 800;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 20px -12px rgba(0, 0, 0, 0.4);
}

.hero-art .g1 {
  width: 42px;
  height: 42px;
  right: 46px;
  top: 8px;
  font-size: 18px;
  transform: rotate(-8deg);
}

.hero-art .g2 {
  width: 34px;
  height: 34px;
  right: 18px;
  top: 72px;
  font-size: 14px;
  color: #ffd479;
  transform: rotate(9deg);
}

.hero-art .g3 {
  width: 46px;
  height: 46px;
  right: 78px;
  top: 96px;
  font-size: 19px;
  transform: rotate(6deg);
  background: rgba(255, 201, 107, 0.2);
  border-color: rgba(255, 212, 121, 0.36);
}

.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  margin-top: 18px;
  padding-top: 13px;
}

.hero-stat b {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.hero-stat span {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.56);
}

/* 按钮 -------------------------------------------------------------------- */
.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 11px 17px;
  font-size: 13px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary:disabled {
  background: #e2e6f2;
  color: #979eb3;
  box-shadow: none;
  opacity: 1;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(44, 75, 221, 0.8);
}

.btn-primary:hover {
  background: #2542c9;
}

.btn-light {
  background: #fff;
  color: #1c2f88;
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.4);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(8px);
}

.btn-ghost {
  background: #f0f2f8;
  color: var(--ink-2);
}

.btn-outline {
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink-2);
}

.btn-dark {
  background: #171d32;
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.6);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-amber {
  background: linear-gradient(120deg, #ffbf4d, #f6a723);
  color: #3d2600;
  box-shadow: 0 12px 24px -14px rgba(246, 167, 35, 0.9);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 11.5px;
}

.btn-lg {
  padding: 14px 22px;
  border-radius: 16px;
  font-size: 14.5px;
}

/* 分类 -------------------------------------------------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.cat-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 17px;
  padding: 11px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cat-card:active {
  transform: scale(0.97);
}

.cat-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--tint);
}

.cat-name {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -0.1px;
}

.cat-count {
  font-size: 9.5px;
  color: var(--muted-2);
  margin-top: -5px;
}

/* 课程封面 ---------------------------------------------------------------- */
.cover {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  background:
    radial-gradient(120% 130% at 88% -10%, rgba(255, 255, 255, 0.3), transparent 45%),
    linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  flex: none;
  isolation: isolate;
}

.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 0.7px, transparent 0.7px);
  background-size: 10px 10px;
  opacity: 0.45;
  z-index: -1;
}

.cover::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  right: -28px;
  top: -28px;
  box-shadow: 0 0 0 18px rgba(255, 255, 255, 0.04);
}

.cover-glyph {
  position: absolute;
  right: -5px;
  bottom: -30px;
  font-size: 78px;
  line-height: 1;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.16);
  letter-spacing: -6px;
  pointer-events: none;
}

.cover-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 8.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(5px);
  color: rgba(255, 255, 255, 0.94);
  letter-spacing: 0.2px;
}

.cover-play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--c1);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.cover-play svg {
  margin-left: 1px;
}

/* 课程列表行 -------------------------------------------------------------- */
.course-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-row {
  display: flex;
  gap: 13px;
  align-items: stretch;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  text-align: left;
  width: 100%;
}

.course-row:active {
  transform: scale(0.985);
}

.course-row .cover {
  width: 112px;
  min-height: 84px;
  align-self: stretch;
}

.course-row .cover-glyph {
  font-size: 62px;
  bottom: -22px;
}

.course-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1px 2px 1px 0;
  gap: 7px;
}

.course-row-title {
  font-size: 13.5px;
  font-weight: 780;
  line-height: 1.4;
  letter-spacing: -0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-row-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.course-row-meta .dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted-2);
}

.course-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price {
  font-size: 13.5px;
  font-weight: 850;
  color: var(--brand);
  letter-spacing: -0.2px;
}

.price.free {
  color: var(--green);
}

.price small {
  font-size: 9px;
  font-weight: 600;
  color: var(--muted-2);
  margin-left: 2px;
}

.rating-mini {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  color: #a56a00;
}

.rating-mini svg {
  color: var(--amber);
}

/* 横向卡片 ---------------------------------------------------------------- */
.hscroll {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  padding: 2px 20px 10px;
  margin: 0 -20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.hscroll::-webkit-scrollbar {
  display: none;
}

.hcard {
  flex: 0 0 205px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 8px 11px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.hcard .cover {
  width: 100%;
  height: 108px;
  border-radius: 14px;
}

.hcard-title {
  font-size: 12.5px;
  font-weight: 780;
  line-height: 1.4;
  margin: 9px 3px 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hcard-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 3px;
  font-size: 9.5px;
  color: var(--muted);
}

/* 继续学习 ---------------------------------------------------------------- */
.continue-card {
  position: relative;
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 21px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.continue-cover {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background:
    radial-gradient(100% 100% at 90% 0%, rgba(255, 255, 255, 0.28), transparent 50%),
    linear-gradient(145deg, var(--c1), var(--c2));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 25px;
  font-weight: 850;
  flex: none;
  position: relative;
  overflow: hidden;
}

.continue-cover span {
  position: relative;
  z-index: 1;
}

.continue-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.25) 0.7px, transparent 0.7px);
  background-size: 8px 8px;
  opacity: 0.5;
}

.continue-body {
  flex: 1;
  min-width: 0;
}

.continue-label {
  font-size: 9px;
  color: var(--brand);
  font-weight: 750;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.continue-title {
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-lesson {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}

.continue-arrow {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex: none;
}

.progress-track {
  height: 5px;
  background: #eef0f7;
  border-radius: 99px;
  overflow: hidden;
  flex: 1;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), #7a94ff);
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 9px;
  font-weight: 750;
  color: var(--muted);
  flex: none;
}

/* 名师 -------------------------------------------------------------------- */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.teacher-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px;
  text-align: left;
}

.teacher-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background:
    radial-gradient(100% 100% at 85% 0%, rgba(255, 255, 255, 0.4), transparent 50%),
    linear-gradient(145deg, var(--c1), var(--c2));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  flex: none;
}

.avatar-lg {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  font-size: 16px;
}

.teacher-name {
  font-size: 12.5px;
  font-weight: 800;
}

.teacher-role {
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teacher-course {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teacher-course b {
  color: var(--ink-2);
  font-weight: 700;
}

/* 空状态 / 加载 ------------------------------------------------------------ */
.empty {
  padding: 42px 22px;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 22px;
}

.empty-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 13px;
  border-radius: 20px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
}

.empty h3 {
  font-size: 15px;
  font-weight: 800;
}

.empty p {
  font-size: 11.5px;
  color: var(--muted);
  margin: 6px auto 16px;
  max-width: 240px;
  line-height: 1.7;
}

.skeleton {
  background: linear-gradient(90deg, #eceef6 25%, #f7f8fc 37%, #eceef6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 12px;
}

@keyframes shimmer {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: 0 50%;
  }
}

.skel-hero {
  height: 250px;
  border-radius: 28px;
}

.skel-line {
  height: 13px;
  margin-top: 10px;
}

.skel-card {
  height: 106px;
  border-radius: 19px;
  margin-top: 10px;
}

/* 底部导航 ---------------------------------------------------------------- */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(11px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 496px);
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: 0 18px 40px -18px rgba(22, 30, 64, 0.35), 0 0 0 1px rgba(220, 224, 238, 0.6);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
}

.tab {
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 3px 0 4px;
  border-radius: 16px;
  color: #9298ac;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.tab-icon {
  width: 42px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab.active {
  color: var(--brand);
  font-weight: 800;
}

.tab.active .tab-icon {
  background: var(--brand-soft);
}

/* 课程库 ---------------------------------------------------------------- */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 14px;
  color: var(--muted-2);
  pointer-events: none;
}

.search-input {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 15px;
  padding: 12px 42px 12px 41px;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-input::placeholder {
  color: var(--muted-2);
}

.search-input:focus {
  border-color: rgba(44, 75, 221, 0.5);
  box-shadow: 0 0 0 4px rgba(44, 75, 221, 0.08);
}

.search-clear {
  position: absolute;
  right: 9px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 9px;
  background: #eff1f7;
  color: var(--muted);
  display: none;
  place-items: center;
}

.search-clear.show {
  display: grid;
}

.chip-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 20px 6px;
  margin: 0 -20px;
  scrollbar-width: none;
}

.chip-scroll::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  padding: 7px 13px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 650;
  transition: all 0.18s ease;
}

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 750;
  box-shadow: 0 8px 16px -10px rgba(21, 26, 45, 0.5);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 9px;
}

.result-count {
  font-size: 11px;
  color: var(--muted);
}

.result-count b {
  color: var(--ink);
  font-weight: 800;
}

.sort-select {
  border: 0;
  background: transparent;
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
  padding: 4px;
  outline: none;
}

/* 课程详情 ---------------------------------------------------------------- */
.detail-page {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.detail-hero {
  position: relative;
  padding: calc(12px + env(safe-area-inset-top)) 18px 38px;
  background:
    radial-gradient(120% 100% at 90% 0%, rgba(255, 255, 255, 0.24), transparent 48%),
    linear-gradient(148deg, var(--c1), var(--c2));
  color: #fff;
  overflow: hidden;
  border-radius: 0 0 30px 30px;
}

.detail-hero::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  right: -80px;
  top: -70px;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.04);
}

.detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.detail-nav .icon-btn {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(8px);
}

.detail-kicker {
  display: flex;
  gap: 6px;
  margin-top: 22px;
  position: relative;
  z-index: 2;
}

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.92);
}

.detail-hero h1 {
  position: relative;
  z-index: 2;
  font-size: 25px;
  line-height: 1.33;
  font-weight: 850;
  letter-spacing: -0.7px;
  margin: 12px 0 7px;
  max-width: 330px;
}

.detail-sub {
  position: relative;
  z-index: 2;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.65;
  max-width: 310px;
}

.detail-hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 17px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.68);
}

.detail-hero-stats b {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  margin-right: 2px;
}

.detail-glyph {
  position: absolute;
  right: -16px;
  bottom: -54px;
  font-size: 190px;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.09);
  letter-spacing: -15px;
  pointer-events: none;
}

.detail-sheet {
  position: relative;
  z-index: 3;
  margin-top: -22px;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  padding: 18px 20px 10px;
}

.enroll-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 750;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 99px;
  padding: 5px 9px;
}

.price-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
}

.price-label {
  font-size: 9px;
  color: var(--muted-2);
  letter-spacing: 1px;
  margin-bottom: 1px;
}

.price-big {
  font-size: 24px;
  font-weight: 850;
  color: var(--brand);
  letter-spacing: -0.8px;
  line-height: 1.15;
}

.price-big.free {
  color: var(--green);
}

.price-note {
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 2px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 12px 0 0;
  background: var(--line);
  border-radius: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.stat-cell {
  background: #fff;
  padding: 11px 6px;
  text-align: center;
}

.stat-cell b {
  display: block;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -0.4px;
}

.stat-cell span {
  font-size: 9px;
  color: var(--muted-2);
}

.tabs {
  display: flex;
  gap: 3px;
  background: #e9ebf4;
  padding: 4px;
  border-radius: 14px;
  margin: 16px 0 14px;
  position: sticky;
  top: 8px;
  z-index: 20;
}

.tab-btn {
  flex: 1;
  border: 0;
  background: none;
  padding: 8px 4px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.18s ease;
}

.tab-btn.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 8px -4px rgba(21, 26, 45, 0.3);
}

.detail-tab-panel {
  animation: fade-up 0.3s ease;
}

.outcomes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 18px;
}

.outcome {
  display: flex;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.6;
}

.outcome-check {
  width: 19px;
  height: 19px;
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
}

.intro-text {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-2);
  white-space: pre-line;
}

.teacher-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 15px;
  margin-top: 18px;
  display: flex;
  gap: 12px;
}

.teacher-box .avatar {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  font-size: 14px;
}

.teacher-box-name {
  font-size: 13px;
  font-weight: 800;
}

.teacher-box-title {
  font-size: 9.5px;
  color: var(--muted);
  margin: 2px 0 6px;
}

.teacher-box-bio {
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
}

.chapter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 9px;
  overflow: hidden;
}

.chapter-head {
  width: 100%;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 14px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 780;
}

.chapter-head .chapter-index {
  width: 21px;
  height: 21px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  flex: none;
}

.chapter-head .chev {
  margin-left: auto;
  color: var(--muted-2);
  transition: transform 0.2s ease;
}

.chapter-card.open .chev {
  transform: rotate(180deg);
}

.chapter-lessons {
  display: none;
  border-top: 1px solid var(--line-2);
}

.chapter-card.open .chapter-lessons {
  display: block;
}

.lesson-row {
  width: 100%;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line-2);
}

.lesson-row:last-child {
  border-bottom: 0;
}

.lesson-row.locked {
  opacity: 0.55;
}

.lesson-status {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex: none;
}

.lesson-status.done {
  background: var(--green-soft);
  color: var(--green);
}

.lesson-title {
  flex: 1;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.4;
}

.lesson-duration {
  font-size: 9px;
  color: var(--muted-2);
  flex: none;
}

.lesson-free {
  font-size: 8px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 5px;
  padding: 2px 5px;
  font-weight: 700;
  flex: none;
}

.review-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 9px;
}

.review-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-name {
  font-size: 11.5px;
  font-weight: 750;
}

.review-stars {
  margin-left: auto;
  color: var(--amber);
  font-size: 10px;
  letter-spacing: 1px;
}

.review-text {
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-2);
  margin-top: 8px;
}

.review-date {
  font-size: 9px;
  color: var(--muted-2);
  margin-top: 7px;
}

.detail-cta {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 520px);
  z-index: 50;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(244, 245, 249, 0) 0%, rgba(244, 245, 249, 0.92) 32%, #f4f5f9 70%);
}

.detail-cta .btn {
  flex: 1;
}

.detail-cta .cta-price {
  flex: none;
  padding-right: 4px;
}

.detail-cta .cta-price b {
  display: block;
  font-size: 19px;
  font-weight: 850;
  color: var(--brand);
  line-height: 1.2;
}

.detail-cta .cta-price span {
  font-size: 9px;
  color: var(--muted-2);
}

@media (min-width: 760px) {
  .detail-cta {
    bottom: 24px;
    border-radius: 0 0 34px 34px;
    padding-bottom: 14px;
    width: 520px;
  }
  .detail-page {
    padding-bottom: 100px;
  }
}

/* 学习中心 ---------------------------------------------------------------- */
.summary-card {
  border-radius: 24px;
  padding: 18px;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(255, 201, 107, 0.22), transparent 48%),
    linear-gradient(140deg, #182b78, #2f50df);
  color: #fff;
  box-shadow: 0 20px 40px -28px rgba(30, 54, 160, 0.8);
}

.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-title {
  font-size: 15px;
  font-weight: 800;
}

.summary-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.summary-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  padding-top: 13px;
}

.summary-stat b {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.8px;
}

.summary-stat span {
  display: block;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 1px;
}

.learning-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  text-align: left;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.learning-cover {
  width: 62px;
  height: 62px;
  border-radius: 17px;
  background:
    radial-gradient(100% 100% at 90% 0%, rgba(255, 255, 255, 0.3), transparent 50%),
    linear-gradient(145deg, var(--c1), var(--c2));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  font-weight: 850;
  flex: none;
}

.learning-body {
  flex: 1;
  min-width: 0;
}

.learning-title {
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.learning-lesson {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.learning-progress {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.learning-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  font-size: 9px;
  color: var(--muted-2);
}

.learning-continue {
  width: 31px;
  height: 31px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  align-self: center;
  flex: none;
}

/* 播放页 ---------------------------------------------------------------- */
body.player-mode {
  background: #0a0d17;
}

body.player-mode::before {
  display: none;
}

.player-page {
  width: min(100%, 820px);
  min-height: 100dvh;
  margin: 0 auto;
  background: #0a0d17;
  color: #fff;
  padding-bottom: 42px;
  position: relative;
}

.player-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(11px + env(safe-area-inset-top)) 14px 11px;
  position: relative;
  z-index: 10;
}

.player-top .icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 37px;
  height: 37px;
}

.player-top-title {
  flex: 1;
  min-width: 0;
}

.player-top-title b {
  display: block;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-top-title span {
  display: block;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 1px;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(100% 100% at 90% 0%, rgba(255, 255, 255, 0.16), transparent 48%),
    linear-gradient(145deg, var(--c1), var(--c2));
  isolation: isolate;
}

@media (min-width: 760px) {
  .stage {
    aspect-ratio: 16 / 9;
    width: calc(100% - 32px);
    margin: 0 16px;
    border-radius: 22px;
  }
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 0.7px, transparent 0.7px);
  background-size: 14px 14px;
  opacity: 0.35;
  pointer-events: none;
}

.video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 1;
}

.stage-slide {
  position: absolute;
  inset: 0;
  padding: 22px 24px 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.stage-slide.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.stage-slide .slide-kicker {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.stage-slide h2 {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 850;
  letter-spacing: -0.5px;
  margin: 9px 0 7px;
  max-width: 430px;
}

.stage-slide .slide-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.7;
  max-width: 400px;
}

.slide-points {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 14px;
  max-width: 430px;
}

.slide-point {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.slide-point b {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 9px;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
}

.slide-quote {
  font-size: 18px;
  line-height: 1.65;
  font-weight: 700;
  max-width: 440px;
  color: #fff;
  border-left: 3px solid #ffc96b;
  padding-left: 14px;
}

.slide-glyph {
  position: absolute;
  right: -10px;
  bottom: -44px;
  font-size: 200px;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.08);
  letter-spacing: -14px;
  pointer-events: none;
  z-index: -1;
}

.stage-play {
  position: absolute;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.17);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  z-index: 8;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.stage-play:hover {
  transform: translateX(-50%) scale(1.05);
}

.stage-play svg {
  margin-left: 3px;
}

.stage-play.hidden {
  opacity: 0;
  pointer-events: none;
}

.stage-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  padding: 30px 14px 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
}

.timeline {
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.timeline-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.timeline-buffer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.18);
}

.timeline-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #ffc96b;
  border-radius: 99px;
}

.timeline-thumb {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.ctrl-btn {
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.86);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}

.ctrl-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

.ctrl-time {
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.2px;
}

.ctrl-spacer {
  flex: 1;
}

.speed-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 9px;
  font-weight: 700;
  border-radius: 7px;
  padding: 4px 7px;
}

.player-info {
  padding: 18px 20px 0;
}

.player-course-label {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.42);
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-title {
  font-size: 19px;
  font-weight: 820;
  letter-spacing: -0.4px;
  line-height: 1.4;
  margin: 6px 0 4px;
}

.player-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.45);
  flex-wrap: wrap;
}

.player-meta .done {
  color: #6ee7b7;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.player-tabs {
  display: flex;
  gap: 22px;
  padding: 0 20px;
  margin-top: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.player-tab {
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-weight: 650;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
}

.player-tab.active {
  color: #fff;
  border-color: #ffc96b;
}

.player-panel {
  padding: 14px 20px 20px;
  animation: fade-up 0.3s ease;
}

.dark-chapter {
  margin-bottom: 14px;
}

.dark-chapter-title {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.44);
  padding: 5px 2px 8px;
  letter-spacing: 0.2px;
}

.dark-lesson {
  width: 100%;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-radius: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
}

.dark-lesson.current {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.dark-lesson-icon {
  width: 23px;
  height: 23px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  flex: none;
  font-size: 8.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
}

.dark-lesson.current .dark-lesson-icon {
  background: #ffc96b;
  color: #3d2600;
}

.dark-lesson.done .dark-lesson-icon {
  background: rgba(110, 231, 183, 0.16);
  color: #6ee7b7;
}

.dark-lesson-title {
  flex: 1;
  font-size: 11px;
  line-height: 1.45;
}

.dark-lesson-time {
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.3);
  flex: none;
}

.note-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 17px;
  padding: 15px;
  margin-bottom: 10px;
}

.note-card h4 {
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.note-card p {
  font-size: 11px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.62);
  white-space: pre-line;
}

.note-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.note-point {
  display: flex;
  gap: 8px;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.note-point span {
  color: #ffc96b;
  font-weight: 800;
  font-size: 9px;
  padding-top: 2px;
}

.quiz-cta {
  display: flex;
  align-items: center;
  gap: 11px;
  background: linear-gradient(120deg, rgba(255, 201, 107, 0.14), rgba(255, 201, 107, 0.04));
  border: 1px solid rgba(255, 201, 107, 0.24);
  border-radius: 16px;
  padding: 13px;
  margin-top: 12px;
  width: 100%;
  text-align: left;
  color: #fff;
}

.quiz-cta-icon {
  width: 35px;
  height: 35px;
  border-radius: 12px;
  background: #ffc96b;
  color: #3d2600;
  display: grid;
  place-items: center;
  flex: none;
}

.quiz-cta b {
  display: block;
  font-size: 11.5px;
  font-weight: 780;
}

.quiz-cta span {
  display: block;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

.player-next {
  display: flex;
  gap: 9px;
  padding: 15px 20px 0;
}

.player-next .btn {
  flex: 1;
}

/* 测验页 ---------------------------------------------------------------- */
.quiz-wrap {
  padding: 6px 20px 30px;
  animation: fade-up 0.35s ease;
}

.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.quiz-progress-label {
  font-size: 11px;
  color: var(--muted);
}

.quiz-progress-label b {
  color: var(--ink);
  font-size: 13px;
}

.quiz-score-mini {
  font-size: 9.5px;
  color: var(--muted);
}

.quiz-progress {
  height: 6px;
  background: #e7eaf3;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 18px;
}

.quiz-progress span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), #7a94ff);
  transition: width 0.35s ease;
}

.question-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.question-index {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.4px;
  color: var(--brand);
  margin-bottom: 7px;
}

.question-text {
  font-size: 16px;
  font-weight: 790;
  line-height: 1.55;
  letter-spacing: -0.2px;
  margin-bottom: 16px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
  text-align: left;
  transition: all 0.16s ease;
  color: var(--ink-2);
}

.option:active {
  transform: scale(0.99);
}

.option.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--ink);
}

.option-key {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #eef0f7;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  flex: none;
  color: var(--muted);
}

.option.selected .option-key {
  background: var(--brand);
  color: #fff;
}

.option-text {
  font-size: 12.5px;
  line-height: 1.5;
}

.quiz-actions {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.quiz-actions .btn {
  flex: 1;
}

.result-card {
  text-align: center;
  padding: 8px 0 4px;
}

.score-ring {
  width: 126px;
  height: 126px;
  margin: 4px auto 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--brand) calc(var(--score) * 1%), #e9ebf4 0);
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--bg);
}

.score-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-inner b {
  display: block;
  font-size: 34px;
  font-weight: 850;
  letter-spacing: -1.5px;
  line-height: 1;
}

.score-inner span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}

.result-title {
  font-size: 19px;
  font-weight: 820;
  letter-spacing: -0.3px;
}

.result-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 5px;
}

.result-list {
  margin-top: 18px;
  text-align: left;
}

.result-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 13px;
  margin-bottom: 8px;
}

.result-item-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.result-mark {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
}

.result-mark.ok {
  background: var(--green-soft);
  color: var(--green);
}

.result-mark.no {
  background: var(--danger-soft);
  color: var(--danger);
}

.result-q {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.55;
}

.result-answer {
  font-size: 10.5px;
  color: var(--muted);
  margin: 6px 0 0 28px;
  line-height: 1.7;
}

.result-answer b {
  color: var(--ink-2);
}

.result-explain {
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--ink-2);
  background: #f7f8fc;
  border-radius: 10px;
  padding: 8px 10px;
  margin: 7px 0 0 28px;
}

/* 个人中心 ---------------------------------------------------------------- */
.profile-hero {
  position: relative;
  border-radius: 26px;
  padding: 20px;
  background:
    radial-gradient(100% 130% at 100% 0%, rgba(255, 201, 107, 0.28), transparent 48%),
    linear-gradient(145deg, #17296f, #2d4ddb);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 24px 46px -30px rgba(26, 48, 150, 0.8);
}

.profile-hero::before {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  right: -50px;
  top: -60px;
  box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.035);
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 850;
  flex: none;
  backdrop-filter: blur(7px);
}

.profile-name {
  font-size: 18px;
  font-weight: 830;
  letter-spacing: -0.2px;
}

.profile-mail {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 201, 107, 0.18);
  border: 1px solid rgba(255, 201, 107, 0.3);
  color: #ffd479;
  margin-top: 6px;
}

.profile-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  margin-top: 17px;
  padding-top: 13px;
}

.profile-stat b {
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.6px;
}

.profile-stat span {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.52);
  display: block;
}

.menu-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.menu-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  text-align: left;
}

.menu-item:last-child {
  border-bottom: 0;
}

.menu-icon {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  flex: none;
}

.menu-icon.amber {
  background: var(--amber-soft);
  color: #b47800;
}

.menu-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.menu-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  font-weight: 650;
}

.menu-sub {
  font-size: 9px;
  color: var(--muted-2);
  margin-top: 1px;
  font-weight: 400;
}

.menu-item .chev {
  color: var(--muted-2);
}

.profile-foot {
  text-align: center;
  font-size: 9px;
  color: var(--muted-2);
  margin-top: 18px;
  line-height: 1.8;
}

.guest-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.guest-card .brand-logo {
  margin: 0 auto 13px;
}

.guest-card h2 {
  font-size: 19px;
  font-weight: 830;
  letter-spacing: -0.3px;
}

.guest-card p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.8;
  margin: 7px auto 16px;
  max-width: 280px;
}

/* 表单 ------------------------------------------------------------------ */
.field {
  margin-bottom: 12px;
}

.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.field label small {
  font-weight: 400;
  color: var(--muted-2);
  font-size: 9px;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fafbfe;
  padding: 12px 13px;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.7;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(44, 75, 221, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(44, 75, 221, 0.07);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
}

.pw-wrap {
  position: relative;
}

.pw-wrap .input {
  padding-right: 42px;
}

.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--muted-2);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}

.form-error {
  display: none;
  font-size: 11px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 9px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.form-error.show {
  display: block;
}

/* Auth sheet ------------------------------------------------------------ */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 16, 30, 0.46);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.24s ease;
  z-index: 100;
}

.sheet-backdrop.show {
  opacity: 1;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 104%);
  width: min(100%, 520px);
  max-height: 92dvh;
  overflow-y: auto;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  z-index: 101;
  transition: transform 0.3s cubic-bezier(0.22, 0.68, 0.36, 1);
  box-shadow: 0 -20px 60px -30px rgba(10, 15, 40, 0.5);
}

.sheet.show {
  transform: translate(-50%, 0);
}

@media (min-width: 760px) {
  .sheet {
    bottom: 50%;
    border-radius: 28px;
    transform: translate(-50%, 60%);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
    max-width: 470px;
  }
  .sheet.show {
    transform: translate(-50%, 50%);
    opacity: 1;
  }
}

.sheet-grabber {
  width: 34px;
  height: 4px;
  border-radius: 99px;
  background: #e4e7f0;
  margin: 0 auto 10px;
}

.sheet-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 9px;
  background: #f1f3f9;
  color: var(--muted);
  font-size: 12px;
  display: grid;
  place-items: center;
}

.sheet-body {
  padding: 4px 0 0;
}

.sheet-title {
  font-size: 18px;
  font-weight: 830;
  letter-spacing: -0.3px;
}

.sheet-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.75;
  margin-top: 6px;
}

.sheet-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.sheet-actions .btn {
  flex: 1;
}

.sheet-sm {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.auth-head {
  text-align: center;
  padding: 4px 0 16px;
}

.auth-head .brand-logo {
  margin: 0 auto 10px;
}

.auth-title {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.5px;
}

.auth-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.auth-tabs {
  display: flex;
  background: #f0f2f8;
  padding: 4px;
  border-radius: 13px;
  margin-bottom: 15px;
}

.auth-tab {
  flex: 1;
  border: 0;
  background: none;
  padding: 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.auth-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 8px -5px rgba(21, 26, 45, 0.3);
}

.demo-tip {
  margin-top: 12px;
  background: #fff9ec;
  border: 1px dashed #f3d9a4;
  border-radius: 11px;
  padding: 9px 11px;
  font-size: 9.5px;
  color: #8a6416;
  line-height: 1.7;
}

.demo-tip b {
  font-weight: 750;
}

.demo-fill {
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 9.5px;
  font-weight: 750;
  padding: 0;
  text-decoration: underline;
}

/* Toast ----------------------------------------------------------------- */
#toast-root {
  position: fixed;
  left: 50%;
  top: calc(14px + env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}

.toast {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(21, 26, 45, 0.92);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 9px 13px;
  border-radius: 11px;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ee7b7;
}

.toast-error .toast-dot {
  background: #ff8b8f;
}

.toast-info .toast-dot {
  background: #ffd479;
}

/* 管理后台 -------------------------------------------------------------- */
body.admin-mode {
  background: #f2f4f9;
}

body.admin-mode::before {
  display: none;
}

.admin {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 22px 60px;
  min-height: 100dvh;
  overflow-x: clip;
  animation: fade-up 0.35s ease;
}

.admin-grid-2 > *,
.panel {
  min-width: 0;
}

.table-wrap {
  max-width: 100%;
}

@media (min-width: 900px) {
  .admin {
    padding: 34px 34px 70px;
  }
}

.admin-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-brand-text b {
  display: block;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.2px;
}

.admin-brand-text span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-top: 1px;
}

.admin-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 5px 10px 5px 5px;
  font-size: 10.5px;
  font-weight: 650;
}

.admin-user .avatar {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 9px;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 13px;
  width: fit-content;
  margin-bottom: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.admin-tab {
  border: 0;
  background: none;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.admin-tab.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(44, 75, 221, 0.8);
}

.admin-login-panel {
  max-width: 440px;
  margin: 58px auto 0;
  padding: 30px 24px;
  text-align: center;
}

.admin-login-panel .empty-icon {
  margin: 0 auto 14px;
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

.admin-login-panel h2 {
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.4px;
}

.admin-login-panel p {
  max-width: 330px;
  margin: 8px auto 18px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
}

.admin-login-panel .btn {
  width: 100%;
}

.admin-login-panel .demo-tip {
  margin-top: 14px;
  text-align: left;
}

.admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0 14px;
}

.admin-heading h2 {
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.5px;
}

.admin-heading p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--brand-soft);
}

.stat-label {
  font-size: 9.5px;
  color: var(--muted);
  font-weight: 650;
}

.stat-value {
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -1px;
  margin-top: 4px;
  line-height: 1.1;
}

.stat-foot {
  font-size: 9px;
  color: var(--muted-2);
  margin-top: 5px;
}

.stat-foot b {
  color: var(--green);
  font-weight: 700;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 18px;
  margin-top: 14px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-head h3 {
  font-size: 13.5px;
  font-weight: 800;
}

.panel-head span {
  font-size: 9.5px;
  color: var(--muted);
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.table th {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted-2);
  font-weight: 750;
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  font-size: 10.5px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table .strong {
  font-weight: 750;
  color: var(--ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 8.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 99px;
  background: #f0f2f8;
  color: var(--muted);
  white-space: nowrap;
}

.badge-green {
  background: var(--green-soft);
  color: var(--green);
}

.badge-amber {
  background: var(--amber-soft);
  color: #9a6500;
}

.badge-blue {
  background: var(--brand-soft);
  color: var(--brand);
}

.badge-red {
  background: var(--danger-soft);
  color: var(--danger);
}

.admin-course-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-course-cards {
  display: none;
  flex-direction: column;
  gap: 9px;
}

.admin-course-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 11px;
  background: #fff;
}

.admin-course-card-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.admin-course-card-info {
  flex: 1;
  min-width: 0;
}

.admin-course-card-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.admin-course-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.admin-course-card-actions .btn {
  flex: 1;
}

.admin-cover {
  width: 48px;
  height: 36px;
  border-radius: 9px;
  background:
    radial-gradient(100% 100% at 90% 0%, rgba(255, 255, 255, 0.28), transparent 50%),
    linear-gradient(135deg, var(--c1), var(--c2));
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 850;
  flex: none;
}

.admin-course-name {
  font-size: 10.5px;
  font-weight: 750;
  color: var(--ink);
}

.admin-course-sub {
  font-size: 8.5px;
  color: var(--muted);
  margin-top: 2px;
}

.row-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}

.row-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.row-btn:hover {
  color: var(--brand);
  border-color: rgba(44, 75, 221, 0.3);
}

.row-btn.danger:hover {
  color: var(--danger);
  border-color: rgba(229, 72, 77, 0.3);
}

.toggle-pill {
  border: 0;
  border-radius: 99px;
  font-size: 8.5px;
  font-weight: 700;
  padding: 3px 8px;
}

.toggle-pill.on {
  background: var(--green-soft);
  color: var(--green);
}

.toggle-pill.off {
  background: #f0f2f8;
  color: var(--muted);
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-form .span-2 {
  grid-column: span 2;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-grid-2 {
    grid-template-columns: 1fr;
  }
  .admin-form {
    grid-template-columns: 1fr;
  }
  .admin-form .span-2 {
    grid-column: span 1;
  }
  .admin {
    padding: 16px 14px 40px;
  }
  .admin-top {
    flex-wrap: wrap;
    gap: 10px;
  }
  .admin-brand-text span {
    display: none;
  }
  .admin-brand-text b {
    font-size: 13px;
  }
  .admin-top .btn {
    padding: 7px 10px;
  }
  .admin-heading {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .admin-heading h2 {
    font-size: 19px;
  }
  .admin-user {
    display: none;
  }
  .tabs {
    top: 6px;
  }
  .admin-course-table {
    display: none;
  }
  .admin-course-cards {
    display: flex;
  }
}

@media (max-width: 480px) {
  .brand-sub {
    display: none;
  }
}

@media (max-width: 380px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .topbar-actions {
    gap: 6px;
  }
  .icon-btn,
  .avatar-btn {
    width: 37px;
    height: 37px;
  }
  .hero {
    padding: 20px 18px 14px;
  }
  .hero h1 {
    font-size: 27px;
  }
  .hero-art {
    display: none;
  }
  .hero-sub {
    font-size: 11px;
  }
}

.curriculum-editor {
  margin-top: 8px;
}

.curriculum-chapter {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 8px;
  overflow: hidden;
}

.curriculum-chapter-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fafbfe;
  border-bottom: 1px solid var(--line-2);
}

.curriculum-chapter-head b {
  font-size: 11px;
  flex: 1;
}

.curriculum-lesson {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-2);
  font-size: 10px;
  color: var(--ink-2);
}

.curriculum-lesson:last-child {
  border-bottom: 0;
}

.curriculum-lesson .lesson-name {
  flex: 1;
  min-width: 0;
}

.curriculum-empty {
  font-size: 10px;
  color: var(--muted-2);
  padding: 8px 12px;
}

.admin-modal-form .field {
  margin-bottom: 10px;
}

/* 启动页 ---------------------------------------------------------------- */
.boot {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(150deg, #17296f, #2b49d6 65%, #5474ff);
  color: #fff;
}

.boot-logo {
  width: 67px;
  height: 67px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 850;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.4);
  animation: boot-pop 0.6s cubic-bezier(0.22, 0.68, 0.36, 1);
}

.boot-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 3px;
}

.boot-line {
  width: 54px;
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.boot-line span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 99px;
  background: #ffd479;
  animation: boot-line 1.1s ease-in-out infinite;
}

@keyframes boot-pop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes boot-line {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(260%);
  }
}

/* 工具类 ---------------------------------------------------------------- */
.hidden {
  display: none !important;
}

.mt-8 {
  margin-top: 8px;
}

.mt-14 {
  margin-top: 14px;
}

.mt-20 {
  margin-top: 20px;
}

.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

.icon {
  flex: none;
}

/* 沉浸式页面（播放 / 后台）重置外框 */
body.player-mode,
body.admin-mode {
  padding: 0;
}

.nav-right {
  width: 39px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.player-page .player-title,
.player-page .player-top-title b {
  font-family: var(--serif-zh);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.stage-slide h2 {
  font-family: var(--serif-zh);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.player-next .btn-glass {
  background: transparent;
  border: 1px solid rgba(238, 230, 212, 0.28);
  color: var(--paper-on-night);
}

.player-next .btn-glass:hover {
  background: var(--paper-on-night);
  border-color: var(--paper-on-night);
  color: var(--ink);
}

/* 复选框行 */
.field input[type="checkbox"] {
  accent-color: var(--brand);
  flex: none;
}

/* ==========================================================================
   BOWEN EDITORIAL SKIN
   与 www.liubowen.org 桌面版一致：纸色、墨色、朱砂、旧金、宋体标题、细线方框
   ========================================================================== */

.app {
  background: var(--paper);
}

@media (min-width: 760px) {
  body {
    background: var(--paper-2);
  }
  .app {
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: var(--shadow-lg);
  }
}

/* 标题字体 */
.brand-name,
.section-title,
.hero h1,
.detail-hero h1,
.course-row-title,
.hcard-title,
.teacher-name,
.teacher-box-name,
.summary-title,
.learning-title,
.profile-name,
.auth-title,
.sheet-title,
.question-text,
.result-title,
.guest-card h2,
.admin-heading h2,
.admin-brand-text b,
.admin-login-panel h2,
.price-big,
.stat-value,
.player-title {
  font-family: var(--serif-zh);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.section-title {
  font-size: 21px;
  letter-spacing: 0.05em;
}

.section-desc {
  color: var(--muted);
}

.section-title .spark {
  color: var(--cinnabar);
}

.rating-mini {
  color: var(--gold);
}

.rating-mini svg {
  color: var(--gold);
}

/* 顶栏与导航 */
.topbar,
.navbar {
  background: rgba(244, 239, 227, 0.92);
  border-bottom: 1px solid var(--line);
}

.brand-name {
  font-size: 18px;
  letter-spacing: 0.2em;
}

.brand-sub {
  font-family: var(--serif-zh);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.icon-btn {
  border-radius: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.icon-btn:hover {
  border-color: var(--ink);
}

.avatar-btn {
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--cinnabar);
  color: var(--cinnabar);
  font-family: var(--serif-zh);
  font-weight: 500;
}

.tabbar {
  bottom: 0;
  width: min(100%, 520px);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: rgba(244, 239, 227, 0.96);
  box-shadow: none;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}

@media (min-width: 760px) {
  .tabbar {
    bottom: 24px;
    border: 1px solid var(--line);
  }
}

.tab {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.tab-icon {
  border-radius: 0;
  width: 38px;
  height: 26px;
}

.tab.active {
  color: var(--cinnabar);
  font-weight: 600;
}

.tab.active .tab-icon {
  background: transparent;
  box-shadow: inset 0 -1px 0 var(--cinnabar);
}

/* 首页 Hero */
.hero {
  margin-top: 0;
  padding: 26px 22px 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: none;
}

.hero::before {
  border-color: rgba(163, 55, 42, 0.16);
  box-shadow: 0 0 0 28px rgba(163, 55, 42, 0.03), 0 0 0 58px rgba(163, 55, 42, 0.02);
}

.hero::after {
  background: rgba(201, 164, 104, 0.2);
}

.hero-kicker {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--cinnabar);
  font-family: var(--sans);
  letter-spacing: 0.16em;
}

.hero-kicker .live-dot {
  background: var(--cinnabar);
  box-shadow: none;
}

.hero h1 {
  color: var(--ink);
  font-size: 34px;
  line-height: 1.24;
  letter-spacing: 0.02em;
  margin: 16px 0 10px;
}

.hero h1 em {
  color: var(--cinnabar);
  font-style: normal;
}

.hero-sub {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.85;
  max-width: 310px;
}

.hero-actions .btn-light {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.hero-actions .btn-light:hover {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
}

.hero-actions .btn-glass {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.hero-actions .btn-glass:hover {
  background: var(--ink);
  color: var(--paper);
}

.hero-stats {
  border-top-color: var(--line);
}

.hero-stat b {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-stat span {
  color: var(--muted);
}

.hero-art .ring {
  border-color: rgba(163, 55, 42, 0.18);
}

.hero-art .ring-b {
  border-color: rgba(169, 133, 78, 0.38);
}

.hero-art .glyph-chip {
  background: transparent;
  border: 1px solid rgba(163, 55, 42, 0.32);
  border-radius: 0;
  color: var(--cinnabar);
  font-family: var(--serif-zh);
  font-weight: 500;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-art .glyph-chip.g2 {
  border-color: rgba(169, 133, 78, 0.5);
  color: var(--gold);
  background: transparent;
}

.hero-art .glyph-chip.g3 {
  background: transparent;
  border-color: rgba(163, 55, 42, 0.24);
  color: var(--cinnabar);
}

/* 按钮 */
.btn {
  border-radius: 0;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.btn:hover {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
}

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
}

.btn-primary:disabled {
  background: var(--paper-3);
  border-color: var(--line);
  color: var(--muted);
  opacity: 1;
}

.btn-light {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

.btn-light:hover {
  background: var(--gold-2);
  border-color: var(--gold-2);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

.btn-amber {
  background: var(--gold-2);
  border-color: var(--gold-2);
  color: var(--ink);
  box-shadow: none;
}

.btn-danger {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: var(--paper);
}

.btn-glass {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

/* 卡片与封面 */
.course-row,
.hcard,
.cat-card,
.continue-card,
.teacher-card,
.learning-card,
.review-card,
.price-bar,
.chapter-card,
.menu-card,
.empty,
.guest-card,
.question-card,
.result-item,
.admin-course-card,
.stat-card,
.panel,
.teacher-box,
.admin-login-panel {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.course-row:hover,
.hcard:hover,
.cat-card:hover,
.learning-card:hover {
  border-color: var(--ink);
}

.cover,
.continue-cover,
.learning-cover,
.admin-cover {
  border-radius: 0;
}

.cover {
  border: 1px solid var(--line);
}

.cover-tag {
  border-radius: 0;
  background: rgba(16, 20, 16, 0.66);
  font-family: var(--sans);
  letter-spacing: 0.08em;
}

.cover-glyph,
.course-glyph {
  font-family: var(--serif-zh);
  font-weight: 500;
}

.cover-play {
  border-radius: 0;
  background: var(--paper);
  color: var(--cinnabar);
}

.cover::before {
  opacity: 0.2;
}

.hcard {
  padding: 8px;
}

.hcard .cover {
  height: 108px;
}

.cat-card {
  padding: 12px 10px;
}

.cat-icon {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--soft);
  color: var(--tint);
}

.cat-name {
  font-family: var(--serif-zh);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.cat-count {
  color: var(--muted-2);
}

.continue-cover,
.learning-cover {
  border: 1px solid var(--line);
  font-family: var(--serif-zh);
  font-weight: 500;
}

.continue-label {
  color: var(--cinnabar);
  letter-spacing: 0.16em;
}

.continue-arrow,
.learning-continue {
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cinnabar);
}

.avatar {
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--cinnabar);
  color: var(--cinnabar);
  font-family: var(--serif-zh);
  font-weight: 500;
}

.teacher-name {
  font-size: 13px;
}

.teacher-role,
.teacher-course {
  color: var(--muted);
}

.progress-track {
  border-radius: 0;
  background: var(--paper-3);
}

.progress-fill {
  border-radius: 0;
  background: var(--cinnabar);
}

.badge {
  border-radius: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

.badge-blue {
  border-color: rgba(163, 55, 42, 0.3);
  background: transparent;
  color: var(--cinnabar);
}

.badge-green {
  border-color: rgba(44, 74, 61, 0.3);
  background: transparent;
  color: var(--jade);
}

.badge-amber {
  border-color: rgba(169, 133, 78, 0.4);
  background: transparent;
  color: var(--gold);
}

.badge-red {
  border-color: rgba(163, 55, 42, 0.3);
  background: transparent;
  color: var(--cinnabar);
}

.price {
  color: var(--cinnabar);
  font-family: var(--serif);
}

.price.free {
  color: var(--jade);
}

/* 表单 */
.search-input,
.input,
.textarea,
.select {
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.search-input:focus,
.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--ink);
  background: var(--paper);
  box-shadow: none;
}

.search-clear {
  border-radius: 0;
}

.chip {
  border-radius: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 500;
}

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

/* 课程详情 */
.detail-hero {
  background: var(--paper-2);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.detail-hero::before {
  border-color: rgba(163, 55, 42, 0.16);
  box-shadow: 0 0 0 28px rgba(163, 55, 42, 0.03);
}

.detail-nav .icon-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  backdrop-filter: none;
}

.pill {
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.detail-hero h1 {
  color: var(--ink);
  font-weight: 500;
}

.detail-sub {
  color: var(--ink-soft);
}

.detail-hero-stats {
  color: var(--muted);
}

.detail-hero-stats b {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
}

.detail-glyph {
  color: rgba(163, 55, 42, 0.07);
  font-family: var(--serif-zh);
}

.detail-sheet {
  background: var(--paper);
  border-radius: 0;
  margin-top: 0;
}

.price-bar {
  background: var(--surface);
}

.price-big {
  color: var(--cinnabar);
}

.price-big.free {
  color: var(--jade);
}

.enroll-badge {
  border-radius: 0;
  background: transparent;
  border: 1px solid rgba(44, 74, 61, 0.35);
  color: var(--jade);
}

.stat-strip {
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.stat-cell {
  background: var(--surface);
}

.tabs {
  border-radius: 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.tab-btn {
  border-radius: 0;
  color: var(--muted);
}

.tab-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--cinnabar);
}

.outcome-check,
.lesson-status,
.chapter-index {
  border-radius: 0;
}

.lesson-status {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cinnabar);
}

.lesson-status.done {
  background: transparent;
  border-color: rgba(44, 74, 61, 0.35);
  color: var(--jade);
}

.lesson-free {
  border-radius: 0;
  background: transparent;
  border: 1px solid rgba(44, 74, 61, 0.3);
}

.teacher-box {
  gap: 12px;
}

.detail-cta {
  background: linear-gradient(180deg, rgba(244, 239, 227, 0), var(--paper) 40%);
}

.detail-cta .cta-price b {
  color: var(--cinnabar);
  font-family: var(--serif);
  font-weight: 500;
}

.chapter-head {
  font-family: var(--serif-zh);
  font-weight: 500;
}

.review-stars {
  color: var(--gold);
}

/* 学习概览 / 个人中心 */
.summary-card,
.profile-hero {
  background: var(--night);
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  color: var(--paper-on-night);
}

.summary-card::before,
.profile-hero::before {
  border-color: rgba(200, 164, 104, 0.2);
  box-shadow: 0 0 0 22px rgba(200, 164, 104, 0.04);
}

.summary-sub,
.profile-mail {
  color: rgba(238, 230, 212, 0.55);
}

.summary-title,
.profile-name {
  color: var(--paper-on-night);
  font-size: 20px;
  font-weight: 500;
}

.summary-badge {
  border-radius: 0;
  background: transparent;
  border: 1px solid rgba(200, 164, 104, 0.4);
  color: var(--gold-2);
}

.summary-stats,
.profile-stats {
  border-top-color: rgba(238, 230, 212, 0.18);
}

.summary-stat b,
.profile-stat b {
  color: var(--gold-2);
  font-family: var(--serif);
  font-weight: 400;
}

.summary-stat span,
.profile-stat span {
  color: rgba(238, 230, 212, 0.5);
}

.profile-avatar {
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--gold-2);
  color: var(--paper-on-night);
  font-family: var(--serif-zh);
  font-weight: 500;
}

.profile-tag {
  border-radius: 0;
  background: transparent;
  border: 1px solid rgba(200, 164, 104, 0.45);
  color: var(--gold-2);
}

.learning-meta {
  color: var(--muted-2);
}

.menu-icon {
  border-radius: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cinnabar);
}

.menu-item {
  border-bottom-color: var(--line-2);
}

.menu-item:hover {
  background: rgba(23, 23, 15, 0.03);
}

/* 播放页 */
.player-page {
  background: var(--night);
}

.player-top .icon-btn {
  background: transparent;
  border-color: rgba(238, 230, 212, 0.18);
  color: var(--paper-on-night);
}

.stage {
  background: linear-gradient(145deg, var(--c1), var(--c2));
}

.speed-btn {
  border-radius: 0;
}

.player-tab.active {
  border-color: var(--gold-2);
}

.quiz-cta {
  border-radius: 0;
  background: rgba(200, 164, 104, 0.08);
  border-color: rgba(200, 164, 104, 0.35);
}

.quiz-cta-icon {
  border-radius: 0;
  background: var(--gold-2);
  color: var(--ink);
}

.dark-lesson {
  border-radius: 0;
}

.dark-lesson.current {
  background: rgba(238, 230, 212, 0.08);
}

.dark-lesson.current .dark-lesson-icon {
  background: var(--gold-2);
  color: var(--ink);
}

/* 弹层 */
.sheet {
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(16, 20, 16, 0.3);
}

@media (min-width: 760px) {
  .sheet {
    border-radius: 0;
  }
}

.sheet-close {
  border-radius: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.sheet-grabber {
  background: var(--line);
}

.auth-tabs {
  border-radius: 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.auth-tab {
  border-radius: 0;
  color: var(--muted);
}

.auth-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.demo-tip {
  border-radius: 0;
  background: var(--paper-2);
  border-color: rgba(169, 133, 78, 0.5);
  color: var(--ink-soft);
}

.pw-toggle {
  border-radius: 0;
}

.toast {
  border-radius: 0;
  background: var(--ink);
}

/* 小测 */
.option {
  border-radius: 0;
  border-color: var(--line);
  background: var(--surface);
}

.option.selected {
  border-color: var(--ink);
  background: rgba(23, 23, 15, 0.05);
}

.option-key {
  border-radius: 0;
}

.option.selected .option-key {
  background: var(--ink);
  color: var(--paper);
}

.quiz-progress {
  border-radius: 0;
  background: var(--paper-3);
}

.quiz-progress span {
  border-radius: 0;
  background: var(--cinnabar);
}

.option-key {
  background: var(--paper-2);
  color: var(--muted);
}

.option.selected .option-key {
  background: var(--ink);
  color: var(--paper);
}

.score-ring {
  background: conic-gradient(var(--cinnabar) calc(var(--score) * 1%), var(--paper-3) 0);
}

.score-ring::before {
  background: var(--paper);
}

/* 后台 */
body.admin-mode {
  background: var(--paper-2);
}

body.admin-mode::before {
  display: none;
}

.admin-brand-text b {
  font-family: var(--serif-zh);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.admin-tabs {
  border-radius: 0;
  background: var(--surface);
  border: 1px solid var(--line);
}

.admin-tab {
  border-radius: 0;
}

.admin-tab.active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

.stat-card::after {
  background: var(--paper-2);
}

.stat-value {
  color: var(--ink);
}

.panel {
  background: var(--surface);
}

.table th {
  color: var(--muted);
  border-bottom-color: var(--line);
}

.table td {
  border-bottom-color: var(--line-2);
}

.toggle-pill {
  border-radius: 0;
  border: 1px solid var(--line);
  background: transparent;
}

.toggle-pill.on {
  border-color: rgba(44, 74, 61, 0.35);
  background: transparent;
  color: var(--jade);
}

.admin-cover {
  border: 1px solid var(--line);
  font-family: var(--serif-zh);
}

.row-btn {
  border-radius: 0;
}

.btn-sm {
  border-radius: 0;
}

/* 启动页 */
.boot {
  background: var(--paper-2);
  color: var(--ink);
}

.boot-logo {
  border-radius: 0;
  background: transparent;
  border: 1.5px solid var(--cinnabar);
  color: var(--cinnabar);
  box-shadow: none;
  font-family: var(--serif-zh);
  font-weight: 500;
}

.boot-name {
  font-family: var(--serif-zh);
  font-weight: 500;
  letter-spacing: 0.3em;
}

.boot-line {
  background: var(--line);
}

.boot-line span {
  background: var(--cinnabar);
}

/* ==========================================================================
   电脑版：与 www.liubowen.org 桌面站一致的全宽编辑式布局
   ========================================================================== */

.desktop-nav,
.desktop-footer {
  display: none;
}

@media (min-width: 1024px) {
  body {
    padding: 0;
    background: var(--paper);
  }

  .app {
    width: 100%;
    max-width: 1320px;
    min-height: 100vh;
    margin: 0 auto;
    padding-bottom: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  /* 顶部导航 */
  .topbar {
    height: 84px;
    padding: 0 48px;
    gap: 0;
    background: rgba(244, 239, 227, 0.94);
    border-bottom: 1px solid var(--line);
  }

  .brand {
    gap: 14px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .brand-name {
    font-size: 22px;
    letter-spacing: 0.22em;
  }

  .brand-sub {
    font-size: 9.5px;
    margin-top: 6px;
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: 48px;
  }

  .desktop-nav a {
    position: relative;
    padding: 8px 0;
    color: var(--ink-soft);
    font-size: 12px;
    letter-spacing: 0.1em;
    transition: color 0.25s;
  }

  .desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--cinnabar);
    transition: width 0.3s var(--ease, ease);
  }

  .desktop-nav a:hover,
  .desktop-nav a.active {
    color: var(--ink);
  }

  .desktop-nav a:hover::after,
  .desktop-nav a.active::after {
    width: 100%;
  }

  .topbar-actions {
    margin-left: auto;
    gap: 10px;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .tabbar {
    display: none;
  }

  /* 页面与通用区块 */
  .page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 34px 48px 72px;
  }

  .page-tight {
    padding-top: 26px;
  }

  .section {
    margin-top: 58px;
  }

  .section-head {
    margin-bottom: 24px;
  }

  .section-title {
    font-size: 30px;
    letter-spacing: 0.03em;
  }

  .section-desc {
    font-size: 13px;
  }

  .section-link {
    font-size: 12px;
  }

  /* 首页 Hero */
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    grid-template-areas:
      "kicker art"
      "title art"
      "sub art"
      "actions art"
      "stats stats";
    column-gap: 54px;
    align-items: start;
    min-height: 450px;
    padding: 48px 54px 24px;
  }

  .hero-kicker {
    grid-area: kicker;
    font-size: 10.5px;
    letter-spacing: 0.22em;
  }

  .hero h1 {
    grid-area: title;
    max-width: 680px;
    margin: 18px 0 16px;
    font-size: 56px;
    line-height: 1.12;
    letter-spacing: 0.02em;
  }

  .hero-sub {
    grid-area: sub;
    max-width: 590px;
    font-size: 15px;
    line-height: 1.95;
  }

  .hero-actions {
    grid-area: actions;
    margin-top: 28px;
  }

  .hero-actions .btn {
    padding: 16px 28px;
    font-size: 12px;
  }

  .hero-stats {
    grid-area: stats;
    margin-top: 36px;
    padding-top: 20px;
  }

  .hero-stat b {
    font-size: 26px;
  }

  .hero-stat span {
    font-size: 10px;
  }

  .hero-art {
    grid-area: art;
    position: relative;
    inset: auto;
    width: 100%;
    height: 360px;
  }

  .hero-art .ring-a {
    width: 230px;
    height: 230px;
    right: 10px;
    top: 22px;
  }

  .hero-art .ring-b {
    width: 150px;
    height: 150px;
    right: 50px;
    top: 62px;
  }

  .hero-art .g1 {
    width: 68px;
    height: 68px;
    right: 72px;
    top: 10px;
    font-size: 27px;
  }

  .hero-art .g2 {
    width: 50px;
    height: 50px;
    right: 14px;
    top: 128px;
    font-size: 20px;
  }

  .hero-art .g3 {
    width: 78px;
    height: 78px;
    right: 150px;
    top: 182px;
    font-size: 30px;
  }

  /* 分类、课程、名师 */
  .cat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }

  .cat-card {
    min-height: 128px;
    padding: 18px 16px;
  }

  .cat-icon {
    width: 40px;
    height: 40px;
  }

  .cat-name {
    font-size: 15px;
  }

  .hscroll {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    overflow: visible;
    margin: 0;
    padding: 0;
  }

  .hcard {
    width: auto;
    padding: 9px 9px 14px;
  }

  .hcard .cover {
    height: 160px;
  }

  .hcard-title {
    margin-top: 13px;
    font-size: 15px;
  }

  .hcard-meta {
    font-size: 10.5px;
  }

  .course-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .search-box {
    max-width: 640px;
  }

  .course-row {
    padding: 12px;
  }

  .course-row .cover {
    width: 138px;
    min-height: 100px;
  }

  .course-row-title {
    font-size: 15px;
  }

  .course-row-meta {
    font-size: 10px;
  }

  .teacher-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .teacher-card {
    padding: 16px;
  }

  .continue-card {
    padding: 16px;
  }

  .continue-cover {
    width: 76px;
    height: 76px;
    font-size: 30px;
  }

  .continue-title {
    font-size: 16px;
  }

  /* 页脚 */
  .desktop-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    max-width: 1320px;
    margin: 72px auto 0;
    padding: 30px 48px 34px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
  }

  .desktop-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .desktop-footer-brand b {
    display: block;
    font-family: var(--serif-zh);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.12em;
    color: var(--ink);
  }

  .desktop-footer-brand small {
    display: block;
    margin-top: 3px;
    color: var(--muted-2);
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .desktop-footer nav {
    display: flex;
    gap: 26px;
  }

  .desktop-footer nav a {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .desktop-footer nav a:hover {
    color: var(--cinnabar);
  }

  .desktop-footer p {
    margin: 0;
    color: var(--muted-2);
    font-size: 10px;
  }

  /* 课程详情 */
  .detail-page {
    max-width: 1320px;
    margin: 0 auto;
    padding-bottom: 56px;
  }

  .detail-hero {
    padding: 34px 48px 58px;
  }

  .detail-nav {
    max-width: 1224px;
    margin: 0 auto;
  }

  .detail-hero h1 {
    max-width: 860px;
    margin-top: 20px;
    font-size: 44px;
    line-height: 1.2;
  }

  .detail-sub {
    max-width: 680px;
    font-size: 14px;
  }

  .detail-hero-stats {
    gap: 24px;
    margin-top: 22px;
    font-size: 11px;
  }

  .detail-hero-stats b {
    font-size: 15px;
  }

  .detail-glyph {
    right: 30px;
    bottom: -80px;
    font-size: 260px;
  }

  .detail-sheet {
    margin-top: -24px;
    padding: 28px 48px 24px;
  }

  .price-bar,
  .stat-strip,
  .tabs,
  .detail-tab-panel {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .tabs {
    top: 10px;
  }

  .chapter-card,
  .teacher-box,
  .review-card {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .detail-cta {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: 900px;
    margin: 24px auto 0;
    padding: 20px 0 8px;
    background: transparent;
    border-top: 1px solid var(--line);
  }

  .detail-cta .btn {
    max-width: 380px;
    margin-left: auto;
  }

  /* 课业、个人中心、小测 */
  .summary-card,
  .profile-hero,
  .menu-card,
  .guest-card {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  [data-learning-list] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
  }

  .quiz-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding-top: 20px;
  }

  .navbar {
    max-width: 1320px;
    margin: 0 auto;
    padding: 22px 48px 16px;
  }

  .navbar h1 {
    text-align: left;
    font-size: 22px;
    padding-right: 0;
  }

  .player-page {
    max-width: 1100px;
  }
}

@media (min-width: 1200px) {
  .course-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 首页 Hero 装饰：单枚伯温印章 + 同心圆 */
.hero-art .ring-a {
  width: 206px;
  height: 206px;
  left: 50%;
  top: 50%;
  right: auto;
  transform: translate(-50%, -50%);
}

.hero-art .ring-b {
  width: 132px;
  height: 132px;
  left: 50%;
  top: 50%;
  right: auto;
  transform: translate(-50%, -50%);
}

.hero-seal {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 1px solid var(--cinnabar);
  background: rgba(244, 239, 227, 0.72);
  color: var(--cinnabar);
  font-family: var(--serif-zh);
  font-size: 42px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 0 0 8px rgba(244, 239, 227, 0.35);
}

.hero-art-caption {
  position: absolute;
  right: -2px;
  top: 24px;
  writing-mode: vertical-rl;
  color: var(--muted);
  font-family: var(--serif-zh);
  font-size: 10px;
  letter-spacing: 0.22em;
}

@media (min-width: 1024px) {
  .hero-seal {
    width: 112px;
    height: 112px;
    font-size: 52px;
  }
}

/* 手机版优化：去掉装饰、收紧顶栏和首屏、分类改为 2 列 */
@media (max-width: 1023px) {
  .topbar {
    padding: 14px 16px 10px;
  }

  .brand-name {
    font-size: 17px;
    letter-spacing: 0.16em;
  }

  .topbar-actions {
    gap: 7px;
  }

  .hero-art {
    display: none;
  }

  .hero {
    padding: 22px 18px 14px;
  }

  .hero-kicker {
    font-size: 9.5px;
    letter-spacing: 0.12em;
  }

  .hero h1 {
    max-width: 100%;
    margin: 12px 0 8px;
    font-size: 31px;
    line-height: 1.22;
    letter-spacing: 0.01em;
  }

  .hero-sub {
    max-width: 100%;
    font-size: 11.5px;
    line-height: 1.8;
  }

  .hero-actions {
    gap: 8px;
    margin-top: 16px;
  }

  .hero-actions .btn {
    padding: 11px 16px;
    font-size: 12px;
  }

  .hero-stats {
    margin-top: 16px;
    padding-top: 12px;
  }

  .hero-stat b {
    font-size: 17px;
  }

  .hero-stat span {
    font-size: 9px;
  }

  .section {
    margin-top: 23px;
  }

  .section-head {
    margin-bottom: 12px;
  }

  .section-title {
    font-size: 19px;
    letter-spacing: 0.04em;
  }

  .section-desc {
    font-size: 10.5px;
    margin-top: 3px;
  }

  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .cat-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 1px;
    align-items: center;
    min-height: 0;
    padding: 11px 12px;
  }

  .cat-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .cat-icon {
    grid-row: 1 / 3;
    width: 38px;
    height: 38px;
  }

  .cat-name {
    grid-column: 2;
    align-self: end;
    font-size: 13px;
  }

  .cat-count {
    grid-column: 2;
    align-self: start;
    margin-top: 0;
    font-size: 9px;
  }

  .hscroll {
    gap: 10px;
  }

  .hcard {
    flex-basis: 196px;
  }

  .hcard .cover {
    height: 104px;
  }

  .continue-card {
    padding: 16px;
  }

  .continue-cover {
    width: 76px;
    height: 76px;
  }

  .continue-title {
    font-size: 16px;
  }

  .desktop-footer {
    display: none;
  }
}


/* Unified top-level nav + academy subnav */
.academy-subnav { display: none; }

@media (min-width: 1024px) {
  .topbar { gap: 8px; }
  .desktop-nav { gap: 20px; margin-left: 28px; }
  .desktop-nav a { font-size: 11.5px; letter-spacing: .04em; }
  .academy-subnav {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 48px 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 239, 227, 0.94);
  }
  .academy-subnav a {
    position: relative;
    padding: 7px 0;
    color: var(--muted);
    font-size: 11.5px;
    letter-spacing: .04em;
  }
  .academy-subnav a.active { color: var(--ink); }
  .academy-subnav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--cinnabar);
  }
}

/* mobile: keep the site-wide categories reachable under the app header */
@media (max-width: 1023px) {
  .topbar { flex-wrap: wrap; gap: 8px; }
  .desktop-nav { display: flex; order: 3; width: 100%; gap: 18px; margin: 2px 0 4px; overflow-x: auto; scrollbar-width: none; }
  .desktop-nav::-webkit-scrollbar { display: none; }
  .desktop-nav a { font-size: 11.5px; white-space: nowrap; padding: 4px 0; }
}

@media (min-width: 1024px) and (max-width: 1180px) {
  .desktop-nav { gap: 12px; margin-left: 18px; }
  .desktop-nav a { font-size: 10.5px; letter-spacing: .03em; }
}

@media (max-width: 1023px) {
  .desktop-nav { flex-wrap: wrap; overflow: visible; gap: 8px 16px; }
}
